public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/ksystemlog/
Date: Sat, 19 Sep 2020 20:18:59 +0000 (UTC)	[thread overview]
Message-ID: <1600546722.0629e604123c478049295966edecf253b62feff1.asturm@gentoo> (raw)

commit:     0629e604123c478049295966edecf253b62feff1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 16:23:01 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 20:18:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0629e604

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 <AT> e3q.eu>
Closes: https://bugs.gentoo.org/743196
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...20.04.3.ebuild => ksystemlog-20.04.3-r1.ebuild} | 28 ++++++++++------------
 ...20.08.1.ebuild => ksystemlog-20.08.1-r1.ebuild} | 16 ++++++++++++-
 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
similarity index 69%
rename from kde-apps/ksystemlog/ksystemlog-20.04.3.ebuild
rename to kde-apps/ksystemlog/ksystemlog-20.04.3-r1.ebuild
index 3c015a822d8..5578b9e6691 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
similarity index 74%
rename from kde-apps/ksystemlog/ksystemlog-20.08.1.ebuild
rename to kde-apps/ksystemlog/ksystemlog-20.08.1-r1.ebuild
index e62fbabe06a..421207a4525 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 2fdbf33d963..c86984db68b 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>


             reply	other threads:[~2020-09-19 20:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 20:18 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-02 13:22 [gentoo-commits] repo/gentoo:master commit in: kde-apps/ksystemlog/ Andreas Sturmlechner
2021-09-12 11:28 Yixun Lan
2021-08-03  8:56 Andreas Sturmlechner
2016-06-15 17:59 Michael Palimaka
2016-03-05 11:20 Mikle Kolyada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1600546722.0629e604123c478049295966edecf253b62feff1.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox