Bug 1185361 - Use appstream-util validate-relax instead of appdata-validate
Summary: Use appstream-util validate-relax instead of appdata-validate
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-23 14:21 UTC by Yanko Kaneti
Modified: 2016-07-19 12:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 12:42:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch more (3.66 KB, patch)
2015-01-23 14:21 UTC, Yanko Kaneti
no flags Details | Diff
just rpmlint patch (1.72 KB, patch)
2015-01-24 08:38 UTC, Yanko Kaneti
no flags Details | Diff

Description Yanko Kaneti 2015-01-23 14:21:00 UTC
Created attachment 983384 [details]
patch more

Attaching a full fedora git repo patch with changelog etc.

Comment 1 Ville Skyttä 2015-01-24 08:07:56 UTC
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.

Comment 2 Ville Skyttä 2015-01-24 08:24:35 UTC
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.)

Comment 3 Yanko Kaneti 2015-01-24 08:30:39 UTC
(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.

Comment 4 Yanko Kaneti 2015-01-24 08:38:11 UTC
Created attachment 983647 [details]
just rpmlint patch

This is just the rpmlint patch with adjusted call to getstatusoutput

Comment 5 Ville Skyttä 2015-01-24 09:01:07 UTC
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
/usr/share/appdata/baobab.appdata.xml: OK

$ appstream-util validate /usr/share/appdata/baobab.appdata.xml
/usr/share/appdata/baobab.appdata.xml: FAILED:
• 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).

Comment 6 Jaroslav Reznik 2015-03-03 16:45:30 UTC
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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 7 Gerald Cox 2015-06-02 15:23:09 UTC
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  
copyq.appdata.xml: FAILED: 
• 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:
http://people.freedesktop.org/~hughsient/appdata/

it doesn't really give an indication of what is required, and what is optional.

Which is correct?

Comment 8 Fedora End Of Life 2016-07-19 12:42:13 UTC
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
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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