From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/libksysguard/, kde-plasma/libksysguard/files/
Date: Wed, 17 Feb 2021 22:13:49 +0000 (UTC) [thread overview]
Message-ID: <1613600015.764915834d64bd9ba4cd9c49c94d7d54207e159f.asturm@gentoo> (raw)
commit: 764915834d64bd9ba4cd9c49c94d7d54207e159f
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 17 21:44:50 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 17 22:13:35 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76491583
kde-plasma/libksysguard: Add method CGroupDataModel::isAvailable
Backport upstream commit 76a3570ab2f9fab98aa6ccc9ceafbbc29323db06 to fix
a runtime crash happening without systemd.
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=433013
Reported-by: jospezial <jospezial <AT> gmx.de>
Closes: https://bugs.gentoo.org/766755
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...libksysguard-5.21.0-fix-non-systemd-crash.patch | 96 ++++++++++++++++++++++
.../libksysguard/libksysguard-5.21.0-r1.ebuild | 72 ++++++++++++++++
2 files changed, 168 insertions(+)
diff --git a/kde-plasma/libksysguard/files/libksysguard-5.21.0-fix-non-systemd-crash.patch b/kde-plasma/libksysguard/files/libksysguard-5.21.0-fix-non-systemd-crash.patch
new file mode 100644
index 00000000000..ec7c57e133a
--- /dev/null
+++ b/kde-plasma/libksysguard/files/libksysguard-5.21.0-fix-non-systemd-crash.patch
@@ -0,0 +1,96 @@
+From 76a3570ab2f9fab98aa6ccc9ceafbbc29323db06 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Thu, 4 Feb 2021 10:47:43 +0000
+Subject: [PATCH] Add method CGroupDataModel::isAvailable
+
+This returns true if the root is pointing to a valid path. The idea
+being that non-systemd systems won't have applications scoped correctly,
+nor a relevant user slice.
+
+By communicating this we can dislpay the entry as not working in the UI.
+
+
+(cherry picked from commit 6d42960456f145d178579a1debb726bd0c7dcee6)
+---
+ processcore/cgroup_data_model.cpp | 21 ++++++++++++++++++++-
+ processcore/cgroup_data_model.h | 5 +++++
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/processcore/cgroup_data_model.cpp b/processcore/cgroup_data_model.cpp
+index 46a36c3..4278a2c 100644
+--- a/processcore/cgroup_data_model.cpp
++++ b/processcore/cgroup_data_model.cpp
+@@ -48,6 +48,7 @@ public:
+ QHash<QString, KSysGuard::ProcessAttribute* > m_availableAttributes;
+ QVector<KSysGuard::ProcessAttribute* > m_enabledAttributes;
+
++ bool m_available = false;
+ QString m_root;
+ QScopedPointer<CGroup> m_rootGroup;
+
+@@ -367,9 +368,22 @@ void CGroupDataModel::setRoot(const QString &root)
+ return;
+ }
+ d->m_root = root;
+- d->m_rootGroup.reset(new CGroup(root));
+ emit rootChanged();
+ QMetaObject::invokeMethod(this, [this] {update();}, Qt::QueuedConnection);
++
++ const QString path = CGroup::cgroupSysBasePath() + root;
++ bool available = QFile::exists(path);
++
++ if (available) {
++ d->m_rootGroup.reset(new CGroup(root));
++ } else {
++ d->m_rootGroup.reset();
++ }
++
++ if (available != d->m_available) {
++ d->m_available = available;
++ emit availableChanged();
++ }
+ }
+
+ void CGroupDataModel::update()
+@@ -443,6 +457,11 @@ void CGroupDataModel::update(CGroup *node)
+ }
+ }
+
++bool CGroupDataModel::isAvailable() const
++{
++ return d->m_available;
++}
++
+ QVector<Process*> CGroupDataModelPrivate::processesFor(CGroup *app)
+ {
+ if (m_processMap.contains(app)) {
+diff --git a/processcore/cgroup_data_model.h b/processcore/cgroup_data_model.h
+index 5ce58aa..1f7d28d 100644
+--- a/processcore/cgroup_data_model.h
++++ b/processcore/cgroup_data_model.h
+@@ -59,6 +59,8 @@ class Q_DECL_EXPORT CGroupDataModel : public QAbstractItemModel
+ */
+ Q_PROPERTY(QString setRoot READ root WRITE setRoot NOTIFY rootChanged)
+
++ Q_PROPERTY(bool available READ isAvailable NOTIFY availableChanged)
++
+ public:
+ CGroupDataModel(QObject *parent = nullptr);
+ CGroupDataModel(const QString &root, QObject *parent = nullptr);
+@@ -114,10 +116,13 @@ public:
+ */
+ void update();
+
++ bool isAvailable() const;
++
+ Q_SIGNALS:
+ void enabledAttributesChanged();
+ void enabledChanged();
+ void rootChanged();
++ void availableChanged();
+
+ protected:
+ virtual bool filterAcceptsCGroup(const QString &id);
+--
+GitLab
+
diff --git a/kde-plasma/libksysguard/libksysguard-5.21.0-r1.ebuild b/kde-plasma/libksysguard/libksysguard-5.21.0-r1.ebuild
new file mode 100644
index 00000000000..91254d1119c
--- /dev/null
+++ b/kde-plasma/libksysguard/libksysguard-5.21.0-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_DESIGNERPLUGIN="true"
+ECM_TEST="true"
+KFMIN=5.78.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Task management and system monitoring library"
+LICENSE="LGPL-2+"
+SLOT="5/9"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="webengine X"
+
+RDEPEND="
+ >=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
+ >=kde-frameworks/kauth-${KFMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/knewstuff-${KFMIN}:5
+ >=kde-frameworks/kpackage-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ sys-libs/zlib
+ webengine? (
+ >=dev-qt/qtwebchannel-${QTMIN}:5
+ >=dev-qt/qtwebengine-${QTMIN}:5
+ )
+ X? (
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ x11-libs/libX11
+ x11-libs/libXres
+ )
+"
+DEPEND="${RDEPEND}
+ !<kde-plasma/plasma-workspace-5.18.80:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ X? ( x11-base/xorg-proto )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.16.0-no-detailed-mem-message.patch" # downstream info
+ "${FILESDIR}/${P}-fix-non-systemd-crash.patch" # bug 766755
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package webengine Qt5WebChannel)
+ $(cmake_use_find_package webengine Qt5WebEngineWidgets)
+ $(cmake_use_find_package X X11)
+ )
+
+ ecm_src_configure
+}
+
+src_test() {
+ LC_NUMERIC="C" ecm_src_test # bug 695514
+}
next reply other threads:[~2021-02-17 22:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 22:13 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-18 20:09 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/libksysguard/, kde-plasma/libksysguard/files/ Andreas Sturmlechner
2023-08-14 13:56 Andreas Sturmlechner
2023-01-15 13:04 Andreas Sturmlechner
2022-01-25 9:49 Andreas Sturmlechner
2021-12-15 9:38 Andreas Sturmlechner
2021-01-24 19:44 Andreas Sturmlechner
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=1613600015.764915834d64bd9ba4cd9c49c94d7d54207e159f.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