• Bug#1086181: lintian: false positive warning for appstream-metadata-val

    From Peter Blackman@21:1/5 to All on Mon May 12 15:10:01 2025
    Hi,

    I'm reopening this bug as I am still seeing
    appstream-metadata-validation-failed in https://udd.debian.org/lintian/?packages=cevomapgen

    I cannot see anything wrong with the metadata,
    and cannot reproduce the issue locally.

    No issues with the package reported here. https://appstream.debian.org/sid/main/issues/index.html


    Regards,
    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Mon May 12 09:13:43 2025
    To: peter@pblackman.plus.com

    On Monday, May 12, 2025 5:53:34 AM Mountain Standard Time Peter Blackman wrote:
    Hi,

    I'm reopening this bug as I am still seeing
    appstream-metadata-validation-failed in https://udd.debian.org/lintian/?packages=cevomapgen

    I cannot see anything wrong with the metadata,
    and cannot reproduce the issue locally.

    No issues with the package reported here. https://appstream.debian.org/sid/main/issues/index.html


    Regards,
    Peter

    In my experiences, this particular error has to do with inconsistencies between the appstream metadata file name, the appstream ID name, and the desktop file name.

    In my experience, the following always resolves the issue.

    1. Use reverse DNS naming for the appstream metadata file appended by metainfo.xml.
    2. Use reverse DNS naming for the appstream ID.
    3. Use reverse DNS naming for the desktop file appended by .desktop.

    For example, see privacybrowser:

    1. Reverse DNS naming for the appstream metadata file: com.stoutner.privacybrowser.metainfo.xml

    https://salsa.debian.org/soren/privacybrowser/-/blob/master/src/ com.stoutner.privacybrowser.metainfo.xml?ref_type=heads

    2. Reverse DNS naming for the appstream ID: com.stoutner.privacybrowser

    https://salsa.debian.org/soren/privacybrowser/-/blob/master/src/ com.stoutner.privacybrowser.metainfo.xml?ref_type=heads#L26

    3. Reverse DNS naming for the desktop file: com.stoutner.privacybrowser.desktop

    https://salsa.debian.org/soren/privacybrowser/-/blob/master/src/ com.stoutner.privacybrowser.metainfo.xml?ref_type=heads#L57

    https://salsa.debian.org/soren/privacybrowser/-/blob/master/src/ com.stoutner.privacybrowser.desktop

    Running validate-tree on an installed binary checks these file name relationships, whereas a normal validate only checks the contents of the metainfo.xml file itself, but not the relationship of the file names.

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmgiHjgACgkQwufLJ66w tgMQQw//TkYURdybFW8NqPWZB+uCjRtoHOSxArjYGuDbWgqNuksOhjFJo5PT7kud S1yfc6u7BECJXK1v0Edctzswk3bEdA0WSlul1YaofNBpA/jvoWcgvXBu/Ek+3aNp z8cIyMwxXFrureuO1y/NDZxKIS4XNm51L0/y+vlYsjEc6L8LXSayMzQyha2nbATS 5o4dMguoWf4kpx8MGYesKAzgp1+UnlOpczE8ea4an09ymGUrOejvngKa1s6T5gWT yAVjSBU1c37bCsCHOhfIltwyZj6gugtnXVpsiFGDQuKL7hfNyNXNTUqub+f12Fjh kGVm52m7+E010IrWQx1mTlvzT54Npm0rVskCbvy/D6QvIvLYpDOgA3TRFHxvl399 oPu3JQ0nrSRycpiZk5eBgDvY09X3pxP+2YjinLEIYqBNEak6ljrYS+Ui+l22uRPt j23HdE9NP35TZ1qH8Rz/6ECAkwD8LAWarAC9HguJ5KWJX2XVj7rpXrJBmQuEmSIA ylhUfosIO+fBHbnJWTcdhhIhpKhnhfebjjsmtEq5+MB0G/+jczy7+JtTCn7wTGsm yQM8m0sWoqHbZ0je6TS2CX9zccgn2749ohVxfM8JoFP6iFrlpXuilz98y4WuKZ7y bTuCBNMshMLXAFW3FLi6l45mh4yP6xRrTT/1umPOZdMjfpdiu34=
    =fVe0
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Blackman@21:1/5 to Soren Stoutner on Mon May 12 20:40:02 2025
    This is a multi-part message in MIME format.
    On 12/05/2025 17:13, Soren Stoutner wrote:

    In my experiences, this particular error has to do with inconsistencies between the appstream metadata file name, the appstream ID name, and the desktop file name.

    In my experience, the following always resolves the issue.


    <snip>

    3. Use reverse DNS naming for the desktop file appended by .desktop.

    Hi Soren,

    Right.
    It looks possible that my failure to rDNS the .desktop name
    may be the issue with the package.

    What is tedious,
    is that I cannot reproduce the problem locally, to check.

    UDD claims a lintian warning against the package https://udd.debian.org/lintian/?packages=cevomapgen

    But if I run either ..validate-tree or lintian itself
    against the .deb, no errors are shown.

    Salsa CI has SALSA_CI_LINTIAN_FAIL_WARNING set
    but nothing shows there either. https://salsa.debian.org/PeterB/cevomapgen/-/jobs/7567926


    So the lintian "bug" I'm seeing, is that when run via UDD
    the result is different to when run locally or via Salsa CI.

    Regards,
    Peter

    P.S.
    attaching a little basic test script.
    It takes the .deb file as a parameter.



    IyEvYmluL3NoCiMgY2hlY2sgYXBwc3RyZWFtIGRhdGEgb2YgYmluYXJ5IHBhY2thZ2UKCiMg c2V0IC1lCgpURU1QRD0kKG1rdGVtcCAtZCkKCmRwa2ctZGViIC1SICQxICRURU1QRAoKYXBw c3RyZWFtY2xpIHZhbGlkYXRlIC0tcGVkYW50aWMgJFRFTVBEL3Vzci9zaGFyZS8qLyoueG1s CmVjaG8KYXBwc3RyZWFtLXV0aWwgdmFsaWRhdGUgJFRFTVBEL3Vzci9zaGFyZS8qLyoueG1s CmVjaG8KYXBwc3RyZWFtY2xpIHZhbGlkYXRlLXRyZWUgLS1uby1uZXQgJFRFTVBECmVjaG8K

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Mon May 12 12:06:00 2025
    To: peter@pblackman.plus.com

    On Monday, May 12, 2025 11:31:26 AM Mountain Standard Time Peter Blackman wrote:
    On 12/05/2025 17:13, Soren Stoutner wrote:
    In my experiences, this particular error has to do with inconsistencies between the appstream metadata file name, the appstream ID name, and the desktop file name.

    In my experience, the following always resolves the issue.

    <snip>

    3. Use reverse DNS naming for the desktop file appended by .desktop.

    Hi Soren,

    Right.
    It looks possible that my failure to rDNS the .desktop name
    may be the issue with the package.

    What is tedious,
    is that I cannot reproduce the problem locally, to check.

    UDD claims a lintian warning against the package https://udd.debian.org/lintian/?packages=cevomapgen

    But if I run either ..validate-tree or lintian itself
    against the .deb, no errors are shown.

    I also don’t see any lintian tags when I run the following command with lintian from testing:

    lintian -iIE --pedantic

    My guess is that the factors for determining this tag have changed and that UDD is running either a newer or an older version of either lintian or "appstreamcli validate”.

    In the past, when I have dealt with this error I was able to reproduce it locally with lintian. If you want to make UDD happy you could upload a version with a corrected .desktop entry (it is recommended it use reverse DNS naming anyway).

    "The name of the desktop entry should follow the "reverse DNS" convention: it should start with a reversed DNS domain name controlled by the author of the application, in lower case.”

    https://specifications.freedesktop.org/desktop-entry-spec/latest-single/#file-naming

    Similar language also exists for the AppStream file name and ID tag.

    https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html

    I think in the past the recommendation to use reverse DNS naming wasn’t as strong, which is why you see a lot of .desktop files that follow other patterns, especially for programs that have been around for a long time.

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmgiRpgACgkQwufLJ66w tgOyjQ/+MI0tLWlxjTV2efnhJ3yooHT+VFaIgRIqt3ES700BlLA9Gw8KoDs6NZIk yvKfti7vwAJhh0o0bMO8yuynpEKGnVUpoNhZ3Ng62ulaMJHfizTdmXANQnM07p4s coq4GKt4Mu3Gmef/OIkjaF9S9FjzY2iguA6ZXhO3+Kvea7LnBF6P61fhc2U32jzK JVFWeXUM84e3YXcwHyRr86ro0cm/4ohtFE+V/yUvqD1UW3IHx6s0bkulsi3onQAW xoIA7kEpNEAUwEFoac5VbR2K9w9i8rGO1dH/n2djMM1VnvSA82cV7Lq4Eg1gFo5+ 3fUXa8ATlXAS1wAa13RWXT+vM1nBvdmF5qE4ACJAGo738Xfs10LR0RvifEDMPemT /wY6wibtu3ILW1mDEVUi1n7VdiuYs2Z4bbSqU+Y/SqyT02txiEZvSCj0hXBttoxj cDgzZlKspbemxkdEPaN0bJCrrEEYKj0OMVRuc049NLjZ9jj5cHyQW++xH7pbSGWj FzRBGwUp4xJEfvZ/BL2zZ21/ac4MSEpincnpbG85yBJgm9F3bbjefrlkARNmmM27 ACIZio2hLcK6sQR23OJZt+KFkBDtzn2aXXMv4WH8WVufk5nf7YTU8pK3YMQPOxk+ nJ04+CKbB3bE9Xf5Afr0YSyvJXjj7p2nO8AaViXVATFnEDejp/A=
    =COou
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Blackman@21:1/5 to Peter Blackman on Mon May 12 21:20:01 2025
    On 12/05/2025 19:31, Peter Blackman wrote:
    It looks possible that my failure to rDNS the .desktop name
    may be the issue with the package.

    Seems not to be the case. If I rDNS the .desktop name locally,
    that CAUSES
    appstream-metadata-validation-failed Problems reported by "appstreamcli validate-tree"

    WTF!!!

    What I tried adding to d/rules is
    # Rename desktop file to rDNS style
    execute_after_dh_auto_install:
        mv -v debian/c-evo-map-gen/usr/share/applications/cevomapgen.desktop \ debian/c-evo-map-gen/usr/share/applications/net.sourceforge.cevomapgen.desktop

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Blackman@21:1/5 to Soren Stoutner on Mon May 12 21:50:01 2025
    On 12/05/2025 20:27, Soren Stoutner wrote:


    You need to both rename the file and edit the name it is looking for in the metainfo.xml here:

    Of course!!

    Forgot that bit. Will try again tomorrow.

    Thanks,
    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Soren Stoutner@21:1/5 to All on Mon May 12 12:27:20 2025
    To: peter@pblackman.plus.com

    On Monday, May 12, 2025 12:03:26 PM Mountain Standard Time Peter Blackman wrote:
    On 12/05/2025 19:31, Peter Blackman wrote:
    It looks possible that my failure to rDNS the .desktop name
    may be the issue with the package.

    Seems not to be the case. If I rDNS the .desktop name locally,
    that CAUSES
    appstream-metadata-validation-failed Problems reported by "appstreamcli validate-tree"

    WTF!!!

    What I tried adding to d/rules is
    # Rename desktop file to rDNS style
    execute_after_dh_auto_install:
    mv -v debian/c-evo-map-gen/usr/share/applications/cevomapgen.desktop \ debian/c-evo-map-gen/usr/share/applications/
    net.sourceforge.cevomapgen.desktop

    You need to both rename the file and edit the name it is looking for in the metainfo.xml here:

    https://salsa.debian.org/PeterB/cevomapgen/-/blob/master/ net.sourceforge.cevomapgen.metainfo.xml?ref_type=heads#L11

    When I have done this I have usually submitted an upstream patch to implement it on their end, which usually, but not always, is accepted with appreciation.

    --
    Soren Stoutner
    soren@debian.org
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmgiS5gACgkQwufLJ66w tgMiRQ//SpZfy0DzMjx8ZvJDQQD2t4qx4kE8e3wXz8s3caGYFupffrUMs61GMawT iktt/GPf6UYrmHERK2eLiQhivLLfu2RXJKzMkRUoC7WO77RxO7mbwFeH2r/7QiKl ssiDB6CUBUt0o4Ot0x3OUHxC+Q29BAhlzTdECbCyh+dMdATnxxXNkD/1BgoZ/iF/ R2jYeOuVAXdqYzANOj7mEDwnJR7CnOsNOqmOFrCqBiGM5FHmYV36ATDkW0iLdUbJ OTlbZRFUWofB4LTS6gfs3DRbC/zL6FlIBAPLIIJGUX2ZwD9uB78ecERcuY0Cbk78 z4U1PTUqGhuMmvtHG55IVK/N7LisRtIVDMNFKYJnosYiXYbNV4A1Jtr3u/q+8nGu Srqf7bvFQ3ijel9Oq8i6UwMVyTjWUltPcgAJ7AP3VC8qgfseSd/Y5/+jHv71u8u7 emAuEAbT4uBrd5awbvSyLv+ATEyR2GSJYpDP+Ap4QMOF2FeVLvRuc6tojltUsYo+ QD+J3edxRxRDZ0Q1cicFPHgeIPkY+4S3toNfvaj0QVKNQYPBhlDY2Nvmn6OPBSTC h2EFGRFv6w3gFTOCkCJhWcmLpJ/kphtkm7LHbwXAv8ul22fhhkmHCHq7K9lX1H4J bpm1TDPvpAa+8SMca/owfzEO4MkILFXFtekhT17ujHQQiNUahis=
    =tQPY
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Blackman@21:1/5 to Soren Stoutner on Tue May 13 12:00:01 2025
    On 12/05/2025 20:06, Soren Stoutner wrote:


    I also don’t see any lintian tags when I run the following command with lintian from testing:

    lintian -iIE --pedantic

    My guess is that the factors for determining this tag have changed and that UDD is running either a newer or an older version of either lintian or "appstreamcli validate”.

    This remains a mystery. Lintian version 2.122.0 is used throughout.
    I tried installing older versions of appstream and its library,
    but still could not reproduce the problem locally.


    "The name of the desktop entry should follow the "reverse DNS" convention: it should start with a reversed DNS domain name controlled by the author of the application, in lower case.”

    https://specifications.freedesktop.org/desktop-entry-spec/latest-single/#file-naming

    Notwithstanding that I can't reproduce the problem, I agree this seems
    highly likely to be the issue. I'll attempt a fix on the next upload.


    I think in the past the recommendation to use reverse DNS naming wasn’t as strong, which is why you see a lot of .desktop files that follow other patterns, especially for programs that have been around for a long time.


    That seems to explain why over 600 reports of this tag! https://udd.debian.org/lintian-tag/appstream-metadata-validation-failed?affected=yes

    Thanks for helping,
    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)