Bug 341066 - Drop executable bits from .desktop files
Summary: Drop executable bits from .desktop files
Status: RESOLVED INTENTIONAL
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-17 22:44 UTC by Manuel Rüger
Modified: 2014-12-12 22:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rüger 2014-11-17 22:44:04 UTC
Some desktop files have permissions set to 0755 instead of 0644

Please apply:
diff --git a/active/app/active-documentviewer.desktop b/active/app/active-documentviewer.desktop
old mode 100644
new mode 100755
diff --git a/generators/chm/okularApplication_chm.desktop b/generators/chm/okularApplication_chm.desktop
old mode 100644
new mode 100755
diff --git a/generators/comicbook/okularApplication_comicbook.desktop b/generators/comicbook/okularApplication_comicbook.desktop
old mode 100644
new mode 100755
diff --git a/generators/djvu/okularApplication_djvu.desktop b/generators/djvu/okularApplication_djvu.desktop
old mode 100644
new mode 100755
diff --git a/generators/dvi/okularApplication_dvi.desktop b/generators/dvi/okularApplication_dvi.desktop
old mode 100644
new mode 100755
diff --git a/generators/epub/okularApplication_epub.desktop b/generators/epub/okularApplication_epub.desktop
old mode 100644
new mode 100755
diff --git a/generators/fax/okularApplication_fax.desktop b/generators/fax/okularApplication_fax.desktop
old mode 100644
new mode 100755
diff --git a/generators/fictionbook/okularApplication_fb.desktop b/generators/fictionbook/okularApplication_fb.desktop
old mode 100644
new mode 100755
diff --git a/generators/kimgio/active-documentviewer_kimgio.desktop b/generators/kimgio/active-documentviewer_kimgio.desktop
old mode 100644
new mode 100755
diff --git a/generators/kimgio/okularApplication_kimgio.desktop b/generators/kimgio/okularApplication_kimgio.desktop
old mode 100644
new mode 100755
diff --git a/generators/mobipocket/okularApplication_mobi.desktop b/generators/mobipocket/okularApplication_mobi.desktop
old mode 100644
new mode 100755
diff --git a/generators/ooo/okularApplication_ooo.desktop b/generators/ooo/okularApplication_ooo.desktop
old mode 100644
new mode 100755
diff --git a/generators/plucker/okularApplication_plucker.desktop b/generators/plucker/okularApplication_plucker.desktop
old mode 100644
new mode 100755
diff --git a/generators/poppler/okularApplication_pdf.desktop b/generators/poppler/okularApplication_pdf.desktop
old mode 100644
new mode 100755
diff --git a/generators/spectre/okularApplication_ghostview.desktop b/generators/spectre/okularApplication_ghostview.desktop
old mode 100644
new mode 100755
diff --git a/generators/tiff/okularApplication_tiff.desktop b/generators/tiff/okularApplication_tiff.desktop
old mode 100644
new mode 100755
diff --git a/generators/xps/okularApplication_xps.desktop b/generators/xps/okularApplication_xps.desktop
old mode 100644
new mode 100755
diff --git a/shell/okular.desktop b/shell/okular.desktop
old mode 100644
new mode 100755


Reproducible: Always
Comment 1 Manuel Rüger 2014-11-17 22:45:10 UTC
Sorry, switched arguments on diff.

