Skip to content

Commit

Permalink
systemd: 252.5 -> 253
Browse files Browse the repository at this point in the history
systemd v253 changelog/NEWS:
https://github.com/systemd/systemd/blob/v253/NEWS

NixOS changes:
0007-hostnamed-localed-timedated-disable-methods-that-cha.patch was
dropped, because systemd gained support to handle read-only /etc.

*-add-rootprefix-to-lookup-dir-paths.patch required some updates too,
as src/basic/def.h moved to src/basic/constants.h.

systemd/systemd#25771 switched p11kit to become
dlopen()'ed, so we need to patch that path.

added a note to the 23.05 release notes to recommend `nixos-rebuild boot`

Co-authored-by: Florian Klink <flokli@flokli.de>
  • Loading branch information
gdamjan and flokli committed Mar 5, 2023
1 parent fb96f99 commit 575fddf
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 171 deletions.
4 changes: 4 additions & 0 deletions nixos/doc/manual/release-notes/rl-2305.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ In addition to numerous new and upgraded packages, this release has the followin

- default linux: 5.15 -\> 6.1, all supported kernels available

- systemd has been updated to v253.1, see [the pull request](https://github.com/NixOS/nixpkgs/pull/216826) for more info.
It's recommended to use `nixos-rebuild boot` and `reboot`, rather than `nixos-rebuild switch` - since in some rare cases
the switch of a live system might fail.

- Cinnamon has been updated to 5.6, see [the pull request](https://github.com/NixOS/nixpkgs/pull/201328#issue-1449910204) for what is changed.

- KDE Plasma has been updated to v5.27, see [the release notes](https://kde.org/announcements/plasma/5/5.27.0/) for what is changed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ https://github.com/NixOS/nixos/issues/126
2 files changed, 4 insertions(+)

diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
index f683f05981..5a04c2c2a6 100644
index 164e71a150..68e0766594 100644
--- a/src/shared/fstab-util.c
+++ b/src/shared/fstab-util.c
@@ -40,6 +40,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
@@ -41,6 +41,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
/* Don't bother with the OS data itself */
if (PATH_IN_SET(mount,
"/",
Expand All @@ -25,10 +25,10 @@ index f683f05981..5a04c2c2a6 100644
"/etc"))
return true;
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index e650b82170..5d0d41aa28 100644
index 61bd9d2601..a6243da417 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -522,6 +522,8 @@ static int delete_md(MountPoint *m) {
@@ -531,6 +531,8 @@ static int delete_md(MountPoint *m) {

static bool nonunmountable_path(const char *path) {
return path_equal(path, "/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ 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 01a67b5553..86dd2cea84 100644
index 36d336dfc8..d62c5173ca 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5636,6 +5636,7 @@ static int run(int argc, char *argv[]) {
@@ -5634,6 +5634,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
_cleanup_free_ char *p = NULL;

if (arg_pivot_root_new)
@@ -5650,6 +5651,7 @@ static int run(int argc, char *argv[]) {
@@ -5648,6 +5649,7 @@ static int run(int argc, char *argv[]) {
"Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.", arg_directory);
goto finish;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ Subject: [PATCH] Look for fsck in the right place
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 73c76fceea..d00cea7158 100644
index e25c5d5efa..26f4e5669e 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -352,6 +352,7 @@ static int run(int argc, char *argv[]) {
@@ -351,6 +351,7 @@ static int run(int argc, char *argv[]) {
if (r == 0) {
char dash_c[STRLEN("-C") + DECIMAL_STR_MAX(int) + 1];
int progress_socket = -1;
+ _cleanup_free_ char *fsck_name = NULL;
const char *cmdline[9];
int i = 0;

@@ -372,7 +373,10 @@ static int run(int argc, char *argv[]) {
@@ -371,7 +372,10 @@ static int run(int argc, char *argv[]) {
} else
dash_c[0] = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Also, remove /usr and /lib as these don't exist on NixOS.
2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
index 36f386254b..a968d28dfc 100644
index c99e9d8786..b9f85d1f8c 100644
--- a/src/basic/path-lookup.c
+++ b/src/basic/path-lookup.c
@@ -92,11 +92,7 @@ int xdg_user_data_dir(char **ret, const char *suffix) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ in containers.
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/manager.c b/src/core/manager.c
index a59afafb58..d9e7d77913 100644
index 7b394794b0..50d092042c 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1432,7 +1432,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
@@ -1437,7 +1437,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
if (!unit_is_bound_by_inactive(u, &culprit))
continue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Patch by vcunat.
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/libsystemd/sd-hwdb/hwdb-internal.h b/src/libsystemd/sd-hwdb/hwdb-internal.h
index 62d27f7b89..87318e041b 100644
index 5302679a62..c681f3a984 100644
--- a/src/libsystemd/sd-hwdb/hwdb-internal.h
+++ b/src/libsystemd/sd-hwdb/hwdb-internal.h
@@ -83,8 +83,5 @@ struct trie_value_entry2_f {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ index e486474c44..5f373d0723 100644
<literal>Etc/UTC</literal>. The resulting link should lead to the
corresponding binary
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 71b2f67350..465f1c0b15 100644
index b700f364ef..116b1cec63 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1280,7 +1280,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {
@@ -1282,7 +1282,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {

assert(ret);

Expand All @@ -47,7 +47,7 @@ index 71b2f67350..465f1c0b15 100644
if (!f)
return -errno;

@@ -1319,7 +1319,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {
@@ -1321,7 +1321,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {
_cleanup_strv_free_ char **zones = NULL;
int r;

Expand All @@ -56,7 +56,7 @@ index 71b2f67350..465f1c0b15 100644
if (!f)
return -errno;

@@ -1431,7 +1431,7 @@ int verify_timezone(const char *name, int log_level) {
@@ -1433,7 +1433,7 @@ int verify_timezone(const char *name, int log_level) {
if (p - name >= PATH_MAX)
return -ENAMETOOLONG;

Expand All @@ -65,7 +65,7 @@ index 71b2f67350..465f1c0b15 100644

fd = open(t, O_RDONLY|O_CLOEXEC);
if (fd < 0)
@@ -1489,7 +1489,7 @@ int get_timezone(char **ret) {
@@ -1491,7 +1491,7 @@ int get_timezone(char **ret) {
if (r < 0)
return r; /* returns EINVAL if not a symlink */

Expand All @@ -75,10 +75,10 @@ index 71b2f67350..465f1c0b15 100644
return -EINVAL;

diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 065ee896cd..1b260416c8 100644
index 9e79f84691..1a1c75718c 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -510,7 +510,7 @@ static int process_timezone(void) {
@@ -512,7 +512,7 @@ static int process_timezone(void) {
if (isempty(arg_timezone))
return 0;

Expand All @@ -88,10 +88,10 @@ index 065ee896cd..1b260416c8 100644
(void) mkdir_parents(etc_localtime, 0755);
r = symlink_atomic(e, etc_localtime);
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 86dd2cea84..4e5f03669d 100644
index d62c5173ca..84beac064b 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1905,8 +1905,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
@@ -1915,8 +1915,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
static const char *timezone_from_path(const char *path) {
return PATH_STARTSWITH_SET(
path,
Expand All @@ -103,7 +103,7 @@ index 86dd2cea84..4e5f03669d 100644

static bool etc_writable(void) {
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 6dbf73eb42..a36dd459d2 100644
index ad483301ef..a7f22b1c86 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -282,7 +282,7 @@ static int context_read_data(Context *c) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ NixOS has an option to link the xkb data files to /etc/X11, but not to
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index c23f1fa3f6..ad2eba82ad 100644
index fb83881cc7..c47a33134a 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -299,7 +299,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
@@ -297,7 +297,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
} state = NONE, look_for;
int r;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] build: don't create statedir and don't touch prefixdir
1 file changed, 3 deletions(-)

diff --git a/meson.build b/meson.build
index 76ad51d3fb..839dcef437 100644
index bfc86857d6..84e3e4c1db 100644
--- a/meson.build
+++ b/meson.build
@@ -4067,9 +4067,6 @@ install_data('LICENSE.GPL2',
@@ -4277,9 +4277,6 @@ install_data('LICENSE.GPL2',
install_subdir('LICENSES',
install_dir : docdir)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ discovery default udev rules. By adding `$out/lib` to the lookup paths
we should again be able to discover the udev rules amongst other default
files that I might have missed.
---
src/basic/def.h | 6 ++++--
src/basic/constants.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/basic/def.h b/src/basic/def.h
index 2b4de29021..1bd61dc45f 100644
--- a/src/basic/def.h
+++ b/src/basic/def.h
@@ -44,13 +44,15 @@
diff --git a/src/basic/constants.h b/src/basic/constants.h
index 5d68cc6332..a2ccc315e1 100644
--- a/src/basic/constants.h
+++ b/src/basic/constants.h
@@ -73,13 +73,15 @@
"/run/" n "\0" \
"/usr/local/lib/" n "\0" \
"/usr/lib/" n "\0" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ This is needed for NixOS to use such scripts as systemd directory is immutable.
1 file changed, 1 insertion(+)

diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
index dcee0f9006..24b03d6948 100644
index 42111d2772..53467ac229 100644
--- a/src/shutdown/shutdown.c
+++ b/src/shutdown/shutdown.c
@@ -334,6 +334,7 @@ static void init_watchdog(void) {
@@ -335,6 +335,7 @@ static void init_watchdog(void) {
int main(int argc, char *argv[]) {
static const char* const dirs[] = {
SYSTEM_SHUTDOWN_PATH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is needed for NixOS to use such scripts as systemd directory is immutable.
1 file changed, 1 insertion(+)

diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 3461d3e45f..d7d0ec2a7a 100644
index 9c51a3367f..75d6b76a87 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -184,6 +184,7 @@ static int execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ systemd itself uses extensively.
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/basic/path-util.h b/src/basic/path-util.h
index 22d3632e6e..1e8bbb242b 100644
index 56f01f41d8..f9b8627388 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -24,11 +24,11 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ executables that are being called from managers.
1 file changed, 8 insertions(+)

diff --git a/src/core/manager.c b/src/core/manager.c
index d9e7d77913..ba3ce14bf0 100644
index 50d092042c..898f9ed2f1 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -3693,9 +3693,17 @@ static int build_generator_environment(Manager *m, char ***ret) {
@@ -3714,9 +3714,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. */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ See also: https://github.com/systemd/systemd/issues/24191
1 file changed, 4 deletions(-)

diff --git a/src/core/manager.c b/src/core/manager.c
index ba3ce14bf0..03bf66ff74 100644
index 898f9ed2f1..5040d5b105 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -4493,10 +4493,6 @@ char* manager_taint_string(const Manager *m) {
@@ -4543,10 +4543,6 @@ char* manager_taint_string(const Manager *m) {
if (m->taint_usr)
stage[n++] = "split-usr";

Expand Down
Loading

0 comments on commit 575fddf

Please sign in to comment.