Discussion:
Bug#1093287: RFS: imsprog/1.4.5-1 -- Linux chip programmer for CH341a devices
Add Reply
Soren Stoutner
2025-01-17 17:10:02 UTC
Reply
Permalink
W: imsprog: appstream-metadata-validation-failed Problems reported by
"appstreamcli validate-tree".
N: The specified AppStream metadata file fail to validate using
'appstreamcli
N: validate-tree --no-net path-to-package-root'.
N: Please refer to https://wiki.debian.org/AppStream/Guidelines for
details.
N: Visibility: warning
N: Show-Always: no
N: Check: appstream-metadata
I have run into this error before. It took me a while to figure out the
problem, because the error message didn’t point me in the right direction.
So, let me tell you where the bears sleep.

There is an intricate dance between the name of the appstream file, the ID
inside the appstream file, and the name of the desktop file. If they don’t line
up in a certain way, you will get this failure. The documentation says there
are supposed to be several ways to line them up, but when I followed some of
the examples I couldn’t get the warning to go away. This is what has worked
every time I have tried it.

Appsream file name: Use reverse domain name notation appended by .appdata.xml.
ID: Use the same reverse domain name notation.
Desktop file: Use the same reverse domain name notation appended by .desktop.

For example:

Appstream file name: com.stoutner.privacybrowser.appdata.xml
ID: com.stoutner.privacybrowser
Desktop file: com.stoutner.privacybrowser.desktop

https://salsa.debian.org/soren/privacybrowser/-/blob/master/src/
com.stoutner.privacybrowser.appdata.xml?ref_type=heads
--
Soren Stoutner
***@debian.org
Soren Stoutner
2025-01-17 18:50:01 UTC
Reply
Permalink
Post by Soren Stoutner
Appsream file name: Use reverse domain name notation appended by
.appdata.xml. ID: Use the same reverse domain name notation.
A review of the documentation taught me that .appdata.xml is deprecated (but
it will still work) and the recommended suffix is now .metainfo.xml.

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location
--
Soren Stoutner
***@debian.org
Soren Stoutner
2025-01-17 20:40:01 UTC
Reply
Permalink
Post by Soren Stoutner
Post by Soren Stoutner
Appsream file name: Use reverse domain name notation appended by
.appdata.xml. ID: Use the same reverse domain name notation.
A review of the documentation taught me that .appdata.xml is deprecated (but
it will still work) and the recommended suffix is now .metainfo.xml.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-> > component-location
Hi Soren,
IN this case and for others reviewing the docs[1] and using the specification
is best. I have done this with rednotebook over the years, though upstream
does not want rDNS naming.
Where do you see that upstream does not want rDNS naming? They docs I am
reading explicitly say it is required.

“Upstream projects can ship one or more metainfo files in /usr/share/metainfo/%
{id}.metainfo.xml, where id is a unique identifier of this specific component.”

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location

“The ID must follow a reverse-DNS scheme, consisting of {tld}.{vendor}.
{product}, for example org.kde.gwenview or com.hugski.colorhug2. Ownership of
{vendor}.{tld} in the domain name system guarantees uniqueness of IDs.”

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic
--
Soren Stoutner
***@debian.org
Soren Stoutner
2025-01-17 21:00:02 UTC
Reply
Permalink
Post by Soren Stoutner
Post by Soren Stoutner
Post by Soren Stoutner
Appsream file name: Use reverse domain name notation appended by
.appdata.xml. ID: Use the same reverse domain name notation.
A review of the documentation taught me that .appdata.xml is
deprecated
Post by Soren Stoutner
(but
Post by Soren Stoutner
it will still work) and the recommended suffix is now .metainfo.xml.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#s
pec
-> > component-location
Hi Soren,
IN this case and for others reviewing the docs[1] and using the specification
is best. I have done this with rednotebook over the years, though upstream
does not want rDNS naming.
Where do you see that upstream does not want rDNS naming? They docs I am
reading explicitly say it is required.
“Upstream projects can ship one or more metainfo files in /usr/share/metainfo/%
{id}.metainfo.xml, where id is a unique identifier of this specific component.”
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-> > component-location
“The ID must follow a reverse-DNS scheme, consisting of {tld}.{vendor}.
{product}, for example org.kde.gwenview or com.hugski.colorhug2. Ownership of
{vendor}.{tld} in the domain name system guarantees uniqueness of IDs.”
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-i
d-generic
Soren,
For rednotebook the application name is used for the ID and .desktop file. It
did previously did give a lintian warning until appstream in Debian went
nuts,
but upstream is not willing to make all other associated changes. It is his
choice, so I am fine with it.
It works fine. It may become a necessary in the future for upstream to make
the move, but until then I go with his wishes.
In my experience it isn’t that hard to modify the metainfo.xml and desktop
files for Debian, either with patches or by creating custom files in the debian
directory. Also, in my experience, upstream is usually pretty open to
accepting submissions fixing these problems, although there are probably a few
upstreams that aren’t.

In any case, it isn’t that hard to bring these files into compliance with the
AppStream protocol as documented in the freedesktop.org documentation I linked
to above, so it seems like it is something worth doing.

Other people may feel differently, but I personally like to address any of
these problems before sponsoring a package.
--
Soren Stoutner
***@debian.org
Loading...