systemd: 249.4 -> 249.5

Some of Andi's patches have been upstreamed, so we don't need to apply
them ourselves any more.
This commit is contained in:
Alyssa Ross 2021-10-17 20:12:37 +00:00
parent 8c692a36b9
commit 28e55bce8c
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0
23 changed files with 47 additions and 155 deletions

View File

@ -1,7 +1,7 @@
From 6c5d8677e1b3c18455066e55b65cf699d8db363b Mon Sep 17 00:00:00 2001
From 06a8dbb65584b6f705fee8a486f32dab12f72082 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/22] Start device units for uninitialised encrypted devices
Subject: [PATCH 01/19] 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

View File

@ -1,7 +1,7 @@
From ce8c1905a81f143e2baa0f77f12753073b556d62 Mon Sep 17 00:00:00 2001
From 2c98ff115f7027bebde14cf3e74f2c51b343874c 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/22] Don't try to unmount /nix or /nix/store
Subject: [PATCH 02/19] Don't try to unmount /nix or /nix/store
They'll still be remounted read-only.

View File

@ -1,7 +1,7 @@
From 9d6a1dfefa2342cc466e4cdebb86da1b174ae962 Mon Sep 17 00:00:00 2001
From 16f441b6495ff4c4d1d0b71a7f1650505147173d 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/22] Fix NixOS containers
Subject: [PATCH 03/19] Fix NixOS containers
In NixOS containers, the init script is bind-mounted into the
container, so checking early whether it exists will fail.
@ -10,7 +10,7 @@ container, so checking early whether it exists will fail.
1 file changed, 2 insertions(+)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 04685fecba..0e5ece5f91 100644
index 575b9da447..438ca294db 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5590,6 +5590,7 @@ static int run(int argc, char *argv[]) {

View File

@ -1,7 +1,7 @@
From 9f3850d67c57c8e9912d2da0357b66d0d1d08d2f Mon Sep 17 00:00:00 2001
From 261423bc039378115ad9223c2b6ede9c395847b2 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/22] Look for fsck in the right place
Subject: [PATCH 04/19] Look for fsck in the right place
---
src/fsck/fsck.c | 2 +-

View File

@ -1,7 +1,7 @@
From 04d3d52868f40b3401884b06c494f5dcfc85da3d Mon Sep 17 00:00:00 2001
From 18b45c20499747bcc66714ee87edf34d4f6e3dca 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/22] Add some NixOS-specific unit directories
Subject: [PATCH 05/19] 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

View File

@ -1,7 +1,7 @@
From 22c7a75220bd3b9c535f7b589b88e755aad93040 Mon Sep 17 00:00:00 2001
From 8b8f4168828a12cac17c3e8803cacebf31608c68 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/22] Get rid of a useless message in user sessions
Subject: [PATCH 06/19] Get rid of a useless message in user sessions
Namely lots of variants of

View File

@ -1,7 +1,7 @@
From e9c6714cce635ee4b302993a73c59e091f931952 Mon Sep 17 00:00:00 2001
From e147e9defaf2bb5e8040566537661d90b4008daf 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/22] hostnamed, localed, timedated: disable methods that
Subject: [PATCH 07/19] hostnamed, localed, timedated: disable methods that
change system settings.
---
@ -35,7 +35,7 @@ index 36702f2fb0..669257ea2f 100644
context_read_machine_info(c);
diff --git a/src/locale/localed.c b/src/locale/localed.c
index df0eb030d4..d026eae97e 100644
index c228385d0e..942ccaa038 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -360,6 +360,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er

View File

@ -1,7 +1,7 @@
From 4561f306751256a77d4c78dddf5c3d3056825b7a Mon Sep 17 00:00:00 2001
From 992d0e6abb09aacceee2f8646c4bcdacf7277dc7 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/22] Fix hwdb paths
Subject: [PATCH 08/19] Fix hwdb paths
Patch by vcunat.
---

View File

@ -1,7 +1,7 @@
From d082d08ae0a4ffbefccf29065806ebc1821b5c67 Mon Sep 17 00:00:00 2001
From 462bc01b3a38468fd617066a3d7f27b1acca9e0a 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/22] Change /usr/share/zoneinfo to /etc/zoneinfo
Subject: [PATCH 09/19] Change /usr/share/zoneinfo to /etc/zoneinfo
NixOS uses this path.
---
@ -88,7 +88,7 @@ index 2cb4f80d5d..ebeaeac52f 100644
(void) mkdir_parents(etc_localtime, 0755);
if (symlink(e, etc_localtime) < 0)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 0e5ece5f91..cc46435472 100644
index 438ca294db..98bd110d92 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1887,8 +1887,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid

