Automatically update appstream-data #507

Open
opened 2026-03-27 13:54:27 +00:00 by asciiwolf · 19 comments

The appstream-data package is an imporant part of the Fedora Workstation experience because it contains all the AppStream metadata used by modern software store GUIs such as GNOME Software or KDE Discover.

As such, it needs to be updated regularly - before the new Fedora version release and during its lifetime. However, this has to be done manually and currently depends on one person - Richard Hughes.

If there is no update done in time (for example, before the new Fedora release), it often results in applications being missing or having outdated metadata.

It would be great if there was a way to re-generate the appstream-data package automatically.

/cc @rhughes

The appstream-data package is an imporant part of the Fedora Workstation experience because it contains all the AppStream metadata used by modern software store GUIs such as GNOME Software or KDE Discover. As such, it needs to be updated regularly - before the new Fedora version release and during its lifetime. However, this has to be done manually and currently depends on one person - Richard Hughes. If there is no update done in time (for example, before the new Fedora release), it often results in applications being missing or having outdated metadata. It would be **great** if there was a way to re-generate the appstream-data package automatically. /cc @rhughes
Owner

We discussed today and agreed it would be nice to automate.

Action: Matthias to talk to Kevin Fenzi to see whether he has suggestions.

We discussed today and agreed it would be nice to automate. Action: Matthias to talk to Kevin Fenzi to see whether he has suggestions.
Author

This is still a problem. For example, appstream-data in Fedora 44 (and the current Rawhide) were last updated in March. It definitely needs some automation.

