- 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/package/show/Base:System/systemd?expand=0&rev=821
This commit is contained in:
Dr. Werner Fink 2014-11-20 12:21:44 +00:00 committed by Git OBS Bridge
parent a7ba21adeb
commit 4c119e58e8
5 changed files with 20 additions and 97 deletions

View File

@ -1,73 +0,0 @@
#!/bin/bash
#
# pm-utils-hooks-compat.sh - run pm-utils sleep hooks from systemd
#
# Copyright (C) 2014 Guido Berhoerster <gber@opensuse.org>
#
# 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

View File

@ -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 <ledest@gmail.com>

View File

@ -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

View File

@ -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 <ledest@gmail.com>

View File

@ -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