Bug 2267575 - appstreamcli validate --no-net --explain fails during build
Summary: appstreamcli validate --no-net --explain fails during build
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: appstream
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-03 21:20 UTC by Sandro
Modified: 2024-03-06 12:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sandro 2024-03-03 21:20:17 UTC
I just happened to rebuild a package (spyder) which built fine previously. I made no changes to the package, but the build now fails with:

appstreamcli validate --no-net --explain /builddir/build/BUILDROOT/spyder-6.0.0~a1-17.20240117gitv6.0.0a1.fc41.x86_64//usr/share/metainfo/org.spyder_ide.spyder.appdata.xml
W: org.spyder_ide.spyder:~: url-homepage-missing
   This component is missing an `url` element of type `homepage` to link to the project's homepage.

I: org.spyder_ide.spyder:~: content-rating-missing
   This component has no `content_rating` tag to provide age rating information. You can generate
   the tag data online by answering a few questions at https://hughsie.github.io/oars/

✘ Validation failed: warnings: 1, infos: 1, pedantic: 2

Build log: https://download.copr.fedorainfracloud.org/results/gui1ty/updates/fedora-rawhide-x86_64/07097539-spyder/builder-live.log.gz

It seems to affect users as well. On IRC a user reported (for all software):

Hello! Just installed the OS but none of the software are listed on the applications menu
They're installed but can't access to them

Other users are reporting on the issue as well: https://forums.fedoraforum.org/showthread.php?330034-COMP-NEURO-Lab-does-not-install-the-modelling-tools&p=1867320

Reproducible: Always

Steps to Reproduce:
1. Rebuild an application package that succeeded previously with updated appstream
2. Install Fedora 40
3.
Actual Results:  
1. Build fails
2. Installed apps not available in menu

Expected Results:  
1. Build succeeds as it did before.
2. Apps are visible in menu.

Comment 1 Fedora Blocker Bugs Application 2024-03-03 21:24:48 UTC
Proposed as a Blocker and Freeze Exception for 40-beta by Fedora user gui1ty using the blocker tracking app because:

 This breaks the release criteria. It also prevents packagers from rebuilding packages that built fine previously.

Comment 2 Sandro 2024-03-03 22:18:38 UTC
I was a bit hasty in concluding the issues are related. The issue with the build breaking with the updated appstream is definitely there, but doesn't warrant it being a blocker issue. I'll try to get this all fixed with regards to the blocker proposal. I hope simply removing the bugs listed in 'Blocks' will do the trick.

Comment 3 Sandro 2024-03-04 10:29:29 UTC
Apparently, appstreamcli is now stricter when validating appdata. Running the same command with appstreamcli 0.16.1 I get:

appstreamcli validate --no-net --explain ./scripts/org.spyder_ide.spyder.appdata.xml
I: org.spyder_ide.spyder:~: content-rating-missing
   This component has no `content_rating` tag to provide age rating information. You can generate
   the tag data online by answering a few questions at https://hughsie.github.io/oars/

✔ Validation was successful: infos: 1, pedantic: 2

It seems URL is now mandatory.

Comment 4 Ben Beasley 2024-03-06 12:23:45 UTC
Similarly, with agenda:

/builddir/build/BUILDROOT/agenda-1.1.2-19.fc41.x86_64//usr/share/metainfo/com.github.dahenson.agenda.appdata.xml: OK
+ appstreamcli validate --no-net --explain /builddir/build/BUILDROOT/agenda-1.1.2-19.fc41.x86_64//usr/share/metainfo/com.github.dahenson.agenda.appdata.xml
W: com.github.dahenson.agenda:15: developer-id-missing
   The `developer` element is missing an `id` property, containing a unique string ID for the
   developer. Consider adding a unique ID.

This is not a packaging issue, but the upstream practice of exiting with nonzero status for warnings (effectively making warnings errors) and frequently adding new warnings is pretty hard to deal with. I suspect I have a dozen or so upstreams to ask about adding a developer ID now…


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