Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621970 - KDE packages install .desktop files with executable bit
Summary: KDE packages install .desktop files with executable bit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in EAPI-8
Keywords: PullRequest
: 621972 621974 642470 (view as bug list)
Depends on:
Blocks: 621966
  Show dependency tree
 
Reported: 2017-06-16 22:04 UTC by Jonas Stein
Modified: 2021-09-02 18:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Stein gentoo-dev 2017-06-16 22:04:29 UTC
.desktop files in /usr/share/applications/ should not be executable
Comment 1 Michael Palimaka (kensington) gentoo-dev 2017-06-18 07:37:16 UTC
Can you please provide some background information about this (for taking upstream)?
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-06-18 09:18:09 UTC
Those are not executable files:

  $ LANG=C /usr/share/applications/okularApplication_pdf.desktop
  /usr/share/applications/okularApplication_pdf.desktop: line 1: [Desktop: command not found
  /usr/share/applications/okularApplication_pdf.desktop: line 2: application/x-gzpdf: No such file or directory
  /usr/share/applications/okularApplication_pdf.desktop: line 2: application/x-bzpdf: No such file or directory
  /usr/share/applications/okularApplication_pdf.desktop: line 2: application/x-wwf: No such file or directory

I think in case of okular it's a mix of source tarball having executable bits on some .desktop files:

  $ LANG=C ls -l /usr/share/applications/okularApplication_pdf.desktop
  -rwxr-xr-x 1 root root 8332 Mar  5 18:51 /usr/share/applications/okularApplication_pdf.desktop

  $ LANG=C ls -l /tmp/portage/kde-apps/okular-17.04.2/work/okular-17.04.2/generators/poppler/ | grep desktop
  -rwxr-xr-x 1 slyfox users  8512 Jun  5 20:00 okularApplication_pdf.desktop
  -rw-r--r-- 1 slyfox users  1311 Jun  5 20:00 okularPoppler.desktop
  -rw-r--r-- 1 slyfox users  9116 Jun  5 20:00 org.kde.mobile.okular_pdf.desktop

and cmake explicitly setting executable bits (via PROGRAMS?) for final permissions when file is installed:
    generators/poppler/CMakeLists.txt:
        install( PROGRAMS okularApplication_pdf.desktop org.kde.mobile.okular_pdf.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )

I guess it should be FILES used in other places:

  install( FILES okularPoppler.desktop  DESTINATION  ${KDE_INSTALL_KSERVICES5DIR} )
  install( PROGRAMS okularApplication_pdf.desktop org.kde.mobile.okular_pdf.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )
  install( FILES org.kde.okular-poppler.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
Comment 3 Michael Palimaka (kensington) gentoo-dev 2017-06-24 16:21:14 UTC
Since the majority of KDE packages seem to do this, I don't think it makes sense to have individual tracker bugs.

We should bring this up on the KDE mailing list, and if there's agreement we can start fixing upstream repos.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2017-06-24 16:21:22 UTC
*** Bug 621974 has been marked as a duplicate of this bug. ***
Comment 5 Michael Palimaka (kensington) gentoo-dev 2017-06-24 16:21:25 UTC
*** Bug 621972 has been marked as a duplicate of this bug. ***
Comment 6 Michael Palimaka (kensington) gentoo-dev 2017-12-28 08:34:38 UTC
*** Bug 642470 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2021-08-21 13:11:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=70ed594d0d6a67b486c8781e02dbab1bba92aba4

commit 70ed594d0d6a67b486c8781e02dbab1bba92aba4
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-05 22:30:53 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-08-21 13:10:11 +0000

    ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir
    
    Bug: https://bugs.gentoo.org/621970
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/ecm.eclass | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2021-09-02 16:53:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c3597edfe479b5e81a09380f11b6c23bbcaf723

commit 1c3597edfe479b5e81a09380f11b6c23bbcaf723
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-05 22:30:53 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-02 16:46:25 +0000

    ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir
    
    Bug: https://bugs.gentoo.org/621970
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/ecm.eclass | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)