Merge branch 'master' into x-updates

Conflicts (just splitting version from name):
	pkgs/os-specific/linux/systemd/default.nix
This commit is contained in:
Vladimír Čunát
2013-05-08 13:46:46 +02:00
153 changed files with 1505 additions and 674 deletions
@@ -1,7 +1,7 @@
From d9c2065158b63db16c9bf0fed37b3f759ef85cbd Mon Sep 17 00:00:00 2001
From 8f861550827e750fb56954c3f91a2f565abb42bb Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:44:33 +0100
Subject: [PATCH 1/8] Make "systemctl daemon-reexec" do the right thing on
Subject: [PATCH 1/9] Make "systemctl daemon-reexec" do the right thing on
NixOS
---
@@ -9,10 +9,10 @@ Subject: [PATCH 1/8] Make "systemctl daemon-reexec" do the right thing on
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/main.c b/src/core/main.c
index 7899761..f6f83f4 100644
index 7fc06be..7575223 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1884,7 +1884,7 @@ finish:
@@ -1857,7 +1857,7 @@ finish:
char_array_0(sfd);
i = 0;
@@ -22,5 +22,5 @@ index 7899761..f6f83f4 100644
args[i++] = "--switched-root";
args[i++] = arg_running_as == SYSTEMD_SYSTEM ? "--system" : "--user";
--
1.8.1
1.8.2.1
@@ -1,29 +1,25 @@
From f3838af51d461ca3d339618d17962f2d57d1a7fa Mon Sep 17 00:00:00 2001
From 2afcee0b4da066fb5f8fc00b749d88f5bd9df3d3 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:45:01 +0100
Subject: [PATCH 2/8] Ignore duplicate paths in "systemctl start"
Subject: [PATCH 2/9] Ignore duplicate paths in "systemctl start"
---
src/systemctl/systemctl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
src/systemctl/systemctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index fd9f580..b8252c9 100644
index 3cca861..16791a2 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1507,8 +1507,10 @@ static int start_unit_one(
r = set_put(s, p);
if (r < 0) {
free(p);
- log_error("Failed to add path to set.");
- return r;
+ if (r != -EEXIST) {
+ log_error("Failed to add path %s to set.", p);
+ return r;
+ }
}
}
@@ -1867,7 +1867,7 @@ static int start_unit_one(
return log_oom();
r = set_consume(s, p);
- if (r < 0) {
+ if (r < 0 && r != -EEXIST) {
log_error("Failed to add path to set.");
return r;
}
--
1.8.1
1.8.2.1
@@ -1,7 +1,7 @@
From 6960f2025e95e69079540c4828f62e16d7e75fb1 Mon Sep 17 00:00:00 2001
From b288ca7d376e3a78368a2b59529ebe5ba812babf Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:46:30 +0100
Subject: [PATCH 3/8] Start device units for uninitialised encrypted devices
Subject: [PATCH 3/9] Start device units for uninitialised encrypted devices
This is necessary because the NixOS service that initialises the
filesystem depends on the appearance of the device unit. Also, this
@@ -28,5 +28,5 @@ index d17bdd9..040b10e 100644
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
--
1.8.1
1.8.2.1
@@ -1,7 +1,7 @@
From 22d416e766e11dbc381620beff89284a0e23827b Mon Sep 17 00:00:00 2001
From 7a498e661f3d111fa09700a6cfa62cfd6733b1cc Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:48:19 +0100
Subject: [PATCH 4/8] Set switch-to-configuration hints for some units
Subject: [PATCH 4/9] Set switch-to-configuration hints for some units
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -34,12 +34,12 @@ index 18c3d74..a09054c 100644
+
+X-StopOnReconfiguration=yes
diff --git a/units/remote-fs.target b/units/remote-fs.target
index e867b8d..02462b4 100644
index 09213e8..47b4cf5 100644
--- a/units/remote-fs.target
+++ b/units/remote-fs.target
@@ -10,5 +10,7 @@ Description=Remote File Systems
Documentation=man:systemd.special(7)
After=remote-fs-pre.target remote-fs-setup.target
After=remote-fs-pre.target
+X-StopOnReconfiguration=yes
+
@@ -70,5 +70,5 @@ index 0869e73..b6ed958 100644
+# Restart kills all active sessions.
+X-RestartIfChanged=no
--
1.8.1
1.8.2.1
@@ -1,7 +1,7 @@
From 4b0a5f8b3f8fed53f34021dd6139699740b0c3ff Mon Sep 17 00:00:00 2001
From e6bbe5fa858bd8196c8e1f264904679e6bda426d Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:56:03 +0100
Subject: [PATCH 5/8] sysinit.target: Drop the dependency on local-fs.target
Subject: [PATCH 5/9] sysinit.target: Drop the dependency on local-fs.target
and swap.target
Having all services with DefaultDependencies=yes depend on
@@ -29,5 +29,5 @@ index 8f4fb8f..e0f0147 100644
+After=emergency.service emergency.target
RefuseManualStart=yes
--
1.8.1
1.8.2.1
@@ -1,7 +1,7 @@
From fbb62c4d5973f7556ce6c3bc9242180b7e087de8 Mon Sep 17 00:00:00 2001
From 4731a9074538e9e24d2b81fc737917b064e194e6 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 18:36:28 +0100
Subject: [PATCH 6/8] Don't call "plymouth quit"
Subject: [PATCH 6/9] Don't call "plymouth quit"
NixOS doesn't use Plymouth (yet).
---
@@ -34,5 +34,5 @@ index 269797a..2c640f4 100644
ExecStart=-/sbin/sulogin
ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
--
1.8.1
1.8.2.1
@@ -1,7 +1,7 @@
From 72a89fd9b4e35da375a1cdcf0d30a0f31a78d9a5 Mon Sep 17 00:00:00 2001
From f0c362873860526579bf9bda216005fd5a0936dd Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Mon, 4 Feb 2013 12:41:14 +0100
Subject: [PATCH 7/8] Ignore IPv6 link-local addresses
Subject: [PATCH 7/9] Ignore IPv6 link-local addresses
Returning IPv6 link-local addresses is a bad idea, because they only
work if an application connects specifically over the corresponding
@@ -33,5 +33,5 @@ index b1ef912..4f2ab5c 100644
continue;
--
1.8.1
1.8.2.1
@@ -1,7 +1,7 @@
From ceb0fc701960de1568fe2732f390a7b92b76f2e1 Mon Sep 17 00:00:00 2001
From 0112df74e576dd683c132ec33861b7099dc94454 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 12 Apr 2013 13:16:57 +0200
Subject: [PATCH 8/8] Don't try to unmount /nix or /nix/store
Subject: [PATCH 8/9] Don't try to unmount /nix or /nix/store
They'll still be remounted read-only.
@@ -11,7 +11,7 @@ https://github.com/NixOS/nixos/issues/126
1 file changed, 2 insertions(+)
diff --git a/src/core/umount.c b/src/core/umount.c
index 8c69e74..ff13a5d 100644
index 1e95ad7..9f0e471 100644
--- a/src/core/umount.c
+++ b/src/core/umount.c
@@ -435,6 +435,8 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
@@ -24,5 +24,5 @@ index 8c69e74..ff13a5d 100644
|| path_equal(m->path, "/usr")
#endif
--
1.8.1
1.8.2.1
@@ -0,0 +1,27 @@
From ed7c22c76e1399861ec8e0216f08a7f9419eea50 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 7 May 2013 14:03:13 +0200
Subject: [PATCH 9/9] Start ctrl-alt-del.target irreversibly
This makes ctrl-alt-del reboots more robust, just like "systemctl
reboot".
---
src/core/manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index c7f8f20..0508628 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1372,7 +1372,7 @@ static int manager_process_signal_fd(Manager *m) {
case SIGINT:
if (m->running_as == SYSTEMD_SYSTEM) {
- manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE);
+ manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE_IRREVERSIBLY);
break;
}
--
1.8.2.1
+3 -2
View File
@@ -4,12 +4,12 @@
}:
stdenv.mkDerivation rec {
version = "201";
version = "203";
name = "systemd-${version}";
src = fetchurl {
url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
sha256 = "046cr1q7xv7bslzc16g8zz8nddf64lw8v01isw1204n21cd9yafn";
sha256 = "07gvn3rpski8sh1nz16npjf2bvj0spsjdwc5px9685g2pi6kxcb1";
};
patches =
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
./0006-Don-t-call-plymouth-quit.patch
./0007-Ignore-IPv6-link-local-addresses.patch
./0008-Don-t-try-to-unmount-nix-or-nix-store.patch
./0009-Start-ctrl-alt-del.target-irreversibly.patch
] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch;
buildInputs = assert stdenv.gcc.libc or null != null; # assertion here, so it doesn't trigger on passthru.headers