diff --git a/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch b/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch index 9dd9344a831f..d242ff7c9287 100644 --- a/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch +++ b/pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch @@ -13,10 +13,10 @@ 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 ad0c7e2fb5..79f3086e78 100644 +index 882cda0dcd..8e8d1f04ce 100644 --- a/rules.d/99-systemd.rules.in +++ b/rules.d/99-systemd.rules.in -@@ -26,10 +26,6 @@ SUBSYSTEM=="block", ACTION=="add", KERNEL=="dm-*", ENV{DM_NAME}!="?*", ENV{SYSTE +@@ -30,10 +30,6 @@ SUBSYSTEM=="block", ACTION=="add", KERNEL=="dm-*", ENV{DM_NAME}!="?*", ENV{SYSTE # Import previous SYSTEMD_READY state. SUBSYSTEM=="block", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}=="", IMPORT{db}="SYSTEMD_READY" diff --git a/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch b/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch index 6adbe5d6f68d..d6a64437c2ac 100644 --- a/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch +++ b/pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch @@ -14,7 +14,7 @@ Original-Author: Eelco Dolstra 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c -index eac5bb8d3b..d8187bfa99 100644 +index d6a256c4a7..f74d5198f1 100644 --- a/src/shared/fstab-util.c +++ b/src/shared/fstab-util.c @@ -66,6 +66,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) { @@ -27,7 +27,7 @@ index eac5bb8d3b..d8187bfa99 100644 "/etc")) return true; diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c -index ca6d36e054..0a9227c9a8 100644 +index 4bc01c75e0..ede9ac7b87 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -170,8 +170,10 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) { diff --git a/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch b/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch index 68bb9914e40e..23029da39f23 100644 --- a/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch +++ b/pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch @@ -10,10 +10,10 @@ 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 4fee8a693c..756ce11b1f 100644 +index 500725d35f..2b735e4df4 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -6028,6 +6028,7 @@ static int run(int argc, char *argv[]) { +@@ -6189,6 +6189,7 @@ static int run(int argc, char *argv[]) { goto finish; } } else { @@ -21,8 +21,8 @@ index 4fee8a693c..756ce11b1f 100644 _cleanup_free_ char *p = NULL; if (arg_pivot_root_new) -@@ -6044,6 +6045,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); +@@ -6208,6 +6209,7 @@ static int run(int argc, char *argv[]) { + log_error_errno(r, "Unable to determine if %s looks like it has an OS tree (i.e. whether /usr/ exists): %m", arg_directory); goto finish; } +#endif diff --git a/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch b/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch index 46623e87e8c3..2657eb9089d1 100644 --- a/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch +++ b/pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch @@ -11,93 +11,12 @@ Also, remove /usr and /lib as these don't exist on NixOS. Original-Author: Eelco Dolstra --- - src/basic/path-lookup.c | 18 ++---------------- - src/core/systemd.pc.in | 8 ++++---- - 2 files changed, 6 insertions(+), 20 deletions(-) + src/core/systemd.pc.in | 8 ++++---- + src/libsystemd/sd-path/path-lookup.c | 20 +++----------------- + 2 files changed, 7 insertions(+), 21 deletions(-) -diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c -index 540256b73b..a115ec09a3 100644 ---- a/src/basic/path-lookup.c -+++ b/src/basic/path-lookup.c -@@ -123,11 +123,7 @@ int runtime_directory(char **ret, RuntimeScope scope, const char *suffix) { - } - - static const char* const user_data_unit_paths[] = { -- "/usr/local/lib/systemd/user", -- "/usr/local/share/systemd/user", - USER_DATA_UNIT_DIR, -- "/usr/lib/systemd/user", -- "/usr/share/systemd/user", - NULL - }; - -@@ -634,16 +630,13 @@ int lookup_paths_init( - persistent_config, - SYSTEM_CONFIG_UNIT_DIR, - "/etc/systemd/system", -+ "/nix/var/nix/profiles/default/lib/systemd/system", - STRV_IFNOTNULL(persistent_attached), - runtime_config, - "/run/systemd/system", - STRV_IFNOTNULL(runtime_attached), - STRV_IFNOTNULL(generator), -- "/usr/local/lib/systemd/system", - SYSTEM_DATA_UNIT_DIR, -- "/usr/lib/systemd/system", -- /* To be used ONLY for images which might be legacy split-usr */ -- STRV_IFNOTNULL(flags & LOOKUP_PATHS_SPLIT_USR ? "/lib/systemd/system" : NULL), - STRV_IFNOTNULL(generator_late)); - break; - -@@ -659,14 +652,11 @@ int lookup_paths_init( - persistent_config, - USER_CONFIG_UNIT_DIR, - "/etc/systemd/user", -+ "/nix/var/nix/profiles/default/lib/systemd/user", - runtime_config, - "/run/systemd/user", - STRV_IFNOTNULL(generator), -- "/usr/local/share/systemd/user", -- "/usr/share/systemd/user", -- "/usr/local/lib/systemd/user", - USER_DATA_UNIT_DIR, -- "/usr/lib/systemd/user", - STRV_IFNOTNULL(generator_late)); - break; - -@@ -825,7 +815,6 @@ char **generator_binary_paths(RuntimeScope scope) { - case RUNTIME_SCOPE_SYSTEM: - add = strv_new("/run/systemd/system-generators", - "/etc/systemd/system-generators", -- "/usr/local/lib/systemd/system-generators", - SYSTEM_GENERATOR_DIR); - break; - -@@ -833,7 +822,6 @@ char **generator_binary_paths(RuntimeScope scope) { - case RUNTIME_SCOPE_USER: - add = strv_new("/run/systemd/user-generators", - "/etc/systemd/user-generators", -- "/usr/local/lib/systemd/user-generators", - USER_GENERATOR_DIR); - break; - -@@ -872,14 +860,12 @@ char **env_generator_binary_paths(RuntimeScope runtime_scope) { - case RUNTIME_SCOPE_SYSTEM: - add = strv_new("/run/systemd/system-environment-generators", - "/etc/systemd/system-environment-generators", -- "/usr/local/lib/systemd/system-environment-generators", - SYSTEM_ENV_GENERATOR_DIR); - break; - - case RUNTIME_SCOPE_USER: - add = strv_new("/run/systemd/user-environment-generators", - "/etc/systemd/user-environment-generators", -- "/usr/local/lib/systemd/user-environment-generators", - USER_ENV_GENERATOR_DIR); - break; - diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in -index f3b85b0190..8ae544b495 100644 +index f3b85b0190..f7aa5fca50 100644 --- a/src/core/systemd.pc.in +++ b/src/core/systemd.pc.in @@ -43,10 +43,10 @@ systemdsystemconfdir=${systemd_system_conf_dir} @@ -105,11 +24,11 @@ index f3b85b0190..8ae544b495 100644 systemduserconfdir=${systemd_user_conf_dir} -systemd_system_unit_path=${systemd_system_conf_dir}:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemd_system_unit_dir}:/usr/lib/systemd/system:/lib/systemd/system -+systemd_system_unit_path=${systemd_system_conf_dir}:/etc/systemd/system:/nix/var/nix/profiles/default/lib/systemd/system:/run/systemd/system:${systemdsystemunitdir} ++systemd_system_unit_path=${systemd_system_conf_dir}:/etc/systemd/system:/nix/var/nix/profiles/default/lib/systemd/system:/run/systemd/system:${systemd_system_unit_dir} systemdsystemunitpath=${systemd_system_unit_path} -systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:${systemd_user_unit_dir}:/usr/lib/systemd/user:/usr/share/systemd/user -+systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/user:${systemduserunitdir} ++systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/user:${systemd_user_unit_dir} systemduserunitpath=${systemd_user_unit_path} systemd_system_generator_dir=${prefix}/lib/systemd/system-generators @@ -126,3 +45,85 @@ index f3b85b0190..8ae544b495 100644 systemdusergeneratorpath=${systemd_user_generator_path} systemd_sleep_dir=${prefix}/lib/systemd/system-sleep +diff --git a/src/libsystemd/sd-path/path-lookup.c b/src/libsystemd/sd-path/path-lookup.c +index a3b09208cb..91a085c6bc 100644 +--- a/src/libsystemd/sd-path/path-lookup.c ++++ b/src/libsystemd/sd-path/path-lookup.c +@@ -69,11 +69,7 @@ int runtime_directory(RuntimeScope scope, const char *suffix, char **ret) { + } + + static const char* const user_data_unit_paths[] = { +- "/usr/local/lib/systemd/user", +- "/usr/local/share/systemd/user", + USER_DATA_UNIT_DIR, +- "/usr/lib/systemd/user", +- "/usr/share/systemd/user", + NULL + }; + +@@ -481,16 +477,13 @@ int lookup_paths_init( + persistent_config, + SYSTEM_CONFIG_UNIT_DIR, + "/etc/systemd/system", ++ "/nix/var/nix/profiles/default/lib/systemd/system", + ASSERT_PTR(persistent_attached), + ASSERT_PTR(runtime_config), + "/run/systemd/system", + ASSERT_PTR(runtime_attached), + STRV_IFNOTNULL(generator), +- "/usr/local/lib/systemd/system", + SYSTEM_DATA_UNIT_DIR, +- "/usr/lib/systemd/system", +- /* To be used ONLY for images which might be legacy split-usr */ +- FLAGS_SET(flags, LOOKUP_PATHS_SPLIT_USR) ? "/lib/systemd/system" : STRV_IGNORE, + STRV_IFNOTNULL(generator_late)); + break; + +@@ -508,13 +501,10 @@ int lookup_paths_init( + add = strv_new(persistent_config, + USER_CONFIG_UNIT_DIR, + "/etc/systemd/user", ++ "/nix/var/nix/profiles/default/lib/systemd/user", + ASSERT_PTR(runtime_config), + "/run/systemd/user", +- "/usr/local/share/systemd/user", +- "/usr/share/systemd/user", +- "/usr/local/lib/systemd/user", +- USER_DATA_UNIT_DIR, +- "/usr/lib/systemd/user"); ++ USER_DATA_UNIT_DIR); + break; + + case RUNTIME_SCOPE_USER: +@@ -653,7 +643,6 @@ void lookup_paths_log(LookupPaths *lp) { + static const char* const system_generator_paths[] = { + "/run/systemd/system-generators", + "/etc/systemd/system-generators", +- "/usr/local/lib/systemd/system-generators", + SYSTEM_GENERATOR_DIR, + NULL, + }; +@@ -661,7 +650,6 @@ static const char* const system_generator_paths[] = { + static const char* const user_generator_paths[] = { + "/run/systemd/user-generators", + "/etc/systemd/user-generators", +- "/usr/local/lib/systemd/user-generators", + USER_GENERATOR_DIR, + NULL, + }; +@@ -669,7 +657,6 @@ static const char* const user_generator_paths[] = { + static const char* const system_env_generator_paths[] = { + "/run/systemd/system-environment-generators", + "/etc/systemd/system-environment-generators", +- "/usr/local/lib/systemd/system-environment-generators", + SYSTEM_ENV_GENERATOR_DIR, + NULL, + }; +@@ -677,7 +664,6 @@ static const char* const system_env_generator_paths[] = { + static const char* const user_env_generator_paths[] = { + "/run/systemd/user-environment-generators", + "/etc/systemd/user-environment-generators", +- "/usr/local/lib/systemd/user-environment-generators", + USER_ENV_GENERATOR_DIR, + NULL, + }; diff --git a/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch b/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch index 5c1684281b25..c23b7315cde9 100644 --- a/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch +++ b/pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch @@ -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 04103e0fe9..e26c6c5cfd 100644 +index f21a4f7ceb..4c24ce5c98 100644 --- a/src/core/manager.c +++ b/src/core/manager.c -@@ -1611,7 +1611,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) { +@@ -1672,7 +1672,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) { if (!unit_is_bound_by_inactive(u, &culprit)) continue; diff --git a/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch b/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch index c60c5a4cbf9b..44bd2263ddf0 100644 --- a/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch +++ b/pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch @@ -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 82d08803fa..8e40b77eba 100644 +index ba50b59f92..9827487453 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c -@@ -1116,6 +1116,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ +@@ -1115,6 +1115,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ if (r < 0) return r; @@ -24,7 +24,7 @@ index 82d08803fa..8e40b77eba 100644 name = empty_to_null(name); context_read_etc_hostname(c); -@@ -1178,6 +1181,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess +@@ -1177,6 +1180,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess if (r < 0) return r; @@ -35,7 +35,7 @@ index 82d08803fa..8e40b77eba 100644 context_read_machine_info(c); diff --git a/src/locale/localed.c b/src/locale/localed.c -index c0d104578d..51a714ee23 100644 +index 062744519d..95bde4b1c3 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -226,6 +226,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er @@ -69,10 +69,10 @@ index c0d104578d..51a714ee23 100644 r = x11_context_verify_and_warn(&in, LOG_ERR, error); diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c -index e3b4367ec0..448aa7e94d 100644 +index c79bb864df..cbd30214b7 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c -@@ -673,6 +673,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error * +@@ -676,6 +676,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error * if (r < 0) return r; @@ -83,7 +83,7 @@ index e3b4367ec0..448aa7e94d 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); -@@ -750,6 +754,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error +@@ -754,6 +758,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error if (r < 0) return r; @@ -93,7 +93,7 @@ index e3b4367ec0..448aa7e94d 100644 if (lrtc == c->local_rtc && !fix_system) return sd_bus_reply_method_return(m, NULL); -@@ -928,6 +935,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error +@@ -948,6 +955,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error if (r < 0) return r; diff --git a/pkgs/os-specific/linux/systemd/0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch b/pkgs/os-specific/linux/systemd/0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch index b73489f56b29..119dd75bc2c3 100644 --- a/pkgs/os-specific/linux/systemd/0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch +++ b/pkgs/os-specific/linux/systemd/0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch @@ -35,10 +35,10 @@ index 3a13e04a27..4fd58068a1 100644 Etc/UTC. The resulting link should lead to the corresponding binary diff --git a/src/basic/time-util.c b/src/basic/time-util.c -index b94f37c31c..48f5a2526b 100644 +index 29afb08ebc..398ff340cd 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c -@@ -1412,7 +1412,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) { +@@ -1418,7 +1418,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) { assert(ret); @@ -47,7 +47,7 @@ index b94f37c31c..48f5a2526b 100644 if (!f) return -errno; -@@ -1453,7 +1453,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) { +@@ -1459,7 +1459,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) { assert(ret); @@ -56,7 +56,7 @@ index b94f37c31c..48f5a2526b 100644 if (!f) return -errno; -@@ -1565,7 +1565,7 @@ int verify_timezone(const char *name, int log_level) { +@@ -1570,7 +1570,7 @@ int verify_timezone(const char *name, int log_level) { if (p - name >= PATH_MAX) return -ENAMETOOLONG; @@ -65,7 +65,7 @@ index b94f37c31c..48f5a2526b 100644 fd = open(t, O_RDONLY|O_CLOEXEC); if (fd < 0) -@@ -1617,7 +1617,7 @@ int get_timezone(char **ret) { +@@ -1622,7 +1622,7 @@ int get_timezone(char **ret) { if (r < 0) return r; /* Return EINVAL if not a symlink */ @@ -75,10 +75,10 @@ index b94f37c31c..48f5a2526b 100644 return -EINVAL; if (!timezone_is_valid(e, LOG_DEBUG)) diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c -index 6afabef430..c1e3af77e1 100644 +index 9be62b8df3..2044e9f8d0 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c -@@ -648,7 +648,7 @@ static int process_timezone(int rfd) { +@@ -598,7 +598,7 @@ static int process_timezone(int rfd) { if (isempty(arg_timezone)) return 0; @@ -88,10 +88,10 @@ index 6afabef430..c1e3af77e1 100644 r = symlinkat_atomic_full(e, pfd, f, /* make_relative= */ false); if (r < 0) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 756ce11b1f..436804b3bd 100644 +index 2b735e4df4..7a21f34edd 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -1862,8 +1862,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid +@@ -1851,8 +1851,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, @@ -103,7 +103,7 @@ index 756ce11b1f..436804b3bd 100644 static bool etc_writable(void) { diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c -index 448aa7e94d..2161e09579 100644 +index cbd30214b7..b9b2f533a4 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -280,7 +280,7 @@ static int context_read_data(Context *c) { diff --git a/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch b/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch index fe0dca1863dd..c670f076c34a 100644 --- a/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch +++ b/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch @@ -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 32354027f1..1d231f1afc 100644 +index 36dbeb9daa..265eda2751 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c -@@ -297,7 +297,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) { +@@ -301,7 +301,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) { } state = NONE, look_for; int r; diff --git a/pkgs/os-specific/linux/systemd/0009-add-rootprefix-to-lookup-dir-paths.patch b/pkgs/os-specific/linux/systemd/0009-add-rootprefix-to-lookup-dir-paths.patch index d7a11e3996cb..bf9f028d6300 100644 --- a/pkgs/os-specific/linux/systemd/0009-add-rootprefix-to-lookup-dir-paths.patch +++ b/pkgs/os-specific/linux/systemd/0009-add-rootprefix-to-lookup-dir-paths.patch @@ -12,7 +12,7 @@ files that I might have missed. 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/basic/constants.h b/src/basic/constants.h -index e70817c51f..859e673a67 100644 +index 5aaf8f535c..934175fb51 100644 --- a/src/basic/constants.h +++ b/src/basic/constants.h @@ -62,13 +62,15 @@ diff --git a/pkgs/os-specific/linux/systemd/0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch b/pkgs/os-specific/linux/systemd/0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch index 24c74216b729..20b4641ac000 100644 --- a/pkgs/os-specific/linux/systemd/0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch +++ b/pkgs/os-specific/linux/systemd/0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch @@ -10,7 +10,7 @@ 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 67f44e16e9..dda6614561 100644 +index e26a8579c5..af814cd551 100644 --- a/src/shutdown/shutdown.c +++ b/src/shutdown/shutdown.c @@ -358,6 +358,7 @@ static void notify_supervisor(void) { diff --git a/pkgs/os-specific/linux/systemd/0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch b/pkgs/os-specific/linux/systemd/0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch index 733e042ec0dd..13578115a014 100644 --- a/pkgs/os-specific/linux/systemd/0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch +++ b/pkgs/os-specific/linux/systemd/0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch @@ -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 c96207428d..1e95eec7f1 100644 +index 181bb4ccef..2b1410d8a1 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c -@@ -217,6 +217,7 @@ static int execute( +@@ -218,6 +218,7 @@ static int execute( }; static const char* const dirs[] = { SYSTEM_SLEEP_PATH, diff --git a/pkgs/os-specific/linux/systemd/0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch b/pkgs/os-specific/linux/systemd/0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch index b546c7eeb62e..9e29c34efcd7 100644 --- a/pkgs/os-specific/linux/systemd/0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch +++ b/pkgs/os-specific/linux/systemd/0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch @@ -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 fcb3aa9399..b9e69cbf91 100644 +index dff5a3a549..01344e5cf6 100644 --- a/src/basic/path-util.h +++ b/src/basic/path-util.h @@ -17,10 +17,10 @@ diff --git a/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch b/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch index e17d281a6101..14ff6ca57d46 100644 --- a/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch +++ b/pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch @@ -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 e26c6c5cfd..6cc1642684 100644 +index 4c24ce5c98..3c944559fc 100644 --- a/src/core/manager.c +++ b/src/core/manager.c -@@ -4035,9 +4035,17 @@ static int build_generator_environment(Manager *m, char ***ret) { +@@ -4135,9 +4135,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. */ diff --git a/pkgs/os-specific/linux/systemd/0014-core-don-t-taint-on-unmerged-usr.patch b/pkgs/os-specific/linux/systemd/0014-core-don-t-taint-on-unmerged-usr.patch index 0fd274d7a5b7..fbaaed99cb61 100644 --- a/pkgs/os-specific/linux/systemd/0014-core-don-t-taint-on-unmerged-usr.patch +++ b/pkgs/os-specific/linux/systemd/0014-core-don-t-taint-on-unmerged-usr.patch @@ -17,10 +17,10 @@ See also: https://github.com/systemd/systemd/issues/24191 1 file changed, 8 deletions(-) diff --git a/src/core/taint.c b/src/core/taint.c -index 969b37f209..de64e8f1f9 100644 +index b7a1c647a2..c04864c478 100644 --- a/src/core/taint.c +++ b/src/core/taint.c -@@ -41,14 +41,6 @@ char* taint_string(void) { +@@ -41,14 +41,6 @@ char** taint_strv(void) { _cleanup_free_ char *bin = NULL, *usr_sbin = NULL, *var_run = NULL; diff --git a/pkgs/os-specific/linux/systemd/0015-tpm2_context_init-fix-driver-name-checking.patch b/pkgs/os-specific/linux/systemd/0015-tpm2_context_init-fix-driver-name-checking.patch index 57ca20fdcbf7..41e836ca04eb 100644 --- a/pkgs/os-specific/linux/systemd/0015-tpm2_context_init-fix-driver-name-checking.patch +++ b/pkgs/os-specific/linux/systemd/0015-tpm2_context_init-fix-driver-name-checking.patch @@ -27,10 +27,10 @@ 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 10a78adfaf..6493d5d270 100644 +index 36a0f906da..e0f42abca2 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c -@@ -670,7 +670,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) { +@@ -721,7 +721,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) { fn = strjoina("libtss2-tcti-", driver, ".so.0"); /* Better safe than sorry, let's refuse strings that cannot possibly be valid driver early, before going to disk. */ @@ -38,4 +38,4 @@ index 10a78adfaf..6493d5d270 100644 + if (!path_is_valid(fn)) return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "TPM2 driver name '%s' not valid, refusing.", driver); - context->tcti_dl = dlopen(fn, RTLD_NOW); + context->tcti_dl = dlopen(fn, RTLD_NOW|RTLD_NODELETE); diff --git a/pkgs/os-specific/linux/systemd/0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch b/pkgs/os-specific/linux/systemd/0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch index cc7106f9bb3d..6c7a1aff4094 100644 --- a/pkgs/os-specific/linux/systemd/0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch +++ b/pkgs/os-specific/linux/systemd/0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch @@ -30,10 +30,10 @@ 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 15398f8364..8d440cee59 100644 +index c42a31153d..154dbf0402 100644 --- a/src/systemctl/systemctl-edit.c +++ b/src/systemctl/systemctl-edit.c -@@ -322,6 +322,9 @@ int verb_edit(int argc, char *argv[], void *userdata) { +@@ -323,6 +323,9 @@ int verb_edit(int argc, char *argv[], void *userdata) { sd_bus *bus; int r; @@ -41,5 +41,5 @@ index 15398f8364..8d440cee59 100644 + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "The unit-directory '/etc/systemd/system' is read-only on NixOS, so it's not possible to edit system-units directly. Use 'systemctl edit --runtime' instead."); + if (!on_tty() && !arg_stdin) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot edit units if not on a tty."); + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot edit units interactively if not on a tty."); diff --git a/pkgs/os-specific/linux/systemd/0017-meson.build-do-not-create-systemdstatedir.patch b/pkgs/os-specific/linux/systemd/0017-meson.build-do-not-create-systemdstatedir.patch index 7d941c33b927..debcaab14e81 100644 --- a/pkgs/os-specific/linux/systemd/0017-meson.build-do-not-create-systemdstatedir.patch +++ b/pkgs/os-specific/linux/systemd/0017-meson.build-do-not-create-systemdstatedir.patch @@ -8,10 +8,10 @@ Subject: [PATCH] meson.build: do not create systemdstatedir 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build -index cecdbc3aa7..bd7f8ec580 100644 +index bffda86845..cb5dcec0f9 100644 --- a/meson.build +++ b/meson.build -@@ -2652,7 +2652,6 @@ install_data('LICENSE.GPL2', +@@ -2781,7 +2781,6 @@ install_data('LICENSE.GPL2', install_subdir('LICENSES', install_dir : docdir) diff --git a/pkgs/os-specific/linux/systemd/0018-Revert-bootctl-update-list-remove-all-instances-of-s.patch b/pkgs/os-specific/linux/systemd/0018-Revert-bootctl-update-list-remove-all-instances-of-s.patch new file mode 100644 index 000000000000..b4b9d9ee3e3d --- /dev/null +++ b/pkgs/os-specific/linux/systemd/0018-Revert-bootctl-update-list-remove-all-instances-of-s.patch @@ -0,0 +1,125 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jared Baur +Date: Sun, 17 Nov 2024 12:46:36 -0800 +Subject: [PATCH] Revert "bootctl: update/list/remove all instances of + systemd-boot in /EFI/BOOT" + +This reverts commit 929f41c6528fb630753d4e2f588a8eb6c2f6a609. +--- + src/bootctl/bootctl-install.c | 52 ++++------------------------------- + src/bootctl/bootctl-status.c | 8 ++++-- + 2 files changed, 12 insertions(+), 48 deletions(-) + +diff --git a/src/bootctl/bootctl-install.c b/src/bootctl/bootctl-install.c +index 7ad264d882..298e749ed6 100644 +--- a/src/bootctl/bootctl-install.c ++++ b/src/bootctl/bootctl-install.c +@@ -323,46 +323,6 @@ static int create_subdirs(const char *root, const char * const *subdirs) { + return 0; + } + +-static int update_efi_boot_binaries(const char *esp_path, const char *source_path) { +- _cleanup_closedir_ DIR *d = NULL; +- _cleanup_free_ char *p = NULL; +- int r, ret = 0; +- +- r = chase_and_opendir("/EFI/BOOT", esp_path, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS, &p, &d); +- if (r == -ENOENT) +- return 0; +- if (r < 0) +- return log_error_errno(r, "Failed to open directory \"%s/EFI/BOOT\": %m", esp_path); +- +- FOREACH_DIRENT(de, d, break) { +- _cleanup_close_ int fd = -EBADF; +- _cleanup_free_ char *v = NULL; +- +- if (!endswith_no_case(de->d_name, ".efi")) +- continue; +- +- fd = openat(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC); +- if (fd < 0) +- return log_error_errno(errno, "Failed to open \"%s/%s\" for reading: %m", p, de->d_name); +- +- r = get_file_version(fd, &v); +- if (r == -ESRCH) +- continue; /* No version information */ +- if (r < 0) +- return r; +- if (startswith(v, "systemd-boot ")) { +- _cleanup_free_ char *dest_path = NULL; +- +- dest_path = path_join(p, de->d_name); +- if (!dest_path) +- return log_oom(); +- +- RET_GATHER(ret, copy_file_with_version_check(source_path, dest_path, /* force = */ false)); +- } +- } +- +- return ret; +-} + + static int copy_one_file(const char *esp_path, const char *name, bool force) { + char *root = IN_SET(arg_install_source, ARG_INSTALL_SOURCE_AUTO, ARG_INSTALL_SOURCE_IMAGE) ? arg_root : NULL; +@@ -416,12 +376,9 @@ static int copy_one_file(const char *esp_path, const char *name, bool force) { + if (r < 0) + return log_error_errno(r, "Failed to resolve path %s under directory %s: %m", v, esp_path); + +- RET_GATHER(ret, copy_file_with_version_check(source_path, default_dest_path, force)); +- +- /* If we were installed under any other name in /EFI/BOOT, make sure we update those binaries +- * as well. */ +- if (!force) +- RET_GATHER(ret, update_efi_boot_binaries(esp_path, source_path)); ++ r = copy_file_with_version_check(source_path, default_dest_path, force); ++ if (r < 0 && ret == 0) ++ ret = r; + } + + return ret; +@@ -1102,6 +1059,9 @@ static int remove_boot_efi(const char *esp_path) { + if (!endswith_no_case(de->d_name, ".efi")) + continue; + ++ if (!startswith_no_case(de->d_name, "boot")) ++ continue; ++ + fd = openat(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC); + if (fd < 0) + return log_error_errno(errno, "Failed to open \"%s/%s\" for reading: %m", p, de->d_name); +diff --git a/src/bootctl/bootctl-status.c b/src/bootctl/bootctl-status.c +index 6bcb348935..fe753510ce 100644 +--- a/src/bootctl/bootctl-status.c ++++ b/src/bootctl/bootctl-status.c +@@ -187,6 +187,7 @@ static int status_variables(void) { + static int enumerate_binaries( + const char *esp_path, + const char *path, ++ const char *prefix, + char **previous, + bool *is_first) { + +@@ -212,6 +213,9 @@ static int enumerate_binaries( + if (!endswith_no_case(de->d_name, ".efi")) + continue; + ++ if (prefix && !startswith_no_case(de->d_name, prefix)) ++ continue; ++ + filename = path_join(p, de->d_name); + if (!filename) + return log_oom(); +@@ -268,11 +272,11 @@ static int status_binaries(const char *esp_path, sd_id128_t partition) { + printf(" (/dev/disk/by-partuuid/" SD_ID128_UUID_FORMAT_STR ")", SD_ID128_FORMAT_VAL(partition)); + printf("\n"); + +- r = enumerate_binaries(esp_path, "EFI/systemd", &last, &is_first); ++ r = enumerate_binaries(esp_path, "EFI/systemd", NULL, &last, &is_first); + if (r < 0) + goto fail; + +- k = enumerate_binaries(esp_path, "EFI/BOOT", &last, &is_first); ++ k = enumerate_binaries(esp_path, "EFI/BOOT", "boot", &last, &is_first); + if (k < 0) { + r = k; + goto fail; diff --git a/pkgs/os-specific/linux/systemd/0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch b/pkgs/os-specific/linux/systemd/0019-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch similarity index 87% rename from pkgs/os-specific/linux/systemd/0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch rename to pkgs/os-specific/linux/systemd/0019-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch index eb06459a560d..a1b1575a51d2 100644 --- a/pkgs/os-specific/linux/systemd/0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch +++ b/pkgs/os-specific/linux/systemd/0019-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch @@ -13,10 +13,10 @@ directly. 1 file changed, 11 insertions(+) diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c -index 5c308a04bc..81aa3d3334 100644 +index d002501d29..9b835dc031 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c -@@ -21,6 +21,11 @@ +@@ -23,6 +23,11 @@ #include "timesyncd-conf.h" #include "timesyncd-manager.h" #include "user-util.h" @@ -26,9 +26,9 @@ index 5c308a04bc..81aa3d3334 100644 +extern void __nss_disable_nscd(void (*)(size_t, struct traced_file *)); +static void register_traced_file(size_t dbidx, struct traced_file *finfo) {} - static int advance_tstamp(int fd, const struct stat *st) { - assert_se(fd >= 0); -@@ -198,6 +203,12 @@ static int run(int argc, char *argv[]) { + static int advance_tstamp(int fd, usec_t epoch) { + assert(fd >= 0); +@@ -201,6 +206,12 @@ static int run(int argc, char *argv[]) { if (r < 0) return log_error_errno(r, "Failed to parse fallback server strings: %m"); diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 799e2824bfb1..2858da955ff6 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,5 +1,3 @@ -# NOTE: Make sure to (re-)format this file on changes with `nixpkgs-fmt`! - { stdenv, lib, @@ -8,7 +6,6 @@ testers, fetchFromGitHub, fetchzip, - fetchpatch2, buildPackages, makeBinaryWrapper, ninja, @@ -188,14 +185,14 @@ assert withBootloader -> withEfi; let wantCurl = withRemote || withImportd; wantGcrypt = withResolved || withImportd; - version = "256.9"; + version = "257.1"; # Use the command below to update `releaseTimestamp` on every (major) version # change. More details in the commentary at mesonFlags. # command: # $ curl -s https://api.github.com/repos/systemd/systemd/releases/latest | \ # jq '.created_at|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime' - releaseTimestamp = "1720202583"; + releaseTimestamp = "1734643670"; in stdenv.mkDerivation (finalAttrs: { inherit pname version; @@ -206,7 +203,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "systemd"; repo = "systemd"; rev = "v${version}"; - hash = "sha256-Pp75XXF1R0XEzowRIw4BA/SSCQq8K4YVoPlmXrkU9nQ="; + hash = "sha256-w+PBpu3XjYob2VYh8FHU4sUZaWHVO9k5g0/vIj0cTvo="; }; # On major changes, or when otherwise required, you *must* : @@ -236,51 +233,43 @@ stdenv.mkDerivation (finalAttrs: { ./0015-tpm2_context_init-fix-driver-name-checking.patch ./0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch ./0017-meson.build-do-not-create-systemdstatedir.patch - - # https://github.com/systemd/systemd/issues/33392 - (fetchpatch2 { - url = "https://github.com/systemd/systemd/commit/f8b02a56febf14adf2474875a1b6625f1f346a6f.patch?full_index=1"; - hash = "sha256-qRW92gPtACjk+ifptkw5mujhHlkCF56M3azGIjLiMKE="; - revert = true; - }) + ./0018-Revert-bootctl-update-list-remove-all-instances-of-s.patch # https://github.com/systemd/systemd/issues/33392 ] - ++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu) [ - ./0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch + ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu) [ + ./0019-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch ] - ++ lib.optional stdenv.hostPlatform.isMusl ( + ++ lib.optionals stdenv.hostPlatform.isMusl ( let oe-core = fetchzip { - url = "https://git.openembedded.org/openembedded-core/snapshot/openembedded-core-89b75b46371d5e9172cb496b461824d8551a2af5.tar.gz"; - hash = "sha256-etdIIdo3FezVafEYP5uAS9pO36Rdea2A+Da1P44cPXg="; + url = "https://git.openembedded.org/openembedded-core/snapshot/openembedded-core-86ab9abd1073474f25d0ad878d5bea01ba633772.tar.gz"; + hash = "sha256-avTJC905erZIQ3OGBNwOcCgk0fQWju6X2P1kRJGxRYI="; }; - musl-patches = oe-core + "/meta/recipes-core/systemd/systemd"; in - [ - (musl-patches + "/0004-missing_type.h-add-comparison_fn_t.patch") - (musl-patches + "/0005-add-fallback-parse_printf_format-implementation.patch") - (musl-patches + "/0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch") - (musl-patches + "/0007-add-missing-FTW_-macros-for-musl.patch") - (musl-patches + "/0008-Use-uintmax_t-for-handling-rlim_t.patch") - (musl-patches + "/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch") - (musl-patches + "/0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch") - (musl-patches + "/0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch") - (musl-patches + "/0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch") - (musl-patches + "/0013-avoid-redefinition-of-prctl_mm_map-structure.patch") - (musl-patches + "/0014-do-not-disable-buffer-in-writing-files.patch") - (musl-patches + "/0015-Handle-__cpu_mask-usage.patch") - (musl-patches + "/0016-Handle-missing-gshadow.patch") - (musl-patches + "/0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch") - (musl-patches + "/0018-pass-correct-parameters-to-getdents64.patch") - (musl-patches + "/0019-Adjust-for-musl-headers.patch") - (musl-patches + "/0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch") - (musl-patches + "/0021-errno-util-Make-STRERROR-portable-for-musl.patch") - (musl-patches + "/0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch") - (musl-patches + "/0023-shared-Do-not-use-malloc_info-on-musl.patch") - (musl-patches + "/0024-avoid-missing-LOCK_EX-declaration.patch") - (musl-patches + "/0025-include-signal.h-to-avoid-the-undeclared-error.patch") - (musl-patches + "/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch") - (musl-patches + "/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch") - (musl-patches + "/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch") + map (patch: "${oe-core}/meta/recipes-core/systemd/systemd/${patch}") [ + "0003-missing_type.h-add-comparison_fn_t.patch" + "0004-add-fallback-parse_printf_format-implementation.patch" + "0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch" + "0006-add-missing-FTW_-macros-for-musl.patch" + "0007-Use-uintmax_t-for-handling-rlim_t.patch" + "0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch" + "0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch" + "0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch" + "0011-avoid-redefinition-of-prctl_mm_map-structure.patch" + "0012-do-not-disable-buffer-in-writing-files.patch" + "0013-Handle-__cpu_mask-usage.patch" + "0014-Handle-missing-gshadow.patch" + "0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch" + "0016-pass-correct-parameters-to-getdents64.patch" + "0017-Adjust-for-musl-headers.patch" + "0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch" + "0019-errno-util-Make-STRERROR-portable-for-musl.patch" + "0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch" + "0021-shared-Do-not-use-malloc_info-on-musl.patch" + "0022-avoid-missing-LOCK_EX-declaration.patch" + "0023-include-signal.h-to-avoid-the-undeclared-error.patch" + "0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch" + "0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch" + "0026-build-path.c-avoid-boot-time-segfault-for-musl.patch" ] ); @@ -437,6 +426,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonOption "tty-gid" "3") # tty in NixOS has gid 3 (lib.mesonOption "debug-shell" "${bashInteractive}/bin/bash") (lib.mesonOption "pamconfdir" "${placeholder "out"}/etc/pam.d") + (lib.mesonOption "shellprofiledir" "${placeholder "out"}/etc/profile.d") (lib.mesonOption "kmod-path" "${kmod}/bin/kmod") # Attempts to check /usr/sbin and that fails in macOS sandbox because @@ -677,6 +667,8 @@ stdenv.mkDerivation (finalAttrs: { "src/import/importd.c" # runs `tar` but also also creates a temporary directory with the string "src/import/pull-tar.c" + # tar referenced as file suffix + "src/shared/import-util.c" ]; } ]