From 7f42a2bcfb302ccbbfa43f9cf5f542544b105998688a71646a59df1ce758d9d0 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 20 Nov 2014 12:21:44 +0000 Subject: [PATCH] Accepting request 262325 from home:gberh:branches:Base:System - remove pm-utils-hooks-compat.sh again, pm-utils built-in hooks partially duplicate hooks run by systemd which may potentially lead to problems, instead temporarily re-enable Forward-suspend-hibernate-calls-to-pm-utils.patch until boo#904828 can be addressed properly - fix bashisms in write_net_rules script - update patches: * 1053-better-checks-in-write_net_rules.patch - remove pm-utils-hooks-compat.sh again, pm-utils built-in hooks partially duplicate hooks run by systemd which may potentially lead to problems, instead temporarily re-enable Forward-suspend-hibernate-calls-to-pm-utils.patch until boo#904828 can be addressed properly OBS-URL: https://build.opensuse.org/request/show/262325 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=821 --- pm-utils-hooks-compat.sh | 73 ---------------------------------------- systemd-mini.changes | 9 +++++ systemd-mini.spec | 13 +------ systemd.changes | 9 +++++ systemd.spec | 13 +------ 5 files changed, 20 insertions(+), 97 deletions(-) delete mode 100644 pm-utils-hooks-compat.sh diff --git a/pm-utils-hooks-compat.sh b/pm-utils-hooks-compat.sh deleted file mode 100644 index bbe2d99c..00000000 --- a/pm-utils-hooks-compat.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -# -# pm-utils-hooks-compat.sh - run pm-utils sleep hooks from systemd -# -# Copyright (C) 2014 Guido Berhoerster -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -shopt -s nullglob -export PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin -export LC_ALL=C - -PM_UTILS_SLEEP_D_PATH=/usr/lib/pm-utils/sleep.d -PM_UTILS_ETC_SLEEP_D_PATH=/etc/pm/sleep.d -export PM_FUNCTIONS=/usr/lib/pm-utils/functions - -function run_script { - if [[ -r ${1} && -x ${1} && -O ${1} && \ - ! -e ${PM_UTILS_ETC_SLEEP_D_PATH}/${1##*/} ]]; then - "$@" - fi -} - -[[ -r $PM_FUNCTIONS ]] || exit 1 - -scripts=( ${PM_UTILS_SLEEP_D_PATH}/*[!~] ) -if [[ $1 == "pre" ]]; then - for (( i = 0; i < ${#scripts[@]}; i++ )); do - case "$2" in - suspend) - run_script "${scripts[i]}" suspend suspend - ;; - hibernate) - run_script "${scripts[i]}" hibernate hibernate - ;; - hybrid-sleep) - run_script "${scripts[i]}" suspend suspend-hybrid - ;; - esac - done -else - for (( i = ${#scripts[@]}; i >= 0; i-- )); do - case "$2" in - suspend) - run_script "${scripts[i]}" resume suspend - ;; - hibernate) - run_script "${scripts[i]}" thaw hibernate - ;; - hybrid-sleep) - run_script "${scripts[i]}" resume suspend-hybrid - ;; - esac - done -fi diff --git a/systemd-mini.changes b/systemd-mini.changes index 9288e1f1..f8c7e61d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -3,6 +3,15 @@ Thu Nov 20 12:18:57 UTC 2014 - werner@suse.de - Re-add directory /usr/lib/systemd/system/basic.target.wants +------------------------------------------------------------------- +Wed Nov 19 15:07:43 UTC 2014 - gber@opensuse.org + +- remove pm-utils-hooks-compat.sh again, pm-utils built-in hooks + partially duplicate hooks run by systemd which may potentially + lead to problems, instead temporarily re-enable + Forward-suspend-hibernate-calls-to-pm-utils.patch until + boo#904828 can be addressed properly + ------------------------------------------------------------------- Wed Nov 19 00:58:00 UTC 2014 - Led diff --git a/systemd-mini.spec b/systemd-mini.spec index 2437fa3c..c2d3c28a 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -188,7 +188,6 @@ Source8: systemd-journald.init Source9: nss-myhostname-config Source10: macros.systemd.upstream Source11: after-local.service -Source12: pm-utils-hooks-compat.sh Source1060: boot.udev Source1063: udev-generate-persistent-rule.sh @@ -247,7 +246,7 @@ Patch42: systemd-pam_config.patch Patch23: disable-nss-myhostname-warning-bnc-783841.patch # PATCH-FIX-OPENSUSE handle-HOSTNAME.patch fcrozat@suse.com -- handle /etc/HOSTNAME (bnc#803653) Patch24: handle-etc-HOSTNAME.patch -# PATCH-FIX-OPENSUSE forward to pm-utils -- for code base <= 1310 +# 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 @@ -1495,9 +1494,7 @@ cp %{SOURCE7} m4/ %patch22 -p1 %patch23 -p1 %patch24 -p1 -%if 0%{?suse_version} <= 1310 %patch25 -p1 -%endif # 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 @@ -2316,11 +2313,6 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ -# run pm-utils sleep hooks (boo#904828) -%if 0%{?suse_version} > 1310 -install -m 755 %{S:12} %{buildroot}%{_prefix}/lib/systemd/system-sleep/pm-utils-hooks-compat -%endif - # Make sure these directories are properly owned mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants @@ -2728,9 +2720,6 @@ exit 0 %dir %{_prefix}/lib/systemd/ntp-units.d/ %dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-sleep/ -%if 0%{?suse_version} > 1310 -%{_prefix}/lib/systemd/system-sleep/pm-utils-hooks-compat -%endif %dir %{_prefix}/lib/systemd/system/default.target.wants %dir %{_prefix}/lib/systemd/system/dbus.target.wants %dir %{_prefix}/lib/systemd/system/getty@tty1.service.d diff --git a/systemd.changes b/systemd.changes index 9288e1f1..f8c7e61d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -3,6 +3,15 @@ Thu Nov 20 12:18:57 UTC 2014 - werner@suse.de - Re-add directory /usr/lib/systemd/system/basic.target.wants +------------------------------------------------------------------- +Wed Nov 19 15:07:43 UTC 2014 - gber@opensuse.org + +- remove pm-utils-hooks-compat.sh again, pm-utils built-in hooks + partially duplicate hooks run by systemd which may potentially + lead to problems, instead temporarily re-enable + Forward-suspend-hibernate-calls-to-pm-utils.patch until + boo#904828 can be addressed properly + ------------------------------------------------------------------- Wed Nov 19 00:58:00 UTC 2014 - Led diff --git a/systemd.spec b/systemd.spec index bedb43e3..cd601dd5 100644 --- a/systemd.spec +++ b/systemd.spec @@ -183,7 +183,6 @@ Source8: systemd-journald.init Source9: nss-myhostname-config Source10: macros.systemd.upstream Source11: after-local.service -Source12: pm-utils-hooks-compat.sh Source1060: boot.udev Source1063: udev-generate-persistent-rule.sh @@ -242,7 +241,7 @@ Patch42: systemd-pam_config.patch Patch23: disable-nss-myhostname-warning-bnc-783841.patch # PATCH-FIX-OPENSUSE handle-HOSTNAME.patch fcrozat@suse.com -- handle /etc/HOSTNAME (bnc#803653) Patch24: handle-etc-HOSTNAME.patch -# PATCH-FIX-OPENSUSE forward to pm-utils -- for code base <= 1310 +# 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 @@ -1490,9 +1489,7 @@ cp %{SOURCE7} m4/ %patch22 -p1 %patch23 -p1 %patch24 -p1 -%if 0%{?suse_version} <= 1310 %patch25 -p1 -%endif # 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 @@ -2311,11 +2308,6 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ -# run pm-utils sleep hooks (boo#904828) -%if 0%{?suse_version} > 1310 -install -m 755 %{S:12} %{buildroot}%{_prefix}/lib/systemd/system-sleep/pm-utils-hooks-compat -%endif - # Make sure these directories are properly owned mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants @@ -2723,9 +2715,6 @@ exit 0 %dir %{_prefix}/lib/systemd/ntp-units.d/ %dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-sleep/ -%if 0%{?suse_version} > 1310 -%{_prefix}/lib/systemd/system-sleep/pm-utils-hooks-compat -%endif %dir %{_prefix}/lib/systemd/system/default.target.wants %dir %{_prefix}/lib/systemd/system/dbus.target.wants %dir %{_prefix}/lib/systemd/system/getty@tty1.service.d