View File

@ -1,7 +1,7 @@
From bbfcc492757c2ea2c6452256c7040021b390a60a Mon Sep 17 00:00:00 2001
From fbb302d00c63dc17a210f83648f24a1da983b2c0 Mon Sep 17 00:00:00 2001
From: Imuli <i@imu.li>
Date: Wed, 19 Oct 2016 08:46:47 -0400
Subject: [PATCH 10/22] localectl: use /etc/X11/xkb for list-x11-*
Subject: [PATCH 10/19] 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.

View File

@ -1,17 +1,17 @@
From 654ac88b9b6f6b6a13e8af57ef88844769e1408f Mon Sep 17 00:00:00 2001
From b850dae349de8ac6906d4f920a21ef275cecb2de 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/22] build: don't create statedir and don't touch prefixdir
Subject: [PATCH 11/19] build: don't create statedir and don't touch prefixdir
---
meson.build | 3 ---
1 file changed, 3 deletions(-)
diff --git a/meson.build b/meson.build
index 738879eb21..453ee4b1c0 100644
index b5a51b6d0d..99b071542c 100644
--- a/meson.build
+++ b/meson.build
@@ -3538,9 +3538,6 @@ install_data('LICENSE.GPL2',
@@ -3540,9 +3540,6 @@ install_data('LICENSE.GPL2',
'docs/GVARIANT-SERIALIZATION.md',
install_dir : docdir)

View File

@ -1,7 +1,7 @@
From a716de6dc551008ffa6ce46686422d2fd9bc5397 Mon Sep 17 00:00:00 2001
From beefb6d381286769cc47c71c82b831a37a405d90 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/22] inherit systemd environment when calling generators.
Subject: [PATCH 12/19] 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

View File

@ -1,7 +1,7 @@
From 0a71c96913eeadfb8db6b4cc1856120abd5f0bd3 Mon Sep 17 00:00:00 2001
From 146b79d55cc4fdfdb5fd4978e68b21f5c1df1679 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/22] add rootprefix to lookup dir paths
Subject: [PATCH 13/19] 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

View File

@ -1,7 +1,7 @@
From 26694b35de479577afb7456d2e74d2834645e123 Mon Sep 17 00:00:00 2001
From 8edd810e74e2308f34eba6e8072e559e69307830 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/22] systemd-shutdown: execute scripts in
Subject: [PATCH 14/19] systemd-shutdown: execute scripts in
/etc/systemd/system-shutdown
This is needed for NixOS to use such scripts as systemd directory is immutable.

View File

@ -1,7 +1,7 @@
From d605877fcbc9898db25f8af4c874aed244e57235 Mon Sep 17 00:00:00 2001
From 9ed24199dd3ce91d3f7fbfbdf823312c124aba56 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/22] systemd-sleep: execute scripts in
Subject: [PATCH 15/19] systemd-sleep: execute scripts in
/etc/systemd/system-sleep
This is needed for NixOS to use such scripts as systemd directory is immutable.

View File

@ -1,7 +1,7 @@
From dffe9928bfa364ece8737157689e607510d18a59 Mon Sep 17 00:00:00 2001
From 6db7ad4d5526a82e4ed9b135daf1054a8b71e1c7 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/22] kmod-static-nodes.service: Update ConditionFileNotEmpty
Subject: [PATCH 16/19] 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/.

View File

@ -1,7 +1,7 @@
From 9dcb52f782ddae2f6a1c00cdcf09053453acef14 Mon Sep 17 00:00:00 2001
From 160d32c336c96744bbfb618eae4c12cb90138644 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/22] path-util.h: add placeholder for DEFAULT_PATH_NORMAL
Subject: [PATCH 17/19] 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.

View File

@ -1,7 +1,7 @@
From dfcf361bed232d9cf8f7344872ca185e4d96a871 Mon Sep 17 00:00:00 2001
From 777d61550f95b1dcf253e1d2132f9db7010a18f3 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 18/22] pkg-config: derive prefix from --prefix
Subject: [PATCH 18/19] 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

