Bug#855345: jessie-pu: package systemd/215-17+deb8u7

Michael Biebl biebl at debian.org
Thu Feb 16 23:29:38 GMT 2017


Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org at packages.debian.org
Usertags: pu

Hi,

I'd like to make a stable upload for systemd, fixing two bugs.

The changelog is

systemd (215-17+deb8u7) stable; urgency=medium

  * bus: Fix bus_print_property() to use "int" for booleans.
    This fixes the problem that on big endian architectures, like mips or
    powerpc, boolean properties that were retrieved via via sd-bus were always
    set to 0 (no). (Closes: #774430)
  * systemctl: Add is-enabled support for SysV init scripts.
    The update-rc.d utility does not provide is-enabled, so implement it
    ourselves in systemctl using the same logic as systemd-sysv-install from
    Stretch. (Closes: #809405)

 -- Michael Biebl <biebl at debian.org>  Fri, 17 Feb 2017 00:26:38 +0100

The complete debdiff is attached.

Regards,
Michael


-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index ffceb7d..3c17485 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+systemd (215-17+deb8u7) stable; urgency=medium
+
+  * bus: Fix bus_print_property() to use "int" for booleans.
+    This fixes the problem that on big endian architectures, like mips or
+    powerpc, boolean properties that were retrieved via via sd-bus were always
+    set to 0 (no). (Closes: #774430)
+  * systemctl: Add is-enabled support for SysV init scripts.
+    The update-rc.d utility does not provide is-enabled, so implement it
+    ourselves in systemctl using the same logic as systemd-sysv-install from
+    Stretch. (Closes: #809405)
+
+ -- Michael Biebl <biebl at debian.org>  Fri, 17 Feb 2017 00:26:38 +0100
+
 systemd (215-17+deb8u6) stable; urgency=medium
 
   [ Michael Biebl ]
diff --git a/debian/patches/bus-fix-bus_print_property-to-use-int-for-booleans.patch b/debian/patches/bus-fix-bus_print_property-to-use-int-for-booleans.patch
new file mode 100644
index 0000000..262252e
--- /dev/null
+++ b/debian/patches/bus-fix-bus_print_property-to-use-int-for-booleans.patch
@@ -0,0 +1,27 @@
+From: David Herrmann <dh.herrmann at gmail.com>
+Date: Thu, 18 Sep 2014 13:28:28 +0200
+Subject: bus: fix bus_print_property() to use "int" for booleans
+
+We always use "int" if we retrieve boolean values from sd-bus, as "bool"
+is only a single byte, but full int on va-args.
+
+Thanks to Werner Fink for the report!
+
+(cherry picked from commit c2fa048c4a70c8386c6d8fe939e5ea9edecf1e98)
+---
+ src/libsystemd/sd-bus/bus-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
+index 6441c5b..d0b7c3d 100644
+--- a/src/libsystemd/sd-bus/bus-util.c
++++ b/src/libsystemd/sd-bus/bus-util.c
+@@ -631,7 +631,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
+         }
+ 
+         case SD_BUS_TYPE_BOOLEAN: {
+-                bool b;
++                int b;
+ 
+                 r = sd_bus_message_read_basic(property, type, &b);
+                 if (r < 0)
diff --git a/debian/patches/series b/debian/patches/series
index a883d86..3dc8933 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -170,6 +170,7 @@ polkit-don-t-start-polkit-agent-when-running-as-root.patch
 core-rework-logic-to-determine-when-we-decide-to-add-auto.patch
 systemctl-fix-argument-handling-when-invoked-as-shutdown.patch
 systemctl-when-reading-legacy-t-argument-for-shutdown-don.patch
+bus-fix-bus_print_property-to-use-int-for-booleans.patch
 
 ## Debian specific patches:
 Add-back-support-for-Debian-specific-config-files.patch
@@ -228,3 +229,4 @@ Skip-filesystem-check-if-already-done-by-the-initram.patch
 cryptsetup-Implement-offset-and-skip-options.patch
 Revert-core-one-step-back-again-for-nspawn-we-actual.patch
 udev-increase-udev-event-timeout-to-180s.patch
+systemctl-Add-is-enabled-support-for-SysV-init-scripts.patch
diff --git a/debian/patches/systemctl-Add-is-enabled-support-for-SysV-init-scripts.patch b/debian/patches/systemctl-Add-is-enabled-support-for-SysV-init-scripts.patch
new file mode 100644
index 0000000..7b73592
--- /dev/null
+++ b/debian/patches/systemctl-Add-is-enabled-support-for-SysV-init-scripts.patch
@@ -0,0 +1,84 @@
+From: Michael Biebl <michael at debian>
+Date: Wed, 15 Feb 2017 10:03:37 +0100
+Subject: systemctl: Add is-enabled support for SysV init scripts
+
+The update-rc.d utility does not provide is-enabled, so implement it
+ourselves in systemctl using the same logic as systemd-sysv-install from
+Stretch.
+See commit b5aa768d8108b294c1187a0728f5b13c033b3d47
+
+Closes: #809405
+---
+ src/systemctl/systemctl.c | 38 ++++++++++++++++++++++++--------------
+ 1 file changed, 24 insertions(+), 14 deletions(-)
+
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index c67b86d..efce97f 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -4998,9 +4998,8 @@ static int enable_sysv_units(const char *verb, char **args) {
+                 return 0;
+ 
+         if (!streq(verb, "enable") &&
+-            !streq(verb, "disable"))
+-            // update-rc.d currently does not provide is-enabled
+-            //!streq(verb, "is-enabled"))
++            !streq(verb, "disable") &&
++            !streq(verb, "is-enabled"))
+                 return 0;
+ 
+         /* Processes all SysV units, and reshuffles the array so that
+@@ -5045,6 +5044,12 @@ static int enable_sysv_units(const char *verb, char **args) {
+                                 break;
+                 }
+ 
++                /* If we have both a native unit and a SysV script,
++                 * enable/disable them both (below); for is-enabled,
++                 * prefer the native unit */
++                if (found_native && streq(verb, "is-enabled"))
++                        continue;
++
+                 if (!isempty(arg_root))
+                         asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/%s", arg_root, name);
+                 else
+@@ -5065,6 +5070,21 @@ static int enable_sysv_units(const char *verb, char **args) {
+                         args[f] = (char*) "";
+                 }
+ 
++                if (streq(verb, "is-enabled")) {
++                        _cleanup_free_ char *g = NULL;
++                        asprintf(&g, "%s%s", "/etc/rc[S5].d/S??", basename(p));
++                        if (glob_exists(g)) {
++                                if (!arg_quiet)
++                                        puts("enabled");
++                                r = 1;
++                                continue;
++                        } else {
++                                if (!arg_quiet)
++                                        puts("disabled");
++                                continue;
++                        }
++                }
++
+                 log_info("Synchronizing state for %s with sysvinit using update-rc.d...", name);
+ 
+                 if (!isempty(arg_root) && !streq(arg_root, "/")) {
+@@ -5149,17 +5169,7 @@ static int enable_sysv_units(const char *verb, char **args) {
+                 }
+ 
+                 if (status.si_code == CLD_EXITED) {
+-                        if (streq(verb, "is-enabled")) {
+-                                if (status.si_status == 0) {
+-                                        if (!arg_quiet)
+-                                                puts("enabled");
+-                                        r = 1;
+-                                } else {
+-                                        if (!arg_quiet)
+-                                                puts("disabled");
+-                                }
+-
+-                        } else if (status.si_status != 0) {
++                        if (status.si_status != 0) {
+                                 r = -EINVAL;
+                                 goto finish;
+                         }


More information about the Pkg-systemd-maintainers mailing list