diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-02-21 11:03:21 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-02-22 11:22:14 +0100 |
commit | c16c1be7946efb201b545944b0d6cea31964f197 (patch) | |
tree | 35d90a9955685e1f30f2850517da3064740af161 /kde-frameworks/kidletime | |
parent | net-misc/curl: remove overlooked patches (diff) | |
download | gentoo-c16c1be7946efb201b545944b0d6cea31964f197.tar.gz gentoo-c16c1be7946efb201b545944b0d6cea31964f197.tar.bz2 gentoo-c16c1be7946efb201b545944b0d6cea31964f197.zip |
kde-frameworks/kidletime: Fix baloo segfault in Wayland session
Upstream commit a0da010b8c4c97792543d24f6597ba1c1b3ceaef
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=465801
Bug: https://bugs.gentoo.org/895636
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kidletime')
3 files changed, 178 insertions, 0 deletions
diff --git a/kde-frameworks/kidletime/files/kidletime-5.102.0-wayland-baloo-crashfix.patch b/kde-frameworks/kidletime/files/kidletime-5.102.0-wayland-baloo-crashfix.patch new file mode 100644 index 000000000000..da2faa692cd2 --- /dev/null +++ b/kde-frameworks/kidletime/files/kidletime-5.102.0-wayland-baloo-crashfix.patch @@ -0,0 +1,56 @@ +From a0da010b8c4c97792543d24f6597ba1c1b3ceaef Mon Sep 17 00:00:00 2001 +From: David Redondo <kde@david-redondo.de> +Date: Thu, 16 Feb 2023 12:16:03 +0100 +Subject: [PATCH] wayland: Guard wayland object destructors + +Kidletime is a singleton and the client API works by supplying ints to add +or remove timeouts. When not all timeouts are removed before program exits, +trying to destroy the wayland objects will crash since the lifetime of the +wayland connection is tied to the QGuiApplication. +BUG:465801 +FIXED-IN:5.104 + + +(cherry picked from commit 53779a8d8fb177762d0435634c8ca45b0a47f1db) +--- + src/plugins/wayland/poller.cpp | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/wayland/poller.cpp b/src/plugins/wayland/poller.cpp +index 918766b..9c1d7ad 100644 +--- a/src/plugins/wayland/poller.cpp ++++ b/src/plugins/wayland/poller.cpp +@@ -50,7 +50,9 @@ public: + + ~IdleTimeoutKwin() + { +- release(); ++ if (qGuiApp) { ++ release(); ++ } + } + + protected: +@@ -74,7 +76,9 @@ public: + + ~IdleTimeoutExt() + { +- destroy(); ++ if (qGuiApp) { ++ destroy(); ++ } + } + + protected: +@@ -120,7 +124,7 @@ public: + } + ~IdleManagerExt() + { +- if (isActive()) { ++ if (qGuiApp && isActive()) { + destroy(); + } + } +-- +GitLab + diff --git a/kde-frameworks/kidletime/kidletime-5.102.0-r1.ebuild b/kde-frameworks/kidletime/kidletime-5.102.0-r1.ebuild new file mode 100644 index 000000000000..3c3ada0ad28c --- /dev/null +++ b/kde-frameworks/kidletime/kidletime-5.102.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="false" +QTMIN=5.15.5 +inherit ecm frameworks.kde.org + +DESCRIPTION="Framework for detection and notification of device idle time" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="wayland X xscreensaver" + +REQUIRED_USE="xscreensaver? ( X )" + +RDEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + wayland? ( + dev-libs/wayland + >=dev-qt/qtgui-${QTMIN}:5=[wayland] + >=dev-qt/qtwayland-${QTMIN}:5 + ) + X? ( + >=dev-qt/qtx11extras-${QTMIN}:5 + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libXext + ) + xscreensaver? ( + >=dev-qt/qtdbus-${QTMIN}:5 + x11-libs/libXScrnSaver + ) +" +DEPEND="${RDEPEND} + wayland? ( + >=dev-libs/plasma-wayland-protocols-1.7.0 + >=dev-libs/wayland-protocols-1.27:0 + ) +" +BDEPEND="wayland? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )" + +PATCHES=( "${FILESDIR}/${P}-wayland-baloo-crashfix.patch" ) # bug 895636 + +src_prepare() { + ecm_src_prepare + if ! use xscreensaver; then + sed -i -e "s/\${X11_Xscreensaver_FOUND}/0/" CMakeLists.txt || die + fi +} + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package wayland Qt5WaylandClient) + $(cmake_use_find_package X X11) + $(cmake_use_find_package X XCB) + ) + + ecm_src_configure +} diff --git a/kde-frameworks/kidletime/kidletime-5.103.0-r1.ebuild b/kde-frameworks/kidletime/kidletime-5.103.0-r1.ebuild new file mode 100644 index 000000000000..8912fc139445 --- /dev/null +++ b/kde-frameworks/kidletime/kidletime-5.103.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="false" +QTMIN=5.15.5 +inherit ecm frameworks.kde.org + +DESCRIPTION="Framework for detection and notification of device idle time" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="wayland X xscreensaver" + +REQUIRED_USE="xscreensaver? ( X )" + +RDEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + wayland? ( + dev-libs/wayland + >=dev-qt/qtgui-${QTMIN}:5=[wayland] + >=dev-qt/qtwayland-${QTMIN}:5 + ) + X? ( + >=dev-qt/qtx11extras-${QTMIN}:5 + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libXext + ) + xscreensaver? ( + >=dev-qt/qtdbus-${QTMIN}:5 + x11-libs/libXScrnSaver + ) +" +DEPEND="${RDEPEND} + wayland? ( + >=dev-libs/plasma-wayland-protocols-1.7.0 + >=dev-libs/wayland-protocols-1.27:0 + ) +" +BDEPEND="wayland? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )" + +PATCHES=( "${FILESDIR}/${PN}-5.102.0-wayland-baloo-crashfix.patch" ) # bug 895636 + +src_prepare() { + ecm_src_prepare + if ! use xscreensaver; then + sed -i -e "s/\${X11_Xscreensaver_FOUND}/0/" CMakeLists.txt || die + fi +} + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package wayland Qt5WaylandClient) + $(cmake_use_find_package X X11) + $(cmake_use_find_package X XCB) + ) + + ecm_src_configure +} |