systemd: drop 0013-inherit-systemd-environment-when-calling-generators.patch
This is possibile because of the preparations from 4aae99b7d7
This commit is contained in:
-39
@@ -1,39 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Yuriy Taraday <yorik.sar@gmail.com>
|
||||
Date: Fri, 17 Jun 2022 12:45:10 +0000
|
||||
Subject: [PATCH] inherit systemd environment when calling generators.
|
||||
|
||||
Systemd generators need access to the environment configured in
|
||||
stage-2-init.sh since it schedules fsck and mkfs executions based on
|
||||
being able to find an appropriate binary for the target filesystem.
|
||||
|
||||
With this commit I am altering the systemd behaviour since upstream
|
||||
tries to gather environments with that they call
|
||||
"environment-generators" and then seems to pass that on to all the other
|
||||
executables that are being called from managers.
|
||||
---
|
||||
src/core/manager.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index 2115d74595..86f697313b 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -3999,9 +3999,17 @@ static int build_generator_environment(Manager *m, char ***ret) {
|
||||
* adjust generated units to that. Let's pass down some bits of information that are easy for us to
|
||||
* determine (but a bit harder for generator scripts to determine), as environment variables. */
|
||||
|
||||
+ // On NixOS we must propagate PATH to generators so they are
|
||||
+ // able to find binaries such as `fsck.${fstype}` and
|
||||
+ // `mkfs.${fstype}`. That is why we ignore transient_environment that
|
||||
+ // overrides the PATH variable. This propagates systemd's
|
||||
+ // environment (e.g. PATH) that was setup
|
||||
+ // before calling systemd from stage-2-init.sh.
|
||||
+#if 0
|
||||
nl = strv_copy(m->transient_environment);
|
||||
if (!nl)
|
||||
return -ENOMEM;
|
||||
+#endif
|
||||
|
||||
r = strv_env_assign(&nl, "SYSTEMD_SCOPE", runtime_scope_to_string(m->runtime_scope));
|
||||
if (r < 0)
|
||||
@@ -241,7 +241,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
|
||||
./0009-add-rootprefix-to-lookup-dir-paths.patch
|
||||
./0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
|
||||
./0013-inherit-systemd-environment-when-calling-generators.patch
|
||||
./0014-core-don-t-taint-on-unmerged-usr.patch
|
||||
./0015-tpm2_context_init-fix-driver-name-checking.patch
|
||||
./0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch
|
||||
|
||||
Reference in New Issue
Block a user