This is still a problem. For example, appstream-data in Fedora 44 (and the current Rawhide) were last [updated in March](https://bugzilla.redhat.com/show_bug.cgi?id=2510685). It definitely needs some automation.
ngompa self-assigned this 2026-08-25 14:19:06 +00:00
Author
https://forge.fedoraproject.org/quality/blocker-review/issues/2179
Owner

Action: Matthias to talk to Kevin Fenzi to see whether he has suggestions.

Any updates?

> Action: Matthias to talk to Kevin Fenzi to see whether he has suggestions. Any updates?
Author

As Kamil pointed out here, the release blocker criteria for Fedora could also be changed to require sufficiently up-to-date appstream-data before Final (or Beta). They already require up-to-date release notes, release and repos metadata etc.

As Kamil pointed out [here](https://forge.fedoraproject.org/quality/blocker-review/issues/2179#issuecomment-1357524), the release blocker criteria for Fedora could also be changed to require sufficiently up-to-date appstream-data before Final (or Beta). They already require up-to-date release notes, release and repos metadata etc.
Owner

I think we should update appstream-data every week, as the package description says:

This package provides the distribution specific AppStream metadata required
for the GNOME and KDE software centers. The appstream data is built weekly with
/usr/bin/appstream-builder, combining the data from RPM packages in official
repositories and the extra data in fedora-appstream.

If nobody is willing to take responsibility for appstream-data, which seems likely given how long this has been a problem, then the natural consequence is we should give up on having a graphical software center. That would be a real shame, but it seems like the next step here.

I think we should update appstream-data every week, as the package description says: > This package provides the distribution specific AppStream metadata required for the GNOME and KDE software centers. The appstream data is built weekly with /usr/bin/appstream-builder, combining the data from RPM packages in official repositories and the extra data in fedora-appstream. If nobody is willing to take responsibility for appstream-data, which seems likely given how long this has been a problem, then the natural consequence is we should give up on having a graphical software center. That would be a real shame, but it seems like the next step here.
Owner

I agree that automating the updates would be a good win and certainly WS should strive to update before each release.
Nevertheless for most apps is the impact really so high? Sure it is not ideal that the data is out of date of course,
but talk of removing software center because of this feels a bit dramatic to me.

I think a good action would be to add the updating of the package to our WS release checklist, so that we can track it.
Is the data update process documented somewhere? Perhaps I could try to help.

I agree that automating the updates would be a good win and certainly WS should strive to update before each release. Nevertheless for most apps is the impact really so high? Sure it is not ideal that the data is out of date of course, but talk of removing software center because of this feels a bit dramatic to me. I think a good action would be to add the updating of the package to our WS release checklist, so that we can track it. Is the data update process documented somewhere? Perhaps I could try to help.
Author

Nevertheless for most apps is the impact really so high?

Well, it can have a direct impact on the whole end-user experience:

quality/blocker-review#2179 (comment)

> Nevertheless for most apps is the impact really so high? Well, it can have a direct impact on the whole end-user experience: https://forge.fedoraproject.org/quality/blocker-review/issues/2179#issuecomment-1357495
Owner

Is the data update process documented somewhere? Perhaps I could try to help.

Please talk to Richard Hughes. He would know.

> Is the data update process documented somewhere? Perhaps I could try to help. Please talk to Richard Hughes. He would know.
Owner

@catanzaro wrote in #507 (comment):

Is the data update process documented somewhere? Perhaps I could try to help.
Please talk to Richard Hughes. He would know.

Okay thanks - will do: give me a little time - will try to start looking at it next week at least.

@catanzaro wrote in https://forge.fedoraproject.org/workstation/tickets/issues/507#issuecomment-1359935: > > Is the data update process documented somewhere? Perhaps I could try to help. > Please talk to Richard Hughes. He would know. Okay thanks - will do: give me a little time - will try to start looking at it next week at least.
Owner

I talked a little to Richard and he told me that David Jasa is currently working on update(s).
Though the path to automation isn't much clearer to me.

I talked a little to Richard and he told me that David Jasa is currently working on update(s). Though the path to automation isn't much clearer to me.

Hello, I'm working on this. Roughly, the manual steps as of now are:

  1. download Richard's scripts
  2. tweak them for new Fedora version
  3. mirror the current tree
  4. run the script
    a. if needed upload manually (and get permissions for that)
  5. check changes if they look reasonable

I'm now automating 2 and 3 into 4, 4a needs a note of what access the packagers needs for upload and 5 needs a bit more thinking and maybe needs to remain manual. For example asking LLM to break down 44→45 changes to renames vs. actual modifications produced this stat:

Summary:

  • 72 removals, 229 additions (301 total changes)
  • ~14 confirmed renames (.desktop format changes, old app IDs → new format)
  • ~2 font version bumps (fontawesome v6 → v7, which paired with additions)
  • ~56 actual app removals (including 18 Elementary desktop apps that don't have direct GNOME replacements)
  • ~213 actual new additions (the bulk of the 229 added are genuinely new apps)

So roughly 15-20% name/format changes, 80-85% actual new/removed apps. The metadata has substantially changed with many apps removed and many more (2–3×) new ones added.

Hello, I'm working on this. Roughly, the manual steps as of now are: 1. download [Richard's scripts](https://github.com/hughsie/appstream-scripts/) 1. tweak them for new Fedora version 1. mirror the current tree 1. run the script a. if needed upload manually (and get permissions for that) 1. check changes if they look reasonable I'm now automating 2 and 3 into 4, 4a needs a note of what access the packagers needs for upload and 5 needs a bit more thinking and maybe needs to remain manual. For example asking LLM to break down 44→45 changes to renames vs. actual modifications produced this stat: > Summary: > > - 72 removals, 229 additions (301 total changes) > - ~14 confirmed renames (.desktop format changes, old app IDs → new format) > - ~2 font version bumps (fontawesome v6 → v7, which paired with additions) > - ~56 actual app removals (including 18 Elementary desktop apps that don't have direct GNOME replacements) > - ~213 actual new additions (the bulk of the 229 added are genuinely new apps) > > So roughly 15-20% name/format changes, 80-85% actual new/removed apps. The metadata has substantially changed with many apps removed and many more (2–3×) new ones added.

The appstream-data is aging, it should be replaced by the AppStream data provided directly by the repos. If I'm not mistaken, Debian already does that (or some other distro), thus it's doable even with a large set of packages. The new AppStream libraries/tools allow merging data, not build them from scratch every time, thus updating a repo might be a cheap thing on the CPU, though harder on the disk. The obvious advantage: you do not need to care, any time the .repo content updates it updates also the AppStream data. Not once per week, neither once somebody recalls and finds time to do it, it'll do it literally every time the repository changes.

It needs some testing, profiling, and so on, but with the bug #2325398 fixed, it should be relatively easy to set up. The NVIDIA repo uses that, but it has only few packages, definitely less in compare to the thousands the Fedora has.

PackageKit downloads this AppStream data, the same as dnf5 (with the appstream data plugin), and gnome-software can read those as well, the same as KDE Discover (I did not test the later, but as the files are in a well known path it should just work, and considering some repos use it the folks won't be able to search for the apps from there otherwise).

The appstream-data is aging, it should be replaced by the AppStream data provided directly by the repos. If I'm not mistaken, Debian already does that (or some other distro), thus it's doable even with a large set of packages. The new AppStream libraries/tools allow merging data, not build them from scratch every time, thus updating a repo might be a cheap thing on the CPU, though harder on the disk. The obvious advantage: you do not need to care, any time the .repo content updates it updates also the AppStream data. Not once per week, neither once somebody recalls and finds time to do it, it'll do it literally every time the repository changes. It needs some testing, profiling, and so on, but with the [bug #2325398](https://bugzilla.redhat.com/show_bug.cgi?id=2325398) fixed, it should be relatively easy to set up. The NVIDIA repo uses that, but it has only few packages, definitely less in compare to the thousands the Fedora has. PackageKit downloads this AppStream data, the same as dnf5 (with the appstream data plugin), and gnome-software can read those as well, the same as KDE Discover (I did not test the later, but as the files are in a well known path it should just work, and considering some repos use it the folks won't be able to search for the apps from there otherwise).

So the rough issues with automating the building fully that I see are:

  • the builder machine needs to have hundreds of GB of space (appstream-builder needs to work on top of full repo mirror)
  • the builder needs to be able to upload screenshots to fedora infra (I guess doable via some credentials passing?)
  • we upload tons of data to a public webserver. If we do it regularly, it's going to be an attractive target for someone to distribute malicious stuff. Should we do some security scans of screenshots then?
  • there are loads of errors in the data, majority of which are from the packages from my looks there, is it possible to tighten the policy so these get caught by individual packagers?
    $ appstream-util validate /usr/share/swcatalog/xml/fedora.xml.gz > validate.log
    $ grep "^• " validate.log | wc -l
    30655
    $ for REASON in $(sed -n 's/^•[[:space:]]\+\([^[:space:]]\+\).*/\1/ p' < validate.log | sort | uniq); do echo -n "${REASON}: "; grep "^• ${REASON}" validate.log | wc -l; done
    attribute-invalid: 12075
    duplicate-data: 206
    file-invalid: 316
    style-invalid: 17427
    tag-invalid: 195
    tag-missing: 434
    url-not-found: 2
    

@mcrha,

The new AppStream libraries/tools allow merging data, not build them from scratch every time, thus updating a repo might be a cheap thing on the CPU, though harder on the disk.

The CPU doesn't seem to be a big issue to me, regenerating the stuff on a laptop is in matter of minutes. The support of merging of build data could ease the disk requirements on its own, it's possible then to get just package URLs from dnf reposync --urls and do downloads and metadata building in chunks.

So the rough issues with automating the building fully that I see are: * the builder machine needs to have hundreds of GB of space (appstream-builder needs to work on top of full repo mirror) * the builder needs to be able to upload screenshots to fedora infra (I guess doable via some credentials passing?) * we upload tons of data to a public webserver. If we do it regularly, it's going to be an attractive target for someone to distribute malicious stuff. Should we do some security scans of screenshots then? * there are loads of errors in the data, majority of which are from the packages from my looks there, is it possible to tighten the policy so these get caught by individual packagers? ``` $ appstream-util validate /usr/share/swcatalog/xml/fedora.xml.gz > validate.log $ grep "^• " validate.log | wc -l 30655 $ for REASON in $(sed -n 's/^•[[:space:]]\+\([^[:space:]]\+\).*/\1/ p' < validate.log | sort | uniq); do echo -n "${REASON}: "; grep "^• ${REASON}" validate.log | wc -l; done attribute-invalid: 12075 duplicate-data: 206 file-invalid: 316 style-invalid: 17427 tag-invalid: 195 tag-missing: 434 url-not-found: 2 ``` @mcrha, > The new AppStream libraries/tools allow merging data, not build them from scratch every time, thus updating a repo might be a cheap thing on the CPU, though harder on the disk. The CPU doesn't seem to be a big issue to me, regenerating the stuff on a laptop is in matter of minutes. The support of merging of build data could ease the disk requirements on its own, it's possible then to get just package URLs from `dnf reposync --urls` and do downloads and metadata building in chunks.

If I'm not mistaken, Debian already does that (or some other distro),

Yeah, Debian does automated builds using appstream-generator and they have a clickable dashboard where one can see stats over time and click through releases to see what issues there are in the data.

> If I'm not mistaken, Debian already does that (or some other distro), Yeah, Debian does automated builds using [appstream-generator](https://github.com/ximion/appstream-generator) and they have a clickable [dashboard](https://appstream.debian.org/) where one can see stats over time and click through releases to see what issues there are in the data.
Author

The problem with Debian's appstream-generator is that it also generates AppStream metadata from packages without AppStream appdata/metainfo files. This can be useful to make many apps that lack AppStream metadata available in GUI software stores, but it creates a lot of mess and broken results. But maybe this can be turned off in the appstream-generator configuration, I haven't checked...

The problem with Debian's appstream-generator is that it also generates AppStream metadata from packages without AppStream appdata/metainfo files. This can be useful to make many apps that lack AppStream metadata available in GUI software stores, but it creates a lot of mess and broken results. But maybe this can be turned off in the appstream-generator configuration, I haven't checked...
Author

@djasa wrote in #507 (comment):

  $ appstream-util validate /usr/share/swcatalog/xml/fedora.xml.gz > validate.log

I might be wrong, but isn't appstream-util deprecated (not supporting newer AppStream versions) and appstreamcli is used instead these days?

@djasa wrote in https://forge.fedoraproject.org/workstation/tickets/issues/507#issuecomment-1366737: > $ appstream-util validate /usr/share/swcatalog/xml/fedora.xml.gz > validate.log I might be wrong, but isn't _appstream-util_ deprecated (not supporting newer AppStream versions) and _appstreamcli_ is used instead these days?
Owner

Ideally yes, appstream-util should definitely not be used anymore. Nevertheless, Fedora packages are required to use appstream-util for metadata validation because appstream-util is what Fedora uses to build the metadata. Now is the time to fix that.

Ideally yes, appstream-util should definitely not be used anymore. Nevertheless, Fedora packages are required to use appstream-util for metadata validation because appstream-util is what Fedora uses to build the metadata. Now is the time to fix that.

From my understanding the createrepo has all the packages which are part of the repository, it cannot have half of it on one machine and another half on another machine. If that's so, you do not need additional hundreds of gigabytes, not more than what you have already. The appstream-generator is supposed to extract AppStream data from one package after another, not all of the packages. It's also supposed to merge the data, not to regenerate everything from scratch. Nonetheless, it's only my understanding, I can be wrong in any or all of that.

Fedora has the list of the failures too, but it's rather hidden, I do not know whether anybody is aware of it:
https://dl.fedoraproject.org/pub/alt/screenshots/f44/failed.html

One old asgen-config.json file I found from the times when I've been helping with the NVIDIA repository contained the following. Take it as an example, if you are looking for any such thing:

{
  "ProjectName": "test",
  "ArchiveRoot": "/tmp/appstrm/",
  "MediaBaseUrl": "http://metadata.tanglu.org/appstream/media",
  "HtmlBaseUrl": "http://metadata.tanglu.org/appstream/",
  "Backend": "rpmmd",
  "Features": {
    "processDesktop": true
  },
  "Suites": {
    "main-pkgs": {
      "sections": ["pkgs"],
      "architectures": ["x86_64"]
    },
  },
  "Icons": {
    "64x64":   {"cached": true, "remote": false},
    "128x128": {"cached": false, "remote": true}
  }
}
From my understanding the `createrepo` has all the packages which are part of the repository, it cannot have half of it on one machine and another half on another machine. If that's so, you do not need additional hundreds of gigabytes, not more than what you have already. The appstream-generator is supposed to extract AppStream data from one package after another, not all of the packages. It's also supposed to merge the data, not to regenerate everything from scratch. Nonetheless, it's only my understanding, I can be wrong in any or all of that. Fedora has the list of the failures too, but it's rather hidden, I do not know whether anybody is aware of it: https://dl.fedoraproject.org/pub/alt/screenshots/f44/failed.html One old `asgen-config.json` file I found from the times when I've been helping with the NVIDIA repository contained the following. Take it as an example, if you are looking for any such thing: ```json { "ProjectName": "test", "ArchiveRoot": "/tmp/appstrm/", "MediaBaseUrl": "http://metadata.tanglu.org/appstream/media", "HtmlBaseUrl": "http://metadata.tanglu.org/appstream/", "Backend": "rpmmd", "Features": { "processDesktop": true }, "Suites": { "main-pkgs": { "sections": ["pkgs"], "architectures": ["x86_64"] }, }, "Icons": { "64x64": {"cached": true, "remote": false}, "128x128": {"cached": false, "remote": true} } } ```
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
workstation/tickets#507
No description provided.