From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/ksystemlog/
Date: Sat, 19 Sep 2020 20:03:47 +0000 (UTC) [thread overview]
Message-ID: <1600545795.3f8ad6b2e4c131954ba2564664f0a5eccee5178d.asturm@gentoo> (raw)
commit: 3f8ad6b2e4c131954ba2564664f0a5eccee5178d
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:03:15 2020 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=3f8ad6b2
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>
Bug: https://bugs.gentoo.org/743196
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
kde-apps/ksystemlog/ksystemlog-20.08.49.9999.ebuild | 16 +++++++++++++++-
kde-apps/ksystemlog/ksystemlog-9999.ebuild | 20 ++++++++++++++++++--
kde-apps/ksystemlog/metadata.xml | 3 +++
3 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/kde-apps/ksystemlog/ksystemlog-20.08.49.9999.ebuild b/kde-apps/ksystemlog/ksystemlog-20.08.49.9999.ebuild
index 0b27eba71b..f5db0dd3da 100644
--- a/kde-apps/ksystemlog/ksystemlog-20.08.49.9999.ebuild
+++ b/kde-apps/ksystemlog/ksystemlog-20.08.49.9999.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://kde.org/applications/system/org.kde.ksystemlog"
LICENSE="GPL-2" # TODO: CHECK
SLOT="5"
KEYWORDS=""
-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/ksystemlog-9999.ebuild b/kde-apps/ksystemlog/ksystemlog-9999.ebuild
index b3ab81e1bf..974334236b 100644
--- a/kde-apps/ksystemlog/ksystemlog-9999.ebuild
+++ b/kde-apps/ksystemlog/ksystemlog-9999.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://kde.org/applications/system/org.kde.ksystemlog"
LICENSE="GPL-2" # TODO: CHECK
SLOT="5"
KEYWORDS=""
-IUSE="systemd"
+IUSE="kdesu systemd"
DEPEND="
>=dev-qt/qtgui-${QTMIN}:5
@@ -36,7 +36,17 @@ 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 kdesu; then
+ sed -e "/^X-KDE-SubstituteUID/s:true:false:" \
+ -i src/org.kde.ksystemlog.desktop || die
+ fi
+}
src_configure() {
local mycmakeargs=(
@@ -44,3 +54,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/metadata.xml b/kde-apps/ksystemlog/metadata.xml
index 2fdbf33d96..c86984db68 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>
next reply other threads:[~2020-09-19 20:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 20:03 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-10 16:46 [gentoo-commits] proj/kde:master commit in: kde-apps/ksystemlog/ Andreas Sturmlechner
2024-03-25 18:47 Andreas Sturmlechner
2023-09-15 12:10 Andreas Sturmlechner
2022-03-24 11:59 Andreas Sturmlechner
2021-08-03 8:57 Andreas Sturmlechner
2021-01-22 0:00 Andreas Sturmlechner
2020-08-30 19:02 Andreas Sturmlechner
2020-07-18 8:57 Andreas Sturmlechner
2016-01-20 18:13 Michael Palimaka
2015-10-15 8:14 Michael Palimaka
2015-07-20 20:39 Johannes Huber
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=1600545795.3f8ad6b2e4c131954ba2564664f0a5eccee5178d.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