diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-09-19 18:23:01 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-09-19 22:18:42 +0200 |
commit | 0629e604123c478049295966edecf253b62feff1 (patch) | |
tree | 78b4e3d79e7b8a0c07e02868e52db45db4ca693e /kde-apps | |
parent | dev-util/cmake: Disable broken tests (diff) | |
download | gentoo-0629e604123c478049295966edecf253b62feff1.tar.gz gentoo-0629e604123c478049295966edecf253b62feff1.tar.bz2 gentoo-0629e604123c478049295966edecf253b62feff1.zip |
kde-apps/ksystemlog: Add IUSE=kdesu for X-only run-as-root option
Keeping this disabled by default with accompanying pkg_postinst messages as a
middle ground between hard-requiring X or being broken by default in Wayland.
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=414971
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=227793
Reported-by: Erik Quaeghebeur <gentoo@e3q.eu>
Closes: https://bugs.gentoo.org/743196
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps')
-rw-r--r-- | kde-apps/ksystemlog/ksystemlog-20.04.3-r1.ebuild (renamed from kde-apps/ksystemlog/ksystemlog-20.04.3.ebuild) | 28 | ||||
-rw-r--r-- | kde-apps/ksystemlog/ksystemlog-20.08.1-r1.ebuild (renamed from kde-apps/ksystemlog/ksystemlog-20.08.1.ebuild) | 16 | ||||
-rw-r--r-- | kde-apps/ksystemlog/metadata.xml | 3 |
3 files changed, 31 insertions, 16 deletions
diff --git a/kde-apps/ksystemlog/ksystemlog-20.04.3.ebuild b/kde-apps/ksystemlog/ksystemlog-20.04.3-r1.ebuild index 3c015a822d8e..5578b9e66917 100644 --- a/kde-apps/ksystemlog/ksystemlog-20.04.3.ebuild +++ b/kde-apps/ksystemlog/ksystemlog-20.04.3-r1.ebuild @@ -16,10 +16,7 @@ HOMEPAGE="https://kde.org/applications/system/org.kde.ksystemlog" LICENSE="GPL-2" # TODO: CHECK SLOT="5" KEYWORDS="amd64 arm64 ~ppc64 x86" -IUSE="systemd" - -# bug 378101 -RESTRICT+=" test" +IUSE="kdesu systemd" DEPEND=" >=dev-qt/qtgui-${QTMIN}:5 @@ -40,21 +37,16 @@ DEPEND=" >=kde-frameworks/kxmlgui-${KFMIN}:5 systemd? ( sys-apps/systemd ) " -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + kdesu? ( kde-plasma/kde-cli-tools[kdesu] ) +" src_prepare() { ecm_src_prepare - if use test; then - # beat this stupid test into shape: the test files contain no year, so - # comparison succeeds only in 2007 !!! - local theyear=$(date +%Y) - einfo Setting the current year as ${theyear} in the test files - sed -e "s:2007:${theyear}:g" -i tests/systemAnalyzerTest.cpp || die - - # one test consistently fails, so comment it out for the moment - sed -e "s:systemAnalyzerTest:# dont run systemAnalyzerTest:g" \ - -i ksystemlog/tests/CMakeLists.txt || die + if ! use kdesu; then + sed -e "/^X-KDE-SubstituteUID/s:true:false:" \ + -i src/org.kde.ksystemlog.desktop || die fi } @@ -64,3 +56,9 @@ src_configure() { ) ecm_src_configure } + +pkg_postinst() { + ecm_pkg_postinst + use kdesu || elog "Will show only user readable logs without USE=kdesu (only in X)." + use kdesu && elog "Cannot be launched from application menu in Wayland with USE=kdesu." +} diff --git a/kde-apps/ksystemlog/ksystemlog-20.08.1.ebuild b/kde-apps/ksystemlog/ksystemlog-20.08.1-r1.ebuild index e62fbabe06a1..421207a4525c 100644 --- a/kde-apps/ksystemlog/ksystemlog-20.08.1.ebuild +++ b/kde-apps/ksystemlog/ksystemlog-20.08.1-r1.ebuild @@ -16,7 +16,7 @@ HOMEPAGE="https://kde.org/applications/system/org.kde.ksystemlog" LICENSE="GPL-2" # TODO: CHECK SLOT="5" KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" -IUSE="systemd" +IUSE="kdesu systemd" DEPEND=" >=dev-qt/qtgui-${QTMIN}:5 @@ -38,9 +38,23 @@ DEPEND=" " RDEPEND="${DEPEND}" +src_prepare() { + ecm_src_prepare + if ! use kdesu; then + sed -e "/^X-KDE-SubstituteUID/s:true:false:" \ + -i src/org.kde.ksystemlog.desktop || die + fi +} + src_configure() { local mycmakeargs=( $(cmake_use_find_package systemd Journald) ) ecm_src_configure } + +pkg_postinst() { + ecm_pkg_postinst + use kdesu || elog "Will show only user readable logs without USE=kdesu (only in X)." + use kdesu && elog "Cannot be launched from application menu in Wayland with USE=kdesu." +} diff --git a/kde-apps/ksystemlog/metadata.xml b/kde-apps/ksystemlog/metadata.xml index 2fdbf33d963d..c86984db68b9 100644 --- a/kde-apps/ksystemlog/metadata.xml +++ b/kde-apps/ksystemlog/metadata.xml @@ -5,4 +5,7 @@ <email>kde@gentoo.org</email> <name>Gentoo KDE Project</name> </maintainer> + <use> + <flag name="kdesu">Run as root using kdesu from <pkg>kde-plasma/kde-cli-tools</pkg></flag> + </use> </pkgmetadata> |