diff options
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 13 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/fail-after-reaching-respawn-limit.patch | 12 |
2 files changed, 20 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index a6889e3e44032..f15043c6328d7 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -6,13 +6,15 @@ assert stdenv.gcc.libc or null != null; stdenv.mkDerivation rec { - name = "systemd-187"; + name = "systemd-188"; src = fetchurl { url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz"; - sha256 = "1m7fzcqqgwqdjrrdp41i81q6y0cgjbknrznsvjqwh7nc027k6fqs"; + sha256 = "0nr1cg1mizbwcafjcqw3c30mx6xdv596jpbgjlxr6myvc5hfsfg8"; }; + patches = [ ./fail-after-reaching-respawn-limit.patch ]; + buildInputs = [ pkgconfig intltool gperf libcap udev dbus kmod xz pam acl cryptsetup libuuid m4 usbutils pciutils glib @@ -47,7 +49,8 @@ stdenv.mkDerivation rec { done ''; - NIX_CFLAGS_COMPILE = "-DKBD_LOADKEYS=\"${kbd}/bin/loadkeys\" -DKBD_SETFONT=\"${kbd}/bin/setfont\""; + # ‘-fstack-protector’ is necessary to build the PAM module correctly. + NIX_CFLAGS_COMPILE = "-DKBD_LOADKEYS=\"${kbd}/bin/loadkeys\" -DKBD_SETFONT=\"${kbd}/bin/setfont\" -fstack-protector"; makeFlags = "CPPFLAGS=-I${stdenv.gcc.libc}/include"; @@ -64,12 +67,12 @@ stdenv.mkDerivation rec { mkdir -p $out/sbin ln -s $out/lib/systemd/systemd $out/sbin/telinit for i in init halt poweroff runlevel reboot shutdown; do - ln -s $out/bin/systemctl $out/sbin/$i + ln -s $out/bin/systemctl $out/sbin/$i done ''; enableParallelBuilding = true; - + # The interface version prevents NixOS from switching to an # incompatible systemd at runtime. (Switching across reboots is # fine, of course.) It should be increased whenever systemd changes diff --git a/pkgs/os-specific/linux/systemd/fail-after-reaching-respawn-limit.patch b/pkgs/os-specific/linux/systemd/fail-after-reaching-respawn-limit.patch new file mode 100644 index 0000000000000..7271b5578d527 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/fail-after-reaching-respawn-limit.patch @@ -0,0 +1,12 @@ +diff --git a/src/core/service.c b/src/core/service.c +index 1c127bd..eafdbe5 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -2487,6 +2487,7 @@ static int service_start(Unit *u) { + r = service_start_limit_test(s); + if (r < 0) { + service_notify_sockets_dead(s, true); ++ service_set_state(s, SERVICE_FAILED); + return r; + } + |