[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1002012: [pre-approval] bullseye-pu: package sysvinit/2.96-7



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

I would like pre-approval to update sysvinit in bullseye.

 - Fix #1001795: backport upstream fix for parsing shutdown argument '+0' that
   was released in version 2.98.  Version 3.00-1 is already present in sid and
   bookworm.
    
 - Update documentation for shutdown(8) to clarify behaviour when a time is
   specified. This was committed directly to salsa[1] by Tomas Popisek with
   rationale:

    'Clarify that when called with a `time` shutdown will not exit. That's
    important to know for programs or scripts that call `shutdown ... time`
    because they will never proceed after having called it (unless they fork exec
    or similar of course). Point in case: unattended-upgrades gets caught by
    this.'

The source debdiff for 2.96-7+deb11u1 is attatched.

Thanks

Mark
   

-- System Information:
Debian Release: 10.0
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-18-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

[1]  https://salsa.debian.org/debian/sysvinit/-/commit/75af55f59b562fea69adf7af8298ba0f777c9bb1
diff -Nru sysvinit-2.96/debian/changelog sysvinit-2.96/debian/changelog
--- sysvinit-2.96/debian/changelog	2021-04-18 16:38:40.000000000 +0100
+++ sysvinit-2.96/debian/changelog	2021-12-16 18:12:09.000000000 +0000
@@ -1,3 +1,21 @@
+sysvinit (2.96-7+deb11u1) bullseye; urgency=medium
+
+  [ Tomas Pospisek ]
+  * Clarify that when called with a `time` shutdown will not exit. That's
+    important to know for programs or scripts that call `shutdown
+    ... time` because they will never proceed after having called it
+    (unless they fork exec or similar of course). Point in case:
+    unattended-upgrades gets caught by this.
+
+  [ mirabilos ]
+  * convert to a DEP 3 patch instead
+
+  [ Mark Hindley ]
+  * Backport upstream patch to fix parsing of shutdown +0 (Closes:
+    #1001795).
+
+ -- Mark Hindley <leepen@debian.org>  Thu, 16 Dec 2021 18:12:09 +0000
+
 sysvinit (2.96-7) unstable; urgency=medium
 
   [ Mark Hindley ]
diff -Nru sysvinit-2.96/debian/patches/0001-Fixed-time-parsing-in-shutdown-when-there-is-a-in-fr.patch sysvinit-2.96/debian/patches/0001-Fixed-time-parsing-in-shutdown-when-there-is-a-in-fr.patch
--- sysvinit-2.96/debian/patches/0001-Fixed-time-parsing-in-shutdown-when-there-is-a-in-fr.patch	1970-01-01 01:00:00.000000000 +0100
+++ sysvinit-2.96/debian/patches/0001-Fixed-time-parsing-in-shutdown-when-there-is-a-in-fr.patch	2021-12-16 18:12:09.000000000 +0000
@@ -0,0 +1,37 @@
+From 462a92ce2adb3f9e7d8c55301d8eb4ba2b15830c Mon Sep 17 00:00:00 2001
+From: Jesse Smith <jsmith@resonatingmedia.com>
+Date: Sat, 15 Aug 2020 18:50:58 -0300
+Subject: [PATCH] Fixed time parsing in shutdown when there is a + in front of
+ a 0 time offset. Commands with a postiive time offset (+1) would work but +0
+ fails. This has been corrected by Arkadiusz Miskiewicz.
+
+---
+ src/shutdown.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -777,16 +777,18 @@
+ 	if (!strcmp(when, "now")) strcpy(when, "0");
+ 
+         sp = when;
+-	if (when[0] == '+') sp++;
+-	/* Decode shutdown time. */
++	/* Validate time argument. */
+ 	for ( ; *sp; sp++) {
+-		if (*sp != ':' && (*sp < '0' || *sp > '9'))
++		if (*sp != '+' && *sp != ':' && (*sp < '0' || *sp > '9'))
+ 			usage();
+ 	}
++	sp = when;
++	/* Decode shutdown time. */
++	if (when[0] == '+') sp++;
+ 	if (strchr(when, ':') == NULL) {
+ 		/* Time in minutes. */
+-		wt = atoi(when);
+-		if (wt == 0 && when[0] != '0') usage();
++		wt = atoi(sp);
++		if (wt == 0 && sp[0] != '0') usage();
+ 	} else {
+ 		/* Time in hh:mm format. */
+ 		if (sscanf(when, "%d:%2d", &hours, &mins) != 2) usage();
diff -Nru sysvinit-2.96/debian/patches/fix-shutdown-time-docs.diff sysvinit-2.96/debian/patches/fix-shutdown-time-docs.diff
--- sysvinit-2.96/debian/patches/fix-shutdown-time-docs.diff	1970-01-01 01:00:00.000000000 +0100
+++ sysvinit-2.96/debian/patches/fix-shutdown-time-docs.diff	2021-12-16 18:12:09.000000000 +0000
@@ -0,0 +1,20 @@
+Description: Clarify that when called with a time shutdown will not exit.
+ That's important to know for programs or scripts that call shutdown … time
+ because they will never proceed after having called it (unless they fork,
+ exec or similar of course).
+ Point in case: unattended-upgrades gets caught by this.
+Author: Tomas Pospisek <tpo@debian.org>
+
+--- a/man/shutdown.8
++++ b/man/shutdown.8
+@@ -132,6 +132,10 @@ When shutdown is called with the -n flag
+ .\"{{{  time
+ .IP \fItime\fP
+ When to shutdown.
++If a
++\fItime\fP
++is given then the
++\fBshutdown\fP command will not exit but instead count down until reboot.
+ .\"}}}
+ .\"{{{  warning-message
+ .IP "\fIwarning message\fP"
diff -Nru sysvinit-2.96/debian/patches/series sysvinit-2.96/debian/patches/series
--- sysvinit-2.96/debian/patches/series	2021-04-18 16:38:40.000000000 +0100
+++ sysvinit-2.96/debian/patches/series	2021-12-16 18:12:09.000000000 +0000
@@ -1,3 +1,4 @@
+0001-Fixed-time-parsing-in-shutdown-when-there-is-a-in-fr.patch
 11_run_nologin.patch
 0002-Fix-FTBFS-on-kfreebsd-any.patch
 0003-Fix-formatting-of-bootlogd-8.patch
@@ -5,3 +6,4 @@
 0005-workaround-gcc-lintian.patch
 fstab-decode.man.patch
 libcrypt-lib.patch
+fix-shutdown-time-docs.diff

Reply to: