action #15436

AppStream metadata for OBS projects

Added by dimstar over 6 years ago. Updated over 5 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


AppStream is not as simple as it's often presented - and our tools get it wrong in so many ways
(Note: the distributions are fine: they make use of appstream-builder - being the upstream reference tool, it does get the job done right)

For the distro(s), we run appstream-builder as part of the media production task (from within kiwi) - this has worked reliable for a while (and the number of applications is increasing)

Now we need to get a handle on the 3rd-party Repos (any repository inside OBS, incl the :Update ones!) to get this right too (if not, mail threads like are the result)

The current tools in place are:

  • brp-extract-appdata
  • code in OBS publisher

Basic Info: An application provides an appdata file .appdata.xml (appdata is a subset of AppStream); all applications together are bundled in an AppStream (.appdata.xml.gz)

Difficulties to take into account:

  • There are *.appdata and *.mimeinfo files, located in /usr/share/appdata and /usr/share/metainfo; (/usr/share/appdata is the old location, slowly moving to /usr/share/metainfo. BOTH file extensions are valid in both locations. Don't get confused
  • The format evolved. Originally, this was 'only' for applications, so the tags used in the Appdata files were [...]; this changed to [...]. One AppData file can be either format. The resulting AppStream must be (when using AppStream format version 0.6+). So the tool has to take input in one format, output it in another
  • An AppData file mandatory references a .desktop file (application ID) when it's a component type=desktop; other component types don't have this.
    • In this case, the NAME of the application is not mandatory to be present on the AppData file, but is supposed to be taken from the .desktop file (and merged into the AppStream) - incl. Translations
  • And AppStream file (*.appdata.xml.gz) is accompanied by a tarball with the icons for the apps (icons.tar.gz); brp-extract-appdata embeds the icon into the AppData file - OBS spublisher splits it out again

the 'easiest' solution would be to run as-builder as part of the obs publisher task (just like createrepo), but that is not acceptable to the OBS Admins (too many deps, 'intransparent code') - so the solution based on the current perl scripts probably needs to be spun further

It's certainly a good idea to draft out the details together with the OBS team to get this right (and future proof, being able to follow upstrams changes of the AppStream format)


#1 Updated by lnussel over 5 years ago

  • Subject changed from AppSteram metadata for OBS projects to AppStream metadata for OBS projects

Also available in: Atom PDF