flathub / org.flatpak.Builder

16 stars 14 forks source link

Valid license expression not being accepted by appstream-util #187

Closed Zishan-Rahman closed 8 months ago

Zishan-Rahman commented 1 year ago

I'm currently trying to change the project_license tag's value in org.bluej.BlueJ's appdata.xml file in https://github.com/flathub/org.bluej.BlueJ/pull/14, and I will need to do the same in https://github.com/flathub/org.greenfoot.Greenfoot/pull/1. The GPL-2.0-with-classpath-exception value it currently holds has been deprecated since SPDX license list version 2.0rc2 (we are now at version 3.22), and as such, the app license shows on Flathub as "Proprietary", when it's really not. The correct license expression used should be GPL-2.0-or-later WITH Classpath-exception-2.0, following the documentation. However, when I run the updated appdata.xml file through Flatpak Builder, both on the Buildbot server and locally on my computer, I get this error:

flatpak run --env=G_DEBUG=fatal-criticals --command=appstream-util org.flatpak.Builder validate build/*/share/appdata/org.bluej.BlueJ.appdata.xml
build/files/share/appdata/org.bluej.BlueJ.appdata.xml: FAILED:
• tag-invalid           : <project_license> is not valid [GPL-2.0-or-later WITH Classpath-exception-2.0]SPDX ID 'WITH Classpath-exception-2.0' unknown
Validation of files failed

To the best of my knowledge, this should not be happening, and, so far, I'm having trouble figuring out why it's still going wrong. If this issue could get addressed as soon as possible, I'd be very grateful.

bbhtt commented 11 months ago

appstream-glib does not support the "with" operator.

It's also discontinued and Flathub will switch to libappstream at one point, which supports it.