1 |
commit: 5a15b9b4cdb4ace6be8597189bab3859bbfacc69 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 29 22:57:36 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 29 22:58:34 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a15b9b4 |
7 |
|
8 |
kde-frameworks/kio: Fix kioclient5 exec with PIE binaries |
9 |
|
10 |
See also: https://bugs.kde.org/show_bug.cgi?id=350018 |
11 |
|
12 |
Package-Manager: Portage-2.3.5, Repoman-2.3.1 |
13 |
|
14 |
kde-frameworks/kio/files/kio-5.34.0-pie.patch | 62 ++++++++++++++++++++ |
15 |
kde-frameworks/kio/kio-5.34.0-r2.ebuild | 84 +++++++++++++++++++++++++++ |
16 |
2 files changed, 146 insertions(+) |
17 |
|
18 |
diff --git a/kde-frameworks/kio/files/kio-5.34.0-pie.patch b/kde-frameworks/kio/files/kio-5.34.0-pie.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..973f9550447 |
21 |
--- /dev/null |
22 |
+++ b/kde-frameworks/kio/files/kio-5.34.0-pie.patch |
23 |
@@ -0,0 +1,62 @@ |
24 |
+commit 4122b52fee540f6b7cdd8fde2f55e2f7c2673b1a |
25 |
+Author: Fabian Vogt <fabian@×××××××××××.de> |
26 |
+Date: Sun May 28 14:49:03 2017 +0200 |
27 |
+ |
28 |
+ Identify PIE binaries (application/x-sharedlib) as executable files |
29 |
+ |
30 |
+ Summary: |
31 |
+ x86_64 binaries compiled with PIE are just shared objects with the |
32 |
+ executable bit set. Without this patch, kio does not know that they |
33 |
+ can be executed as well, causing "kioclient5 exec" to ask for an |
34 |
+ application that can handle application/x-sharedlib. |
35 |
+ |
36 |
+ BUG: 350018 |
37 |
+ |
38 |
+ Test Plan: Can run applications fine again. |
39 |
+ |
40 |
+ Reviewers: dfaure, aacid |
41 |
+ |
42 |
+ Reviewed By: dfaure |
43 |
+ |
44 |
+ Subscribers: asturmlechner, #frameworks |
45 |
+ |
46 |
+ Tags: #frameworks |
47 |
+ |
48 |
+ Differential Revision: https://phabricator.kde.org/D6002 |
49 |
+ |
50 |
+diff --git a/src/widgets/krun.cpp b/src/widgets/krun.cpp |
51 |
+index 399ca975..2a9b563a 100644 |
52 |
+--- a/src/widgets/krun.cpp |
53 |
++++ b/src/widgets/krun.cpp |
54 |
+@@ -139,7 +139,8 @@ bool KRun::isExecutableFile(const QUrl &url, const QString &mimetype) |
55 |
+ #ifdef Q_OS_WIN |
56 |
+ mimeType.inherits(QLatin1String("application/x-ms-dos-executable")) || |
57 |
+ #endif |
58 |
+- mimeType.inherits(QStringLiteral("application/x-executable-script")) |
59 |
++ mimeType.inherits(QStringLiteral("application/x-executable-script")) || |
60 |
++ mimeType.inherits(QStringLiteral("application/x-sharedlib")) |
61 |
+ ) { |
62 |
+ return true; |
63 |
+ } |
64 |
+@@ -1438,6 +1439,8 @@ bool KRun::isExecutable(const QString &serviceType) |
65 |
+ { |
66 |
+ return (serviceType == QLatin1String("application/x-desktop") || |
67 |
+ serviceType == QLatin1String("application/x-executable") || |
68 |
++ /* See https://bugs.freedesktop.org/show_bug.cgi?id=97226 */ |
69 |
++ serviceType == QLatin1String("application/x-sharedlib") || |
70 |
+ serviceType == QLatin1String("application/x-ms-dos-executable") || |
71 |
+ serviceType == QLatin1String("application/x-shellscript")); |
72 |
+ } |
73 |
+diff --git a/src/widgets/krun.h b/src/widgets/krun.h |
74 |
+index 2d167fc8..1012fb2b 100644 |
75 |
+--- a/src/widgets/krun.h |
76 |
++++ b/src/widgets/krun.h |
77 |
+@@ -436,7 +436,7 @@ public: |
78 |
+ * To be executable the file must pass the following rules: |
79 |
+ * -# Must reside on the local filesystem. |
80 |
+ * -# Must be marked as executable for the user by the filesystem. |
81 |
+- * -# The mime type must inherit application/x-executable or application/x-executable-script. |
82 |
++ * -# The mime type must inherit application/x-executable, application/x-executable-script or application/x-sharedlib. |
83 |
+ * To allow a script to run when the above rules are satisfied add the entry |
84 |
+ * @code |
85 |
+ * X-KDE-IsAlso=application/x-executable-script |
86 |
|
87 |
diff --git a/kde-frameworks/kio/kio-5.34.0-r2.ebuild b/kde-frameworks/kio/kio-5.34.0-r2.ebuild |
88 |
new file mode 100644 |
89 |
index 00000000000..3fa22fb33b0 |
90 |
--- /dev/null |
91 |
+++ b/kde-frameworks/kio/kio-5.34.0-r2.ebuild |
92 |
@@ -0,0 +1,84 @@ |
93 |
+# Copyright 1999-2017 Gentoo Foundation |
94 |
+# Distributed under the terms of the GNU General Public License v2 |
95 |
+ |
96 |
+EAPI=6 |
97 |
+ |
98 |
+KDE_TEST="forceoptional-recursive" |
99 |
+VIRTUALX_REQUIRED="test" |
100 |
+inherit kde5 |
101 |
+ |
102 |
+DESCRIPTION="Framework providing transparent file and data management" |
103 |
+LICENSE="LGPL-2+" |
104 |
+KEYWORDS="~amd64 ~arm ~x86" |
105 |
+IUSE="acl +handbook kerberos +kwallet X" |
106 |
+ |
107 |
+COMMON_DEPEND=" |
108 |
+ $(add_frameworks_dep karchive) |
109 |
+ $(add_frameworks_dep kbookmarks) |
110 |
+ $(add_frameworks_dep kcodecs) |
111 |
+ $(add_frameworks_dep kcompletion) |
112 |
+ $(add_frameworks_dep kconfig) |
113 |
+ $(add_frameworks_dep kconfigwidgets) |
114 |
+ $(add_frameworks_dep kcoreaddons) |
115 |
+ $(add_frameworks_dep kdbusaddons) |
116 |
+ $(add_frameworks_dep ki18n) |
117 |
+ $(add_frameworks_dep kiconthemes) |
118 |
+ $(add_frameworks_dep kitemviews) |
119 |
+ $(add_frameworks_dep kjobwidgets) |
120 |
+ $(add_frameworks_dep knotifications) |
121 |
+ $(add_frameworks_dep kservice) |
122 |
+ $(add_frameworks_dep ktextwidgets) |
123 |
+ $(add_frameworks_dep kwidgetsaddons) |
124 |
+ $(add_frameworks_dep kwindowsystem) |
125 |
+ $(add_frameworks_dep kxmlgui) |
126 |
+ $(add_frameworks_dep solid) |
127 |
+ $(add_qt_dep qtdbus) |
128 |
+ $(add_qt_dep qtgui) |
129 |
+ $(add_qt_dep qtnetwork 'ssl') |
130 |
+ $(add_qt_dep qtscript) |
131 |
+ $(add_qt_dep qtwidgets) |
132 |
+ $(add_qt_dep qtxml) |
133 |
+ dev-libs/libxml2 |
134 |
+ dev-libs/libxslt |
135 |
+ acl? ( |
136 |
+ sys-apps/attr |
137 |
+ virtual/acl |
138 |
+ ) |
139 |
+ kerberos? ( virtual/krb5 ) |
140 |
+ kwallet? ( $(add_frameworks_dep kwallet) ) |
141 |
+ X? ( $(add_qt_dep qtx11extras) ) |
142 |
+" |
143 |
+DEPEND="${COMMON_DEPEND} |
144 |
+ $(add_qt_dep qtconcurrent) |
145 |
+ handbook? ( $(add_frameworks_dep kdoctools) ) |
146 |
+ test? ( sys-libs/zlib ) |
147 |
+ X? ( |
148 |
+ x11-libs/libX11 |
149 |
+ x11-libs/libXrender |
150 |
+ x11-proto/xproto |
151 |
+ ) |
152 |
+" |
153 |
+PDEPEND=" |
154 |
+ $(add_frameworks_dep kded) |
155 |
+" |
156 |
+RDEPEND="${COMMON_DEPEND}" |
157 |
+ |
158 |
+# tests hang |
159 |
+RESTRICT+=" test" |
160 |
+ |
161 |
+PATCHES=( |
162 |
+ "${FILESDIR}"/${P}-previewjob{1,2}.patch |
163 |
+ "${FILESDIR}"/${P}-kio.patch |
164 |
+) |
165 |
+ |
166 |
+src_configure() { |
167 |
+ local mycmakeargs=( |
168 |
+ $(cmake-utils_use_find_package acl ACL) |
169 |
+ $(cmake-utils_use_find_package handbook KF5DocTools) |
170 |
+ $(cmake-utils_use_find_package kerberos GSSAPI) |
171 |
+ $(cmake-utils_use_find_package kwallet KF5Wallet) |
172 |
+ $(cmake-utils_use_find_package X X11) |
173 |
+ ) |
174 |
+ |
175 |
+ kde5_src_configure |
176 |
+} |