nixpkgs/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
Artturin 40eff710af Revert "Systemd package rewrite"
Reverts NixOS/nixpkgs#269620

- eab0837b68 caused a mass-rebuild on master

- self-merge on a critical package without review and not waiting for the active owner team

Below are the reverts of the commits from that PR

Revert "systemd: migrate to by-name"

This reverts commit 33d2a40d67.

Revert "systemd: add meta.longDescription"

This reverts commit 7c588d141d.

Revert "systemd: cosmetic rewording of code"

This reverts commit d91b8d9fcb.

Revert "systemd: cosmetic rewording of comments"

This reverts commit bc563998c0.

Revert "systemd: remove some redundancy on mesonFlags"

This reverts commit eab0837b68.

Revert "systemd: use  lib.meson* functions"

This reverts commit 1129756b1a.
2023-11-26 03:12:04 +02:00

32 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 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] 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 e170958fc5..898a674631 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5648,6 +5648,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
_cleanup_free_ char *p = NULL;
if (arg_pivot_root_new)
@@ -5662,6 +5663,7 @@ static int run(int argc, char *argv[]) {
"Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.", arg_directory);
goto finish;
}
+#endif
}
} else {