summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-01-26 14:56:41 +0100
committerFlorian Klink <flokli@flokli.de>2020-04-17 00:27:19 +0200
commitba770e599c3489856054e23f1b8d09684195f619 (patch)
tree3a0bfca6651d85e5bcc2d857277982e687cc172b /pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch
parentd1009f4d99dbb6600f08ab0ef214806acc675670 (diff)
downloadnixpkgs-ba770e599c3489856054e23f1b8d09684195f619.tar
nixpkgs-ba770e599c3489856054e23f1b8d09684195f619.tar.gz
nixpkgs-ba770e599c3489856054e23f1b8d09684195f619.tar.bz2
nixpkgs-ba770e599c3489856054e23f1b8d09684195f619.tar.lz
nixpkgs-ba770e599c3489856054e23f1b8d09684195f619.tar.xz
nixpkgs-ba770e599c3489856054e23f1b8d09684195f619.tar.zst
nixpkgs-ba770e599c3489856054e23f1b8d09684195f619.zip
systemd: switch from our own fork to upstream repo + local patches
After patching, this produces exactly the same source code as in our
custom fork, but having the actual patches inlined inside nixpkgs makes
it easier to get rid of them.

In case more complicated rebasing is necessary, maintainers can

 - Clone the upstream systemd/systemd[-stable] repo
 - Checkout the current rev mentioned in src
 - Apply the patches from this folder via `git am 00*.patch`
 - Rebase the repo on top of a new version
 - Export the patch series via `git format-patch $newVersion`
 - Update the patches = [ … ] attribute (if necessary)
Diffstat (limited to 'pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch')
-rw-r--r--pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch b/pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch
new file mode 100644
index 00000000000..ffb139b71e1
--- /dev/null
+++ b/pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch
@@ -0,0 +1,34 @@
+From 58c4a7b4e9d9c34b92deded6aea814738821059d Mon Sep 17 00:00:00 2001
+From: Eelco Dolstra <eelco.dolstra@logicblox.com>
+Date: Wed, 16 Apr 2014 10:59:28 +0200
+Subject: [PATCH 04/27] Fix NixOS containers
+
+In NixOS containers, the init script is bind-mounted into the
+container, so checking early whether it exists will fail.
+---
+ src/nspawn/nspawn.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index 5d9290b1cf..26615901c3 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -4924,6 +4924,7 @@ static int run(int argc, char *argv[]) {
+                                 goto finish;
+                         }
+                 } else {
++#if 0
+                         const char *p, *q;
+ 
+                         if (arg_pivot_root_new)
+@@ -4938,6 +4939,7 @@ static int run(int argc, char *argv[]) {
+                                 r = -EINVAL;
+                                 goto finish;
+                         }
++#endif
+                 }
+ 
+         } else {
+-- 
+2.24.1
+