systemd: regenerate patch list according to instructions

This commit is contained in:
Thomas Tuegel 2021-10-16 08:49:53 -05:00
parent deffa7350d
commit 1c95c92c59
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
23 changed files with 81 additions and 77 deletions

View File

@ -1,7 +1,7 @@
From 57e31a2d4a5d5bd7a9e1cd8a0d8bc6a00624ad68 Mon Sep 17 00:00:00 2001
From 6c5d8677e1b3c18455066e55b65cf699d8db363b Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:46:30 +0100
Subject: [PATCH 01/19] Start device units for uninitialised encrypted devices
Subject: [PATCH 01/22] Start device units for uninitialised encrypted devices
This is necessary because the NixOS service that initialises the
filesystem depends on the appearance of the device unit. Also, this
@ -28,5 +28,5 @@ index 25b8a590a6..d18999ea87 100644
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root"
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks"
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 43465a392b47238a32f8719f603ed9e2c9bb0363 Mon Sep 17 00:00:00 2001
From ce8c1905a81f143e2baa0f77f12753073b556d62 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 12 Apr 2013 13:16:57 +0200
Subject: [PATCH 02/19] Don't try to unmount /nix or /nix/store
Subject: [PATCH 02/22] Don't try to unmount /nix or /nix/store
They'll still be remounted read-only.
@ -38,5 +38,5 @@ index c2a26242c0..9936398f32 100644
|| path_equal(path, "/usr")
#endif
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From a99666d3d7012c2162fdacf84a57fc0b848fd957 Mon Sep 17 00:00:00 2001
From 9d6a1dfefa2342cc466e4cdebb86da1b174ae962 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 03/19] Fix NixOS containers
Subject: [PATCH 03/22] Fix NixOS containers
In NixOS containers, the init script is bind-mounted into the
container, so checking early whether it exists will fail.
@ -30,5 +30,5 @@ index 04685fecba..0e5ece5f91 100644
} else {
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 3f0780b25bdbe4156a2f761c90083bbba5f4d473 Mon Sep 17 00:00:00 2001
From 9f3850d67c57c8e9912d2da0357b66d0d1d08d2f Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Thu, 1 May 2014 14:10:10 +0200
Subject: [PATCH 04/19] Look for fsck in the right place
Subject: [PATCH 04/22] Look for fsck in the right place
---
src/fsck/fsck.c | 2 +-
@ -21,5 +21,5 @@ index cd7adfaeb9..68cebdd158 100644
cmdline[i++] = "-T";
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 82698c6a5142e710c302f9c38367ed00d8ec94ba Mon Sep 17 00:00:00 2001
From 04d3d52868f40b3401884b06c494f5dcfc85da3d Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 19 Dec 2014 14:46:17 +0100
Subject: [PATCH 05/19] Add some NixOS-specific unit directories
Subject: [PATCH 05/22] Add some NixOS-specific unit directories
Look in `/nix/var/nix/profiles/default/lib/systemd/{system,user}` for
units provided by packages installed into the default profile via
@ -92,7 +92,7 @@ index 05eb17d66c..1cd141d012 100644
if (!add)
diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index fc0f8c34fa..ded74ce50a 100644
index fc0f8c34fa..162432e77f 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -38,10 +38,10 @@ systemdsystemconfdir=${systemd_system_conf_dir}
@ -122,5 +122,5 @@ index fc0f8c34fa..ded74ce50a 100644
systemd_sleep_dir=${root_prefix}/lib/systemd/system-sleep
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From e2a8db60ebfb1e0477ce989f6c3d4a95f2e08120 Mon Sep 17 00:00:00 2001
From 22c7a75220bd3b9c535f7b589b88e755aad93040 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Mon, 11 May 2015 15:39:38 +0200
Subject: [PATCH 06/19] Get rid of a useless message in user sessions
Subject: [PATCH 06/22] Get rid of a useless message in user sessions
Namely lots of variants of
@ -13,7 +13,7 @@ in containers.
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 8884437347..e23d47b4a4 100644
index 34891a8754..b9b4789720 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1375,7 +1375,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
@ -27,5 +27,5 @@ index 8884437347..e23d47b4a4 100644
/* If stopping a unit fails continuously we might enter a stop loop here, hence stop acting on the
* service being unnecessary after a while. */
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 56ae06b48c6852071dfc57c1203c04f07309d757 Mon Sep 17 00:00:00 2001
From e9c6714cce635ee4b302993a73c59e091f931952 Mon Sep 17 00:00:00 2001
From: Gabriel Ebner <gebner@gebner.org>
Date: Sun, 6 Dec 2015 14:26:36 +0100
Subject: [PATCH 07/19] hostnamed, localed, timedated: disable methods that
Subject: [PATCH 07/22] hostnamed, localed, timedated: disable methods that
change system settings.
---
@ -104,5 +104,5 @@ index 66b454269d..0a8fe25d0f 100644
if (r < 0)
return r;
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From b783b2da164482f26ac5e6e347dc41930c072ea5 Mon Sep 17 00:00:00 2001
From 4561f306751256a77d4c78dddf5c3d3056825b7a Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Thu, 7 Jul 2016 02:47:13 +0300
Subject: [PATCH 08/19] Fix hwdb paths
Subject: [PATCH 08/22] Fix hwdb paths
Patch by vcunat.
---
@ -24,5 +24,5 @@ index 5ddc2211e6..ee621eec46 100644
+ "/etc/udev/hwdb.bin\0"
+
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From e24c05ef8cfe48c4f0ebdb92e8147ae2151e4c87 Mon Sep 17 00:00:00 2001
From d082d08ae0a4ffbefccf29065806ebc1821b5c67 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Tue, 11 Oct 2016 13:12:08 +0300
Subject: [PATCH 09/19] Change /usr/share/zoneinfo to /etc/zoneinfo
Subject: [PATCH 09/22] Change /usr/share/zoneinfo to /etc/zoneinfo
NixOS uses this path.
---
@ -137,5 +137,5 @@ index 0a8fe25d0f..2f02b9a520 100644
return -ENOMEM;
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 09f6ca91b4131637038686dafd57b5da642c100e Mon Sep 17 00:00:00 2001
From bbfcc492757c2ea2c6452256c7040021b390a60a Mon Sep 17 00:00:00 2001
From: Imuli <i@imu.li>
Date: Wed, 19 Oct 2016 08:46:47 -0400
Subject: [PATCH 10/19] localectl: use /etc/X11/xkb for list-x11-*
Subject: [PATCH 10/22] localectl: use /etc/X11/xkb for list-x11-*
NixOS has an option to link the xkb data files to /etc/X11, but not to
/usr/share/X11.
@ -23,5 +23,5 @@ index 548ac8eb2c..5e372f1566 100644
return log_error_errno(errno, "Failed to open keyboard mapping list. %m");
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From d5716cd93fdaad16b590a581f39d95954f40748e Mon Sep 17 00:00:00 2001
From 654ac88b9b6f6b6a13e8af57ef88844769e1408f Mon Sep 17 00:00:00 2001
From: Franz Pletz <fpletz@fnordicwalking.de>
Date: Sun, 11 Feb 2018 04:37:44 +0100
Subject: [PATCH 11/19] build: don't create statedir and don't touch prefixdir
Subject: [PATCH 11/22] build: don't create statedir and don't touch prefixdir
---
meson.build | 3 ---
@ -22,5 +22,5 @@ index 738879eb21..453ee4b1c0 100644
# Ensure that changes to the docs/ directory do not break the
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 40a5df71e7af5feefacae9fc95bf94e72c6c12f4 Mon Sep 17 00:00:00 2001
From a716de6dc551008ffa6ce46686422d2fd9bc5397 Mon Sep 17 00:00:00 2001
From: Andreas Rammhold <andreas@rammhold.de>
Date: Fri, 2 Nov 2018 21:15:42 +0100
Subject: [PATCH 12/19] inherit systemd environment when calling generators.
Subject: [PATCH 12/22] 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
@ -16,10 +16,10 @@ executables that are being called from managers.
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index e23d47b4a4..1047aadebc 100644
index b9b4789720..79239afe4a 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -4145,10 +4145,15 @@ static int manager_run_generators(Manager *m) {
@@ -4149,10 +4149,15 @@ static int manager_run_generators(Manager *m) {
argv[4] = NULL;
RUN_WITH_UMASK(0022)
@ -40,5 +40,5 @@ index e23d47b4a4..1047aadebc 100644
finish:
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From fe3aff271cf127c1484533237fe0a024e07ae7bc Mon Sep 17 00:00:00 2001
From 0a71c96913eeadfb8db6b4cc1856120abd5f0bd3 Mon Sep 17 00:00:00 2001
From: Andreas Rammhold <andreas@rammhold.de>
Date: Thu, 9 May 2019 11:15:22 +0200
Subject: [PATCH 13/19] add rootprefix to lookup dir paths
Subject: [PATCH 13/22] add rootprefix to lookup dir paths
systemd does not longer use the UDEVLIBEXEC directory as root for
discovery default udev rules. By adding `$out/lib` to the lookup paths
@ -34,5 +34,5 @@ index 2e60abb4f1..732ec51d36 100644
#define CONF_PATHS(n) \
CONF_PATHS_USR(n) \
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 31732478745f7a200004fb8ec013f54dbc536f2e Mon Sep 17 00:00:00 2001
From 26694b35de479577afb7456d2e74d2834645e123 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Thu, 25 Jul 2019 20:45:55 +0300
Subject: [PATCH 14/19] systemd-shutdown: execute scripts in
Subject: [PATCH 14/22] systemd-shutdown: execute scripts in
/etc/systemd/system-shutdown
This is needed for NixOS to use such scripts as systemd directory is immutable.
@ -23,5 +23,5 @@ index a98cfc4d8a..b0b34edda7 100644
/* The log target defaults to console, but the original systemd process will pass its log target in through a
* command line argument, which will override this default. Also, ensure we'll never log to the journal or
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 3f2277b86f39cb55936ae11c2365feb283b547cb Mon Sep 17 00:00:00 2001
From d605877fcbc9898db25f8af4c874aed244e57235 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Thu, 25 Jul 2019 20:46:58 +0300
Subject: [PATCH 15/19] systemd-sleep: execute scripts in
Subject: [PATCH 15/22] systemd-sleep: execute scripts in
/etc/systemd/system-sleep
This is needed for NixOS to use such scripts as systemd directory is immutable.
@ -22,5 +22,5 @@ index a3aeb24633..0ed6a34d79 100644
};
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 330490aa8a44206bc03205654680913ab01408a1 Mon Sep 17 00:00:00 2001
From dffe9928bfa364ece8737157689e607510d18a59 Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Sat, 7 Mar 2020 22:40:27 +0100
Subject: [PATCH 16/19] kmod-static-nodes.service: Update ConditionFileNotEmpty
Subject: [PATCH 16/22] kmod-static-nodes.service: Update ConditionFileNotEmpty
On NixOS, kernel modules of the currently booted systems are located at
/run/booted-system/kernel-modules/lib/modules/%v/, not /lib/modules/%v/.
@ -23,5 +23,5 @@ index 777e82d16b..b6abc2bba0 100644
[Service]
Type=oneshot
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 216018be7b422586b937dae8fd83f51989479a41 Mon Sep 17 00:00:00 2001
From 9dcb52f782ddae2f6a1c00cdcf09053453acef14 Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Sun, 8 Mar 2020 01:05:54 +0100
Subject: [PATCH 17/19] path-util.h: add placeholder for DEFAULT_PATH_NORMAL
Subject: [PATCH 17/22] path-util.h: add placeholder for DEFAULT_PATH_NORMAL
This will be the $PATH used to lookup ExecStart= etc. options, which
systemd itself uses extensively.
@ -29,5 +29,5 @@ index 26e7362d1f..a8f8a863ec 100644
#if HAVE_SPLIT_USR
# define DEFAULT_PATH DEFAULT_PATH_SPLIT_USR
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 2e7477dc29095141a0556ded11f0ee370d82bfbb Mon Sep 17 00:00:00 2001
From dfcf361bed232d9cf8f7344872ca185e4d96a871 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Sun, 6 Dec 2020 08:34:19 +0100
Subject: [PATCH 19/19] pkg-config: derive prefix from --prefix
Subject: [PATCH 18/22] pkg-config: derive prefix from --prefix
Point prefix to the one configured, instead of `/usr` `systemd` has limited
support for making the pkgconfig prefix overridable, and interpolates those
@ -16,7 +16,7 @@ Co-Authored-By: Florian Klink <flokli@flokli.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index ded74ce50a..0262f53154 100644
index 162432e77f..2fc20daf03 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -11,7 +11,7 @@
@ -29,5 +29,5 @@ index ded74ce50a..0262f53154 100644
rootprefix=${root_prefix}
sysconf_dir={{SYSCONF_DIR}}
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 1a2d24d210c9329e8b900fdb01576c57374581d8 Mon Sep 17 00:00:00 2001
From 0ac75fbbf771dfbb368087f19b2ed61356f9367d Mon Sep 17 00:00:00 2001
From: Andreas Rammhold <andreas@rammhold.de>
Date: Mon, 26 Jul 2021 16:57:43 +0200
Subject: [PATCH 20/20] core: respect install_sysconfdir_samples in meson file
Subject: [PATCH 19/22] core: respect install_sysconfdir_samples in meson file
The refactoring done in e11a25cadbe caused the configuration files to be
installed into the pkgsysconfdir regardless of the state of the
@ -27,5 +27,5 @@ index f0d2c6f642..4ff7e00e36 100644
file,
input : file + '.in',
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 189ba3af8b21cfc53527453907e800a2917b1bfd Mon Sep 17 00:00:00 2001
From c12879d75c5ba7cd982993a815fc6540ae50a941 Mon Sep 17 00:00:00 2001
From: Andreas Rammhold <andreas@rammhold.de>
Date: Mon, 26 Jul 2021 17:20:34 +0200
Subject: [PATCH] login: respect install_sysconfdir_samples in meson file
Subject: [PATCH 20/22] login: respect install_sysconfdir_samples in meson file
The refactoring done in c900d89faa0 caused the configuration files to be
installed into the pkgsysconfdir regardless of the state of the
@ -25,5 +25,5 @@ index 8c20e6be65..b637adc9a2 100644
['71-seat.rules', udevrulesdir, enable_logind],
['73-seat-late.rules', udevrulesdir, enable_logind],
--
2.32.0
2.33.0

View File

@ -1,7 +1,7 @@
From 5f17b65d30480e489e135b403a072b38535b2911 Mon Sep 17 00:00:00 2001
From 3e0e304959719958dee4d88ccbb9647ffb5797ef Mon Sep 17 00:00:00 2001
From: Andreas Rammhold <andreas@rammhold.de>
Date: Wed, 18 Aug 2021 19:10:08 +0200
Subject: [PATCH] core: handle lookup paths being symlinks
Subject: [PATCH 21/22] core: handle lookup paths being symlinks
With a recent change paths leaving the statically known lookup paths
would be treated differently then those that remained within those. That
@ -76,5 +76,5 @@ index 884a0674a9..3ae2a115d0 100644
log_debug("%s: linked unit file: %s → %s",
__func__, filename, simplified);
--
2.32.0
2.33.0

View File

@ -1,7 +1,8 @@
From 93413acd3ef3a637a0f31a1d133b103e1dc81fd6 Mon Sep 17 00:00:00 2001
From 04eef1fb8e2a52277e051eb7980e96f9acc0afaa Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Mon, 23 Aug 2021 06:16:48 +0900
Subject: [PATCH] path-util: make find_executable() work without /proc mounted
Subject: [PATCH 22/22] path-util: make find_executable() work without /proc
mounted
Follow-up for 888f65ace6296ed61285d31db846babf1c11885e.
@ -11,10 +12,10 @@ Hopefully fixes #20514.
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index d11f254a9f6a..a21981616b59 100644
index e5afb5f5f5..13d71ed1b6 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -630,7 +630,11 @@ static int check_x_access(const char *path, int *ret_fd) {
@@ -628,7 +628,11 @@ static int check_x_access(const char *path, int *ret_fd) {
return r;
r = access_fd(fd, X_OK);
@ -27,3 +28,6 @@ index d11f254a9f6a..a21981616b59 100644
return r;
if (ret_fd)
--
2.33.0

View File

@ -155,20 +155,20 @@ stdenv.mkDerivation {
./0015-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
./0016-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
./0017-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
./0019-pkg-config-derive-prefix-from-prefix.patch
./0018-pkg-config-derive-prefix-from-prefix.patch
# In v249 a bunch of meson files had been touched as part of the migration to
# jinja2 for templating. Unfortunately some of those files lost the `install_sysconfdir_samples` check.
# The following two patches are part of a PR that was filed to fix those cases.
# https://github.com/systemd/systemd/pull/20303
./0020-core-respect-install_sysconfdir_samples-in-meson-fil.patch
./0021-login-respect-install_sysconfdir_samples-in-meson-fi.patch
./0019-core-respect-install_sysconfdir_samples-in-meson-fil.patch
./0020-login-respect-install_sysconfdir_samples-in-meson-fi.patch
# In v248 or v249 we started to get in trouble due to our /etc/systemd/sytem being
# a symlink and thus being treated differently by systemd. With the below
# patch we mitigate that effect by special casing all our root unit dirs
# if they are symlinks. This does exactly what we need (AFAICT).
./0022-core-Handle-lookup-paths-being-symlinks.patch
./0021-core-handle-lookup-paths-being-symlinks.patch
# The way files are being tested for being executable changed in v248/v249
# which caused our confinement setup to fail as we do not mount /proc by
@ -176,7 +176,7 @@ stdenv.mkDerivation {
# The issue has been reported upstream and this patch carries the upstream
# fix for the same. Upstream now has a test for this scenario.
# https://github.com/systemd/systemd/issues/20514
./0023-path-util-make-find_executable-work-without-proc-mounted.patch
./0022-path-util-make-find_executable-work-without-proc-mou.patch
];
postPatch = ''