From 3d2db08a62dfcc10f6c56e08fd6d03cb5f55fbdead97f206db4a26b52c2a0ee1 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 21 Jan 2014 12:55:52 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=490 --- 1016-support-powerfail-with-powerstatus.patch | 90 +++++++++++++++++++ ...enforce-sufficient-shutdown-warnings.patch | 24 ----- systemd-mini.changes | 9 ++ systemd-mini.spec | 7 +- systemd.changes | 9 ++ systemd.spec | 7 +- 6 files changed, 112 insertions(+), 34 deletions(-) create mode 100644 1016-support-powerfail-with-powerstatus.patch delete mode 100644 1017-enforce-sufficient-shutdown-warnings.patch diff --git a/1016-support-powerfail-with-powerstatus.patch b/1016-support-powerfail-with-powerstatus.patch new file mode 100644 index 0000000..c59f682 --- /dev/null +++ b/1016-support-powerfail-with-powerstatus.patch @@ -0,0 +1,90 @@ +--- systemd-208/units/sigpwr.target ++++ systemd-208/units/sigpwr.target 2014-01-14 15:53:32.878735762 +0000 +@@ -8,3 +8,5 @@ + [Unit] + Description=Power Failure + Documentation=man:systemd.special(7) ++BindsTo=powerfail.service ++DefaultDependencies=no ++RefuseManualStart=yes +--- systemd-208/units/powerfail.service ++++ systemd-208/units/powerfail.service 2014-01-14 16:11:41.802235712 +0000 +@@ -0,0 +1,21 @@ ++# This file is part of systemd. ++# ++# Copyright (c) 2014 SUSE LINUX Products GmbH, Germany. ++# Author: Werner Fink ++# Please send feedback to http://www.suse.de/feedback ++# ++# Description: ++# ++# Used to start the systemd-powerfail.service ++# ++ ++[Unit] ++Description=powerfail handling ++BindsTo=sigpwr.target ++DefaultDependencies=no ++RefuseManualStart=yes ++ ++[Service] ++Type=oneshot ++ExecStart=/usr/lib/systemd/systemd-powerfail ++RemainAfterExit=false +--- systemd-208/man/systemd-powerfail.service.8 ++++ systemd-208/man/systemd-powerfail.service.8 2014-01-14 18:22:21.286735810 +0000 +@@ -0,0 +1,54 @@ ++'\" t ++.TH "SYSTEMD\-POWERFAIL\&.SERVICE" "8" "" "systemd 208" "systemd-powerfail.service" ++.\" ----------------------------------------------------------------- ++.\" * Define some portability stuff ++.\" ----------------------------------------------------------------- ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.\" http://bugs.debian.org/507673 ++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.\" ----------------------------------------------------------------- ++.\" * MAIN CONTENT STARTS HERE * ++.\" ----------------------------------------------------------------- ++.SH "NAME" ++systemd-powerfail.service, systemd-powerfail \- Power Fail signal handling ++.SH "SYNOPSIS" ++.PP ++systemd\-powerfail\&.service ++.PP ++/usr/lib/systemd/systemd\-powerfail ++.SH "DESCRIPTION" ++.PP ++systemd\-powerfail ++is a system service that is used to evaulate the content of ++\fI/var/run/powerstatus\fR. Based on the content of this ++file: ++.IP F(AIL) ++Power is failing, UPS is providing the power. The ++systemd\-powerfail ++is now doing a timed shutdown. ++.IP O(K) ++The power has been restored, and pending shutdown ++will be cancled. ++.IP L(OW) ++The power is failing and the UPS has a low battery. ++The ++systemd\-powerfail ++is doing an immediate shutdown. ++.PP ++If \fI/var/run/powerstatus\fR doesn't exist or contains anything else then the letters ++F, O or L, systemd\-powerfail will behave as if it has read the letter F. ++.PP ++.SH "SEE ALSO" ++.PP ++\fBshutdown\fR(8), ++\fBpowerd\fR(8) diff --git a/1017-enforce-sufficient-shutdown-warnings.patch b/1017-enforce-sufficient-shutdown-warnings.patch deleted file mode 100644 index 036ff62..0000000 --- a/1017-enforce-sufficient-shutdown-warnings.patch +++ /dev/null @@ -1,24 +0,0 @@ -Simple fix for bnc#750845. Maybe the original values are broken as the -delay of the first two entries in when_wall() are less then the warning -intervall. Now we warn once per hour in the first 3 hours, then all -30 minutes in last hour, all 15 minutes in the last 45 minutes, all 10 -minutes in the last 15 minutes, and then all minute in the last 10 minutes. - ---- - shutdownd.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- systemd-208/src/shutdownd/shutdownd.c -+++ systemd-208/src/shutdownd/shutdownd.c 2014-01-15 12:11:23.206235784 +0000 -@@ -156,8 +156,9 @@ _const_ static usec_t when_wall(usec_t n - usec_t delay; - usec_t interval; - } table[] = { -- { 0, USEC_PER_MINUTE }, -- { 10 * USEC_PER_MINUTE, 15 * USEC_PER_MINUTE }, -+ { 10 * USEC_PER_MINUTE, USEC_PER_MINUTE }, -+ { 15 * USEC_PER_MINUTE, 10 * USEC_PER_MINUTE }, -+ { 45 * USEC_PER_MINUTE, 15 * USEC_PER_MINUTE }, - { USEC_PER_HOUR, 30 * USEC_PER_MINUTE }, - { 3 * USEC_PER_HOUR, USEC_PER_HOUR }, - }; diff --git a/systemd-mini.changes b/systemd-mini.changes index 5342df3..b1df88a 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jan 21 12:51:20 UTC 2014 - werner@suse.de + +- Drop patch 1017-enforce-sufficient-shutdown-warnings.patch + as the original code behaves exactly as the shutdown code of + the old SysVinit (bnc#750845) +- Rename support-powerfail-with-powerstatus.patch to + 1016-support-powerfail-with-powerstatus.patch + ------------------------------------------------------------------- Mon Jan 20 10:18:20 UTC 2014 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 7c40f35..95113a4 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -287,10 +287,8 @@ Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch Patch1014: 1014-journald-with-journaling-FS.patch # PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch Patch1015: build-sys-make-multi-seat-x-optional.patch -# PATCH-FIX-SUSE support-powerfail-with-powerstatus.patch -Patch1016: support-powerfail-with-powerstatus.patch -# PATCH-FIX-SUSE 1017-enforce-sufficient-shutdown-warnings.patch -Patch1017: 1017-enforce-sufficient-shutdown-warnings.patch +# PATCH-FIX-SUSE 1016-support-powerfail-with-powerstatus.patch +Patch1016: 1016-support-powerfail-with-powerstatus.patch # PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch # PATCH-FIX-SUSE 1019-make-completion-smart-to-be-able-to-redirect.patch @@ -579,7 +577,6 @@ cp %{SOURCE7} m4/ %patch1014 -p1 %patch1015 -p1 %patch1016 -p1 -%patch1017 -p1 %patch1018 -p1 %patch1019 -p1 diff --git a/systemd.changes b/systemd.changes index 5342df3..b1df88a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jan 21 12:51:20 UTC 2014 - werner@suse.de + +- Drop patch 1017-enforce-sufficient-shutdown-warnings.patch + as the original code behaves exactly as the shutdown code of + the old SysVinit (bnc#750845) +- Rename support-powerfail-with-powerstatus.patch to + 1016-support-powerfail-with-powerstatus.patch + ------------------------------------------------------------------- Mon Jan 20 10:18:20 UTC 2014 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 0a1fb50..a27e22c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -282,10 +282,8 @@ Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch Patch1014: 1014-journald-with-journaling-FS.patch # PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch Patch1015: build-sys-make-multi-seat-x-optional.patch -# PATCH-FIX-SUSE support-powerfail-with-powerstatus.patch -Patch1016: support-powerfail-with-powerstatus.patch -# PATCH-FIX-SUSE 1017-enforce-sufficient-shutdown-warnings.patch -Patch1017: 1017-enforce-sufficient-shutdown-warnings.patch +# PATCH-FIX-SUSE 1016-support-powerfail-with-powerstatus.patch +Patch1016: 1016-support-powerfail-with-powerstatus.patch # PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch # PATCH-FIX-SUSE 1019-make-completion-smart-to-be-able-to-redirect.patch @@ -574,7 +572,6 @@ cp %{SOURCE7} m4/ %patch1014 -p1 %patch1015 -p1 %patch1016 -p1 -%patch1017 -p1 %patch1018 -p1 %patch1019 -p1