summaryrefslogtreecommitdiff
path: root/source/kde
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2021-02-19 20:53:50 +0000
committerEric Hameleers <alien@slackware.com>2021-02-20 08:59:50 +0100
commit782ab7566ebf43eb6feeedace1c58e6632f37e10 (patch)
tree60111bab7fbd4e32c69f6049ae8c78ceb4aba782 /source/kde
parentee1a7d961cd6886f9beadcf29069ecdf36113168 (diff)
downloadcurrent-782ab7566ebf43eb6feeedace1c58e6632f37e10.tar.gz
Fri Feb 19 20:53:50 UTC 202120210219205350
d/autoconf-archive-2021.02.19-noarch-1.txz: Upgraded. d/python3-3.9.2-x86_64-1.txz: Upgraded. kde/libksysguard-5.21.0-x86_64-2.txz: Rebuilt. Patched to fix crash without systemd. Thanks to LuckyCyborg. l/imagemagick-7.0.11_0-x86_64-1.txz: Upgraded. extra/php8/php8-8.0.2-x86_64-1.txz: Added.
Diffstat (limited to 'source/kde')
-rw-r--r--source/kde/kde/build/libksysguard2
-rw-r--r--source/kde/kde/patch/libksysguard.patch2
-rw-r--r--source/kde/kde/patch/libksysguard/libksysguard.nosystemd.patch97
3 files changed, 100 insertions, 1 deletions
diff --git a/source/kde/kde/build/libksysguard b/source/kde/kde/build/libksysguard
index d00491fd..0cfbf088 100644
--- a/source/kde/kde/build/libksysguard
+++ b/source/kde/kde/build/libksysguard
@@ -1 +1 @@
-1
+2
diff --git a/source/kde/kde/patch/libksysguard.patch b/source/kde/kde/patch/libksysguard.patch
new file mode 100644
index 00000000..d14bc712
--- /dev/null
+++ b/source/kde/kde/patch/libksysguard.patch
@@ -0,0 +1,2 @@
+# Fix crash without systemd:
+cat $CWD/patch/libksysguard/libksysguard.nosystemd.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/kde/kde/patch/libksysguard/libksysguard.nosystemd.patch b/source/kde/kde/patch/libksysguard/libksysguard.nosystemd.patch
new file mode 100644
index 00000000..ea0423f5
--- /dev/null
+++ b/source/kde/kde/patch/libksysguard/libksysguard.nosystemd.patch
@@ -0,0 +1,97 @@
+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
+
+