View File

@ -1,7 +1,7 @@
From 3e0e304959719958dee4d88ccbb9647ffb5797ef Mon Sep 17 00:00:00 2001
From 273e706ff561f2164b84c714148346ac92dd8846 Mon Sep 17 00:00:00 2001
From: Andreas Rammhold <andreas@rammhold.de>
Date: Wed, 18 Aug 2021 19:10:08 +0200
Subject: [PATCH 21/22] core: handle lookup paths being symlinks
Subject: [PATCH 19/19] 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
@ -15,7 +15,7 @@ directory itself is already a symlink.
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/src/basic/unit-file.c b/src/basic/unit-file.c
index 884a0674a9..3ae2a115d0 100644
index 0d58b1c4fe..7314f1245f 100644
--- a/src/basic/unit-file.c
+++ b/src/basic/unit-file.c
@@ -254,6 +254,7 @@ int unit_file_build_name_map(

View File

@ -1,31 +0,0 @@
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 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
install_sysconfdir_samples boolean that indicated whether or not the
sample files should be installed.
---
src/core/meson.build | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/core/meson.build b/src/core/meson.build
index f0d2c6f642..4ff7e00e36 100644
--- a/src/core/meson.build
+++ b/src/core/meson.build
@@ -187,6 +187,10 @@ foreach item : in_files
file = item[0]
dir = item[1]
+ if not install_sysconfdir_samples and dir == pkgsysconfdir
+ continue
+ endif
+
custom_target(
file,
input : file + '.in',
--
2.33.0

View File

@ -1,29 +0,0 @@
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 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
install_sysconfdir_samples boolean that indicates whether or not the
sample files should be installed.
---
src/login/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/login/meson.build b/src/login/meson.build
index 8c20e6be65..b637adc9a2 100644
--- a/src/login/meson.build
+++ b/src/login/meson.build
@@ -67,7 +67,7 @@ pam_systemd_c = files('pam_systemd.c')
enable_logind = conf.get('ENABLE_LOGIND') == 1
in_files = [
- ['logind.conf', pkgsysconfdir, enable_logind],
+ ['logind.conf', pkgsysconfdir, enable_logind and install_sysconfdir_samples],
['70-uaccess.rules', udevrulesdir, enable_logind and conf.get('HAVE_ACL') == 1],
['71-seat.rules', udevrulesdir, enable_logind],
['73-seat-late.rules', udevrulesdir, enable_logind],
--
2.33.0

View File

@ -1,33 +0,0 @@
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 22/22] path-util: make find_executable() work without /proc
mounted
Follow-up for 888f65ace6296ed61285d31db846babf1c11885e.
Hopefully fixes #20514.
---
src/basic/path-util.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index e5afb5f5f5..13d71ed1b6 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -628,7 +628,11 @@ static int check_x_access(const char *path, int *ret_fd) {
return r;
r = access_fd(fd, X_OK);
- if (r < 0)
+ if (r == -ENOSYS) {
+ /* /proc is not mounted. Fallback to access(). */
+ if (access(path, X_OK) < 0)
+ return -errno;
+ } else if (r < 0)
return r;
if (ret_fd)
--
2.33.0

View File

@ -119,7 +119,7 @@ assert withHomed -> withCryptsetup;
assert withCryptsetup -> (cryptsetup != null);
let
wantCurl = withRemote || withImportd;
version = "249.4";
version = "249.5";
in
stdenv.mkDerivation {
inherit pname version;
@ -130,7 +130,7 @@ stdenv.mkDerivation {
owner = "systemd";
repo = "systemd-stable";
rev = "v${version}";
sha256 = "0pqi9gbk9kgwvd0idf13ybxz7s4h5przn01bwj6fna44jr0wy41c";
sha256 = "0bir2syy20rdi59sv8xp8nw1c92zl9z0wmv7ggsll8dca7niqwbp";
};
# If these need to be regenerated, `git am path/to/00*.patch` them into a
@ -157,27 +157,12 @@ stdenv.mkDerivation {
./0017-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.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
./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/system 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).
./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
# default.
# 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
./0022-path-util-make-find_executable-work-without-proc-mou.patch
./0019-core-handle-lookup-paths-being-symlinks.patch
];
postPatch = ''