Skip to content

Commit

Permalink
systemd: patch meson build file for environmentd generator to include…
Browse files Browse the repository at this point in the history
… missing conditional
  • Loading branch information
ConnorBaker committed Jan 23, 2025
1 parent ff0f85a commit 504cb88
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ filename_is_valid with path_is_valid.
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
index 36a0f906da..e0f42abca2 100644
index 5b6b3ea93c..8ab04241b6 100644
--- a/src/shared/tpm2-util.c
+++ b/src/shared/tpm2-util.c
@@ -721,7 +721,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ are written into `$XDG_CONFIG_HOME/systemd/user`.
1 file changed, 3 insertions(+)

diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index c42a31153d..154dbf0402 100644
index 7165fa1cf7..7498cf9f4c 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -323,6 +323,9 @@ int verb_edit(int argc, char *argv[], void *userdata) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jared Baur <[email protected]>
Date: Thu, 23 Jan 2025 12:29:57 -0800
Subject: [PATCH] environment-d-generator: conditionally install files into
sysconfdir

Make environment-d-generator respect the `install-sysconfdir` meson
option.
---
src/environment-d-generator/meson.build | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/environment-d-generator/meson.build b/src/environment-d-generator/meson.build
index cc41b6b334..de16b0cfae 100644
--- a/src/environment-d-generator/meson.build
+++ b/src/environment-d-generator/meson.build
@@ -13,6 +13,8 @@ executables += [
]

install_emptydir(environmentdir)
-meson.add_install_script(sh, '-c',
- ln_s.format(sysconfdir / 'environment',
- environmentdir / '99-environment.conf'))
+if install_sysconfdir
+ meson.add_install_script(sh, '-c',
+ ln_s.format(sysconfdir / 'environment',
+ environmentdir / '99-environment.conf'))
+endif
2 changes: 2 additions & 0 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
pkgsCross,
testers,
fetchFromGitHub,
fetchpatch,
fetchzip,
buildPackages,
makeBinaryWrapper,
Expand Down Expand Up @@ -241,6 +242,7 @@ stdenv.mkDerivation (finalAttrs: {
./0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch
./0017-meson.build-do-not-create-systemdstatedir.patch
./0018-Revert-bootctl-update-list-remove-all-instances-of-s.patch # https://github.com/systemd/systemd/issues/33392
./0020-environment-d-generator-conditionally-install-files-.patch # https://github.com/systemd/systemd/pull/36140
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu) [
./0019-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch
Expand Down

0 comments on commit 504cb88

Please sign in to comment.