Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1810509 - Audacity AppStream metadata are missing in fedora.xml.gz
Summary: Audacity AppStream metadata are missing in fedora.xml.gz
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: audacity
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ian McInerney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1846764 (view as bug list)
Depends On:
Blocks: 1848463
TreeView+ depends on / blocked
 
Reported: 2020-03-05 12:06 UTC by AsciiWolf
Modified: 2020-08-07 20:06 UTC (History)
10 users (show)

Fixed In Version: audacity-2.3.3-6.fc32 audacity-2.3.3-3.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-18 13:27:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
With FC31 and Software: 3.34.2, seems to be ok for me (19.49 KB, image/png)
2020-04-07 12:26 UTC, David Timms
no flags Details
detail view: registry.fedoraproject.org (196.77 KB, image/png)
2020-04-07 12:27 UTC, David Timms
no flags Details
Log of appstream-builder command on audacity rpm (7.27 KB, text/plain)
2020-08-06 06:38 UTC, Federico Bruni
no flags Details

Description AsciiWolf 2020-03-05 12:06:19 UTC
Description of problem:
Audacity seems to have something wrong in its AppData file. The Fedora package version of Audacity is not displayed in GNOME Software at all. The Flathub and Fedora Flatpak sources of Audacity are displayed without any issue.

Version-Release number of selected component (if applicable):
audacity-2.3.3-1.fc31.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1. Open the "Software" application.
2. Try searching for "Audacity".
3. Click the result and see if there is a fedoraproject.org RPM source displayed in the drop-down Source list in window header.

Actual results:
The RPM fedoraproject.org source is not displayed.

Expected results:
The RPM fedoraproject.org source is displayed.

Additional info:
You can try replacing the AppData file in Fedora with upstream version: https://github.com/audacity/audacity/blob/master/help/audacity.appdata.xml

There were also some GNOME Software related issues with Audacity and other packages, but they are already fixed, see: https://gitlab.gnome.org/GNOME/gnome-software/issues/699

Comment 1 AsciiWolf 2020-03-05 14:32:35 UTC
Same issue on latest Fedora 32 with audacity-2.3.3-1.fc32.x86_64.

Comment 2 David Timms 2020-04-07 12:26:43 UTC
Created attachment 1676915 [details]
With FC31 and Software: 3.34.2, seems to be ok for me

Comment 3 David Timms 2020-04-07 12:27:39 UTC
Created attachment 1676916 [details]
detail view: registry.fedoraproject.org

Comment 4 Daniel Rusek 2020-04-07 13:02:20 UTC
It is not. The registry.fedoraproject.org is a Fedora Flatpak source, not a RPM one. The RPM source is still missing.

Comment 5 Daniel Rusek 2020-04-07 13:06:20 UTC
Anyway, it seems that the AppStream metadata for Audacity are missing in /usr/share/app-info/xmls/fedora.xml.gz.

Switching to appstream-data.

Comment 6 David Timms 2020-04-07 14:01:13 UTC
I also got a FC32/rawhide vm going and tried there. I get the same search results as the previous screenshots.

When I tried to [install] from "software", it doesn't; sitting there for 10-15 minutes and failing is perhaps the nature of the Software App, not Audacity package itself ?
Although, with "only 0.94GB free", perhaps it can't find enough space to fit  audacity which is:
Total download size: 6.9 M
Installed size: 28 M
So, yeah maybe something not going well with "software" - dnf install downloads in 10 seconds, and install scriptlets took many minutes (not normally the case). Bed time - I'm nuking it before ot finishes.

Comment 7 Daniel Rusek 2020-04-07 14:10:09 UTC
Yeah, this is because you was installing the Fedora Flatpak version, not the RPM one.

Comment 8 Daniel Rusek 2020-04-30 12:56:14 UTC
Audacity is displayed on the Installed tab of GNOME Software on F32 if it is already installed using dnf, but it has empty icon and unknown source/version. Metadata for Audacity are is still missing in /usr/share/app-info/xmls/fedora.xml.gz.

Comment 9 Federico Bruni 2020-05-23 21:21:09 UTC
I see that Audacity appdata file was introduced years ago.
Perhaps it's not up-to-date to the AppStream spec and appstream-compose fails because it doesn't pass validation?

In that case it would be an upstream bug?

I see two errors using two different validators.

1. appstreamcli complains about the missing type property in <launchable>:

$ appstreamcli validate /usr/share/appdata/audacity.appdata.xml
E: org.audacityteam.Audacity:29: launchable-unknown-type
E: org.audacityteam.Audacity:29: type-property-required launchable (audacity.desktop)


2. appstream-util complains only about a missing content rating

