unblock: systemd/215-14

Martin Pitt mpitt at debian.org
Wed Apr 1 08:08:12 BST 2015


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock

systemd 215-14 hit unstable two days ago with 5 RC bug fixes (i. e.
all outstanding one except #780650 which was agreed to be
jessie-ignore), plus some other important fixes which got
pre-approved. 215-13 with half of the fixes already got uploaded last
week. So far there have been no regression reports, and these changes
are also getting tested in experimental and Ubuntu, so I'm quite
confident in them. All of the fixes except two (marked below) are
backports from 219 (in experimental and Ubuntu), so they got much
more field testing than just the two days in unstable.

I attach the full debdiff between 215-12 and -14, but as usual I also
link to the individual commits on anonscm.

Note that there are zero changes for udev-udeb (for d-i).

Annotated changelog:

|systemd (215-14) unstable; urgency=medium
|
|  [ Michael Biebl ]
|  * Map $x-display-manager LSB facility to display-manager.service instead of
|    making it a target. Using a target had the downside that multiple display
|    managers could hook into it at the same time which could lead to several
|    failed start attempts for the non-default display manager.
|  * Update insserv-generator and map $x-display-manager to
|    display-manager.service, following the recent change in sysv-generator.
|    This avoids creating references to a no longer existing
|    x-display-manager.target unit.

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=4cfcbb100
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=6ef318a5a

We've had these for a while in experimental/Ubuntu. Pre-acked by Niels in
http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/2015-March/006477.html

|  * Cherry-pick upstream fix to increase the SendBuffer of /dev/log to 8M.

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=6cc87b22c0

Part of/prerequisite for RC bug #762700 below.

