Created attachment 983384 [details]
Attaching a full fedora git repo patch with changelog etc.
The patch looks otherwise fine to me, but could you elaborate on why the new implementation calls "appstream-util validate-relax" instead of "appstream-util validate"? I believe the latter would be a better match for appdata-validate's operation and what we'd want.
Also, note that appstream-util prints stuff to stderr in addition to stdout so the "True" should be removed from the getstatusoutput() call. (Grab fresh upstream git before you modify the upstream patch, I just pushed some changes to this area in the code.)
(In reply to Ville Skyttä from comment #1)
> The patch looks otherwise fine to me, but could you elaborate on why the new
> implementation calls "appstream-util validate-relax" instead of
> "appstream-util validate"? I believe the latter would be a better match for
> appdata-validate's operation and what we'd want.
I could be wrong but as far as I understand from the two FPC tickets #414 and #437 regarding AppData the reason the guidelines https://fedoraproject.org/wiki/Packaging:AppData recommend relaxed validation is because of license nomenclature differences between Fedora and upstream, so the idea is to skip that particular conformance check.
Created attachment 983647 [details]
just rpmlint patch
This is just the rpmlint patch with adjusted call to getstatusoutput
The relaxed mode skips checking more than just license things. For example on my F20 system:
$ appstream-util validate-relax /usr/share/appdata/baobab.appdata.xml
$ appstream-util validate /usr/share/appdata/baobab.appdata.xml
• style-invalid : Not enough <p> tags for a good description
Validation of files failed
...and similarly for appdata-validate. But even with this from the FPC ticket #437 I gather the relaxed mode is indeed desirable as far as Fedora goes. So I applied your patch upstream and made the appdata validation command configurable in a subsequent patch (so one can for example make it stricter).
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.
More information and reason for this action is here:
When running fedpkg lint, I receive:
copyq.x86_64: E: invalid-appdata-file /usr/share/appdata/copyq.appdata.xml
appstream-util validate copyq.appdata.xml
• tag-missing : <name> is not present
• tag-missing : <summary> is not present
Validation of files failed
However, when I run appstream-util validate-relax, it passes.
If I check:
it doesn't really give an indication of what is required, and what is optional.
Which is correct?
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.