commit: b19f5f8a1612cdaac637d07f6729b66d7828f835 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Thu Sep 28 20:05:09 2023 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sat Sep 30 09:57:40 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b19f5f8a
kde-plasma/kscreenlocker: Fix kscreenlocker_greet crash w/ qmlcache KDE-bug: https://bugs.kde.org/show_bug.cgi?id=471952 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> ...creenlocker-5.27.8-disable-qml-disk-cache.patch | 42 +++++++++++ .../kscreenlocker/kscreenlocker-5.27.8-r1.ebuild | 87 ++++++++++++++++++++++ 2 files changed, 129 insertions(+) diff --git a/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch b/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch new file mode 100644 index 000000000000..e177bb290f52 --- /dev/null +++ b/kde-plasma/kscreenlocker/files/kscreenlocker-5.27.8-disable-qml-disk-cache.patch @@ -0,0 +1,42 @@ +From f9b5596b2763e33319134cfd9e9fd5e6bd124a0b Mon Sep 17 00:00:00 2001 +From: Harald Sitter <[email protected]> +Date: Mon, 18 Sep 2023 10:56:47 +0200 +Subject: [PATCH] greeter: disable qml disk cache + +The cache currently runs risk of getting corrupted and breaking the lock +screen until the cache hash changes or the cache file gets removed by +the user. Since we don't necessarily need a cache here let's just +disable it for the time being in the interest of greater fault +tolerance. + +BUG: 471952 +(cherry picked from commit d1640daa360943f86196e323c4a76bde57566150) +--- + greeter/main.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/greeter/main.cpp b/greeter/main.cpp +index f5c3c05c..6c2bff28 100644 +--- a/greeter/main.cpp ++++ b/greeter/main.cpp +@@ -1,5 +1,6 @@ + /* + SPDX-FileCopyrightText: 2011 Martin Gräßlin <[email protected]> ++SPDX-FileCopyrightText: 2023 Harald Sitter <[email protected]> + + SPDX-License-Identifier: GPL-2.0-or-later + */ +@@ -81,6 +82,10 @@ int main(int argc, char *argv[]) + + // Suppresses modal warnings about unwritable configuration files which may render the system inaccessible + qputenv("KDE_HOME_READONLY", "1"); ++ // Disable QML caching to prevent cache corruption in full or near-full disk scenarios. ++ // https://bugs.kde.org/show_bug.cgi?id=471952 ++ // https://bugreports.qt.io/browse/QTBUG-117130 ++ qputenv("QML_DISABLE_DISK_CACHE", "1"); + + auto format = QSurfaceFormat::defaultFormat(); + format.setOption(QSurfaceFormat::ResetNotification); +-- +GitLab + diff --git a/kde-plasma/kscreenlocker/kscreenlocker-5.27.8-r1.ebuild b/kde-plasma/kscreenlocker/kscreenlocker-5.27.8-r1.ebuild new file mode 100644 index 000000000000..48009bd2b6db --- /dev/null +++ b/kde-plasma/kscreenlocker/kscreenlocker-5.27.8-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=5.106.0 +PVCUT=$(ver_cut 1-3) +QTMIN=5.15.9 +inherit ecm plasma.kde.org pam + +DESCRIPTION="Library and components for secure lock screen architecture" + +LICENSE="GPL-2" # TODO: CHECK +SLOT="5" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="" + +RESTRICT="test" + +COMMON_DEPEND=" + dev-libs/wayland + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtnetwork-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=dev-qt/qtx11extras-${QTMIN}:5 + >=kde-frameworks/kcmutils-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5[qml] + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kcrash-${KFMIN}:5 + >=kde-frameworks/kdeclarative-${KFMIN}:5 + >=kde-frameworks/kglobalaccel-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kidletime-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/knotifications-${KFMIN}:5 + >=kde-frameworks/kpackage-${KFMIN}:5 + >=kde-frameworks/kwayland-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 + >=kde-frameworks/solid-${KFMIN}:5 + >=kde-plasma/layer-shell-qt-${PVCUT}:5 + >=kde-plasma/libkscreen-${PVCUT}:5 + sys-libs/pam + x11-libs/libX11 + x11-libs/libXi + x11-libs/libxcb + x11-libs/xcb-util-keysyms +" +DEPEND="${COMMON_DEPEND} + x11-base/xorg-proto +" +RDEPEND="${COMMON_DEPEND} + >=dev-qt/qtquickcontrols2-${QTMIN}:5 + >=kde-frameworks/kirigami-${KFMIN}:5 + >=kde-frameworks/plasma-${KFMIN}:5 +" +BDEPEND=" + dev-util/wayland-scanner + >=kde-frameworks/kcmutils-${KFMIN}:5 +" +PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" + +PATCHES=( "${FILESDIR}/${P}-disable-qml-disk-cache.patch" ) # KDE-bug 471952 + +src_prepare() { + ecm_src_prepare + use test || cmake_run_in greeter cmake_comment_add_subdirectory autotests +} + +src_test() { + # requires running environment + local myctestargs=( + -E x11LockerTest + ) + ecm_src_test +} + +src_install() { + ecm_src_install + + newpamd "${FILESDIR}/kde.pam" kde + newpamd "${FILESDIR}/kde-np.pam" kde-np +}