$ appstream-util validate /usr/share/appdata/audacity.appdata.xml
/usr/share/appdata/audacity.appdata.xml: FAILED:
• tag-missing           : <content_rating> required [use https://odrs.gnome.org/oars]

Comment 10 AsciiWolf 2020-05-31 12:44:35 UTC
I don't think this is an upstream bug. The Fedora Flatpak version of Audacity does not have any issues with its AppData. I think that there were some issues with the upstream AppData year or two ago, but they were already fixed some time ago, at least as far as I know.

Comment 11 AsciiWolf 2020-05-31 12:48:08 UTC
Maybe Audacity was somehow blacklisted in the appstream-data generator when it had these issues and was still not removed from such blacklist? Anyway, this is just my assumption, I don't know any technical details regarding the appstream-data generation process.

Comment 12 Daniel Rusek 2020-06-06 12:16:44 UTC
Yep, the Audacity AppStream metadata file seems to be correct. As far as I know, OARS metadata are not required, at least in Fedora.

$ appstream-util validate /usr/share/appdata/audacity.appdata.xml
/usr/share/appdata/audacity.appdata.xml: FAILED:
• tag-missing           : <content_rating> required [use https://odrs.gnome.org/oars]
Validation of files failed

$ appstream-util validate-relax /usr/share/appdata/audacity.appdata.xml
/usr/share/appdata/audacity.appdata.xml: OK

Comment 13 Ian McInerney 2020-06-13 23:57:44 UTC
I did some digging into this tonight, and a small change in Audacity's appdata.xml file can fix this I believe.

The log of a run of the appstream-builder utility shows the following:
    (appstream-builder:313832): Asb-DEBUG: 23:52:32.120: WARNING: Ignoring: a desktop file is required for org.audacityteam.Audacity
and
    <vetos>
      <veto>Has no Icon</veto>
    </vetos>
for the Audacity RPM.

So apparently it wasn't finding the desktop file. After some experimenting, this looks to be caused by the <launchable> line having an incorrect type. The version packaged from upstream has:
  <launchable type="desktop">audacity.desktop</launchable>
whereas changing it to
  <launchable type="desktop-id">audacity.desktop</launchable>
makes the warning about no desktop file go away. So apparently appstream-builder requires the tag to be "desktop-id" specifically, but the validation programs don't flag that the "desktop" tag is incorrect (I looked at the spec - https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-launchable - and it lists "desktop-id" but not "desktop", so I think "desktop-id" is the standard form, but this says the spec was most recently updated in May of this year).

So it looks like Audacity should be using the "desktop-id" type in its appdata file instead of "desktop" and appstream-util-validate is failing to recognize that "desktop" is an invalid type when it is used - with any of the validate options - so there is a bug in both those packages.

I will move this back to the Audacity component and take it.


@rhughes: Which releases should this be fixed in? I will definitely fix it in Rawhide, but is it worth backporting the fix to f31/32 and EPEL7/8, or are no new runs of the appstream-builder going to be done for those branches now that they are released?

Comment 14 Daniel Rusek 2020-06-14 12:40:34 UTC
There is a two years old upstream Pull Request that fixes this: https://github.com/audacity/audacity/pull/324

Unfortunately, it was still not merged.

Comment 15 Ian McInerney 2020-06-15 00:01:00 UTC
Upstream has now merged that PR into master (I also emailed their devel list asking for someone to look at it earlier today, and they didn't respond with any issues before merging), so this will be fixed in the next upstream release 2.4.2 (currently scheduled for the end of June apparently). That just leaves the question of if I need to backport this to F31/32 (if the appstream data will be regenerated for those releases).

Comment 16 Kalev Lember 2020-06-15 06:40:35 UTC
Nice, thanks for tracking this down! Please backport to F32 and F31 as well. There's definitely going to be appstream-data updates there (but I can't promise the schedule as it's only hughsie that can regenerate the data).

Comment 17 Ian McInerney 2020-06-15 10:40:27 UTC
*** Bug 1846764 has been marked as a duplicate of this bug. ***

Comment 18 Fedora Update System 2020-06-15 11:16:25 UTC
FEDORA-2020-7063229f08 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-7063229f08

Comment 19 Fedora Update System 2020-06-15 11:16:54 UTC
FEDORA-2020-8fb64af012 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-8fb64af012

Comment 20 Fedora Update System 2020-06-16 01:29:09 UTC
audacity-2.3.3-6.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-7063229f08

Comment 21 Fedora Update System 2020-06-17 19:23:42 UTC
FEDORA-2020-8fb64af012 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-8fb64af012`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-8fb64af012

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Daniel Rusek 2020-06-18 12:00:19 UTC
The update is now in stable F32, thanks! Audacity is however still not displayed in GNOME Software, but I think that this is because it needs the appstream-data to be updated as well. Adding Kalev Lember to needinfo.

Comment 23 Daniel Rusek 2020-06-18 12:02:06 UTC
Oops, sorry, I have overlooked the "There's definitely going to be appstream-data updates there" part in #c16. :)

Comment 24 Ian McInerney 2020-06-18 12:17:13 UTC
Yes, the appstream update still has to happen. My plan is to open bugs against the appstream-data component when the Audacity updates reach stable as a reminder in that component to do the update.

Comment 25 Fedora Update System 2020-06-18 13:27:42 UTC
FEDORA-2020-7063229f08 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2020-06-25 01:09:45 UTC
FEDORA-2020-8fb64af012 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 27 Daniel Rusek 2020-07-30 12:44:38 UTC
There is now a new appstream-data build available for F32 (https://koji.fedoraproject.org/koji/buildinfo?buildID=1554585), however Audacity still seems to be missing.

$ rpm -q appstream-data
appstream-data-32-7.fc32.noarch

$ zcat fedora.xml.gz | grep Audacity
$ 

Audacity is also still missing in GNOME Software (except the Fedora Flatpak version).

Richard, do you have any idea what could be wrong? The AppData file should be fine now.

Comment 28 Ian McInerney 2020-07-30 13:08:55 UTC
Can you try generating it with the logfile being saved (--logdir=logdir/). Then there should be a logdir/a/audacity.log file that gives information about how it was parsed. Specifically, there will be lines inside a <veto> block that tells why appstream didn't accept it.

Comment 29 Daniel Rusek 2020-08-03 19:37:00 UTC
What command should I use? The appstream-compose one does not seem to understand --logdir switch. However, when I tried running appstream-compose on manually extracted content of the audacity-2.3.3-6.fc32.x86_64.rpm package, everything was fine:

$ appstream-compose --prefix audacity_files/usr/ audacity
WARNING: Metadata origin not set, using 'example'
Processing application audacity
Saving icon audacity_files/usr/share/app-info/icons/64x64/audacity.png
Saving icon audacity_files/usr/share/app-info/icons/128x128/audacity.png
Saving AppStream /home/drusek/Downloads/audacity_files/usr/share/app-info/xmls/example.xml.gz
Done!

$ zcat audacity_files/usr/share/app-info/xmls/example.xml.gz|head
<?xml version="1.0" encoding="UTF-8"?>
<components origin="example" version="0.8">
  <component type="desktop">
    <id>org.audacityteam.Audacity</id>
    <name>Audacity</name>
    <summary>Record and edit audio files</summary>
    <description><p>Audacity® is a free, easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. The interface is translated into many languages.</p><p>You can use Audacity to:</p><ul><li>Record live audio</li><li>Convert tapes and records into digital recordings or CDs</li><li>Edit WAV, AIFF, FLAC, MP2, MP3 or Ogg Vorbis sound files</li><li>Cut, copy, splice or mix sounds together</li><li>Change the speed or pitch of a recording</li><li>Apply a wide range of other effects to audio recordings</li></ul></description>
    <icon type="cached" height="64" width="64">audacity.png</icon>
    <icon type="cached" height="128" width="128">audacity.png</icon>
    <categories>

Comment 30 Federico Bruni 2020-08-06 05:24:05 UTC
Which id is appstream-compose using for Audacity?
AppData file is called audacity.appdata.xml, but its id is org.audacityteam.Audacity

I guess the only way to understand is building the appstream-data rpm?

$ sudo appstream-compose --verbose --origin=audacity org.audacityteam.Audacity
Processing application org.audacityteam.Audacity
Error loading AppData file: no file found for org.audacityteam.Audacity

$ sudo appstream-compose --verbose --origin=audacity audacity
Processing application audacity
(appstream-compose:6705): As-DEBUG: 07:18:43.239: looking for appdata path '/usr/share/appdata/audacity.appdata.xml'
(appstream-compose:6705): GLib-GIO-DEBUG: 07:18:43.245: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(appstream-compose:6705): dconf-DEBUG: 07:18:43.245: watch_fast: "/system/proxy/" (establishing: 0, active: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: watch_fast: "/system/proxy/http/" (establishing: 0, active: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: watch_fast: "/system/proxy/https/" (establishing: 0, active: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: watch_fast: "/system/proxy/ftp/" (establishing: 0, active: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: watch_fast: "/system/proxy/socks/" (establishing: 0, active: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: unwatch_fast: "/system/proxy/" (active: 0, establishing: 1)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: unwatch_fast: "/system/proxy/http/" (active: 0, establishing: 1)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.246: unwatch_fast: "/system/proxy/https/" (active: 0, establishing: 1)
(appstream-compose:6705): GLib-DEBUG: 07:18:43.246: posix_spawn avoided (fd close requested) 
(appstream-compose:6705): dconf-DEBUG: 07:18:43.247: unwatch_fast: "/system/proxy/ftp/" (active: 0, establishing: 1)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.247: unwatch_fast: "/system/proxy/socks/" (active: 0, establishing: 1)
(appstream-compose:6705): GLib-GIO-DEBUG: 07:18:43.251: _g_io_module_get_default: Found default implementation libproxy (GLibproxyResolver) for ‘gio-proxy-resolver’
(appstream-compose:6705): dconf-DEBUG: 07:18:43.256: watch_established: "/system/proxy/" (establishing: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.257: watch_established: "/system/proxy/http/" (establishing: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.257: watch_established: "/system/proxy/https/" (establishing: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.258: watch_established: "/system/proxy/ftp/" (establishing: 0)
(appstream-compose:6705): dconf-DEBUG: 07:18:43.258: watch_established: "/system/proxy/socks/" (establishing: 0)
(appstream-compose:6705): As-DEBUG: 07:18:43.310: looking for desktop path '/usr/share/applications/audacity.desktop'
Saving icon /usr/share/app-info/icons/audacity/64x64/audacity.png
(appstream-compose:6705): As-DEBUG: 07:18:43.327: trying to load /usr/share/icons/hicolor/scalable/apps/audacity.svg
Saving icon /usr/share/app-info/icons/audacity/128x128/audacity.png
(appstream-compose:6705): As-DEBUG: 07:18:43.356: fixing up ID for desktop merge
(appstream-compose:6705): As-DEBUG: 07:18:43.356: merging duplicate desktop:appdata entries: */*/*/desktop/org.audacityteam.Audacity/*:*/*/*/desktop/org.audacityteam.Audacity/*
(appstream-compose:6705): GLib-GIO-DEBUG: 07:18:43.357: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Saving AppStream /usr/share/app-info/xmls/audacity.xml.gz
Done!

Comment 31 Federico Bruni 2020-08-06 06:14:21 UTC
Daniel, the --log-dir is a flag of appstream-builder (not appstream-compose).

Comment 32 Federico Bruni 2020-08-06 06:37:55 UTC
I've tried the following:

mkdir ~/audacity
cd audacity
wget https://kojipkgs.fedoraproject.org//packages/audacity/2.3.3/6.fc32/x86_64/audacity-2.3.3-6.fc32.x86_64.rpm
mkdir /tmp/logs

appstream-builder --verbose --log-dir=/tmp/logs --packages-dir=/home/fede/audacity --basename="audacity"

It works correctly.

Comment 33 Federico Bruni 2020-08-06 06:38:57 UTC
Created attachment 1710605 [details]
Log of appstream-builder command on audacity rpm

Comment 34 Daniel Rusek 2020-08-06 11:30:40 UTC
Federico, I have also noticed that the app id and appdata/desktop file names are different, but I think that this should not be an issue as long as the correct desktop file name is mentioned in the appdata file.

Comment 35 Ian McInerney 2020-08-06 11:48:24 UTC
The difference in appdata and desktop file naming shouldn't be an issue anymore, but that was the problem originally. The <launchable type="desktop-id">audacity.desktop</launchable> tag tells it to look for a desktop file called "audacity.desktop. If that tag isn't there, then it looks for a desktop file called org.audacity.Audacity.desktop (I think).

That log file seems to look fine, no <vetos> are present. When running it, I don't even need to specify the basename and it works:

appstream-builder --output-dir=metadata/ --temp-dir=tmp/ --packages-dir=appstream-test/ --log-dir=log/


Has the actual appdata XML been updated yet? When I look at the RPM spec file, it looks like it just pulls in the built appdata from a source file and doesn't build it itself (see the spec: https://src.fedoraproject.org/rpms/appstream-data/blob/master/f/appstream-data.spec). It may be that the new F33 RPM from the mass rebuild is still using the old appdata from before I fixed Audacity.

Comment 36 Daniel Rusek 2020-08-06 11:52:45 UTC
Yeah, F33 still has the old appdata build from before you fixed Audacity. However, the latest F32 build should be new. But I am not sure, this is rather a question for Richard. :)

Comment 37 Richard Hughes 2020-08-06 13:53:31 UTC
I wasn't including f32-updates. I've fixed up the tools and an downloading all the packages now. New metadata expected tomorrow?

Comment 38 Richard Hughes 2020-08-06 15:28:35 UTC
Fixed in appstream-data-32-8.fc32

Comment 39 Federico Bruni 2020-08-07 20:06:27 UTC
I confirm it's fixed.
Thank you Richard


Note You need to log in before you can comment on or make changes to this bug.