Bug 1430442

Summary: dist.rpmgrill.desktop-lint should check only under /usr/share/applications/
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: rpmgrillAssignee: Eduardo Santiago <fedoraproject>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dhiru, germano.massullo, jan.public, projects.rg, santiago
Target Milestone: ---Keywords: Tracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rex Dieter 2017-03-08 15:30:28 UTC
I've noticed bodhi is reporting false-positive QA tests of the form:

         "module" : "DesktopLint",
         "order" : 93,
         "results" : [
            {
               "arch" : "armv7hl,i686,x86_64",
               "code" : "DesktopFileValidation",
               "context" : {
                  "path" : "/usr/share/kservicetypes5/plasma-runner.desktop"
               },
               "diag" : "error: file contains group \"PropertyDef::X-Plasma-AdvertiseSingleRunnerQueryMode\", but groups extending the format should start with \"X-\"",
               "subpackage" : "kf5-krunner"
            },

I have a strong suspicion that these tests' intent is for application .desktop files that conform to
https://standards.freedesktop.org/desktop-entry-spec/latest/

and this spec generally refers to .desktop files under
/usr/share/applications
only (with a few exceptions).  I'd suggest rpmgrill follow suit and only care about .desktop files from that location too.

Comment 1 Roman Joost 2017-07-03 00:49:36 UTC
Hi,

many thanks for the bug report. I've had a bit of spare time to look into this. The rpmgrill tool delegates this check to a tool called desktop-file-validate (https://freedesktop.org/wiki/Software/desktop-file-utils/) with whatever desktop or directory file the rpm package ships. So arguably if it is a bug it would have to be addressed by desktop-file-validate.

I've studied the desktop-entry-spec but could not find an explicit reference that it only applies to desktop|directory files stored under /usr/share/applications. Given the spec file and the desktop-file-validate utility against the given desktop file, it seems the errors are actually not false positives, but genuine. According to the spec, the keys should be prefixed with an X- according to:

 https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html

Given all this, I'd be hesitant to make a change to rpmgrill, since it seems to be working as intended. Did I miss something? Let me know, otherwise I think I'll be closing this report as NOTABUG.

Many thanks

Comment 2 Rex Dieter 2017-07-03 14:18:31 UTC
It's mentioned here at least implicitly:

https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id

that mentions it's expected location is under/relative to XDG_DATA_DIRS


And in practice, this is really how .desktop files are handled in the wild as well.  It's expected that the xdg-compliant ones are those that refer to applications launched via menus, ie, those relative to XDG_DATA_DIRS as well.


Ignoring this recommendation could result in dist.rpmgrill results simply being ignored as not valid/relevant too (which I hope we can all agree is not ideal).

Comment 3 Rex Dieter 2017-07-03 14:20:21 UTC
Another reference to explicit expected .desktop location(s):

https://standards.freedesktop.org/menu-spec/menu-spec-latest.html#paths

Comment 4 Jan Kurik 2017-08-15 06:56:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 5 Jan Vlug 2017-12-25 14:06:15 UTC
Maybe the errors mentioned here are relevant:
https://bugzilla.redhat.com/show_bug.cgi?id=1525740#c12

Comment 6 Rex Dieter 2017-12-25 14:28:19 UTC
Comment #5 is not relevant here (sorry)

(Artificially adding "Tracking" keyword to avoid autoclose)

Comment 7 Raphael Groner 2019-04-13 20:09:15 UTC
Ping. Any progress on a fix here?

Comment 8 Fedora Admin user for bugzilla script actions 2025-05-31 02:29:19 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.