[kde-workspace] fix broken suspend/resume with systemd >= 209 (kdebug331403)
Lukas Tinkl
ltinkl at fedoraproject.org
Wed Feb 26 09:56:58 UTC 2014
commit d3209da8bd72d31c11be230c6ecc3e690d0475b0
Author: Lukáš Tinkl <lukas at kde.org>
Date: Wed Feb 26 10:57:44 2014 +0100
fix broken suspend/resume with systemd >= 209 (kdebug331403)
kde-workspace-4.11.7-systemdcheck.patch | 32 +++++++++++++++++++++++++++++++
kde-workspace.spec | 7 +++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/kde-workspace-4.11.7-systemdcheck.patch b/kde-workspace-4.11.7-systemdcheck.patch
new file mode 100644
index 0000000..42b3f5e
--- /dev/null
+++ b/kde-workspace-4.11.7-systemdcheck.patch
@@ -0,0 +1,32 @@
+commit 7584a63924620bac3bd87277c11cdb8cdb5018b1
+Author: Raymond Wooninck <tittiatcoke at gmail.com>
+Date: Tue Feb 25 20:12:58 2014 +0100
+
+ Perform the systemd version evaluation through a regular expression to be more flexible for changes in the version string that systemd returns (Based on Review request 115271)
+
+diff --git a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp b/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp
+index cc3b6ad..70124ad 100644
+--- a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp
++++ b/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp
+@@ -41,13 +41,17 @@
+
+ bool checkSystemdVersion(uint requiredVersion)
+ {
+- bool ok;
+
+ QDBusInterface systemdIface("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager",
+ QDBusConnection::systemBus(), 0);
+- const uint version = systemdIface.property("Version").toString().section(' ', 1).toUInt(&ok);
+- if (ok) {
+- return (version >= requiredVersion);
++
++ const QString reply = systemdIface.property("Version").toString();
++
++ QRegExp expsd("(systemd )?([0-9]+)");
++
++ if (expsd.exactMatch(reply)) {
++ const uint version = expsd.cap(2).toUInt();
++ return (version >= requiredVersion);
+ }
+
+ // Since version 1.11 Upstart user sessions implement the exact same API as logind
diff --git a/kde-workspace.spec b/kde-workspace.spec
index 27238d0..e5a1eee 100644
--- a/kde-workspace.spec
+++ b/kde-workspace.spec
@@ -17,7 +17,7 @@
Summary: KDE Workspace
Name: kde-workspace
Version: 4.11.6
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
URL: https://projects.kde.org/projects/kde/kde-workspace
@@ -116,6 +116,7 @@ Patch57: kde-workspace-4.8.0-bug796969.patch
Patch58: kde-workspace-4.11.0-backlight_actual_brightness.patch
## upstream patches
+Patch100: kde-workspace-4.11.7-systemdcheck.patch
## plasma active patches
@@ -485,6 +486,7 @@ Requires: akonadi
%patch58 -p1 -b .backlight_actual_brightness
# upstream patches
+%patch100: -p1 -b .systemdcheck
# Fedora patches
%if 0%{?fedora} && 0%{?rhel} > 6
@@ -1050,6 +1052,9 @@ fi
%changelog
+* Wed Feb 26 2014 Lukáš Tinkl <ltinkl at redhat.com> 4.11.6-3
+- fix broken suspend/resume with systemd >= 209 (kdebug331403)
+
* Thu Feb 06 2014 Rex Dieter <rdieter at fedoraproject.org> 4.11.6-2
- fix runtime deps (%%version vs. %%_kde4_version)
More information about the scm-commits
mailing list