Skip to content

Commit

Permalink
systemd: 251.7 -> 252
Browse files Browse the repository at this point in the history
  • Loading branch information
martinetd committed Nov 5, 2022
1 parent 844a08c commit c505b79
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ unit. (However, this ignores the fsck unit, so it's not perfect...)
1 file changed, 4 deletions(-)

diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
index 25b8a590a6..d18999ea87 100644
index 3dbba1f850db..40d367d1c86e 100644
--- a/rules.d/99-systemd.rules.in
+++ b/rules.d/99-systemd.rules.in
@@ -17,10 +17,6 @@ SUBSYSTEM=="ubi", TAG+="systemd"
SUBSYSTEM=="block", TAG+="systemd"
@@ -20,10 +20,6 @@ SUBSYSTEM=="block", TAG+="systemd"
SUBSYSTEM=="block", ENV{DM_SUSPENDED}=="1", IMPORT{db}="SYSTEMD_READY", GOTO="systemd_end"
SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"

-# Ignore encrypted devices with no identified superblock on it, since
-# we are probably still calling mke2fs or mkswap on it.
-SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
-
# add symlink to GPT root disk
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"
# Explicitly set SYSTEMD_READY=1 for DM devices that don't have it set yet, so that we always have something to import above
SUBSYSTEM=="block", ENV{DM_UUID}=="?*", ENV{SYSTEMD_READY}=="", ENV{SYSTEMD_READY}="1"

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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 f683f0598159..5a04c2c2a6cf 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) {
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 820aa8e286..653e43053d 100644
index e650b821700d..5d0d41aa287a 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -518,6 +518,8 @@ static int delete_md(MountPoint *m) {
@@ -522,6 +522,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 4ce80bba70..bb149192bd 100644
index 01a67b5553a3..86dd2cea846a 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5651,6 +5651,7 @@ static int run(int argc, char *argv[]) {
@@ -5636,6 +5636,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
_cleanup_free_ char *p = NULL;

if (arg_pivot_root_new)
@@ -5665,6 +5666,7 @@ static int run(int argc, char *argv[]) {
@@ -5650,6 +5651,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,10 +8,10 @@ Subject: [PATCH] Look for fsck in the right place
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 745d01ff50..dd4eef45c3 100644
index 595434ab571e..374a4e6c762c 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -368,7 +368,7 @@ static int run(int argc, char *argv[]) {
@@ -373,7 +373,7 @@ 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 1f4331a8bf..4b9a8ae26e 100644
index 36f386254b72..a968d28dfcfc 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 Expand Up @@ -92,7 +92,7 @@ index 1f4331a8bf..4b9a8ae26e 100644

if (!add)
diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index 693433b34b..5932a21b5b 100644
index 693433b34b87..5932a21b5be1 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -38,10 +38,10 @@ systemdsystemconfdir=${systemd_system_conf_dir}
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 296b759959..71ef7f27b4 100644
index a59afafb589f..d9e7d77913ae 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1428,7 +1428,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
@@ -1432,7 +1432,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 @@ -11,10 +11,10 @@ Subject: [PATCH] hostnamed, localed, timedated: disable methods that change
3 files changed, 25 insertions(+)

diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 5f09e6d0eb..46bef3b59d 100644
index 486b093062fc..580e933f14d4 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -910,6 +910,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
@@ -906,6 +906,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
if (r < 0)
return r;

Expand All @@ -24,7 +24,7 @@ index 5f09e6d0eb..46bef3b59d 100644
name = empty_to_null(name);

context_read_etc_hostname(c);
@@ -973,6 +976,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
@@ -969,6 +972,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
if (r < 0)
return r;

Expand All @@ -35,10 +35,10 @@ index 5f09e6d0eb..46bef3b59d 100644

context_read_machine_info(c);
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 89bf9c6fba..af2f37a4ca 100644
index 7aa47f18c226..0a8ef689311c 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -359,6 +359,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
@@ -309,6 +309,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
if (r < 0)
return r;

Expand All @@ -48,7 +48,7 @@ index 89bf9c6fba..af2f37a4ca 100644
use_localegen = locale_gen_check_available();

/* If single locale without variable name is provided, then we assume it is LANG=. */
@@ -484,6 +487,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
@@ -423,6 +426,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
if (r < 0)
return r;

Expand All @@ -58,7 +58,7 @@ index 89bf9c6fba..af2f37a4ca 100644
keymap = empty_to_null(keymap);
keymap_toggle = empty_to_null(keymap_toggle);

@@ -664,6 +670,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
@@ -602,6 +608,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
if (r < 0)
return r;

Expand All @@ -69,10 +69,10 @@ index 89bf9c6fba..af2f37a4ca 100644
model = empty_to_null(model);
variant = empty_to_null(variant);
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 9ca5d37b75..e41d8d73df 100644
index 373574cc06ca..6dbf73eb42f5 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -669,6 +669,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
@@ -665,6 +665,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
if (r < 0)
return r;

Expand All @@ -83,7 +83,7 @@ index 9ca5d37b75..e41d8d73df 100644
if (!timezone_is_valid(z, LOG_DEBUG))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid or not installed time zone '%s'", z);

@@ -748,6 +752,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
@@ -743,6 +747,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
if (r < 0)
return r;

Expand All @@ -93,7 +93,7 @@ index 9ca5d37b75..e41d8d73df 100644
if (lrtc == c->local_rtc && !fix_system)
return sd_bus_reply_method_return(m, NULL);

@@ -930,6 +937,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
@@ -923,6 +930,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
if (r < 0)
return r;

Expand Down
9 changes: 4 additions & 5 deletions pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Subject: [PATCH] Fix hwdb paths

Patch by vcunat.
---
src/libsystemd/sd-hwdb/hwdb-internal.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
src/libsystemd/sd-hwdb/hwdb-internal.h | 6 +-----
1 file changed, 1 insertion(+), 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 62d27f7b8968..e974c82358ba 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 {
@@ -83,8 +83,4 @@ struct trie_value_entry2_f {
} _packed_;

#define hwdb_bin_paths \
Expand All @@ -22,4 +22,3 @@ index 62d27f7b89..87318e041b 100644
- _CONF_PATHS_SPLIT_USR_NULSTR("systemd/hwdb/hwdb.bin") \
- UDEVLIBEXECDIR "/hwdb.bin\0"
+ "/etc/udev/hwdb.bin\0"
+
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NixOS uses this path.
5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/man/localtime.xml b/man/localtime.xml
index e486474c44..5f373d0723 100644
index e486474c446b..5f373d0723b4 100644
--- a/man/localtime.xml
+++ b/man/localtime.xml
@@ -20,7 +20,7 @@
Expand All @@ -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 0ad8de4b9a..b794c6c7d0 100644
index 71b2f673505e..465f1c0b159a 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1281,7 +1281,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {
@@ -1280,7 +1280,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {

assert(ret);

Expand All @@ -47,7 +47,7 @@ index 0ad8de4b9a..b794c6c7d0 100644
if (!f)
return -errno;

@@ -1320,7 +1320,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {
@@ -1319,7 +1319,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 0ad8de4b9a..b794c6c7d0 100644
if (!f)
return -errno;

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

Expand All @@ -65,7 +65,7 @@ index 0ad8de4b9a..b794c6c7d0 100644

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

Expand All @@ -75,23 +75,23 @@ index 0ad8de4b9a..b794c6c7d0 100644
return -EINVAL;

diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 39160182ef..8dcc3307c8 100644
index 065ee896cd8c..1b260416c8e9 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -494,7 +494,7 @@ static int process_timezone(void) {
@@ -510,7 +510,7 @@ static int process_timezone(void) {
if (isempty(arg_timezone))
return 0;

- e = strjoina("../usr/share/zoneinfo/", arg_timezone);
+ e = strjoina("zoneinfo/", arg_timezone);

(void) mkdir_parents(etc_localtime, 0755);
if (symlink(e, etc_localtime) < 0)
r = symlink_atomic(e, etc_localtime);
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index bb149192bd..08751ed944 100644
index 86dd2cea846a..4e5f03669d78 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1901,8 +1901,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
@@ -1905,8 +1905,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 bb149192bd..08751ed944 100644

static bool etc_writable(void) {
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index e41d8d73df..ff1a384b3b 100644
index 6dbf73eb42f5..a36dd459d2da 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 661d54c27d..e98b578531 100644
index c23f1fa3f670..ad2eba82ad74 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -277,7 +277,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
@@ -299,7 +299,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 9c170acc0a..818b7a3eb5 100644
index 76ad51d3fb75..839dcef437d5 100644
--- a/meson.build
+++ b/meson.build
@@ -3928,9 +3928,6 @@ install_data('LICENSE.GPL2',
@@ -4067,9 +4067,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 @@ -12,10 +12,10 @@ files that I might have missed.
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/basic/def.h b/src/basic/def.h
index 0a1ae023a3..cc00ff6c68 100644
index 2b4de29021a7..1bd61dc45f8a 100644
--- a/src/basic/def.h
+++ b/src/basic/def.h
@@ -39,13 +39,15 @@
@@ -44,13 +44,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 @@ -6,19 +6,18 @@ Subject: [PATCH] systemd-shutdown: execute scripts in

This is needed for NixOS to use such scripts as systemd directory is immutable.
---
src/shutdown/shutdown.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
src/shutdown/shutdown.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
index 2c3cbec02c..1b876203c6 100644
index dcee0f900616..24b03d694884 100644
--- a/src/shutdown/shutdown.c
+++ b/src/shutdown/shutdown.c
@@ -335,7 +335,7 @@ int main(int argc, char *argv[]) {
@@ -334,6 +334,7 @@ static void init_watchdog(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;
char *arguments[3];
int cmd, r, umount_log_level = LOG_INFO;
- static const char* const dirs[] = {SYSTEM_SHUTDOWN_PATH, NULL};
+ static const char* const dirs[] = {SYSTEM_SHUTDOWN_PATH, "/etc/systemd/system-shutdown", NULL};

/* 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ 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 65e391d02a..28af2f8bf5 100644
index 3461d3e45f09..d7d0ec2a7a45 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -180,6 +180,7 @@ static int execute(
@@ -184,6 +184,7 @@ static int execute(
};
static const char* const dirs[] = {
SYSTEM_SLEEP_PATH,
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 553aa4fb58..46294f4bb1 100644
index 22d3632e6ef2..1e8bbb242b57 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -24,11 +24,11 @@
Expand Down
Loading

0 comments on commit c505b79

Please sign in to comment.