|  [ Martin Pitt ]
|  * scope: Make attachment of initial PIDs more robust. Fixes crash with
|    processes that get started by an init.d script with a different (aliased)
|    name when the cgroup becomes empty. (Closes: #781210)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=925a2872f7

|  * boot-and-services, display-managers autopkgtests: Add missing python3 test
|    dependency.

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=0df2572dd

Trivial autopkgtest-only fix, no runtime impact.

|  * Don't attempt to mount the same swap partition twice through different
|    device node aliases. (Closes: #772182, LP: #1399595)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=fc91558

This is the one non-RC/non-pre-ack'ed change in this upload. Several
people asked us to get this into unstable as they ran into it on
installation, and I believe the change is reasonable, safe, and avoids
confusion (people noticing the failed unit and wondering what's wrong,
while there isn't anything wrong).

|  [ Christian Seiler ]
|  * Make the journald to syslog forwarding more robust by increasing the
|    maximum datagram queue length from 10 to 512. (Closes: #762700)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=5ff84d8673

RC bug.

|  [ Marco d'Itri ]
|  * Avoid writing duplicate entries in 70-persistent-net.rules by double
|    checking if the new udev rule has already been written for the given
|    interface. This happens if multiple add events are generated before the
|    write_net_rules script returns and udevd renames the interface.
|    (Closes: #765577)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=1b31191d26a

RC bug.

|
| -- Michael Biebl <biebl at debian.org>  Mon, 30 Mar 2015 13:26:52 +0200
|
|systemd (215-13) unstable; urgency=medium
|
|  [ Martin Pitt ]
|  * Add hwclock-save.service to sync the system clock to the hardware clock on
|    shutdown, to provide monotonic time for reboots. (Note: this is a hack for
|    jessie; the next Debian release will enable timesyncd by default).
|    (Closes: #755722)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=58da7faf9

RC bug.

This patch has *not* been backported, but is jessie-only. I still kind
of disagree with this approach, but I got "outvoted" by the bug
reporters and the release team agreed too. This at least makes jessie
bug-compatible with sysvinit in earlier releases.
experimental/jessie+1 will run timesyncd by default, and hopefully
also get some fsck fixes for this, to solve this in a better way.

|  * Check for correct architecture identifiers for SuperH. (Closes: #779710)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=2800ab3

Helps porters (who specifically asked for this to get included), no-op
for all other architectures.

Not exactly pre-approved, but Niels had no objection in
http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/2015-March/006477.html
("Honestly, not a priority for Jessie, but I see no reason to revert
it either.")

|  * networkd: Fix stopping v4 dhcpclient when the carrier is lost. Thanks
|    Christos Trochalakis! (Closes: #779571)
|  * Fix segfault with units that depend on themselves. (Closes: #780675)
|  * tmpfiles-setup-dev: Call tmpfiles with --boot to allow unsafe device
|    creation. Fixes creation of static device nodes with kmod 20.
|    (Closes: #780263)
|
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=dd625f

RC bug in unstable, as kmod 20 changes behaviour/introduces new
syntax. It currently does not affect jessie, unless kmod 20 somehow
lands in testing. But it's a simple change and a no-op in jessie.
Needs a second part (see below)

|  [ Christian Seiler ]
|  * core: Don't migrate PIDs for units that may contain subcgroups.
|    This stops messing up lxc/libvirt/other custom cgroup layouts after
|    daemon-reload. (Closes: #777164)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=dd56a6cd

RC bug.

|  * sysv-generator: add support for /etc/insserv/overrides. (Closes: #759001)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=72531478d

Pre-approved in https://bugs.debian.org/779244 . Relatively intrusive
and the other jessie-only patch, but quite well-tested by Christian
and me. This should help admins with migrating init.d customizations
to systemd.

|  [ Michael Biebl ]
|  * debian/udev.init: Recognize '!' flag with static device lists, to work
|    with kmod 20. (Closes: #780263)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=9f50cb8f5

Second part of the fix, see above. This one is trivial and a no-op for
jessie.

|  [ Didier Roche ]
|  * Ensure PrivateTmp doesn't require tmpfs through tmp.mount, but rather adds
|    an After relationship. (Closes: #779902)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=ddaae48b0

RC bug.

|
| -- Martin Pitt <mpitt at debian.org>  Thu, 26 Mar 2015 14:23:35 +0100

Thanks,

Martin

unblock systemd/215-14

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 6d81277..b5ac97e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,69 @@
+systemd (215-14) unstable; urgency=medium
+
+  [ Michael Biebl ]
+  * Map $x-display-manager LSB facility to display-manager.service instead of
+    making it a target. Using a target had the downside that multiple display
+    managers could hook into it at the same time which could lead to several
+    failed start attempts for the non-default display manager.
+  * Update insserv-generator and map $x-display-manager to
+    display-manager.service, following the recent change in sysv-generator.
+    This avoids creating references to a no longer existing
+    x-display-manager.target unit.
+  * Cherry-pick upstream fix to increase the SendBuffer of /dev/log to 8M.
+
+  [ Martin Pitt ]
+  * scope: Make attachment of initial PIDs more robust. Fixes crash with
+    processes that get started by an init.d script with a different (aliased)
+    name when the cgroup becomes empty. (Closes: #781210)
+  * boot-and-services, display-managers autopkgtests: Add missing python3 test
+    dependency.
+  * Don't attempt to mount the same swap partition twice through different
+    device node aliases. (Closes: #772182, LP: #1399595)
+
+  [ Christian Seiler ]
+  * Make the journald to syslog forwarding more robust by increasing the
+    maximum datagram queue length from 10 to 512. (Closes: #762700)
+
+  [ Marco d'Itri ]
+  * Avoid writing duplicate entries in 70-persistent-net.rules by double
+    checking if the new udev rule has already been written for the given
+    interface. This happens if multiple add events are generated before the
+    write_net_rules script returns and udevd renames the interface.
+    (Closes: #765577)
+
+ -- Michael Biebl <biebl at debian.org>  Mon, 30 Mar 2015 13:26:52 +0200
+
+systemd (215-13) unstable; urgency=medium
+
+  [ Martin Pitt ]
+  * Add hwclock-save.service to sync the system clock to the hardware clock on
+    shutdown, to provide monotonic time for reboots. (Note: this is a hack for
+    jessie; the next Debian release will enable timesyncd by default).
+    (Closes: #755722)
+  * Check for correct architecture identifiers for SuperH. (Closes: #779710)
+  * networkd: Fix stopping v4 dhcpclient when the carrier is lost. Thanks
+    Christos Trochalakis! (Closes: #779571)
+  * Fix segfault with units that depend on themselves. (Closes: #780675)
+  * tmpfiles-setup-dev: Call tmpfiles with --boot to allow unsafe device
+    creation. Fixes creation of static device nodes with kmod 20.
+    (Closes: #780263)
+
+  [ Christian Seiler ]
+  * core: Don't migrate PIDs for units that may contain subcgroups.
+    This stops messing up lxc/libvirt/other custom cgroup layouts after
+    daemon-reload. (Closes: #777164)
+  * sysv-generator: add support for /etc/insserv/overrides. (Closes: #759001)
+
+  [ Michael Biebl ]
+  * debian/udev.init: Recognize '!' flag with static device lists, to work
+    with kmod 20. (Closes: #780263)
+
+  [ Didier Roche ]
+  * Ensure PrivateTmp doesn't require tmpfs through tmp.mount, but rather adds
+    an After relationship. (Closes: #779902)
+
+ -- Martin Pitt <mpitt at debian.org>  Thu, 26 Mar 2015 14:23:35 +0100
+
 systemd (215-12) unstable; urgency=medium
 
   [ Martin Pitt ]
diff --git a/debian/extra/hwclock-save.service b/debian/extra/hwclock-save.service
new file mode 100644
index 0000000..1e0f99a
--- /dev/null
+++ b/debian/extra/hwclock-save.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Synchronise Hardware Clock to System Clock
+DefaultDependencies=no
+Before=shutdown.target
+ConditionFileIsExecutable=!/usr/sbin/ntpd
+ConditionFileIsExecutable=!/usr/sbin/openntpd
+ConditionFileIsExecutable=!/usr/sbin/chrony
+
+[Service]
+Type=oneshot
+ExecStart=/sbin/hwclock -D --systohc
+
+[Install]
+WantedBy=reboot.target halt.target poweroff.target
diff --git a/debian/extra/systemd-setup-dgram-qlen.service b/debian/extra/systemd-setup-dgram-qlen.service
new file mode 100644
index 0000000..dab08f6
--- /dev/null
+++ b/debian/extra/systemd-setup-dgram-qlen.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Increase datagram queue length
+DefaultDependencies=no
+Before=syslog.socket
+ConditionPathIsReadWrite=/proc/sys/net/unix/max_dgram_qlen
+
+[Service]
+Type=oneshot
+ExecStart=/sbin/sysctl -w net.unix.max_dgram_qlen=512
+StandardOutput=null
+RemainAfterExit=yes
diff --git a/debian/extra/write_net_rules b/debian/extra/write_net_rules
index 4379792..38a3ca0 100644
--- a/debian/extra/write_net_rules
+++ b/debian/extra/write_net_rules
@@ -117,6 +117,17 @@ fi
 basename=${INTERFACE%%[0-9]*}
 match="$match, KERNEL==\"$basename*\""
 
+# build a regular expression that matches the new rule that we want to write
+new_rule_pattern=$(echo "^SUBSYSTEM==\"net\", ACTION==\"add\"$match" | sed -re 's/([\?\*])/\\\1/g')
+
+# Double check if the new rule has already been written. This happens if
+# multiple add events are generated before the script returns and udevd
+# renames the interfaces. See #765577 for details.
+if egrep -qs "$new_rule_pattern" $RO_RULES_FILE $RULES_FILE; then
+	unlock_rules_file
+	exit 0
+fi
+
 if [ "$INTERFACE_NAME" ]; then
 	# external tools may request a custom name
 	COMMENT="$COMMENT (custom name provided by external tool)"
diff --git a/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch b/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch
index 9c182ab..88aaf17 100644
--- a/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch
+++ b/debian/patches/Add-targets-for-compatibility-with-Debian-insserv-sy.patch
@@ -3,30 +3,42 @@ Date: Sat, 26 Apr 2014 14:25:41 +0200
 Subject: Add targets for compatibility with Debian insserv system facilities
 
 ---
- Makefile.am                       |  6 ++++++
- units/mail-transport-agent.target | 12 ++++++++++++
- units/x-display-manager.target    | 12 ++++++++++++
- 3 files changed, 30 insertions(+)
+ Makefile.am                         |  5 +++++
+ src/sysv-generator/sysv-generator.c |  3 +++
+ units/mail-transport-agent.target   | 12 ++++++++++++
+ 3 files changed, 20 insertions(+)
  create mode 100644 units/mail-transport-agent.target
- create mode 100644 units/x-display-manager.target
 
 diff --git a/Makefile.am b/Makefile.am
-index ce93c8c..6f4df22 100644
+index ce93c8c..31c86de 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -539,6 +539,12 @@ nodist_systemunit_DATA = \
+@@ -539,6 +539,11 @@ nodist_systemunit_DATA = \
  	units/systemd-nspawn at .service \
  	units/systemd-update-done.service
  
 +if HAVE_SYSV_COMPAT
 +nodist_systemunit_DATA += \
-+	units/x-display-manager.target \
 +	units/mail-transport-agent.target
 +endif
 +
  dist_userunit_DATA = \
  	units/user/basic.target \
  	units/user/default.target \
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index b7837d8..7931e90 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -277,6 +277,9 @@ static int sysv_translate_facility(const char *name, const char *filename, char
+                 "remote_fs",            SPECIAL_REMOTE_FS_TARGET,
+                 "syslog",               NULL,
+                 "time",                 SPECIAL_TIME_SYNC_TARGET,
++                /* Debian defined facilities */
++                "x-display-manager",    "display-manager.service",
++                "mail-transport-agent", "mail-transport-agent.target",
+         };
+ 
+         unsigned i;
 diff --git a/units/mail-transport-agent.target b/units/mail-transport-agent.target
 new file mode 100644
 index 0000000..4d74ec7
@@ -45,21 +57,3 @@ index 0000000..4d74ec7
 +[Unit]
 +Description=Mail Transport Agent
 +RefuseManualStart=yes
-diff --git a/units/x-display-manager.target b/units/x-display-manager.target
-new file mode 100644
-index 0000000..a528dff
---- /dev/null
-+++ b/units/x-display-manager.target
-@@ -0,0 +1,12 @@
-+#  This file is part of systemd.
-+#
-+#  systemd is free software; you can redistribute it and/or modify it
-+#  under the terms of the GNU Lesser General Public License as published by
-+#  the Free Software Foundation; either version 2.1 of the License, or
-+#  (at your option) any later version.
-+
-+#  This exists mostly for compatibility with SysV/LSB units
-+#  depending on the $x-display-manager system facility.
-+[Unit]
-+Description=X11 Display Manager
-+RefuseManualStart=yes
diff --git a/debian/patches/Map-rcS.d-init-script-dependencies-to-their-systemd-.patch b/debian/patches/Map-rcS.d-init-script-dependencies-to-their-systemd-.patch
index f69545d..8b0da09 100644
--- a/debian/patches/Map-rcS.d-init-script-dependencies-to-their-systemd-.patch
+++ b/debian/patches/Map-rcS.d-init-script-dependencies-to-their-systemd-.patch
@@ -3,27 +3,29 @@ Date: Fri, 11 Jul 2014 02:15:37 +0200
 Subject: Map rcS.d init script dependencies to their systemd equivalent.
 
 ---
- src/sysv-generator/sysv-generator.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
+ src/sysv-generator/sysv-generator.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index 820d79e..677fac4 100644
+index ea864c1..635e0c7 100644
 --- a/src/sysv-generator/sysv-generator.c
 +++ b/src/sysv-generator/sysv-generator.c
-@@ -248,8 +248,15 @@ static int sysv_translate_facility(const char *name, const char *filename, char
+@@ -283,11 +283,17 @@ static int sysv_translate_facility(const char *name, const char *filename, char
                  "named",                SPECIAL_NSS_LOOKUP_TARGET,
                  "portmap",              SPECIAL_RPCBIND_TARGET,
                  "remote_fs",            SPECIAL_REMOTE_FS_TARGET,
 -                "syslog",               NULL,
 +                "syslog",               "systemd-journald-dev-log.socket",
                  "time",                 SPECIAL_TIME_SYNC_TARGET,
+                 /* Debian defined facilities */
+                 "x-display-manager",    "display-manager.service",
+                 "mail-transport-agent", "mail-transport-agent.target",
 +                /* special rcS init scripts */
 +                "cryptdisks",           "cryptsetup.target",
 +                "mountall",             SPECIAL_LOCAL_FS_TARGET,
 +                "mountnfs",             SPECIAL_REMOTE_FS_TARGET,
 +                "checkroot",            "systemd-remount-fs.service",
 +                "dbus",                 "dbus.socket",
-+
          };
  
          unsigned i;
diff --git a/debian/patches/PrivateTmp-shouldn-t-require-tmpfs.patch b/debian/patches/PrivateTmp-shouldn-t-require-tmpfs.patch
new file mode 100644
index 0000000..ea8c866
--- /dev/null
+++ b/debian/patches/PrivateTmp-shouldn-t-require-tmpfs.patch
@@ -0,0 +1,24 @@
+From: Didier Roche <didrocks at ubuntu.com>
+Date: Wed, 18 Mar 2015 17:11:00 +0100
+Subject: PrivateTmp shouldn't require tmpfs
+
+As PrivateTmp is requiring tmp.mount, this one will mount (but only after boot)
+/tmp as tmpfs adding a Requires=tmp.mount to the unit. This change downgrades
+the requirements to an after relationship.
+---
+ src/core/unit.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/unit.c b/src/core/unit.c
+index 62163b1..536fd5e 100644
+--- a/src/core/unit.c
++++ b/src/core/unit.c
+@@ -736,7 +736,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
+                 return 0;
+ 
+         if (c->private_tmp) {
+-                r = unit_require_mounts_for(u, "/tmp");
++                r = unit_add_dependency_by_name(u, UNIT_AFTER, "tmp.mount", NULL, true);
+                 if (r < 0)
+                         return r;
+ 
diff --git a/debian/patches/Use-correct-uname-identifiers-in-arch_map-for-SuperH.patch b/debian/patches/Use-correct-uname-identifiers-in-arch_map-for-SuperH.patch
new file mode 100644
index 0000000..f6bfc5a
--- /dev/null
+++ b/debian/patches/Use-correct-uname-identifiers-in-arch_map-for-SuperH.patch
@@ -0,0 +1,28 @@
+From: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
+Date: Thu, 5 Mar 2015 00:07:33 +0100
+Subject: Use correct uname identifiers in arch_map for SuperH architecture
+
+https://bugs.freedesktop.org/show_bug.cgi?id=89421
+---
+ src/shared/architecture.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/shared/architecture.c b/src/shared/architecture.c
+index dc45f35..617f39c 100644
+--- a/src/shared/architecture.c
++++ b/src/shared/architecture.c
+@@ -108,8 +108,12 @@ Architecture uname_architecture(void) {
+                 { "armv8l",     ARCHITECTURE_ARM      },
+                 { "armv8b",     ARCHITECTURE_ARM_BE   },
+ #elif defined(__sh__) || defined(__sh64__)
+-                { "sh64",       ARCHITECTURE_SH64     },
+-                { "sh",         ARCHITECTURE_SH       },
++                { "sh5",        ARCHITECTURE_SH64     },
++                { "sh2",        ARCHITECTURE_SH       },
++                { "sh2a",       ARCHITECTURE_SH       },
++                { "sh3",        ARCHITECTURE_SH       },
++                { "sh4",        ARCHITECTURE_SH       },
++                { "sh4a",       ARCHITECTURE_SH       },
+ #elif defined(__m68k__)
+                 { "m68k",       ARCHITECTURE_M68K     },
+ #elif defined(__tilegx__)
diff --git a/debian/patches/core-do-not-add-dependencies-to-self.patch b/debian/patches/core-do-not-add-dependencies-to-self.patch
new file mode 100644
index 0000000..ecde6c2
--- /dev/null
+++ b/debian/patches/core-do-not-add-dependencies-to-self.patch
@@ -0,0 +1,90 @@
+From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek at in.waw.pl>
+Date: Thu, 7 Aug 2014 20:42:58 -0400
+Subject: core: do not add dependencies to self
+
+Adds a pair of files which cause a segfault (also with
+systemd-analyze verify).
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1124843
+---
+ src/core/load-dropin.c           |  2 +-
+ src/core/unit.c                  | 16 ++++++++++++----
+ test/loopy.service               |  2 ++
+ test/loopy.service.d/compat.conf |  5 +++++
+ test/loopy2.service              |  1 +
+ 5 files changed, 21 insertions(+), 5 deletions(-)
+ create mode 100644 test/loopy.service
+ create mode 100644 test/loopy.service.d/compat.conf
+ create mode 120000 test/loopy2.service
+
+diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
+index 6ff592b..b2fdf3a 100644
+--- a/src/core/load-dropin.c
++++ b/src/core/load-dropin.c
+@@ -181,7 +181,7 @@ int unit_load_dropin(Unit *u) {
+         }
+ 
+         u->dropin_paths = unit_find_dropin_paths(u);
+-        if (! u->dropin_paths)
++        if (!u->dropin_paths)
+                 return 0;
+ 
+         STRV_FOREACH(f, u->dropin_paths) {
+diff --git a/src/core/unit.c b/src/core/unit.c
+index 0e4ebfd..7dbbf73 100644
+--- a/src/core/unit.c
++++ b/src/core/unit.c
+@@ -597,14 +597,22 @@ static void merge_dependencies(Unit *u, Unit *other, UnitDependency d) {
+                 UnitDependency k;
+ 
+                 for (k = 0; k < _UNIT_DEPENDENCY_MAX; k++) {
+-                        r = set_remove_and_put(back->dependencies[k], other, u);
+-                        if (r == -EEXIST)
++                        /* Do not add dependencies between u and itself */
++                        if (back == u) {
+                                 set_remove(back->dependencies[k], other);
+-                        else
+-                                assert(r >= 0 || r == -ENOENT);
++                        } else {
++                                r = set_remove_and_put(back->dependencies[k], other, u);
++                                if (r == -EEXIST)
++                                        set_remove(back->dependencies[k], other);
++                                else
++                                        assert(r >= 0 || r == -ENOENT);
++                        }
+                 }
+         }
+ 
++        /* Also do not move dependencies on u to itself */
++        set_remove(other->dependencies[d], u);
++
+         complete_move(&u->dependencies[d], &other->dependencies[d]);
+ 
+         set_free(other->dependencies[d]);
+diff --git a/test/loopy.service b/test/loopy.service
+new file mode 100644
+index 0000000..9eb6457
+--- /dev/null
++++ b/test/loopy.service
+@@ -0,0 +1,2 @@
++[Service]
++ExecStart=/bin/true
+diff --git a/test/loopy.service.d/compat.conf b/test/loopy.service.d/compat.conf
+new file mode 100644
+index 0000000..51b84b8
+--- /dev/null
++++ b/test/loopy.service.d/compat.conf
+@@ -0,0 +1,5 @@
++[Unit]
++BindsTo=loopy2.service
++
++[Install]
++Also=loopy2.service
+diff --git a/test/loopy2.service b/test/loopy2.service
+new file mode 120000
+index 0000000..961b1fe
+--- /dev/null
++++ b/test/loopy2.service
+@@ -0,0 +1 @@
++loopy.service
+\ No newline at end of file
diff --git a/debian/patches/core-don-t-migrate-PIDs-for-units-that-may-contain-s.patch b/debian/patches/core-don-t-migrate-PIDs-for-units-that-may-contain-s.patch
new file mode 100644
index 0000000..09e7116
--- /dev/null
+++ b/debian/patches/core-don-t-migrate-PIDs-for-units-that-may-contain-s.patch
@@ -0,0 +1,59 @@
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 26 Mar 2015 12:45:03 +0100
+Subject: core: don't migrate PIDs for units that may contain subcgroups,
+ do this only for leaf units
+
+Otherwise a slice or delegation unit might move PIDs around ignoring
+the fact that it is attached to a subcgroup.
+
+This backport of the original commit does not include the part about
+delegate units that was introduced into the systemd source code at
+commit a931ad47a8623163a29d898224d8a8c1177ffdaf, since that is  not
+part of systemd 215.
+
+Origin: backport (0cd385d31814c)
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1139223
+Bug-Debian: https://bugs.debian.org/777164
+---
+ src/core/cgroup.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/src/core/cgroup.c b/src/core/cgroup.c
+index cd67963..77acd2e 100644
+--- a/src/core/cgroup.c
++++ b/src/core/cgroup.c
+@@ -594,10 +594,15 @@ static const char *migrate_callback(CGroupControllerMask mask, void *userdata) {
+ 
+ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
+         _cleanup_free_ char *path = NULL;
++        CGroupContext *c;
+         int r;
+ 
+         assert(u);
+ 
++        c = unit_get_cgroup_context(u);
++        if (!c)
++                return 0;
++
+         path = unit_default_cgroup_path(u);
+         if (!path)
+                 return log_oom();
+@@ -623,10 +628,14 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
+         u->cgroup_realized = true;
+         u->cgroup_realized_mask = mask;
+ 
+-        /* Then, possibly move things over */
+-        r = cg_migrate_everywhere(u->manager->cgroup_supported, u->cgroup_path, u->cgroup_path, migrate_callback, u);
+-        if (r < 0)
+-                log_warning("Failed to migrate cgroup from to %s: %s", u->cgroup_path, strerror(-r));
++        /* Then, possibly move things over, but not if
++         * subgroups may contain processes, which is the case
++         * for slice units. */
++        if (u->type != UNIT_SLICE) {
++                r = cg_migrate_everywhere(u->manager->cgroup_supported, u->cgroup_path, u->cgroup_path, migrate_callback, u);
++                if (r < 0)
++                        log_warning("Failed to migrate cgroup from to %s: %s", u->cgroup_path, strerror(-r));
++        }
+ 
+         return 0;
+ }
diff --git a/debian/patches/core-if-two-start-jobs-for-the-same-swap-device-node.patch b/debian/patches/core-if-two-start-jobs-for-the-same-swap-device-node.patch
new file mode 100644
index 0000000..a386c90
--- /dev/null
+++ b/debian/patches/core-if-two-start-jobs-for-the-same-swap-device-node.patch
@@ -0,0 +1,76 @@
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 28 Jan 2015 00:38:38 +0100
+Subject: core: if two start jobs for the same swap device node are queued,
+ only dispatch one of them at a time
+
+If two start jobs for two seperate .swap device nodes are queued, which
+then turns out to be referring to the same device node, refuse
+dispatching more than one of them at the same time.
+
+This should solve an issue when the same swap partition is found via GPT
+auto-discovery and via /etc/fstab, where one uses a symlink path, and
+the other the raw devce node. So far we might have ended up invoking
+mkswap on the same node at the very same time with the two device node
+names.
+
+With this change only one mkswap should be executed at a time. THis
+mkswap should have immediate effect on the other swap unit, due to the
+state in /proc/swaps changing, and thus suppressing actual invocation of
+the second mkswap.
+
+http://lists.freedesktop.org/archives/systemd-devel/2015-January/027314.html
+---
+ src/core/swap.c | 19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/swap.c b/src/core/swap.c
+index a6a2355..8a77e78 100644
+--- a/src/core/swap.c
++++ b/src/core/swap.c
+@@ -472,6 +472,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
+ 
+ static void swap_set_state(Swap *s, SwapState state) {
+         SwapState old_state;
++        Swap *other;
+ 
+         assert(s);
+ 
+@@ -499,6 +500,15 @@ static void swap_set_state(Swap *s, SwapState state) {
+                                swap_state_to_string(state));
+ 
+         unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state], true);
++
++        /* If there other units for the same device node have a job
++           queued it might be worth checking again if it is runnable
++           now. This is necessary, since swap_start() refuses
++           operation with EAGAIN if there's already another job for
++           the same device node queued. */
++        LIST_FOREACH_OTHERS(same_devnode, other, s)
++                if (UNIT(other)->job)
++                        job_add_to_run_queue(UNIT(other)->job);
+ }
+ 
+ static int swap_coldplug(Unit *u) {
+@@ -866,7 +876,7 @@ fail:
+ }
+ 
+ static int swap_start(Unit *u) {
+-        Swap *s = SWAP(u);
++        Swap *s = SWAP(u), *other;
+ 
+         assert(s);
+ 
+@@ -888,6 +898,13 @@ static int swap_start(Unit *u) {
+         if (detect_container(NULL) > 0)
+                 return -EPERM;
+ 
++        /* If there's a job for another swap unit for the same node
++         * running, then let's not dispatch this one for now, and wait
++         * until that other job has finished. */
++        LIST_FOREACH_OTHERS(same_devnode, other, s)
++                if (UNIT(other)->job && UNIT(other)->job->state == JOB_RUNNING)
++                        return -EAGAIN;
++
+         s->result = SWAP_SUCCESS;
+         swap_enter_activating(s);
+         return 0;
diff --git a/debian/patches/insserv.conf-generator.patch b/debian/patches/insserv.conf-generator.patch
index 14a5e41..7a4ce95 100644
--- a/debian/patches/insserv.conf-generator.patch
+++ b/debian/patches/insserv.conf-generator.patch
@@ -12,13 +12,15 @@ It has the following modifications:
 - it removes support for boot. and bool.localfs which is a SuSE specific
   extension
 - it ensures that targets do not start other targets or services
+- maps $x-display-manager to display-manager.service, just like the
+  sysv-generator
 
 [0] https://build.opensuse.org/package/view_file/openSUSE:Factory/systemd/insserv-generator.patch
 ---
  Makefile.am                               |   9 +
  src/insserv-generator/Makefile            |  28 +++
- src/insserv-generator/insserv-generator.c | 324 ++++++++++++++++++++++++++++++
- 3 files changed, 361 insertions(+)
+ src/insserv-generator/insserv-generator.c | 326 ++++++++++++++++++++++++++++++
+ 3 files changed, 363 insertions(+)
  create mode 100644 src/insserv-generator/Makefile
  create mode 100644 src/insserv-generator/insserv-generator.c
 
@@ -85,10 +87,10 @@ index 0000000..9d07505
 +.PHONY: all clean
 diff --git a/src/insserv-generator/insserv-generator.c b/src/insserv-generator/insserv-generator.c
 new file mode 100644
-index 0000000..d86ee29
+index 0000000..97a68e7
 --- /dev/null
 +++ b/src/insserv-generator/insserv-generator.c
-@@ -0,0 +1,324 @@
+@@ -0,0 +1,326 @@
 +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 +
 +/***
@@ -160,6 +162,8 @@ index 0000000..d86ee29
 +                "remote_fs",            SPECIAL_REMOTE_FS_TARGET,
 +                "syslog",               NULL,
 +                "time",                 SPECIAL_TIME_SYNC_TARGET,
++                /* Debian defined facilities */
++                "x-display-manager",    "display-manager.service",
 +        };
 +
 +        unsigned i;
diff --git a/debian/patches/journald-also-increase-the-SendBuffer-of-dev-log-to-.patch b/debian/patches/journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
new file mode 100644
index 0000000..7ead190
--- /dev/null
+++ b/debian/patches/journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
@@ -0,0 +1,33 @@
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 13 Aug 2014 18:53:05 +0200
+Subject: journald: also increase the SendBuffer of /dev/log to 8M
+
+http://lists.freedesktop.org/archives/systemd-devel/2014-August/021825.html
+
+(cherry picked from commit 5e8b767df6e18444d5aff2987b5e5603361ed528)
+---
+ units/systemd-journald-dev-log.socket | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/units/systemd-journald-dev-log.socket b/units/systemd-journald-dev-log.socket
+index c01b310..ffd44bb 100644
+--- a/units/systemd-journald-dev-log.socket
++++ b/units/systemd-journald-dev-log.socket
+@@ -17,10 +17,16 @@ Before=sockets.target
+ IgnoreOnIsolate=yes
+ 
+ [Socket]
++Service=systemd-journald.service
+ ListenDatagram=/run/systemd/journal/dev-log
+ Symlinks=/dev/log
+ SocketMode=0666
+ PassCredentials=yes
+ PassSecurity=yes
++
++# Increase both the send and receive buffer, so that things don't
++# block early. Note that journald internally uses the this socket both
++# for receiving syslog messages, and for forwarding them to any other
++# syslog, hence we bump both values.
+ ReceiveBuffer=8M
+-Service=systemd-journald.service
++SendBuffer=8M
diff --git a/debian/patches/list-add-macro-for-iterating-through-a-list-an-item-.patch b/debian/patches/list-add-macro-for-iterating-through-a-list-an-item-.patch
new file mode 100644
index 0000000..4ed6971
--- /dev/null
+++ b/debian/patches/list-add-macro-for-iterating-through-a-list-an-item-.patch
@@ -0,0 +1,51 @@
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 28 Jan 2015 00:34:58 +0100
+Subject: list: add macro for iterating through a list an item is in,
+ skipping the item
+
+---
+ src/shared/list.h    | 12 ++++++++++++
+ src/test/test-list.c |  7 +++++++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/src/shared/list.h b/src/shared/list.h
+index c020f7e..d535a17 100644
+--- a/src/shared/list.h
++++ b/src/shared/list.h
+@@ -130,6 +130,18 @@
+ #define LIST_FOREACH_AFTER(name,i,p)                                    \
+         for ((i) = (p)->name##_next; (i); (i) = (i)->name##_next)
+ 
++/* Iterate through all the members of the list p is included in, but skip over p */
++#define LIST_FOREACH_OTHERS(name,i,p)                                   \
++        for (({                                                         \
++                (i) = (p);                                              \
++                while ((i) && (i)->name##_prev)                         \
++                        (i) = (i)->name##_prev;                         \
++                if ((i) == (p))                                         \
++                        (i) = (p)->name##_next;                         \
++             });                                                        \
++             (i);                                                       \
++             (i) = (i)->name##_next == (p) ? (p)->name##_next : (i)->name##_next)
++
+ /* Loop starting from p->next until p->prev.
+    p can be adjusted meanwhile. */
+ #define LIST_LOOP_BUT_ONE(name,i,head,p)                                \
+diff --git a/src/test/test-list.c b/src/test/test-list.c
+index fa52ad1..4e3be91 100644
+--- a/src/test/test-list.c
++++ b/src/test/test-list.c
+@@ -38,6 +38,13 @@ int main(int argc, const char *argv[]) {
+                 LIST_PREPEND(item, head, &items[i]);
+         }
+ 
++        i = 0;
++        LIST_FOREACH_OTHERS(item, cursor, &items[2]) {
++                i++;
++                assert_se(cursor != &items[2]);
++        }
++        assert_se(i == ELEMENTSOF(items)-1);
++
+         assert_se(!LIST_JUST_US(item, head));
+ 
+         assert_se(items[0].item_next == NULL);
diff --git a/debian/patches/networkd-link-fix-stopping-v4-dhcpclient-when-the-ca.patch b/debian/patches/networkd-link-fix-stopping-v4-dhcpclient-when-the-ca.patch
new file mode 100644
index 0000000..50c5896
--- /dev/null
+++ b/debian/patches/networkd-link-fix-stopping-v4-dhcpclient-when-the-ca.patch
@@ -0,0 +1,33 @@
+From: Christos Trochalakis <yatiohi at ideopolis.gr>
+Date: Sat, 7 Feb 2015 09:23:19 +0200
+Subject: networkd: link - fix stopping v4 dhcpclient when the carrier is lost
+
+The check for a running v4 dhcpclient was using DHCP_SUPPORT_V6 flag
+instead of DHCP_SUPPORT_V4.
+
+As a result, when the carrier was lost systemd was not cleaning up the
+relevant addresses and routes. If the carrier was regained in another
+environment, with a different subnet and gateway, the system would end
+up with multiple addresses and default gateways and thus a broken
+network configuration. This scenario can be easily reproduced with wifi
+links.
+
+Bug-Debian: http://bugs.debian.org/779571
+Forwarded: No, fixed upstream in 217 as side effect of commit ba179154.
+---
+ src/network/networkd-link.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index 6257372..8c68199 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -206,7 +206,7 @@ static int link_stop_clients(Link *link) {
+         if (!link->network)
+                 return 0;
+ 
+-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V6)) {
++        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V4)) {
+                 assert(link->dhcp_client);
+ 
+                 k = sd_dhcp_client_stop(link->dhcp_client);
diff --git a/debian/patches/scope-make-attachment-of-initial-PIDs-a-bit-more-rob.patch b/debian/patches/scope-make-attachment-of-initial-PIDs-a-bit-more-rob.patch
new file mode 100644
index 0000000..4edcb96
--- /dev/null
+++ b/debian/patches/scope-make-attachment-of-initial-PIDs-a-bit-more-rob.patch
@@ -0,0 +1,191 @@
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 10 Dec 2014 22:06:44 +0100
+Subject: scope: make attachment of initial PIDs a bit more robust
+
+---
+ src/core/cgroup.c        | 42 ++++++++++++++++++++++++++++++------------
+ src/core/cgroup.h        |  1 +
+ src/core/execute.c       |  2 +-
+ src/core/scope.c         |  8 +-------
+ src/shared/cgroup-util.c | 18 ++++++++++++++----
+ src/shared/cgroup-util.h |  4 ++--
+ 6 files changed, 49 insertions(+), 26 deletions(-)
+
+diff --git a/src/core/cgroup.c b/src/core/cgroup.c
+index 77acd2e..a7ef88d 100644
+--- a/src/core/cgroup.c
++++ b/src/core/cgroup.c
+@@ -593,7 +593,6 @@ static const char *migrate_callback(CGroupControllerMask mask, void *userdata) {
+ }
+ 
+ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
+-        _cleanup_free_ char *path = NULL;
+         CGroupContext *c;
+         int r;
+ 
+@@ -603,18 +602,22 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
+         if (!c)
+                 return 0;
+ 
+-        path = unit_default_cgroup_path(u);
+-        if (!path)
+-                return log_oom();
++        if (!u->cgroup_path) {
++                _cleanup_free_ char *path = NULL;
+ 
+-        r = hashmap_put(u->manager->cgroup_unit, path, u);
+-        if (r < 0) {
+-                log_error(r == -EEXIST ? "cgroup %s exists already: %s" : "hashmap_put failed for %s: %s", path, strerror(-r));
+-                return r;
+-        }
+-        if (r > 0) {
+-                u->cgroup_path = path;
+-                path = NULL;
++                path = unit_default_cgroup_path(u);
++                if (!path)
++                        return log_oom();
++
++                r = hashmap_put(u->manager->cgroup_unit, path, u);
++                if (r < 0) {
++                        log_error(r == -EEXIST ? "cgroup %s exists already: %s" : "hashmap_put failed for %s: %s", path, strerror(-r));
++                        return r;
++                }
++                if (r > 0) {
++                        u->cgroup_path = path;
++                        path = NULL;
++                }
+         }
+ 
+         /* First, create our own group */
+@@ -640,6 +643,21 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
+         return 0;
+ }
+ 
++int unit_attach_pids_to_cgroup(Unit *u) {
++        int r;
++        assert(u);
++
++        r = unit_realize_cgroup(u);
++        if (r < 0)
++                return r;
++
++        r = cg_attach_many_everywhere(u->manager->cgroup_supported, u->cgroup_path, u->pids, migrate_callback, u);
++        if (r < 0)
++                return r;
++
++        return 0;
++}
++
+ static bool unit_has_mask_realized(Unit *u, CGroupControllerMask mask) {
+         assert(u);
+ 
+diff --git a/src/core/cgroup.h b/src/core/cgroup.h
+index d299872..8a22a26 100644
+--- a/src/core/cgroup.h
++++ b/src/core/cgroup.h
+@@ -108,6 +108,7 @@ CGroupControllerMask unit_get_target_mask(Unit *u);
+ void unit_update_cgroup_members_masks(Unit *u);
+ int unit_realize_cgroup(Unit *u);
+ void unit_destroy_cgroup(Unit *u);
++int unit_attach_pids_to_cgroup(Unit *u);
+ 
+ int manager_setup_cgroup(Manager *m);
+ void manager_shutdown_cgroup(Manager *m, bool delete);
+diff --git a/src/core/execute.c b/src/core/execute.c
+index 6b09402..4efafc9 100644
+--- a/src/core/execute.c
++++ b/src/core/execute.c
+@@ -1406,7 +1406,7 @@ int exec_spawn(ExecCommand *command,
+                 }
+ 
+                 if (cgroup_path) {
+-                        err = cg_attach_everywhere(cgroup_supported, cgroup_path, 0);
++                        err = cg_attach_everywhere(cgroup_supported, cgroup_path, 0, NULL, NULL);
+                         if (err < 0) {
+                                 r = EXIT_CGROUP;
+                                 goto fail_child;
+diff --git a/src/core/scope.c b/src/core/scope.c
+index e8f9e8d..273d7ba 100644
+--- a/src/core/scope.c
++++ b/src/core/scope.c
+@@ -288,13 +288,7 @@ static int scope_start(Unit *u) {
+         if (!u->transient && UNIT(s)->manager->n_reloading <= 0)
+                 return -ENOENT;
+ 
+-        r = unit_realize_cgroup(u);
+-        if (r < 0) {
+-                log_error("Failed to realize cgroup: %s", strerror(-r));
+-                return r;
+-        }
+-
+-        r = cg_attach_many_everywhere(u->manager->cgroup_supported, u->cgroup_path, UNIT(s)->pids);
++        r = unit_attach_pids_to_cgroup(u);
+         if (r < 0)
+                 return r;
+ 
+diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
+index c1c4d40..af9471b 100644
+--- a/src/shared/cgroup-util.c
++++ b/src/shared/cgroup-util.c
+@@ -1628,7 +1628,7 @@ int cg_create_everywhere(CGroupControllerMask supported, CGroupControllerMask ma
+         return 0;
+ }
+ 
+-int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t pid) {
++int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t pid, cg_migrate_callback_t path_callback, void *userdata) {
+         CGroupControllerMask bit = 1;
+         const char *n;
+         int r;
+@@ -1638,8 +1638,18 @@ int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t
+                 return r;
+ 
+         NULSTR_FOREACH(n, mask_names) {
+-                if (supported & bit)
++
++                if (supported & bit) {
++                        const char *p = NULL;
++
++                        if (path_callback)
++                                p = path_callback(bit, userdata);
++
++                        if (!p)
++                                p = path;
++
+                         cg_attach_fallback(n, path, pid);
++                }
+ 
+                 bit <<= 1;
+         }
+@@ -1647,7 +1657,7 @@ int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t
+         return 0;
+ }
+ 
+-int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path, Set* pids) {
++int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path, Set* pids, cg_migrate_callback_t path_callback, void *userdata) {
+         Iterator i;
+         void *pidp;
+         int r = 0;
+@@ -1656,7 +1666,7 @@ int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path,
+                 pid_t pid = PTR_TO_LONG(pidp);
+                 int q;
+ 
+-                q = cg_attach_everywhere(supported, path, pid);
++                q = cg_attach_everywhere(supported, path, pid, path_callback, userdata);
+                 if (q < 0)
+                         r = q;
+         }
+diff --git a/src/shared/cgroup-util.h b/src/shared/cgroup-util.h
+index aca4e44..b3425ca 100644
+--- a/src/shared/cgroup-util.h
++++ b/src/shared/cgroup-util.h
+@@ -125,8 +125,8 @@ int cg_slice_to_path(const char *unit, char **ret);
+ typedef const char* (*cg_migrate_callback_t)(CGroupControllerMask mask, void *userdata);
+ 
+ int cg_create_everywhere(CGroupControllerMask supported, CGroupControllerMask mask, const char *path);
+-int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t pid);
+-int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path, Set* pids);
++int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t pid, cg_migrate_callback_t callback, void *userdata);
++int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path, Set* pids, cg_migrate_callback_t callback, void *userdata);
+ int cg_migrate_everywhere(CGroupControllerMask supported, const char *from, const char *to, cg_migrate_callback_t callback, void *userdata);
+ int cg_trim_everywhere(CGroupControllerMask supported, const char *path, bool delete_root);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 5e7b67b..450d093 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -135,6 +135,15 @@ logind-handle-closing-sessions-over-daemon-restarts.patch
 logind-fix-sd_eviocrevoke-ioctl-call.patch
 rules-Fix-by-path-of-mmc-RPMB-partitions-and-don-t-b.patch
 man-document-failed.patch
+Use-correct-uname-identifiers-in-arch_map-for-SuperH.patch
+networkd-link-fix-stopping-v4-dhcpclient-when-the-ca.patch
+core-do-not-add-dependencies-to-self.patch
+units-tmpfiles-setup-dev-allow-unsafe-file-creation-.patch
+core-don-t-migrate-PIDs-for-units-that-may-contain-s.patch
+scope-make-attachment-of-initial-PIDs-a-bit-more-rob.patch
+journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
+list-add-macro-for-iterating-through-a-list-an-item-.patch
+core-if-two-start-jobs-for-the-same-swap-device-node.patch
 
 ## Debian specific patches:
 Add-back-support-for-Debian-specific-config-files.patch
@@ -187,3 +196,6 @@ Fix-usr-remount-failure-for-split-usr.patch
 Only-start-logind-if-dbus-is-installed.patch
 cgroup-don-t-trim-cgroup-trees-created-by-someone-el.patch
 core-don-t-fail-to-run-services-in-user-instances-if.patch
+PrivateTmp-shouldn-t-require-tmpfs.patch
+sysv-generator-add-support-for-etc-insserv-overrides.patch
+syslog-Increase-max_dgram_qlen-by-pulling-in-systemd.patch
diff --git a/debian/patches/syslog-Increase-max_dgram_qlen-by-pulling-in-systemd.patch b/debian/patches/syslog-Increase-max_dgram_qlen-by-pulling-in-systemd.patch
new file mode 100644
index 0000000..50745ff
--- /dev/null
+++ b/debian/patches/syslog-Increase-max_dgram_qlen-by-pulling-in-systemd.patch
@@ -0,0 +1,24 @@
+From: Michael Biebl <biebl at debian.org>
+Date: Sun, 29 Mar 2015 20:55:32 +0200
+Subject: syslog: Increase max_dgram_qlen by pulling in
+ systemd-setup-dgram-qlen.service
+
+Closes: #762700
+---
+ units/syslog.socket | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/units/syslog.socket b/units/syslog.socket
+index e6e9cf8..457c4e8 100644
+--- a/units/syslog.socket
++++ b/units/syslog.socket
+@@ -15,6 +15,9 @@ Before=sockets.target shutdown.target
+ # Don't allow logging until the very end
+ Conflicts=shutdown.target
+ 
++# Increase max_dgram_qlen to a more reasonable value
++Wants=systemd-setup-dgram-qlen.service
++
+ [Socket]
+ ListenDatagram=/run/systemd/journal/syslog
+ SocketMode=0666
diff --git a/debian/patches/sysv-generator-add-support-for-etc-insserv-overrides.patch b/debian/patches/sysv-generator-add-support-for-etc-insserv-overrides.patch
new file mode 100644
index 0000000..2b5a15e
--- /dev/null
+++ b/debian/patches/sysv-generator-add-support-for-etc-insserv-overrides.patch
@@ -0,0 +1,183 @@
+From: Christian Seiler <christian at iwakd.de>
+Date: Tue, 17 Feb 2015 00:27:21 +0100
+Subject: sysv-generator: add support for /etc/insserv/overrides
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759001
+---
+ src/sysv-generator/sysv-generator.c | 57 ++++++++++++++++++++++++++++++-------
+ 1 file changed, 47 insertions(+), 10 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 628d579..3b5e874 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -41,6 +41,8 @@
+ #include "fileio.h"
+ #include "hashmap.h"
+ 
++#define SYSV_OVERRIDE_PATH    "/etc/insserv/overrides/"
++
+ typedef enum RunlevelType {
+         RUNLEVEL_SYSINIT,
+         RUNLEVEL_UP,
+@@ -76,6 +78,7 @@ static const struct {
+ typedef struct SysvStub {
+         char *name;
+         char *path;
++        char *override_path;
+         char *description;
+         bool sysinit;
+         int sysv_start_priority;
+@@ -207,6 +210,12 @@ static int generate_unit_file(SysvStub *s) {
+         if (!isempty(conflicts))
+                 fprintf(f, "Conflicts=%s\n", conflicts);
+ 
++        /* make systemctl status show the information that the headers
++         * were overridden; not the most elegant way, but SourcePath=
++         * only accepts a single entry */
++        if (s->override_path)
++                fprintf(f, "Documentation=file://%s\n", s->override_path);
++
+         fprintf(f,
+                 "\n[Service]\n"
+                 "Type=forking\n"
+@@ -351,7 +360,7 @@ finish:
+         return 1;
+ }
+ 
+-static int load_sysv(SysvStub *s) {
++static int load_sysv(SysvStub *s, const char *fpath, bool check_for_usage_only) {
+         _cleanup_fclose_ FILE *f;
+         unsigned line = 0;
+         int r;
+@@ -368,7 +377,7 @@ static int load_sysv(SysvStub *s) {
+ 
+         assert(s);
+ 
+-        f = fopen(s->path, "re");
++        f = fopen(fpath, "re");
+         if (!f)
+                 return errno == ENOENT ? 0 : -errno;
+ 
+@@ -381,7 +390,7 @@ static int load_sysv(SysvStub *s) {
+ 
+                         log_error_unit(s->name,
+                                        "Failed to read configuration file '%s': %m",
+-                                       s->path);
++                                       fpath);
+                         return -errno;
+                 }
+ 
+@@ -406,6 +415,11 @@ static int load_sysv(SysvStub *s) {
+                         continue;
+                 }
+ 
++                /* If this is just the run to determine whether the init
++                 * script supports reload. */
++                if (check_for_usage_only)
++                        continue;
++
+                 if (state == NORMAL && streq(t, "### BEGIN INIT INFO")) {
+                         state = LSB;
+                         s->has_lsb = true;
+@@ -456,7 +470,7 @@ static int load_sysv(SysvStub *s) {
+                                 if (!path_is_absolute(fn)) {
+                                         log_error_unit(s->name,
+                                                        "[%s:%u] PID file not absolute. Ignoring.",
+-                                                       s->path, line);
++                                                       fpath, line);
+                                         continue;
+                                 }
+ 
+@@ -547,7 +561,7 @@ static int load_sysv(SysvStub *s) {
+                                         if (r < 0)
+                                                 log_error_unit(s->name,
+                                                                "[%s:%u] Failed to add LSB Provides name %s, ignoring: %s",
+-                                                               s->path, line, m, strerror(-r));
++                                                               fpath, line, m, strerror(-r));
+                                 }
+ 
+                         } else if (startswith_no_case(t, "Required-Start:") ||
+@@ -571,7 +585,7 @@ static int load_sysv(SysvStub *s) {
+                                         if (r < 0) {
+                                                 log_error_unit(s->name,
+                                                                "[%s:%u] Failed to translate LSB dependency %s, ignoring: %s",
+-                                                               s->path, line, n, strerror(-r));
++                                                               fpath, line, n, strerror(-r));
+                                                 continue;
+                                         }
+ 
+@@ -605,7 +619,7 @@ static int load_sysv(SysvStub *s) {
+                                         if (r < 0)
+                                                 log_error_unit(s->name,
+                                                                "[%s:%u] Failed to add dependency on %s, ignoring: %s",
+-                                                               s->path, line, m, strerror(-r));
++                                                               fpath, line, m, strerror(-r));
+                                 }
+ 
+                         } else if (startswith_no_case(t, "Description:")) {
+@@ -761,6 +775,7 @@ static int native_unit_exists(LookupPaths lp, char *name) {
+ 
+ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+         char **path;
++        int had_override = 0;
+ 
+         STRV_FOREACH(path, lp.sysvinit_path) {
+                 _cleanup_closedir_ DIR *d = NULL;
+@@ -776,7 +791,7 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                 while ((de = readdir(d))) {
+                         SysvStub *service;
+                         struct stat st;
+-                        _cleanup_free_ char *fpath = NULL, *name = NULL;
++                        _cleanup_free_ char *fpath = NULL, *name = NULL, *override_fpath = NULL;
+                         int r;
+ 
+                         if (ignore_file(de->d_name))
+@@ -792,6 +807,19 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                         if (!(st.st_mode & S_IXUSR))
+                                 continue;
+ 
++                        override_fpath = strjoin(SYSV_OVERRIDE_PATH, de->d_name, NULL);
++                        if (!override_fpath)
++                                return log_oom();
++
++                        if (stat(override_fpath, &st) < 0) {
++                                free(override_fpath);
++                                override_fpath = NULL;
++                        } else if (!had_override) {
++                                /* Only display this message once. */
++                                had_override = 1;
++                                log_info("Using overrides in %s. This is only supported in Jessie as a transitional measure.", SYSV_OVERRIDE_PATH);
++                        }
++
+                         name = sysv_translate_name(de->d_name);
+                         if (!name)
+                                 return log_oom();
+@@ -812,8 +840,17 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                         service->sysv_start_priority = -1;
+                         service->name = name;
+                         service->path = fpath;
++                        service->override_path = override_fpath;
++
++                        if (override_fpath) {
++                                r = load_sysv(service, override_fpath, false);
++                                if (r < 0)
++                                        continue;
++                        }
+ 
+-                        r = load_sysv(service);
++                        /* always read in the init script to determine whether
++                         * it supports reload action */
++                        r = load_sysv(service, fpath, (bool) override_fpath);
+                         if (r < 0)
+                                 continue;
+ 
+@@ -821,7 +858,7 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
+                         if (r < 0)
+                                 return log_oom();
+ 
+-                        name = fpath = NULL;
++                        name = fpath = override_fpath = NULL;
+                 }
+         }
+ 
diff --git a/debian/patches/units-tmpfiles-setup-dev-allow-unsafe-file-creation-.patch b/debian/patches/units-tmpfiles-setup-dev-allow-unsafe-file-creation-.patch
new file mode 100644
index 0000000..a013c06
--- /dev/null
+++ b/debian/patches/units-tmpfiles-setup-dev-allow-unsafe-file-creation-.patch
@@ -0,0 +1,20 @@
+From: Tom Gundersen <teg at jklm.no>
+Date: Mon, 27 Oct 2014 17:15:42 +0100
+Subject: units: tmpfiles-setup-dev - allow unsafe file creation to happen in
+ /dev at boot
+
+This will allow us to mark static device nodes with '!' to indicate that they should only be created at early boot.
+---
+ units/systemd-tmpfiles-setup-dev.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in
+index 06346d3..0b66c53 100644
+--- a/units/systemd-tmpfiles-setup-dev.service.in
++++ b/units/systemd-tmpfiles-setup-dev.service.in
+@@ -17,4 +17,4 @@ ConditionCapability=CAP_SYS_MODULE
+ [Service]
+ Type=oneshot
+ RemainAfterExit=yes
+-ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create
++ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create --boot
diff --git a/debian/rules b/debian/rules
index 4f79678..5f0a7c3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -183,7 +183,11 @@ override_dh_install:
 		debian/systemd/lib/lsb/init-functions.d/40-systemd
 	install --mode=644 debian/tmpfiles.d/debian.conf \
 		debian/systemd/usr/lib/tmpfiles.d/
-	install --mode=644 debian/debian-fixup.service debian/ifup at .service debian/extra/getty-static.service \
+	install --mode=644 debian/debian-fixup.service \
+		debian/ifup at .service \
+		debian/extra/getty-static.service \
+		debian/extra/hwclock-save.service \
+		debian/extra/systemd-setup-dgram-qlen.service \
 		debian/systemd/lib/systemd/system/
 	install -D --mode=644 debian/extra/network-pre.conf \
 		debian/systemd/lib/systemd/system/networking.service.d/network-pre.conf
diff --git a/debian/systemd.postinst b/debian/systemd.postinst
index 488df32..de92c57 100644
--- a/debian/systemd.postinst
+++ b/debian/systemd.postinst
@@ -131,6 +131,10 @@ if dpkg --compare-versions "$2" lt "214-1"; then
     systemctl enable remote-fs.target || true
 fi
 
+if dpkg --compare-versions "$2" lt "215-13"; then
+    systemctl enable hwclock-save.service || true
+fi
+
 # Re-run systemctl enable for any service that was enabled when preinst was run.
 if dpkg --compare-versions "$2" ge "204"; then
     while read UNIT ; do
diff --git a/debian/tests/control b/debian/tests/control
index 20bd49f..2ccad68 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -13,9 +13,9 @@ Tests: python3
 Depends: python3-systemd
 
 Tests: boot-and-services
-Depends: lightdm, cron, network-manager, busybox-static
+Depends: lightdm, cron, network-manager, busybox-static, python3
 Restrictions: needs-root, isolation-machine, needs-recommends, breaks-testbed
 
 Tests: display-managers
-Depends: systemd, lightdm
+Depends: systemd, lightdm, python3
 Restrictions: needs-root, isolation-machine, needs-recommends, breaks-testbed
diff --git a/debian/udev.init b/debian/udev.init
index fd75031..d144d08 100644
--- a/debian/udev.init
+++ b/debian/udev.init
@@ -95,8 +95,8 @@ make_static_nodes() {
   while read type name mode uid gid age arg; do
     [ -e $name ] && continue
     case "$type" in
-      c|b) mknod -m $mode $name $type $(echo $arg | sed 's/:/ /') ;;
-      d) mkdir $name ;;
+      c|b|c!|b!) mknod -m $mode $name $type $(echo $arg | sed 's/:/ /') ;;
+      d|d!) mkdir $name ;;
       *) echo "unparseable line ($type $name $mode $uid $gid $age $arg)" >&2 ;;
     esac
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20150401/eaaada6f/attachment-0001.sig>


More information about the Pkg-systemd-maintainers mailing list