From 8af921d80899748c9869f6f9dd5a7502f4f6242d437ca66e28e980e209a81ecc Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 30 Jun 2015 07:36:07 +0000 Subject: [PATCH] Accepting request 314429 from home:sbrabec:branches:systemd-drop-pm-utils - Obsolete pm-utils and suspend (boo#925873). - Remove pm-utils support (remove Forward-suspend-hibernate-calls-to-pm-utils.patch). OBS-URL: https://build.opensuse.org/request/show/314429 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=879 --- ...-suspend-hibernate-calls-to-pm-utils.patch | 97 ------------------- systemd-mini.changes | 7 ++ systemd-mini.spec | 5 +- systemd.changes | 7 ++ systemd.spec | 5 +- 5 files changed, 18 insertions(+), 103 deletions(-) delete mode 100644 Forward-suspend-hibernate-calls-to-pm-utils.patch diff --git a/Forward-suspend-hibernate-calls-to-pm-utils.patch b/Forward-suspend-hibernate-calls-to-pm-utils.patch deleted file mode 100644 index 223b311f..00000000 --- a/Forward-suspend-hibernate-calls-to-pm-utils.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Frederic Crozat -Date: Tue, 19 Feb 2013 11:20:31 +0100 -Subject: Forward suspend / hibernate calls to pm-utils - -forward suspend/hibernation calls to pm-utils, if installed (bnc#790157) ---- - src/sleep/sleep.c | 27 ++++++++++++++++++++++----- - 1 file changed, 22 insertions(+), 5 deletions(-) - -Index: systemd-221/src/sleep/sleep.c -=================================================================== ---- systemd-221.orig/src/sleep/sleep.c -+++ systemd-221/src/sleep/sleep.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "sd-messages.h" - #include "log.h" -@@ -34,6 +35,8 @@ - #include "def.h" - - static char* arg_verb = NULL; -+static bool delegate_to_pmutils = false; -+static const char *pmtools; - - static int write_mode(char **modes) { - int r = 0; -@@ -51,10 +54,6 @@ static int write_mode(char **modes) { - if (r == 0) - r = k; - } -- -- if (r < 0) -- log_error_errno(r, "Failed to write mode to /sys/power/disk: %m"); -- - return r; - } - -@@ -95,6 +94,8 @@ static int execute(char **modes, char ** - int r; - _cleanup_fclose_ FILE *f = NULL; - -+ if (!delegate_to_pmutils) { -+ - /* This file is opened first, so that if we hit an error, - * we can abort before modifying any state. */ - f = fopen("/sys/power/state", "we"); -@@ -105,6 +106,7 @@ static int execute(char **modes, char ** - r = write_mode(modes); - if (r < 0) - return r; -+ } - - execute_directories(dirs, DEFAULT_TIMEOUT_USEC, arguments); - -@@ -113,8 +115,10 @@ static int execute(char **modes, char ** - LOG_MESSAGE("Suspending system..."), - "SLEEP=%s", arg_verb, - NULL); -- -+ if (!delegate_to_pmutils) - r = write_state(&f, states); -+ else -+ r = -system(pmtools); - if (r < 0) - return r; - -@@ -154,6 +158,7 @@ static int parse_argv(int argc, char *ar - }; - - int c; -+ struct stat buf; - - assert(argc >= 0); - assert(argv); -@@ -191,6 +196,18 @@ static int parse_argv(int argc, char *ar - return -EINVAL; - } - -+ if (streq(arg_verb, "suspend")) { -+ pmtools = "/usr/sbin/pm-suspend"; -+ } -+ else if (streq(arg_verb, "hibernate") || streq(arg_verb, "hybrid-sleep")) { -+ if (streq(arg_verb, "hibernate")) -+ pmtools = "/usr/sbin/pm-hibernate"; -+ else -+ pmtools = "/usr/sbin/pm-suspend-hybrid"; -+ } -+ -+ delegate_to_pmutils = (stat(pmtools, &buf) >= 0 && S_ISREG(buf.st_mode) && (buf.st_mode & 0111)); -+ - return 1 /* work to do */; - } - diff --git a/systemd-mini.changes b/systemd-mini.changes index aaf260e5..a172eb6e 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 26 17:14:46 CEST 2015 - sbrabec@suse.com + +- Obsolete pm-utils and suspend (boo#925873). +- Remove pm-utils support + (remove Forward-suspend-hibernate-calls-to-pm-utils.patch). + ------------------------------------------------------------------- Thu Jun 25 17:27:06 UTC 2015 - crrodriguez@opensuse.org diff --git a/systemd-mini.spec b/systemd-mini.spec index 9bdd2e78..f48eef16 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -128,6 +128,8 @@ Conflicts: mkinitrd < 2.7.0 Conflicts: kernel < %{min_kernel_version} Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} +Obsoletes: pm-utils <= 1.4.1 +Obsoletes: suspend <= 1.0 #Git-Clone: git://anongit.freedesktop.org/systemd/systemd Source: http://freedesktop.org/software/systemd/systemd-%version.tar.xz @@ -175,8 +177,6 @@ Patch42: systemd-pam_config.patch # Never add any patches to this package without the upstream commit id # in the patch. Any patches added here without a very good reason to make # an exception will be silently removed with the next version update. -# PATCH-FIX-OPENSUSE forward to pm-utils -- until boo#904828 is addressed -Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch # PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) @@ -552,7 +552,6 @@ cp %{SOURCE7} m4/ %patch17 -p1 %patch20 -p1 %patch21 -p1 -%patch25 -p1 # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html %patch27 -p1 diff --git a/systemd.changes b/systemd.changes index aaf260e5..a172eb6e 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 26 17:14:46 CEST 2015 - sbrabec@suse.com + +- Obsolete pm-utils and suspend (boo#925873). +- Remove pm-utils support + (remove Forward-suspend-hibernate-calls-to-pm-utils.patch). + ------------------------------------------------------------------- Thu Jun 25 17:27:06 UTC 2015 - crrodriguez@opensuse.org diff --git a/systemd.spec b/systemd.spec index 5826a1d8..00461c77 100644 --- a/systemd.spec +++ b/systemd.spec @@ -123,6 +123,8 @@ Conflicts: mkinitrd < 2.7.0 Conflicts: kernel < %{min_kernel_version} Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} +Obsoletes: pm-utils <= 1.4.1 +Obsoletes: suspend <= 1.0 #Git-Clone: git://anongit.freedesktop.org/systemd/systemd Source: http://freedesktop.org/software/systemd/systemd-%version.tar.xz @@ -170,8 +172,6 @@ Patch42: systemd-pam_config.patch # Never add any patches to this package without the upstream commit id # in the patch. Any patches added here without a very good reason to make # an exception will be silently removed with the next version update. -# PATCH-FIX-OPENSUSE forward to pm-utils -- until boo#904828 is addressed -Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch # PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) @@ -547,7 +547,6 @@ cp %{SOURCE7} m4/ %patch17 -p1 %patch20 -p1 %patch21 -p1 -%patch25 -p1 # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html %patch27 -p1