1 |
commit: 4f6eef277f8cb6faac8f0c75e7f8260599ed453f |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 22 17:11:27 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 23 14:59:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f6eef27 |
7 |
|
8 |
kde-plasma/plasma-workspace: baloosearchruner: Emit DBus error |
9 |
|
10 |
...when baloo is disabled |
11 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445342 |
12 |
Upstream commit afff43effadd78ab682ecf4c6c9919bdcbbedbcd |
13 |
|
14 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
...earchrunner-emit-DBus-error-when-disabled.patch | 75 ++++++++ |
18 |
.../plasma-workspace-5.23.3-r2.ebuild | 210 +++++++++++++++++++++ |
19 |
2 files changed, 285 insertions(+) |
20 |
|
21 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.23.3-baloosearchrunner-emit-DBus-error-when-disabled.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.23.3-baloosearchrunner-emit-DBus-error-when-disabled.patch |
22 |
new file mode 100644 |
23 |
index 000000000000..be4b6e51b3e2 |
24 |
--- /dev/null |
25 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.23.3-baloosearchrunner-emit-DBus-error-when-disabled.patch |
26 |
@@ -0,0 +1,75 @@ |
27 |
+From afff43effadd78ab682ecf4c6c9919bdcbbedbcd Mon Sep 17 00:00:00 2001 |
28 |
+From: Alexander Lohnau <alexander.lohnau@×××.de> |
29 |
+Date: Fri, 12 Nov 2021 11:10:15 +0100 |
30 |
+Subject: [PATCH] baloosearchruner: Emit DBus error when baloo is disabled |
31 |
+ |
32 |
+Otherwise we exit and KRunner runner into a long timeout. |
33 |
+ |
34 |
+By making this a dedicated DBus error KRunner can also know, that this |
35 |
+runner can not be started. Consequently making new attempts to query |
36 |
+this runner can be prevented. |
37 |
+ |
38 |
+Because the runner is DBus-Activated, we can not exit the process, otherwise other |
39 |
+processes (like the search in the app launcher) will have the same issue with the timeout. |
40 |
+BUG: 445342 |
41 |
+ |
42 |
+ |
43 |
+(cherry picked from commit fa5ac3fe3421a0077d9d80f52b89536daa732afa) |
44 |
+--- |
45 |
+ runners/baloo/baloosearchrunner.cpp | 14 ++++++++++---- |
46 |
+ runners/baloo/baloosearchrunner.h | 2 +- |
47 |
+ 2 files changed, 11 insertions(+), 5 deletions(-) |
48 |
+ |
49 |
+diff --git a/runners/baloo/baloosearchrunner.cpp b/runners/baloo/baloosearchrunner.cpp |
50 |
+index 08f24b362..768709cee 100644 |
51 |
+--- a/runners/baloo/baloosearchrunner.cpp |
52 |
++++ b/runners/baloo/baloosearchrunner.cpp |
53 |
+@@ -31,10 +31,6 @@ static const QString s_openParentDirId = QStringLiteral("openParentDir"); |
54 |
+ |
55 |
+ int main(int argc, char **argv) |
56 |
+ { |
57 |
+- Baloo::IndexerConfig config; |
58 |
+- if (!config.fileIndexingEnabled()) { |
59 |
+- return -1; |
60 |
+- } |
61 |
+ QCoreApplication::setAttribute(Qt::AA_DisableSessionManager); |
62 |
+ QApplication::setQuitOnLastWindowClosed(false); |
63 |
+ QApplication app(argc, argv); // KRun needs widgets for error message boxes |
64 |
+@@ -60,11 +56,21 @@ SearchRunner::~SearchRunner() |
65 |
+ |
66 |
+ RemoteActions SearchRunner::Actions() |
67 |
+ { |
68 |
++ Baloo::IndexerConfig config; |
69 |
++ if (!config.fileIndexingEnabled()) { |
70 |
++ sendErrorReply(QDBusError::ErrorType::NotSupported); |
71 |
++ } |
72 |
+ return RemoteActions({RemoteAction{s_openParentDirId, i18n("Open Containing Folder"), QStringLiteral("document-open-folder")}}); |
73 |
+ } |
74 |
+ |
75 |
+ RemoteMatches SearchRunner::Match(const QString &searchTerm) |
76 |
+ { |
77 |
++ Baloo::IndexerConfig config; |
78 |
++ if (!config.fileIndexingEnabled()) { |
79 |
++ sendErrorReply(QDBusError::ErrorType::NotSupported); |
80 |
++ return {}; |
81 |
++ } |
82 |
++ |
83 |
+ // Do not try to show results for queries starting with = |
84 |
+ // this should trigger the calculator, but the AdvancedQueryParser::parse method |
85 |
+ // in baloo interpreted it as an operator, BUG 345134 |
86 |
+diff --git a/runners/baloo/baloosearchrunner.h b/runners/baloo/baloosearchrunner.h |
87 |
+index 5006c9ae3..4836769c9 100644 |
88 |
+--- a/runners/baloo/baloosearchrunner.h |
89 |
++++ b/runners/baloo/baloosearchrunner.h |
90 |
+@@ -14,7 +14,7 @@ |
91 |
+ #include "dbusutils_p.h" |
92 |
+ #include <KRunner/QueryMatch> |
93 |
+ |
94 |
+-class SearchRunner : public QObject |
95 |
++class SearchRunner : public QObject, protected QDBusContext |
96 |
+ { |
97 |
+ Q_OBJECT |
98 |
+ |
99 |
+-- |
100 |
+GitLab |
101 |
+ |
102 |
|
103 |
diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.23.3-r2.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.23.3-r2.ebuild |
104 |
new file mode 100644 |
105 |
index 000000000000..5bc9e1a28269 |
106 |
--- /dev/null |
107 |
+++ b/kde-plasma/plasma-workspace/plasma-workspace-5.23.3-r2.ebuild |
108 |
@@ -0,0 +1,210 @@ |
109 |
+# Copyright 1999-2021 Gentoo Authors |
110 |
+# Distributed under the terms of the GNU General Public License v2 |
111 |
+ |
112 |
+EAPI=8 |
113 |
+ |
114 |
+ECM_HANDBOOK="forceoptional" |
115 |
+ECM_TEST="forceoptional" |
116 |
+KFMIN=5.86.0 |
117 |
+PVCUT=$(ver_cut 1-3) |
118 |
+QTMIN=5.15.2 |
119 |
+VIRTUALX_REQUIRED="test" |
120 |
+inherit ecm kde.org |
121 |
+ |
122 |
+DESCRIPTION="KDE Plasma workspace" |
123 |
+ |
124 |
+LICENSE="GPL-2" # TODO: CHECK |
125 |
+SLOT="5" |
126 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
127 |
+IUSE="appstream +calculator +calendar +fontconfig geolocation gps screencast |
128 |
++semantic-desktop telemetry" |
129 |
+ |
130 |
+REQUIRED_USE="gps? ( geolocation )" |
131 |
+RESTRICT="test" |
132 |
+ |
133 |
+# slot op: various private QtWaylandClient headers |
134 |
+COMMON_DEPEND=" |
135 |
+ >=dev-libs/wayland-1.15 |
136 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
137 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5[widgets] |
138 |
+ >=dev-qt/qtgui-${QTMIN}:5=[jpeg,libinput] |
139 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
140 |
+ >=dev-qt/qtsql-${QTMIN}:5 |
141 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
142 |
+ >=dev-qt/qtwayland-${QTMIN}:5= |
143 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
144 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
145 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
146 |
+ >=kde-frameworks/kactivities-${KFMIN}:5 |
147 |
+ >=kde-frameworks/kactivities-stats-${KFMIN}:5 |
148 |
+ >=kde-frameworks/karchive-${KFMIN}:5 |
149 |
+ >=kde-frameworks/kauth-${KFMIN}:5 |
150 |
+ >=kde-frameworks/kbookmarks-${KFMIN}:5 |
151 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
152 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
153 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
154 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
155 |
+ >=kde-frameworks/kcrash-${KFMIN}:5 |
156 |
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5 |
157 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
158 |
+ >=kde-frameworks/kded-${KFMIN}:5 |
159 |
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5 |
160 |
+ >=kde-frameworks/kguiaddons-${KFMIN}:5 |
161 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
162 |
+ >=kde-frameworks/kiconthemes-${KFMIN}:5 |
163 |
+ >=kde-frameworks/kidletime-${KFMIN}:5 |
164 |
+ >=kde-frameworks/kinit-${KFMIN}:5 |
165 |
+ >=kde-frameworks/kio-${KFMIN}:5 |
166 |
+ >=kde-frameworks/kitemmodels-${KFMIN}:5 |
167 |
+ >=kde-frameworks/kitemviews-${KFMIN}:5 |
168 |
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5 |
169 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
170 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
171 |
+ >=kde-frameworks/knotifyconfig-${KFMIN}:5 |
172 |
+ >=kde-frameworks/kpackage-${KFMIN}:5 |
173 |
+ >=kde-frameworks/kpeople-${KFMIN}:5 |
174 |
+ >=kde-frameworks/krunner-${KFMIN}:5 |
175 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
176 |
+ >=kde-frameworks/ktexteditor-${KFMIN}:5 |
177 |
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5 |
178 |
+ >=kde-frameworks/kunitconversion-${KFMIN}:5 |
179 |
+ >=kde-frameworks/kwallet-${KFMIN}:5 |
180 |
+ >=kde-frameworks/kwayland-${KFMIN}:5 |
181 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
182 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5 |
183 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
184 |
+ >=kde-frameworks/plasma-${KFMIN}:5 |
185 |
+ >=kde-frameworks/prison-${KFMIN}:5[qml] |
186 |
+ >=kde-frameworks/solid-${KFMIN}:5 |
187 |
+ >=kde-plasma/breeze-${PVCUT}:5 |
188 |
+ >=kde-plasma/kscreenlocker-${PVCUT}:5 |
189 |
+ >=kde-plasma/kwin-${PVCUT}:5 |
190 |
+ >=kde-plasma/layer-shell-qt-${PVCUT}:5 |
191 |
+ >=kde-plasma/libkscreen-${PVCUT}:5 |
192 |
+ >=kde-plasma/libksysguard-${PVCUT}:5 |
193 |
+ >=kde-plasma/libkworkspace-${PVCUT}:5 |
194 |
+ >=media-libs/phonon-4.11.0 |
195 |
+ sys-libs/zlib |
196 |
+ x11-libs/libICE |
197 |
+ x11-libs/libSM |
198 |
+ x11-libs/libX11 |
199 |
+ x11-libs/libXau |
200 |
+ x11-libs/libxcb |
201 |
+ x11-libs/libXcursor |
202 |
+ x11-libs/libXfixes |
203 |
+ x11-libs/libXrender |
204 |
+ x11-libs/libXtst |
205 |
+ x11-libs/xcb-util |
206 |
+ x11-libs/xcb-util-image |
207 |
+ appstream? ( dev-libs/appstream[qt5] ) |
208 |
+ calculator? ( sci-libs/libqalculate:= ) |
209 |
+ calendar? ( >=kde-frameworks/kholidays-${KFMIN}:5 ) |
210 |
+ fontconfig? ( |
211 |
+ >=dev-qt/qtprintsupport-${QTMIN}:5 |
212 |
+ media-libs/fontconfig |
213 |
+ x11-libs/libXft |
214 |
+ x11-libs/xcb-util-image |
215 |
+ ) |
216 |
+ geolocation? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 ) |
217 |
+ gps? ( sci-geosciences/gpsd ) |
218 |
+ screencast? ( |
219 |
+ >=dev-qt/qtgui-${QTMIN}:5=[egl] |
220 |
+ media-libs/libglvnd |
221 |
+ >=media-video/pipewire-0.3:= |
222 |
+ x11-libs/libdrm |
223 |
+ ) |
224 |
+ semantic-desktop? ( >=kde-frameworks/baloo-${KFMIN}:5 ) |
225 |
+ telemetry? ( dev-libs/kuserfeedback:5 ) |
226 |
+" |
227 |
+DEPEND="${COMMON_DEPEND} |
228 |
+ >=dev-libs/plasma-wayland-protocols-1.1.1 |
229 |
+ >=dev-qt/qtconcurrent-${QTMIN}:5 |
230 |
+ >=dev-util/wayland-scanner-1.19.0 |
231 |
+ x11-base/xorg-proto |
232 |
+ fontconfig? ( x11-libs/libXrender ) |
233 |
+" |
234 |
+RDEPEND="${COMMON_DEPEND} |
235 |
+ app-text/iso-codes |
236 |
+ >=dev-qt/qdbus-${QTMIN}:5 |
237 |
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5 |
238 |
+ >=dev-qt/qtpaths-${QTMIN}:5 |
239 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5[widgets] |
240 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
241 |
+ kde-apps/kio-extras:5 |
242 |
+ >=kde-frameworks/kdesu-${KFMIN}:5 |
243 |
+ >=kde-frameworks/kirigami-${KFMIN}:5 |
244 |
+ >=kde-frameworks/kquickcharts-${KFMIN}:5 |
245 |
+ >=kde-plasma/milou-${PVCUT}:5 |
246 |
+ >=kde-plasma/plasma-integration-${PVCUT}:5 |
247 |
+ x11-apps/xmessage |
248 |
+ x11-apps/xprop |
249 |
+ x11-apps/xrdb |
250 |
+ x11-apps/xsetroot |
251 |
+ sys-apps/dbus |
252 |
+ !<kde-plasma/breeze-5.22.90:5 |
253 |
+ !<kde-plasma/plasma-desktop-5.21.90:5 |
254 |
+" |
255 |
+BDEPEND="virtual/pkgconfig" |
256 |
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" |
257 |
+ |
258 |
+PATCHES=( |
259 |
+ "${FILESDIR}/${PN}-5.21.5-split-libkworkspace.patch" # downstream |
260 |
+ "${FILESDIR}/${PN}-5.22.5-krunner-cwd-at-home.patch" # TODO upstream: KDE-bug 432975, bug 767478 |
261 |
+ "${FILESDIR}/${P}-baloosearchrunner-emit-DBus-error-when-disabled.patch" # KDE-bug 445342 |
262 |
+) |
263 |
+ |
264 |
+src_prepare() { |
265 |
+ ecm_src_prepare |
266 |
+ |
267 |
+ cmake_comment_add_subdirectory libkworkspace |
268 |
+ # delete colliding libkworkspace translations |
269 |
+ if [[ ${KDE_BUILD_TYPE} = release ]]; then |
270 |
+ find po -type f -name "*po" -and -name "libkworkspace*" -delete || die |
271 |
+ fi |
272 |
+ |
273 |
+ # TODO: try to get a build switch upstreamed |
274 |
+ if ! use screencast; then |
275 |
+ sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die |
276 |
+ fi |
277 |
+ |
278 |
+ # KDE-bug: 433730 |
279 |
+ use calculator || |
280 |
+ cmake_run_in runners cmake_comment_add_subdirectory calculator |
281 |
+} |
282 |
+ |
283 |
+src_configure() { |
284 |
+ local mycmakeargs=( |
285 |
+ -DBUILD_xembed-sni-proxy=OFF |
286 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON |
287 |
+ $(cmake_use_find_package appstream AppStreamQt) |
288 |
+ $(cmake_use_find_package calendar KF5Holidays) |
289 |
+ $(cmake_use_find_package fontconfig Fontconfig) |
290 |
+ $(cmake_use_find_package geolocation KF5NetworkManagerQt) |
291 |
+ $(cmake_use_find_package semantic-desktop KF5Baloo) |
292 |
+ $(cmake_use_find_package telemetry KUserFeedback) |
293 |
+ ) |
294 |
+ |
295 |
+ use geolocation && mycmakeargs+=( $(cmake_use_find_package gps libgps) ) |
296 |
+ |
297 |
+ ecm_src_configure |
298 |
+} |
299 |
+ |
300 |
+src_install() { |
301 |
+ ecm_src_install |
302 |
+ |
303 |
+ # default startup and shutdown scripts |
304 |
+ insinto /etc/xdg/plasma-workspace/env |
305 |
+ doins "${FILESDIR}"/10-agent-startup.sh |
306 |
+ |
307 |
+ insinto /etc/xdg/plasma-workspace/shutdown |
308 |
+ doins "${FILESDIR}"/10-agent-shutdown.sh |
309 |
+ fperms +x /etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh |
310 |
+} |
311 |
+ |
312 |
+pkg_postinst () { |
313 |
+ ecm_pkg_postinst |
314 |
+ |
315 |
+ elog "To enable gpg-agent and/or ssh-agent in Plasma sessions," |
316 |
+ elog "edit ${EPREFIX}/etc/xdg/plasma-workspace/env/10-agent-startup.sh" |
317 |
+ elog "and ${EPREFIX}/etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh" |
318 |
+} |