3
0
Fork 0
forked from mirrors/nixpkgs

systemd: Update to 201

Fixes NixOS/nixos#135 and NixOS/nixos#126.
This commit is contained in:
Eelco Dolstra 2013-04-12 14:31:53 +02:00
parent ec8a661bf4
commit 4a429f5276
9 changed files with 67 additions and 32 deletions

View file

@ -1,7 +1,7 @@
From 75bc507c854a8fe1f819a6b04ebe9e05cd9c425c Mon Sep 17 00:00:00 2001
From d9c2065158b63db16c9bf0fed37b3f759ef85cbd 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/7] Make "systemctl daemon-reexec" do the right thing on
Subject: [PATCH 1/8] Make "systemctl daemon-reexec" do the right thing on
NixOS
---
@ -9,10 +9,10 @@ Subject: [PATCH 1/7] 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 25f55fc..c2e42b7 100644
index 7899761..f6f83f4 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1887,7 +1887,7 @@ finish:
@@ -1884,7 +1884,7 @@ finish:
char_array_0(sfd);
i = 0;

View file

@ -1,17 +1,17 @@
From b8acf19dbd37f801d5eeb76170f84bc8d75e464c Mon Sep 17 00:00:00 2001
From f3838af51d461ca3d339618d17962f2d57d1a7fa 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/7] Ignore duplicate paths in "systemctl start"
Subject: [PATCH 2/8] Ignore duplicate paths in "systemctl start"
---
src/systemctl/systemctl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 1191c7a..4cd64f5 100644
index fd9f580..b8252c9 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1510,8 +1510,10 @@ static int start_unit_one(
@@ -1507,8 +1507,10 @@ static int start_unit_one(
r = set_put(s, p);
if (r < 0) {
free(p);

View file

@ -1,7 +1,7 @@
From 7e7d0ebc8617dfdae4ece9f5b66dc63031bb3fbc Mon Sep 17 00:00:00 2001
From 6960f2025e95e69079540c4828f62e16d7e75fb1 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/7] Start device units for uninitialised encrypted devices
Subject: [PATCH 3/8] 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

View file

@ -1,7 +1,7 @@
From fa5fabd0123f2d5be7efa877f8dbbf0ae7b929da Mon Sep 17 00:00:00 2001
From 22d416e766e11dbc381620beff89284a0e23827b 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/7] Set switch-to-configuration hints for some units
Subject: [PATCH 4/8] Set switch-to-configuration hints for some units
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -24,13 +24,13 @@ to prevent all user sessions from being killed when this unit changes.
4 files changed, 12 insertions(+)
diff --git a/units/local-fs.target b/units/local-fs.target
index ee02e4e..63ae843 100644
index 18c3d74..a09054c 100644
--- a/units/local-fs.target
+++ b/units/local-fs.target
@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
After=local-fs-pre.target
OnFailure=emergency.target
OnFailureIsolate=yes
OnFailureIsolate=no
+
+X-StopOnReconfiguration=yes
diff --git a/units/remote-fs.target b/units/remote-fs.target

View file

@ -1,7 +1,7 @@
From c2dce9a0088f7d155659bcbf1e9e69467e679244 Mon Sep 17 00:00:00 2001
From 4b0a5f8b3f8fed53f34021dd6139699740b0c3ff 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/7] sysinit.target: Drop the dependency on local-fs.target
Subject: [PATCH 5/8] sysinit.target: Drop the dependency on local-fs.target
and swap.target
Having all services with DefaultDependencies=yes depend on

View file

@ -1,7 +1,7 @@
From f1b273a7203da1dd3ef51529b5b2e481c7a8d999 Mon Sep 17 00:00:00 2001
From fbb62c4d5973f7556ce6c3bc9242180b7e087de8 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/7] Don't call "plymouth quit"
Subject: [PATCH 6/8] Don't call "plymouth quit"
NixOS doesn't use Plymouth (yet).
---

View file

@ -1,7 +1,7 @@
From 61fa587560634d5c71a62a4a2fc2a37eb043e9a4 Mon Sep 17 00:00:00 2001
From 72a89fd9b4e35da375a1cdcf0d30a0f31a78d9a5 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/7] Ignore IPv6 link-local addresses
Subject: [PATCH 7/8] 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
@ -18,19 +18,19 @@ to returning ::1.
1 file changed, 4 insertions(+)
diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c
index 53c3b50..621ca1d 100644
index b1ef912..4f2ab5c 100644
--- a/src/nss-myhostname/netlink.c
+++ b/src/nss-myhostname/netlink.c
@@ -155,6 +155,10 @@ int ifconf_acquire_addresses(struct address **_list, unsigned *_n_list) {
ifaddrmsg->ifa_scope == RT_SCOPE_NOWHERE)
continue;
@@ -113,6 +113,10 @@ static int read_reply(int fd, struct address **list, unsigned *n_list) {
ifaddrmsg->ifa_scope == RT_SCOPE_NOWHERE)
continue;
+ if (ifaddrmsg->ifa_family == AF_INET6 &&
+ ifaddrmsg->ifa_scope == RT_SCOPE_LINK)
+ continue;
+ if (ifaddrmsg->ifa_family == AF_INET6 &&
+ ifaddrmsg->ifa_scope == RT_SCOPE_LINK)
+ continue;
+
if (ifaddrmsg->ifa_flags & IFA_F_DEPRECATED)
continue;
if (ifaddrmsg->ifa_flags & IFA_F_DEPRECATED)
continue;
--
1.8.1

View file

@ -0,0 +1,28 @@
From ceb0fc701960de1568fe2732f390a7b92b76f2e1 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
They'll still be remounted read-only.
https://github.com/NixOS/nixos/issues/126
---
src/core/umount.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/umount.c b/src/core/umount.c
index 8c69e74..ff13a5d 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
* anyway, since we are running from it. They have
* already been remounted ro. */
if (path_equal(m->path, "/")
+ || path_equal(m->path, "/nix")
+ || path_equal(m->path, "/nix/store")
#ifndef HAVE_SPLIT_USR
|| path_equal(m->path, "/usr")
#endif
--
1.8.1

View file

@ -6,11 +6,11 @@
assert stdenv.gcc.libc or null != null;
stdenv.mkDerivation rec {
name = "systemd-200";
name = "systemd-201";
src = fetchurl {
url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
sha256 = "05y2r25441nznif5xi5gab4c6xdywiqzgcl3nsmg0j2wzalbl24s";
sha256 = "046cr1q7xv7bslzc16g8zz8nddf64lw8v01isw1204n21cd9yafn";
};
patches =
@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
./0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch
./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
] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch;
buildInputs =
@ -68,11 +69,17 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE =
[ # Can't say ${polkit}/bin/pkttyagent here because that would
# lead to a cyclic dependency.
"-UPOLKIT_AGENT_BINARY_PATH -DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\""
"-UPOLKIT_AGENT_BINARY_PATH" "-DPOLKIT_AGENT_BINARY_PATH=\"/run/current-system/sw/bin/pkttyagent\""
"-fno-stack-protector"
# Work around our kernel headers being too old. FIXME: remove
# this after the next stdenv update.
"-DFS_NOCOW_FL=0x00800000"
# Set the release_agent on /sys/fs/cgroup/systemd to the
# currently running systemd (/run/current-system/systemd) so
# that we don't use an obsolete/garbage-collected release agent.
"-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\""
];
# Use /var/lib/udev rather than /etc/udev for the generated hardware