diff --git a/active/app/active-documentviewer.desktop b/active/app/active-documentviewer.desktop
old mode 100755
new mode 100644
diff --git a/generators/chm/okularApplication_chm.desktop b/generators/chm/okularApplication_chm.desktop
old mode 100755
new mode 100644
diff --git a/generators/comicbook/okularApplication_comicbook.desktop b/generators/comicbook/okularApplication_comicbook.desktop
old mode 100755
new mode 100644
diff --git a/generators/djvu/okularApplication_djvu.desktop b/generators/djvu/okularApplication_djvu.desktop
old mode 100755
new mode 100644
diff --git a/generators/dvi/okularApplication_dvi.desktop b/generators/dvi/okularApplication_dvi.desktop
old mode 100755
new mode 100644
diff --git a/generators/epub/okularApplication_epub.desktop b/generators/epub/okularApplication_epub.desktop
old mode 100755
new mode 100644
diff --git a/generators/fax/okularApplication_fax.desktop b/generators/fax/okularApplication_fax.desktop
old mode 100755
new mode 100644
diff --git a/generators/fictionbook/okularApplication_fb.desktop b/generators/fictionbook/okularApplication_fb.desktop
old mode 100755
new mode 100644
diff --git a/generators/kimgio/active-documentviewer_kimgio.desktop b/generators/kimgio/active-documentviewer_kimgio.desktop
old mode 100755
new mode 100644
diff --git a/generators/kimgio/okularApplication_kimgio.desktop b/generators/kimgio/okularApplication_kimgio.desktop
old mode 100755
new mode 100644
diff --git a/generators/mobipocket/okularApplication_mobi.desktop b/generators/mobipocket/okularApplication_mobi.desktop
old mode 100755
new mode 100644
diff --git a/generators/ooo/okularApplication_ooo.desktop b/generators/ooo/okularApplication_ooo.desktop
old mode 100755
new mode 100644
diff --git a/generators/plucker/okularApplication_plucker.desktop b/generators/plucker/okularApplication_plucker.desktop
old mode 100755
new mode 100644
diff --git a/generators/poppler/okularApplication_pdf.desktop b/generators/poppler/okularApplication_pdf.desktop
old mode 100755
new mode 100644
diff --git a/generators/spectre/okularApplication_ghostview.desktop b/generators/spectre/okularApplication_ghostview.desktop
old mode 100755
new mode 100644
diff --git a/generators/tiff/okularApplication_tiff.desktop b/generators/tiff/okularApplication_tiff.desktop
old mode 100755
new mode 100644
diff --git a/generators/xps/okularApplication_xps.desktop b/generators/xps/okularApplication_xps.desktop
old mode 100755
new mode 100644
diff --git a/shell/okular.desktop b/shell/okular.desktop
old mode 100755
new mode 100644
Comment 2 Albert Astals Cid 2014-11-17 22:53:56 UTC
Why?
Comment 3 Rex Dieter 2014-11-19 15:11:07 UTC
-1,  KDE purposely sets execute bits on application .desktop files.
Comment 4 Rex Dieter 2014-11-19 15:11:57 UTC
(though I suppose it doesn't matter much about the git permissions)
Comment 5 Manuel Rüger 2014-11-19 16:35:00 UTC
(In reply to Albert Astals Cid from comment #2)
> Why?

https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission%20Bit%20Required

I see there was already a discussion in 2009: http://marc.info/?l=kde-core-devel&m=123438701825150

(In reply to Rex Dieter from comment #3)
> -1,  KDE purposely sets execute bits on application .desktop files.
Why? And if so, why are there some .desktop files without executable bits?
Comment 6 Rex Dieter 2014-11-19 17:01:24 UTC
The ones without execute bits set are potential bugs (and probably should get fixed to be consistent), which could break things if not installed to standard prefixes (which developers are fond of doing)
Comment 7 Rex Dieter 2014-11-19 17:10:58 UTC
To be clear, my understanding is...  to avoid complexity of determining "standard prefix" or not at install-time, the decision was made to simply make all kde .desktop files executable here/upstream.

Now, if downstreams (like ubuntu) choose to remove the executable bits, that's fine, it shouldn't break anything (again, assuming the packaged software installs into standard prefixes).
Comment 8 Christoph Feck 2014-12-12 22:08:35 UTC
> why are there some .desktop files without executable bits?

We once did a review of (all?) application desktop files to correct their permission bits. It is possible that after that review, new or changed files do not have the correct permissions. If you find them, please report them for each application maintainer separately.

As noted in previous comments, the behavior is as intended. Resolving accordingly.