systemd: drop 0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
Instead set this variable via CFLAGS.
This commit is contained in:
-23
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Amiantov <ab@fmap.me>
|
||||
Date: Thu, 25 Jul 2019 20:45:55 +0300
|
||||
Subject: [PATCH] systemd-shutdown: execute scripts in
|
||||
/etc/systemd/system-shutdown
|
||||
|
||||
This is needed for NixOS to use such scripts as systemd directory is immutable.
|
||||
---
|
||||
src/shutdown/shutdown.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
|
||||
index fc6df238be..cb8b45a41b 100644
|
||||
--- a/src/shutdown/shutdown.c
|
||||
+++ b/src/shutdown/shutdown.c
|
||||
@@ -330,6 +330,7 @@ static void notify_supervisor(void) {
|
||||
int main(int argc, char *argv[]) {
|
||||
static const char* const dirs[] = {
|
||||
SYSTEM_SHUTDOWN_PATH,
|
||||
+ "/etc/systemd/system-shutdown",
|
||||
NULL
|
||||
};
|
||||
_cleanup_free_ char *cgroup = NULL;
|
||||
@@ -240,7 +240,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./0002-Don-t-try-to-unmount-nix-or-nix-store.patch
|
||||
./0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
|
||||
./0009-add-rootprefix-to-lookup-dir-paths.patch
|
||||
./0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
|
||||
./0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
|
||||
./0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
|
||||
./0013-inherit-systemd-environment-when-calling-generators.patch
|
||||
@@ -707,12 +706,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# warning messages
|
||||
postConfigure = ''
|
||||
substituteInPlace config.h \
|
||||
--replace-fail "SYSTEMD_BINARY_PATH" "_SYSTEMD_BINARY_PATH"
|
||||
--replace-fail "SYSTEMD_BINARY_PATH" "_SYSTEMD_BINARY_PATH" \
|
||||
--replace-fail "SYSTEM_SHUTDOWN_PATH" "_SYSTEM_SHUTDOWN_PATH"
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString [
|
||||
"-USYSTEMD_BINARY_PATH"
|
||||
"-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\""
|
||||
|
||||
# This path is not exposed via meson
|
||||
"-USYSTEM_SHUTDOWN_PATH"
|
||||
"-DSYSTEM_SHUTDOWN_PATH=\"/etc/systemd/system-shutdown\""
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
Reference in New Issue
Block a user