Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-workspace/, kde-plasma/plasma-workspace/files/
Date: Wed, 14 Sep 2022 11:59:08
Message-Id: 1663156724.6114a64b23157311ebadb1e053bc4485088a69fd.asturm@gentoo
1 commit: 6114a64b23157311ebadb1e053bc4485088a69fd
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 14 10:32:57 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 14 11:58:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6114a64b
7
8 kde-plasma/plasma-workspace: Delay ksplash until after env is set up
9
10 Upstream commit 9bf0e56da84de5e9bd2b3ff28bdb2cb1af6de91e
11
12 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=458865
13 Bug: https://bugs.gentoo.org/868909
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 ....25.5-delay-ksplash-until-after-env-setup.patch | 82 ++++++++
17 .../plasma-workspace-5.25.5-r2.ebuild | 220 +++++++++++++++++++++
18 2 files changed, 302 insertions(+)
19
20 diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-delay-ksplash-until-after-env-setup.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-delay-ksplash-until-after-env-setup.patch
21 new file mode 100644
22 index 000000000000..9fcea5a32cbe
23 --- /dev/null
24 +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-delay-ksplash-until-after-env-setup.patch
25 @@ -0,0 +1,82 @@
26 +From 536ba654e43741a18d2b71ee519f1daefeaa7ffd Mon Sep 17 00:00:00 2001
27 +From: Fushan Wen <qydwhotmail@×××××.com>
28 +Date: Sat, 4 Jun 2022 18:15:10 +0800
29 +Subject: [PATCH 1/2] startkde: `Q_UNUSED` ksplash
30 +
31 +Variable 'ksplash' is assigned a value that is never used. (CWE-563)
32 +
33 +(cherry picked from commit 6bebf9a7e636d6655ede49ce48d33f2254ac75f0)
34 +---
35 + startkde/startplasma-x11.cpp | 1 +
36 + 1 file changed, 1 insertion(+)
37 +
38 +diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp
39 +index 817de3511..a80c515fc 100644
40 +--- a/startkde/startplasma-x11.cpp
41 ++++ b/startkde/startplasma-x11.cpp
42 +@@ -59,6 +59,7 @@ int main(int argc, char **argv)
43 +
44 + setupCursor(false);
45 + QScopedPointer<QProcess, KillBeforeDeleter> ksplash(setupKSplash());
46 ++ Q_UNUSED(ksplash)
47 +
48 + runEnvironmentScripts();
49 +
50 +--
51 +2.37.3
52 +
53 +
54 +From 5e54fbd0b351e43cb68c193bf684dd8cdbd11210 Mon Sep 17 00:00:00 2001
55 +From: Harald Sitter <sitter@×××.org>
56 +Date: Tue, 13 Sep 2022 13:54:04 +0200
57 +Subject: [PATCH 2/2] delay ksplash until after env is set up
58 +
59 +otherwise we can dbus invoke with the wrong environment. specifically
60 +this happens with the latest qtbase changes that introduced color
61 +picking support on wayland. when we start a qguiapplication with
62 +incomplete environment that dbus invokes the xdg-portal system and that
63 +in turn has an incomplete environment resulting in theming and the likes
64 +not properly applying because the portal doesn't know that it runs
65 +inside a plasma session.
66 +
67 +https://invent.kde.org/qt/qt/qtbase/-/commit/2dc083df009a45c5dacfea27b0affeb85b01f847
68 +
69 +BUG: 458865
70 +(cherry picked from commit 9bf0e56da84de5e9bd2b3ff28bdb2cb1af6de91e)
71 +
72 +asturmlechner 2022-09-14: Backported to Plasma/5.25 branch
73 +---
74 + startkde/startplasma-x11.cpp | 10 ++++++----
75 + 1 file changed, 6 insertions(+), 4 deletions(-)
76 +
77 +diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp
78 +index a80c515fc..d1722771b 100644
79 +--- a/startkde/startplasma-x11.cpp
80 ++++ b/startkde/startplasma-x11.cpp
81 +@@ -57,10 +57,6 @@ int main(int argc, char **argv)
82 + }
83 + }
84 +
85 +- setupCursor(false);
86 +- QScopedPointer<QProcess, KillBeforeDeleter> ksplash(setupKSplash());
87 +- Q_UNUSED(ksplash)
88 +-
89 + runEnvironmentScripts();
90 +
91 + out << "startkde: Starting up...\n";
92 +@@ -80,6 +76,12 @@ int main(int argc, char **argv)
93 + // variables (e.g. LANG and LC_*)
94 + importSystemdEnvrionment();
95 +
96 ++ // NOTE: Do not start QGuiApplications before setting up the environment. We'd be at risk of dbus invoking other
97 ++ // processes with an incomplete environment.
98 ++ setupCursor(false);
99 ++ QScopedPointer<QProcess, KillBeforeDeleter> ksplash(setupKSplash());
100 ++ Q_UNUSED(ksplash)
101 ++
102 + if (!startPlasmaSession(false))
103 + return 1;
104 +
105 +--
106 +2.37.3
107 +
108
109 diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.25.5-r2.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.25.5-r2.ebuild
110 new file mode 100644
111 index 000000000000..809aabe37bf7
112 --- /dev/null
113 +++ b/kde-plasma/plasma-workspace/plasma-workspace-5.25.5-r2.ebuild
114 @@ -0,0 +1,220 @@
115 +# Copyright 1999-2022 Gentoo Authors
116 +# Distributed under the terms of the GNU General Public License v2
117 +
118 +EAPI=8
119 +
120 +ECM_HANDBOOK="optional"
121 +ECM_TEST="forceoptional"
122 +KFMIN=5.95.0
123 +PVCUT=$(ver_cut 1-3)
124 +QTMIN=5.15.5
125 +VIRTUALX_REQUIRED="test"
126 +inherit ecm plasma.kde.org
127 +
128 +DESCRIPTION="KDE Plasma workspace"
129 +
130 +LICENSE="GPL-2" # TODO: CHECK
131 +SLOT="5"
132 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
133 +IUSE="appstream +calendar +fontconfig geolocation gps +policykit
134 +screencast +semantic-desktop telemetry"
135 +
136 +REQUIRED_USE="gps? ( geolocation )"
137 +RESTRICT="test"
138 +
139 +# slot op: various private QtWaylandClient headers
140 +COMMON_DEPEND="
141 + >=dev-libs/wayland-1.15
142 + >=dev-qt/qtdbus-${QTMIN}:5
143 + >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
144 + >=dev-qt/qtgui-${QTMIN}:5=[jpeg,libinput]
145 + >=dev-qt/qtnetwork-${QTMIN}:5
146 + >=dev-qt/qtsql-${QTMIN}:5
147 + >=dev-qt/qtsvg-${QTMIN}:5
148 + >=dev-qt/qtwayland-${QTMIN}:5=
149 + >=dev-qt/qtwidgets-${QTMIN}:5
150 + >=dev-qt/qtx11extras-${QTMIN}:5
151 + >=dev-qt/qtxml-${QTMIN}:5
152 + >=kde-frameworks/kactivities-${KFMIN}:5
153 + >=kde-frameworks/kactivities-stats-${KFMIN}:5
154 + >=kde-frameworks/karchive-${KFMIN}:5
155 + >=kde-frameworks/kauth-${KFMIN}:5
156 + >=kde-frameworks/kbookmarks-${KFMIN}:5
157 + >=kde-frameworks/kcompletion-${KFMIN}:5
158 + >=kde-frameworks/kconfig-${KFMIN}:5
159 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5
160 + >=kde-frameworks/kcoreaddons-${KFMIN}:5
161 + >=kde-frameworks/kcrash-${KFMIN}:5
162 + >=kde-frameworks/kdbusaddons-${KFMIN}:5
163 + >=kde-frameworks/kdeclarative-${KFMIN}:5
164 + >=kde-frameworks/kded-${KFMIN}:5
165 + >=kde-frameworks/kglobalaccel-${KFMIN}:5
166 + >=kde-frameworks/kguiaddons-${KFMIN}:5
167 + >=kde-frameworks/ki18n-${KFMIN}:5
168 + >=kde-frameworks/kiconthemes-${KFMIN}:5
169 + >=kde-frameworks/kidletime-${KFMIN}:5
170 + >=kde-frameworks/kinit-${KFMIN}:5
171 + >=kde-frameworks/kio-${KFMIN}:5
172 + >=kde-frameworks/kitemmodels-${KFMIN}:5
173 + >=kde-frameworks/kitemviews-${KFMIN}:5
174 + >=kde-frameworks/kjobwidgets-${KFMIN}:5
175 + >=kde-frameworks/knewstuff-${KFMIN}:5
176 + >=kde-frameworks/knotifications-${KFMIN}:5
177 + >=kde-frameworks/knotifyconfig-${KFMIN}:5
178 + >=kde-frameworks/kpackage-${KFMIN}:5
179 + >=kde-frameworks/kpeople-${KFMIN}:5
180 + >=kde-frameworks/krunner-${KFMIN}:5
181 + >=kde-frameworks/kservice-${KFMIN}:5
182 + >=kde-frameworks/ktexteditor-${KFMIN}:5
183 + >=kde-frameworks/ktextwidgets-${KFMIN}:5
184 + >=kde-frameworks/kunitconversion-${KFMIN}:5
185 + >=kde-frameworks/kwallet-${KFMIN}:5
186 + >=kde-frameworks/kwayland-${KFMIN}:5
187 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
188 + >=kde-frameworks/kwindowsystem-${KFMIN}:5
189 + >=kde-frameworks/kxmlgui-${KFMIN}:5
190 + >=kde-frameworks/plasma-${KFMIN}:5
191 + >=kde-frameworks/prison-${KFMIN}:5[qml]
192 + >=kde-frameworks/solid-${KFMIN}:5
193 + >=kde-plasma/breeze-${PVCUT}:5
194 + >=kde-plasma/kscreenlocker-${PVCUT}:5
195 + >=kde-plasma/kwin-${PVCUT}:5
196 + >=kde-plasma/layer-shell-qt-${PVCUT}:5
197 + >=kde-plasma/libkscreen-${PVCUT}:5
198 + >=kde-plasma/libksysguard-${PVCUT}:5
199 + >=kde-plasma/libkworkspace-${PVCUT}:5
200 + >=media-libs/phonon-4.11.0
201 + sci-libs/libqalculate:=
202 + sys-libs/zlib
203 + x11-libs/libICE
204 + x11-libs/libSM
205 + x11-libs/libX11
206 + x11-libs/libXau
207 + x11-libs/libxcb
208 + x11-libs/libXcursor
209 + x11-libs/libXfixes
210 + x11-libs/libXrender
211 + x11-libs/libXtst
212 + x11-libs/xcb-util
213 + x11-libs/xcb-util-image
214 + appstream? ( dev-libs/appstream[qt5] )
215 + calendar? ( >=kde-frameworks/kholidays-${KFMIN}:5 )
216 + fontconfig? (
217 + >=dev-qt/qtprintsupport-${QTMIN}:5
218 + media-libs/fontconfig
219 + x11-libs/libXft
220 + x11-libs/xcb-util-image
221 + )
222 + geolocation? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 )
223 + gps? ( sci-geosciences/gpsd )
224 + policykit? ( virtual/libcrypt:= )
225 + screencast? (
226 + >=dev-qt/qtgui-${QTMIN}:5=[egl]
227 + media-libs/libglvnd
228 + >=media-video/pipewire-0.3:=
229 + x11-libs/libdrm
230 + )
231 + semantic-desktop? ( >=kde-frameworks/baloo-${KFMIN}:5 )
232 + telemetry? ( dev-libs/kuserfeedback:5 )
233 +"
234 +DEPEND="${COMMON_DEPEND}
235 + >=dev-libs/plasma-wayland-protocols-1.6.0
236 + >=dev-qt/qtconcurrent-${QTMIN}:5
237 + >=dev-util/wayland-scanner-1.19.0
238 + x11-base/xorg-proto
239 + fontconfig? ( x11-libs/libXrender )
240 + test? ( >=dev-libs/wayland-protocols-1.24 )
241 +"
242 +RDEPEND="${COMMON_DEPEND}
243 + app-text/iso-codes
244 + >=dev-qt/qdbus-${QTMIN}:*
245 + >=dev-qt/qtgraphicaleffects-${QTMIN}:5
246 + >=dev-qt/qtpaths-${QTMIN}:5
247 + >=dev-qt/qtquickcontrols-${QTMIN}:5[widgets]
248 + >=dev-qt/qtquickcontrols2-${QTMIN}:5
249 + kde-apps/kio-extras:5
250 + >=kde-frameworks/kirigami-${KFMIN}:5
251 + >=kde-frameworks/kquickcharts-${KFMIN}:5
252 + >=kde-plasma/milou-${PVCUT}:5
253 + >=kde-plasma/plasma-integration-${PVCUT}:5
254 + sys-apps/dbus
255 + x11-apps/xmessage
256 + x11-apps/xprop
257 + x11-apps/xrdb
258 + x11-apps/xsetroot
259 + !<kde-plasma/breeze-5.22.90:5
260 + !<kde-plasma/plasma-desktop-5.23.90:5
261 + policykit? ( sys-apps/accountsservice )
262 +"
263 +BDEPEND="
264 + >=dev-qt/qtwaylandscanner-${QTMIN}:5
265 + virtual/pkgconfig
266 +"
267 +PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
268 +
269 +PATCHES=(
270 + "${FILESDIR}/${PN}-5.24.80-split-libkworkspace.patch" # downstream
271 + "${FILESDIR}/${PN}-5.22.5-krunner-cwd-at-home.patch" # TODO upstream: KDE-bug 432975, bug 767478
272 + "${FILESDIR}/${P}-widgetexplorer-recurse-containments.patch" # https://mail.kde.org/pipermail/distributions/2022-September/001287.html
273 + "${FILESDIR}/${P}-delay-ksplash-until-after-env-setup.patch" # KDE-bug 458865 w/ Qt 5.15.6
274 +)
275 +
276 +src_prepare() {
277 + ecm_src_prepare
278 +
279 + cmake_comment_add_subdirectory libkworkspace
280 + # delete colliding libkworkspace translations
281 + if [[ ${KDE_BUILD_TYPE} = release ]]; then
282 + find po -type f -name "*po" -and -name "libkworkspace*" -delete || die
283 + fi
284 +
285 + # TODO: try to get a build switch upstreamed
286 + if ! use screencast; then
287 + sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
288 + fi
289 +
290 + # TODO: try to get a build switch upstreamed
291 + if use geolocation; then
292 + use gps || sed -e "s/^pkg_check_modules.*LIBGPS/#&/" \
293 + -i dataengines/geolocation/CMakeLists.txt || die
294 + fi
295 +
296 + if ! use policykit; then
297 + cmake_run_in kcms cmake_comment_add_subdirectory users
298 + fi
299 +}
300 +
301 +src_configure() {
302 + local mycmakeargs=(
303 + -DBUILD_xembed-sni-proxy=OFF
304 + -DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON
305 + $(cmake_use_find_package appstream AppStreamQt)
306 + $(cmake_use_find_package calendar KF5Holidays)
307 + $(cmake_use_find_package fontconfig Fontconfig)
308 + $(cmake_use_find_package geolocation KF5NetworkManagerQt)
309 + $(cmake_use_find_package semantic-desktop KF5Baloo)
310 + $(cmake_use_find_package telemetry KUserFeedback)
311 + )
312 +
313 + ecm_src_configure
314 +}
315 +
316 +src_install() {
317 + ecm_src_install
318 +
319 + # default startup and shutdown scripts
320 + insinto /etc/xdg/plasma-workspace/env
321 + doins "${FILESDIR}"/10-agent-startup.sh
322 +
323 + insinto /etc/xdg/plasma-workspace/shutdown
324 + doins "${FILESDIR}"/10-agent-shutdown.sh
325 + fperms +x /etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh
326 +}
327 +
328 +pkg_postinst () {
329 + ecm_pkg_postinst
330 +
331 + elog "To enable gpg-agent and/or ssh-agent in Plasma sessions,"
332 + elog "edit ${EPREFIX}/etc/xdg/plasma-workspace/env/10-agent-startup.sh"
333 + elog "and ${EPREFIX}/etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh"
334 +}