nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

systemd: 254.6 -> 255.2

Removed patches:

- 0007-Fix-hwdb-paths.patch

The directory we want seems to already be included in the list. Is there
a reason why we want to restrict it further?

- 0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch

This patch has little to do with how the meson.build file looks now. The
new patch 0017 is the successor to this one.

- 0015-pkg-config-derive-prefix-from-prefix.patch

This is fixed upstream. We don't need this anymore.

nikstur 748378a3 329de0f5

+287 -300
+2 -2
nixos/modules/system/boot/luksroot.nix
··· 1076 1076 boot.initrd.systemd = { 1077 1077 contents."/etc/crypttab".source = stage1Crypttab; 1078 1078 1079 - extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup"; 1079 + extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup"; 1080 1080 1081 1081 additionalUpstreamUnits = [ 1082 1082 "cryptsetup-pre.target" ··· 1084 1084 "remote-cryptsetup.target" 1085 1085 ]; 1086 1086 storePaths = [ 1087 - "${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup" 1087 + "${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup" 1088 1088 "${config.boot.initrd.systemd.package}/lib/systemd/system-generators/systemd-cryptsetup-generator" 1089 1089 ]; 1090 1090
+3
nixos/modules/system/boot/systemd/initrd.nix
··· 70 70 "systemd-tmpfiles-setup.service" 71 71 "timers.target" 72 72 "umount.target" 73 + "systemd-bsod.service" 73 74 ] ++ cfg.additionalUpstreamUnits; 74 75 75 76 upstreamWants = [ ··· 425 424 426 425 storePaths = [ 427 426 # systemd tooling 427 + "${cfg.package}/lib/systemd/systemd-executor" 428 428 "${cfg.package}/lib/systemd/systemd-fsck" 429 429 "${cfg.package}/lib/systemd/systemd-hibernate-resume" 430 430 "${cfg.package}/lib/systemd/systemd-journald" ··· 435 433 "${cfg.package}/lib/systemd/systemd-shutdown" 436 434 "${cfg.package}/lib/systemd/systemd-sulogin-shell" 437 435 "${cfg.package}/lib/systemd/systemd-sysctl" 436 + "${cfg.package}/lib/systemd/systemd-bsod" 438 437 439 438 # generators 440 439 "${cfg.package}/lib/systemd/system-generators/systemd-debug-generator"
+2 -2
pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch
··· 13 13 1 file changed, 4 deletions(-) 14 14 15 15 diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in 16 - index c0defc31de..8f80235731 100644 16 + index 0d68f31d36..6b52f7ed4b 100644 17 17 --- a/rules.d/99-systemd.rules.in 18 18 +++ b/rules.d/99-systemd.rules.in 19 - @@ -20,10 +20,6 @@ SUBSYSTEM=="block", TAG+="systemd" 19 + @@ -22,10 +22,6 @@ SUBSYSTEM=="block", TAG+="systemd" 20 20 SUBSYSTEM=="block", ENV{DM_SUSPENDED}=="1", IMPORT{db}="SYSTEMD_READY", GOTO="systemd_end" 21 21 SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" 22 22
+3 -3
pkgs/os-specific/linux/systemd/0002-Don-t-try-to-unmount-nix-or-nix-store.patch
··· 14 14 2 files changed, 6 insertions(+), 2 deletions(-) 15 15 16 16 diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c 17 - index 4ffec25c75..b99031c54e 100644 17 + index 55e76b6e16..015a608035 100644 18 18 --- a/src/shared/fstab-util.c 19 19 +++ b/src/shared/fstab-util.c 20 - @@ -43,6 +43,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) { 20 + @@ -66,6 +66,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) { 21 21 /* Don't bother with the OS data itself */ 22 22 if (PATH_IN_SET(mount, 23 23 "/", ··· 27 27 "/etc")) 28 28 return true; 29 29 diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c 30 - index 1586c2e214..fcae95f824 100644 30 + index 1a9b99d761..04ef9af1ea 100644 31 31 --- a/src/shutdown/umount.c 32 32 +++ b/src/shutdown/umount.c 33 33 @@ -170,8 +170,10 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) {
+3 -3
pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
··· 10 10 1 file changed, 2 insertions(+) 11 11 12 12 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c 13 - index e170958fc5..898a674631 100644 13 + index 38196ef3d6..57d1750b00 100644 14 14 --- a/src/nspawn/nspawn.c 15 15 +++ b/src/nspawn/nspawn.c 16 - @@ -5648,6 +5648,7 @@ static int run(int argc, char *argv[]) { 16 + @@ -5602,6 +5602,7 @@ static int run(int argc, char *argv[]) { 17 17 goto finish; 18 18 } 19 19 } else { ··· 21 21 _cleanup_free_ char *p = NULL; 22 22 23 23 if (arg_pivot_root_new) 24 - @@ -5662,6 +5663,7 @@ static int run(int argc, char *argv[]) { 24 + @@ -5618,6 +5619,7 @@ static int run(int argc, char *argv[]) { 25 25 "Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.", arg_directory); 26 26 goto finish; 27 27 }
+14 -13
pkgs/os-specific/linux/systemd/0004-Add-some-NixOS-specific-unit-directories.patch
··· 11 11 12 12 Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com> 13 13 --- 14 - src/basic/path-lookup.c | 17 ++--------------- 14 + src/basic/path-lookup.c | 18 ++---------------- 15 15 src/core/systemd.pc.in | 8 ++++---- 16 - 2 files changed, 6 insertions(+), 19 deletions(-) 16 + 2 files changed, 6 insertions(+), 20 deletions(-) 17 17 18 18 diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c 19 - index 7d158a8295..f9bd62b631 100644 19 + index 4e3d59fc56..0d18b9a2d0 100644 20 20 --- a/src/basic/path-lookup.c 21 21 +++ b/src/basic/path-lookup.c 22 22 @@ -92,11 +92,7 @@ int xdg_user_data_dir(char **ret, const char *suffix) { ··· 31 31 NULL 32 32 }; 33 33 34 - @@ -617,15 +613,13 @@ int lookup_paths_init( 34 + @@ -613,16 +609,13 @@ int lookup_paths_init( 35 35 persistent_config, 36 36 SYSTEM_CONFIG_UNIT_DIR, 37 37 "/etc/systemd/system", ··· 44 44 - "/usr/local/lib/systemd/system", 45 45 SYSTEM_DATA_UNIT_DIR, 46 46 - "/usr/lib/systemd/system", 47 + - /* To be used ONLY for images which might be legacy split-usr */ 47 48 - STRV_IFNOTNULL(flags & LOOKUP_PATHS_SPLIT_USR ? "/lib/systemd/system" : NULL), 48 49 STRV_IFNOTNULL(generator_late)); 49 50 break; 50 51 51 - @@ -641,14 +635,11 @@ int lookup_paths_init( 52 + @@ -638,14 +631,11 @@ int lookup_paths_init( 52 53 persistent_config, 53 54 USER_CONFIG_UNIT_DIR, 54 55 "/etc/systemd/user", ··· 65 64 STRV_IFNOTNULL(generator_late)); 66 65 break; 67 66 68 - @@ -808,7 +799,6 @@ char **generator_binary_paths(RuntimeScope scope) { 67 + @@ -805,7 +795,6 @@ char **generator_binary_paths(RuntimeScope scope) { 69 68 case RUNTIME_SCOPE_SYSTEM: 70 69 add = strv_new("/run/systemd/system-generators", 71 70 "/etc/systemd/system-generators", ··· 73 72 SYSTEM_GENERATOR_DIR); 74 73 break; 75 74 76 - @@ -816,7 +806,6 @@ char **generator_binary_paths(RuntimeScope scope) { 75 + @@ -813,7 +802,6 @@ char **generator_binary_paths(RuntimeScope scope) { 77 76 case RUNTIME_SCOPE_USER: 78 77 add = strv_new("/run/systemd/user-generators", 79 78 "/etc/systemd/user-generators", ··· 81 80 USER_GENERATOR_DIR); 82 81 break; 83 82 84 - @@ -855,14 +844,12 @@ char **env_generator_binary_paths(RuntimeScope runtime_scope) { 83 + @@ -852,14 +840,12 @@ char **env_generator_binary_paths(RuntimeScope runtime_scope) { 85 84 case RUNTIME_SCOPE_SYSTEM: 86 85 add = strv_new("/run/systemd/system-environment-generators", 87 86 "/etc/systemd/system-environment-generators", ··· 97 96 break; 98 97 99 98 diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in 100 - index 693433b34b..5932a21b5b 100644 99 + index f3b85b0190..8ae544b495 100644 101 100 --- a/src/core/systemd.pc.in 102 101 +++ b/src/core/systemd.pc.in 103 - @@ -38,10 +38,10 @@ systemdsystemconfdir=${systemd_system_conf_dir} 102 + @@ -43,10 +43,10 @@ systemdsystemconfdir=${systemd_system_conf_dir} 104 103 systemd_user_conf_dir=${sysconfdir}/systemd/user 105 104 systemduserconfdir=${systemd_user_conf_dir} 106 105 ··· 112 111 +systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/user:${systemduserunitdir} 113 112 systemduserunitpath=${systemd_user_unit_path} 114 113 115 - systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators 116 - @@ -50,10 +50,10 @@ systemdsystemgeneratordir=${systemd_system_generator_dir} 114 + systemd_system_generator_dir=${prefix}/lib/systemd/system-generators 115 + @@ -55,10 +55,10 @@ systemdsystemgeneratordir=${systemd_system_generator_dir} 117 116 systemd_user_generator_dir=${prefix}/lib/systemd/user-generators 118 117 systemdusergeneratordir=${systemd_user_generator_dir} 119 118 ··· 125 124 +systemd_user_generator_path=/run/systemd/user-generators:/etc/systemd/user-generators:${systemd_user_generator_dir} 126 125 systemdusergeneratorpath=${systemd_user_generator_path} 127 126 128 - systemd_sleep_dir=${root_prefix}/lib/systemd/system-sleep 127 + systemd_sleep_dir=${prefix}/lib/systemd/system-sleep
+2 -2
pkgs/os-specific/linux/systemd/0005-Get-rid-of-a-useless-message-in-user-sessions.patch
··· 13 13 1 file changed, 2 insertions(+), 1 deletion(-) 14 14 15 15 diff --git a/src/core/manager.c b/src/core/manager.c 16 - index 22ec6e79b1..771e8e7f16 100644 16 + index e61ebee253..22cc5cc843 100644 17 17 --- a/src/core/manager.c 18 18 +++ b/src/core/manager.c 19 - @@ -1559,7 +1559,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) { 19 + @@ -1562,7 +1562,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) { 20 20 if (!unit_is_bound_by_inactive(u, &culprit)) 21 21 continue; 22 22
+6 -6
pkgs/os-specific/linux/systemd/0006-hostnamed-localed-timedated-disable-methods-that-cha.patch
··· 11 11 3 files changed, 25 insertions(+) 12 12 13 13 diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c 14 - index 9ef45f8e75..99b1ec2e36 100644 14 + index e1d53f2395..a224e6dadc 100644 15 15 --- a/src/hostname/hostnamed.c 16 16 +++ b/src/hostname/hostnamed.c 17 17 @@ -1053,6 +1053,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_ ··· 35 35 36 36 context_read_machine_info(c); 37 37 diff --git a/src/locale/localed.c b/src/locale/localed.c 38 - index f544a73580..ce00c262cc 100644 38 + index 5d96237fae..9af35cd29c 100644 39 39 --- a/src/locale/localed.c 40 40 +++ b/src/locale/localed.c 41 41 @@ -229,6 +229,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er ··· 69 69 70 70 r = x11_context_verify_and_warn(&in, LOG_ERR, error); 71 71 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c 72 - index ad1d492d6b..331af34505 100644 72 + index c7be30f563..50f8aa8675 100644 73 73 --- a/src/timedate/timedated.c 74 74 +++ b/src/timedate/timedated.c 75 - @@ -665,6 +665,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error * 75 + @@ -659,6 +659,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error * 76 76 if (r < 0) 77 77 return r; 78 78 ··· 83 83 if (!timezone_is_valid(z, LOG_DEBUG)) 84 84 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid or not installed time zone '%s'", z); 85 85 86 - @@ -743,6 +747,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error 86 + @@ -737,6 +741,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error 87 87 if (r < 0) 88 88 return r; 89 89 ··· 93 93 if (lrtc == c->local_rtc && !fix_system) 94 94 return sd_bus_reply_method_return(m, NULL); 95 95 96 - @@ -923,6 +930,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error 96 + @@ -917,6 +924,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error 97 97 if (r < 0) 98 98 return r; 99 99
-24
pkgs/os-specific/linux/systemd/0007-Fix-hwdb-paths.patch
··· 1 - From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 - From: Nikolay Amiantov <ab@fmap.me> 3 - Date: Thu, 7 Jul 2016 02:47:13 +0300 4 - Subject: [PATCH] Fix hwdb paths 5 - 6 - Patch by vcunat. 7 - --- 8 - src/libsystemd/sd-hwdb/hwdb-internal.h | 6 +----- 9 - 1 file changed, 1 insertion(+), 5 deletions(-) 10 - 11 - diff --git a/src/libsystemd/sd-hwdb/hwdb-internal.h b/src/libsystemd/sd-hwdb/hwdb-internal.h 12 - index 5302679a62..39e59a527f 100644 13 - --- a/src/libsystemd/sd-hwdb/hwdb-internal.h 14 - +++ b/src/libsystemd/sd-hwdb/hwdb-internal.h 15 - @@ -83,8 +83,4 @@ struct trie_value_entry2_f { 16 - } _packed_; 17 - 18 - #define hwdb_bin_paths \ 19 - - "/etc/systemd/hwdb/hwdb.bin\0" \ 20 - - "/etc/udev/hwdb.bin\0" \ 21 - - "/usr/lib/systemd/hwdb/hwdb.bin\0" \ 22 - - _CONF_PATHS_SPLIT_USR_NULSTR("systemd/hwdb/hwdb.bin") \ 23 - - UDEVLIBEXECDIR "/hwdb.bin\0" 24 - + "/etc/udev/hwdb.bin\0"
+13 -13
pkgs/os-specific/linux/systemd/0008-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch pkgs/os-specific/linux/systemd/0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
··· 35 35 <literal>Etc/UTC</literal>. The resulting link should lead to the 36 36 corresponding binary 37 37 diff --git a/src/basic/time-util.c b/src/basic/time-util.c 38 - index 1db630003a..31744c3e68 100644 38 + index f9014dc560..3ee0363369 100644 39 39 --- a/src/basic/time-util.c 40 40 +++ b/src/basic/time-util.c 41 - @@ -1350,7 +1350,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) { 41 + @@ -1412,7 +1412,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) { 42 42 43 43 assert(ret); 44 44 ··· 47 47 if (!f) 48 48 return -errno; 49 49 50 - @@ -1391,7 +1391,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) { 50 + @@ -1453,7 +1453,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) { 51 51 52 52 assert(ret); 53 53 ··· 56 56 if (!f) 57 57 return -errno; 58 58 59 - @@ -1503,7 +1503,7 @@ int verify_timezone(const char *name, int log_level) { 59 + @@ -1565,7 +1565,7 @@ int verify_timezone(const char *name, int log_level) { 60 60 if (p - name >= PATH_MAX) 61 61 return -ENAMETOOLONG; 62 62 ··· 65 65 66 66 fd = open(t, O_RDONLY|O_CLOEXEC); 67 67 if (fd < 0) 68 - @@ -1563,7 +1563,7 @@ int get_timezone(char **ret) { 68 + @@ -1625,7 +1625,7 @@ int get_timezone(char **ret) { 69 69 if (r < 0) 70 70 return r; /* returns EINVAL if not a symlink */ 71 71 ··· 75 75 return -EINVAL; 76 76 77 77 diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c 78 - index 1956ab3b13..9ef356f8af 100644 78 + index f77a5f6266..63bac85b29 100644 79 79 --- a/src/firstboot/firstboot.c 80 80 +++ b/src/firstboot/firstboot.c 81 - @@ -630,7 +630,7 @@ static int process_timezone(int rfd) { 81 + @@ -632,7 +632,7 @@ static int process_timezone(int rfd) { 82 82 if (isempty(arg_timezone)) 83 83 return 0; 84 84 ··· 88 88 r = symlinkat_atomic_full(e, pfd, f, /* make_relative= */ false); 89 89 if (r < 0) 90 90 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c 91 - index 898a674631..c41a416e04 100644 91 + index e48ebe8342..41796f3358 100644 92 92 --- a/src/nspawn/nspawn.c 93 93 +++ b/src/nspawn/nspawn.c 94 - @@ -1924,8 +1924,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid 94 + @@ -1845,8 +1845,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid 95 95 static const char *timezone_from_path(const char *path) { 96 96 return PATH_STARTSWITH_SET( 97 97 path, ··· 103 103 104 104 static bool etc_writable(void) { 105 105 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c 106 - index 331af34505..722c4b5b4f 100644 106 + index 50f8aa8675..aff156ab42 100644 107 107 --- a/src/timedate/timedated.c 108 108 +++ b/src/timedate/timedated.c 109 - @@ -282,7 +282,7 @@ static int context_read_data(Context *c) { 109 + @@ -276,7 +276,7 @@ static int context_read_data(Context *c) { 110 110 111 111 r = get_timezone(&t); 112 112 if (r == -EINVAL) ··· 115 115 else if (r < 0) 116 116 log_warning_errno(r, "Failed to get target of /etc/localtime: %m"); 117 117 118 - @@ -306,7 +306,7 @@ static int context_write_data_timezone(Context *c) { 118 + @@ -300,7 +300,7 @@ static int context_write_data_timezone(Context *c) { 119 119 120 120 if (isempty(c->zone) || streq(c->zone, "UTC")) { 121 121 ··· 124 124 125 125 if (unlink("/etc/localtime") < 0 && errno != ENOENT) 126 126 return -errno; 127 - @@ -314,9 +314,9 @@ static int context_write_data_timezone(Context *c) { 127 + @@ -308,9 +308,9 @@ static int context_write_data_timezone(Context *c) { 128 128 return 0; 129 129 } 130 130
+1 -1
pkgs/os-specific/linux/systemd/0009-localectl-use-etc-X11-xkb-for-list-x11.patch pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch
··· 10 10 1 file changed, 1 insertion(+), 1 deletion(-) 11 11 12 12 diff --git a/src/locale/localectl.c b/src/locale/localectl.c 13 - index d8db9d9d22..4601bb5431 100644 13 + index 32354027f1..1d231f1afc 100644 14 14 --- a/src/locale/localectl.c 15 15 +++ b/src/locale/localectl.c 16 16 @@ -297,7 +297,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
-23
pkgs/os-specific/linux/systemd/0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
··· 1 - From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 - From: Franz Pletz <fpletz@fnordicwalking.de> 3 - Date: Sun, 11 Feb 2018 04:37:44 +0100 4 - Subject: [PATCH] build: don't create statedir and don't touch prefixdir 5 - 6 - --- 7 - meson.build | 3 --- 8 - 1 file changed, 3 deletions(-) 9 - 10 - diff --git a/meson.build b/meson.build 11 - index 395eca1943..082cd748bb 100644 12 - --- a/meson.build 13 - +++ b/meson.build 14 - @@ -4707,9 +4707,6 @@ install_data('LICENSE.GPL2', 15 - install_subdir('LICENSES', 16 - install_dir : docdir) 17 - 18 - -meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir)) 19 - -meson.add_install_script('sh', '-c', 'touch $DESTDIR@0@'.format(prefixdir)) 20 - - 21 - ############################################################ 22 - 23 - # Ensure that changes to the docs/ directory do not break the
+8 -8
pkgs/os-specific/linux/systemd/0011-add-rootprefix-to-lookup-dir-paths.patch pkgs/os-specific/linux/systemd/0009-add-rootprefix-to-lookup-dir-paths.patch
··· 12 12 1 file changed, 4 insertions(+), 2 deletions(-) 13 13 14 14 diff --git a/src/basic/constants.h b/src/basic/constants.h 15 - index 3f96786da9..6e8fb40c08 100644 15 + index 6bb5f3c281..678d13737d 100644 16 16 --- a/src/basic/constants.h 17 17 +++ b/src/basic/constants.h 18 - @@ -74,13 +74,15 @@ 18 + @@ -65,13 +65,15 @@ 19 + "/etc/" n "\0" \ 19 20 "/run/" n "\0" \ 20 21 "/usr/local/lib/" n "\0" \ 21 - "/usr/lib/" n "\0" \ 22 - - _CONF_PATHS_SPLIT_USR_NULSTR(n) 23 - + _CONF_PATHS_SPLIT_USR_NULSTR(n) \ 24 - + ROOTPREFIX "/lib/" n "\0" 22 + - "/usr/lib/" n "\0" 23 + + "/usr/lib/" n "\0" \ 24 + + PREFIX "/lib/" n "\0" 25 25 26 26 #define CONF_PATHS_USR(n) \ 27 27 "/etc/" n, \ ··· 29 29 "/usr/local/lib/" n, \ 30 30 - "/usr/lib/" n 31 31 + "/usr/lib/" n, \ 32 - + ROOTPREFIX "/lib/" n 32 + + PREFIX "/lib/" n 33 33 34 34 #define CONF_PATHS(n) \ 35 - CONF_PATHS_USR(n) \ 35 + CONF_PATHS_USR(n)
+2 -2
pkgs/os-specific/linux/systemd/0012-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch pkgs/os-specific/linux/systemd/0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
··· 10 10 1 file changed, 1 insertion(+) 11 11 12 12 diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c 13 - index 8395bb429d..14fbc85bb4 100644 13 + index b976b7d8cf..b1c02df6fd 100644 14 14 --- a/src/shutdown/shutdown.c 15 15 +++ b/src/shutdown/shutdown.c 16 - @@ -334,6 +334,7 @@ static void init_watchdog(void) { 16 + @@ -336,6 +336,7 @@ static void init_watchdog(void) { 17 17 int main(int argc, char *argv[]) { 18 18 static const char* const dirs[] = { 19 19 SYSTEM_SHUTDOWN_PATH,
+2 -2
pkgs/os-specific/linux/systemd/0013-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch pkgs/os-specific/linux/systemd/0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
··· 9 9 1 file changed, 1 insertion(+) 10 10 11 11 diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c 12 - index de1f6c7ec1..d0cdebd80a 100644 12 + index 21af3e9e52..6d096e3c78 100644 13 13 --- a/src/sleep/sleep.c 14 14 +++ b/src/sleep/sleep.c 15 - @@ -224,6 +224,7 @@ static int execute( 15 + @@ -215,6 +215,7 @@ static int execute( 16 16 }; 17 17 static const char* const dirs[] = { 18 18 SYSTEM_SLEEP_PATH,
+9 -11
pkgs/os-specific/linux/systemd/0014-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch pkgs/os-specific/linux/systemd/0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
··· 10 10 1 file changed, 3 insertions(+), 3 deletions(-) 11 11 12 12 diff --git a/src/basic/path-util.h b/src/basic/path-util.h 13 - index 97175bee11..3839704901 100644 13 + index 6d943e967f..d4380aa7e3 100644 14 14 --- a/src/basic/path-util.h 15 15 +++ b/src/basic/path-util.h 16 - @@ -25,11 +25,11 @@ 16 + @@ -25,9 +25,9 @@ 17 17 # define PATH_SBIN_BIN_NULSTR(x) PATH_NORMAL_SBIN_BIN_NULSTR(x) 18 18 #endif 19 19 20 - -#define DEFAULT_PATH_NORMAL PATH_SBIN_BIN("/usr/local/") ":" PATH_SBIN_BIN("/usr/") 21 - -#define DEFAULT_PATH_NORMAL_NULSTR PATH_SBIN_BIN_NULSTR("/usr/local/") PATH_SBIN_BIN_NULSTR("/usr/") 22 - +#define DEFAULT_PATH_NORMAL "@defaultPathNormal@" 23 - +#define DEFAULT_PATH_NORMAL_NULSTR "@defaultPathNormal@\0" 24 - #define DEFAULT_PATH_SPLIT_USR DEFAULT_PATH_NORMAL ":" PATH_SBIN_BIN("/") 25 - #define DEFAULT_PATH_SPLIT_USR_NULSTR DEFAULT_PATH_NORMAL_NULSTR PATH_SBIN_BIN_NULSTR("/") 20 + -#define DEFAULT_PATH PATH_SBIN_BIN("/usr/local/") ":" PATH_SBIN_BIN("/usr/") 21 + -#define DEFAULT_PATH_NULSTR PATH_SBIN_BIN_NULSTR("/usr/local/") PATH_SBIN_BIN_NULSTR("/usr/") 26 22 -#define DEFAULT_PATH_COMPAT PATH_SPLIT_SBIN_BIN("/usr/local/") ":" PATH_SPLIT_SBIN_BIN("/usr/") ":" PATH_SPLIT_SBIN_BIN("/") 27 - +#define DEFAULT_PATH_COMPAT DEFAULT_PATH_NORMAL 23 + +#define DEFAULT_PATH "@defaultPathNormal@" 24 + +#define DEFAULT_PATH_NULSTR "@defaultPathNormal@\0" 25 + +#define DEFAULT_PATH_COMPAT DEFAULT_PATH 28 26 29 - #if HAVE_SPLIT_USR 30 - # define DEFAULT_PATH DEFAULT_PATH_SPLIT_USR 27 + #ifndef DEFAULT_USER_PATH 28 + # define DEFAULT_USER_PATH DEFAULT_PATH
-30
pkgs/os-specific/linux/systemd/0015-pkg-config-derive-prefix-from-prefix.patch
··· 1 - From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 - From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io> 3 - Date: Sun, 6 Dec 2020 08:34:19 +0100 4 - Subject: [PATCH] pkg-config: derive prefix from --prefix 5 - 6 - Point prefix to the one configured, instead of `/usr` `systemd` has limited 7 - support for making the pkgconfig prefix overridable, and interpolates those 8 - values later down. 9 - 10 - So we only need to patch this one value to get the correct paths. 11 - See systemd/systemd@bc4e6e27922a2873985ab9367d79fb099f70b505 for details. 12 - 13 - Co-Authored-By: Florian Klink <flokli@flokli.de> 14 - --- 15 - src/core/systemd.pc.in | 2 +- 16 - 1 file changed, 1 insertion(+), 1 deletion(-) 17 - 18 - diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in 19 - index 5932a21b5b..20bf8e316d 100644 20 - --- a/src/core/systemd.pc.in 21 - +++ b/src/core/systemd.pc.in 22 - @@ -11,7 +11,7 @@ 23 - # considered deprecated (though there is no plan to remove them). New names 24 - # shall have underscores. 25 - 26 - -prefix=/usr 27 - +prefix={{PREFIX}} 28 - root_prefix={{ROOTPREFIX_NOSLASH}} 29 - rootprefix=${root_prefix} 30 - sysconf_dir={{SYSCONF_DIR}}
+2 -2
pkgs/os-specific/linux/systemd/0016-inherit-systemd-environment-when-calling-generators.patch pkgs/os-specific/linux/systemd/0013-inherit-systemd-environment-when-calling-generators.patch
··· 16 16 1 file changed, 8 insertions(+) 17 17 18 18 diff --git a/src/core/manager.c b/src/core/manager.c 19 - index 771e8e7f16..acf3ead8d7 100644 19 + index 22cc5cc843..5dc7d4504f 100644 20 20 --- a/src/core/manager.c 21 21 +++ b/src/core/manager.c 22 - @@ -3899,9 +3899,17 @@ static int build_generator_environment(Manager *m, char ***ret) { 22 + @@ -3914,9 +3914,17 @@ static int build_generator_environment(Manager *m, char ***ret) { 23 23 * adjust generated units to that. Let's pass down some bits of information that are easy for us to 24 24 * determine (but a bit harder for generator scripts to determine), as environment variables. */ 25 25
+7 -8
pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch pkgs/os-specific/linux/systemd/0014-core-don-t-taint-on-unmerged-usr.patch
··· 13 13 14 14 See also: https://github.com/systemd/systemd/issues/24191 15 15 --- 16 - src/core/manager.c | 4 ---- 17 - 1 file changed, 4 deletions(-) 16 + src/core/manager.c | 3 --- 17 + 1 file changed, 3 deletions(-) 18 18 19 19 diff --git a/src/core/manager.c b/src/core/manager.c 20 - index acf3ead8d7..bdbab16829 100644 20 + index 5dc7d4504f..6208c9aa31 100644 21 21 --- a/src/core/manager.c 22 22 +++ b/src/core/manager.c 23 - @@ -4754,10 +4754,6 @@ char* manager_taint_string(const Manager *m) { 24 - if (m->taint_usr) 25 - stage[n++] = "split-usr"; 23 + @@ -4800,9 +4800,6 @@ char* manager_taint_string(const Manager *m) { 24 + const char* stage[12] = {}; 25 + size_t n = 0; 26 26 27 27 - _cleanup_free_ char *usrbin = NULL; 28 28 - if (readlink_malloc("/bin", &usrbin) < 0 || !PATH_IN_SET(usrbin, "usr/bin", "/usr/bin")) 29 29 - stage[n++] = "unmerged-usr"; 30 - - 30 + 31 31 if (access("/proc/cgroups", F_OK) < 0) 32 32 stage[n++] = "cgroups-missing"; 33 -
+21
pkgs/os-specific/linux/systemd/0017-meson.build-do-not-create-systemdstatedir.patch
··· 1 + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 2 + From: nikstur <nikstur@outlook.com> 3 + Date: Mon, 6 Nov 2023 22:51:38 +0100 4 + Subject: [PATCH] meson.build: do not create systemdstatedir 5 + 6 + --- 7 + meson.build | 1 - 8 + 1 file changed, 1 deletion(-) 9 + 10 + diff --git a/meson.build b/meson.build 11 + index 7419e2b0b0..c82a527976 100644 12 + --- a/meson.build 13 + +++ b/meson.build 14 + @@ -2497,7 +2497,6 @@ install_data('LICENSE.GPL2', 15 + install_subdir('LICENSES', 16 + install_dir : docdir) 17 + 18 + -install_emptydir(systemdstatedir) 19 + 20 + ############################################################ 21 +
+3 -3
pkgs/os-specific/linux/systemd/0018-tpm2_context_init-fix-driver-name-checking.patch pkgs/os-specific/linux/systemd/0015-tpm2_context_init-fix-driver-name-checking.patch
··· 27 27 1 file changed, 1 insertion(+), 1 deletion(-) 28 28 29 29 diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c 30 - index ae8a8bc073..c284b244f8 100644 30 + index 5e07b88a89..8dd7315009 100644 31 31 --- a/src/shared/tpm2-util.c 32 32 +++ b/src/shared/tpm2-util.c 33 - @@ -582,7 +582,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) { 33 + @@ -654,7 +654,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) { 34 34 fn = strjoina("libtss2-tcti-", driver, ".so.0"); 35 35 36 36 /* Better safe than sorry, let's refuse strings that cannot possibly be valid driver early, before going to disk. */ 37 37 - if (!filename_is_valid(fn)) 38 38 + if (!path_is_valid(fn)) 39 - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "TPM2 driver name '%s' not valid, refusing.", driver); 39 + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "TPM2 driver name '%s' not valid, refusing.", driver); 40 40 41 41 context->tcti_dl = dlopen(fn, RTLD_NOW);
+2 -2
pkgs/os-specific/linux/systemd/0019-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch pkgs/os-specific/linux/systemd/0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch
··· 30 30 1 file changed, 3 insertions(+) 31 31 32 32 diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c 33 - index e3f25d52d5..81c9c6f6b7 100644 33 + index 367afa20f7..5777154d01 100644 34 34 --- a/src/systemctl/systemctl-edit.c 35 35 +++ b/src/systemctl/systemctl-edit.c 36 - @@ -323,6 +323,9 @@ int verb_edit(int argc, char *argv[], void *userdata) { 36 + @@ -322,6 +322,9 @@ int verb_edit(int argc, char *argv[], void *userdata) { 37 37 sd_bus *bus; 38 38 int r; 39 39
pkgs/os-specific/linux/systemd/0020-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch pkgs/os-specific/linux/systemd/0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch
+178 -140
pkgs/os-specific/linux/systemd/default.nix
··· 65 65 , libmicrohttpd 66 66 , libfido2 67 67 , p11-kit 68 + , libpwquality 69 + , qrencode 68 70 69 71 # the (optional) BPF feature requires bpftool, libbpf, clang and llvm-strip to be available during build time. 70 72 # Only libbpf should be a runtime dependency. ··· 101 99 , withHostnamed ? true 102 100 , withHwdb ? true 103 101 , withImportd ? !stdenv.hostPlatform.isMusl 102 + , withIptables ? true 104 103 , withKmod ? true 105 104 , withLibBPF ? lib.versionAtLeast buildPackages.llvmPackages.clang.version "10.0" 106 105 && (stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6") # assumes hard floats ··· 120 117 , withNss ? !stdenv.hostPlatform.isMusl 121 118 , withOomd ? true 122 119 , withPam ? true 123 - , withPasswordQuality ? false 120 + , withPasswordQuality ? true 124 121 , withPCRE2 ? true 125 122 , withPolkit ? true 126 123 , withPortabled ? !stdenv.hostPlatform.isMusl 124 + , withQrencode ? true 127 125 , withRemote ? !stdenv.hostPlatform.isMusl 128 126 , withResolved ? true 129 127 , withShellCompletions ? true ··· 136 132 , withUkify ? false # adds python to closure which is too much by default 137 133 , withUserDb ? true 138 134 , withUtmp ? !stdenv.hostPlatform.isMusl 135 + , withVmspawn ? true 139 136 # tests assume too much system access for them to be feasible for us right now 140 137 , withTests ? false 141 138 # build only libudev and libsystemd ··· 159 154 assert withUkify -> (withEfi && withBootloader); 160 155 assert withRepart -> withCryptsetup; 161 156 assert withBootloader -> withEfi; 162 - # passwdqc is not packaged in nixpkgs yet, if you want to fix this, please submit a PR. 163 - assert !withPasswordQuality; 164 157 165 158 let 166 159 wantCurl = withRemote || withImportd; 167 160 wantGcrypt = withResolved || withImportd; 168 - version = "254.6"; 161 + version = "255.2"; 169 162 170 163 # Bump this variable on every (major) version change. See below (in the meson options list) for why. 171 164 # command: 172 165 # $ curl -s https://api.github.com/repos/systemd/systemd/releases/latest | \ 173 166 # jq '.created_at|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime' 174 - releaseTimestamp = "1690536449"; 167 + releaseTimestamp = "1701895110"; 175 168 in 176 169 stdenv.mkDerivation (finalAttrs: { 177 170 inherit pname version; ··· 180 177 owner = "systemd"; 181 178 repo = "systemd-stable"; 182 179 rev = "v${version}"; 183 - hash = "sha256-Ku24ecDeQt0t7A8/adR3Jm47QZ19+wdMPyJRzCxU4uU="; 180 + hash = "sha256-8SfJY/pcH4yrDeJi0GfIUpetTbpMwyswvSu+RSfgqfY="; 184 181 }; 185 182 186 183 # On major changes, or when otherwise required, you *must* reformat the patches, ··· 195 192 ./0004-Add-some-NixOS-specific-unit-directories.patch 196 193 ./0005-Get-rid-of-a-useless-message-in-user-sessions.patch 197 194 ./0006-hostnamed-localed-timedated-disable-methods-that-cha.patch 198 - ./0007-Fix-hwdb-paths.patch 199 - ./0008-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch 200 - ./0009-localectl-use-etc-X11-xkb-for-list-x11.patch 201 - ./0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch 202 - ./0011-add-rootprefix-to-lookup-dir-paths.patch 203 - ./0012-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch 204 - ./0013-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch 205 - ./0014-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch 206 - ./0015-pkg-config-derive-prefix-from-prefix.patch 207 - ./0016-inherit-systemd-environment-when-calling-generators.patch 208 - ./0017-core-don-t-taint-on-unmerged-usr.patch 209 - ./0018-tpm2_context_init-fix-driver-name-checking.patch 210 - ./0019-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch 195 + ./0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch 196 + ./0008-localectl-use-etc-X11-xkb-for-list-x11.patch 197 + ./0009-add-rootprefix-to-lookup-dir-paths.patch 198 + ./0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch 199 + ./0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch 200 + ./0012-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch 201 + ./0013-inherit-systemd-environment-when-calling-generators.patch 202 + ./0014-core-don-t-taint-on-unmerged-usr.patch 203 + ./0015-tpm2_context_init-fix-driver-name-checking.patch 204 + ./0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch 205 + ./0017-meson.build-do-not-create-systemdstatedir.patch 211 206 ] ++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu) [ 212 - ./0020-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch 207 + ./0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch 213 208 ] ++ lib.optional stdenv.hostPlatform.isMusl ( 214 209 let 215 210 oe-core = fetchzip { ··· 291 290 { name = "libbpf.so.1"; pkg = opt withLibBPF libbpf; } 292 291 { name = "libbpf.so.0"; pkg = null; } 293 292 294 - # We did never provide support for libxkbcommon & qrencode 293 + # We did never provide support for libxkbcommon 295 294 { name = "libxkbcommon.so.0"; pkg = null; } 296 - { name = "libqrencode.so.4"; pkg = null; } 295 + 296 + # qrencode 297 + { name = "libqrencode.so.4"; pkg = opt withQrencode qrencode; } 297 298 { name = "libqrencode.so.3"; pkg = null; } 298 299 299 - # We did not provide libpwquality before so it is safe to disable it for 300 - # now. 301 - { name = "libpwquality.so.1"; pkg = null; } 300 + # Password quality 301 + # We currently do not package passwdqc, only libpwquality. 302 + { name = "libpwquality.so.1"; pkg = opt withPasswordQuality libpwquality; } 303 + { name = "libpasswdqc.so.1"; pkg = null; } 302 304 303 305 # Only include cryptsetup if it is enabled. We might not be able to 304 306 # provide it during "bootstrap" in e.g. the minimal systemd build as ··· 333 329 # Support for PKCS#11 in systemd-cryptsetup, systemd-cryptenroll and systemd-homed 334 330 { name = "libp11-kit.so.0"; pkg = opt (withHomed || withCryptsetup) p11-kit; } 335 331 336 - # Password quality support 337 - { name = "libpasswdqc.so.1"; pkg = opt withPasswordQuality null; } 332 + { name = "libip4tc.so.2"; pkg = opt withIptables iptables; } 338 333 ]; 339 334 340 335 patchDlOpen = dl: ··· 428 425 ++ lib.optional withApparmor libapparmor 429 426 ++ lib.optional withAudit audit 430 427 ++ lib.optional wantCurl (lib.getDev curl) 431 - ++ lib.optionals withCompression [ bzip2 lz4 xz zstd ] 428 + ++ lib.optionals withCompression [ zlib bzip2 lz4 xz zstd ] 432 429 ++ lib.optional withCoredump elfutils 433 430 ++ lib.optional withCryptsetup (lib.getDev cryptsetup.dev) 434 431 ++ lib.optional withKexectools kexec-tools 435 432 ++ lib.optional withKmod kmod 436 433 ++ lib.optional withLibidn2 libidn2 437 434 ++ lib.optional withLibseccomp libseccomp 438 - ++ lib.optional withNetworkd iptables 435 + ++ lib.optional withIptables iptables 439 436 ++ lib.optional withPam pam 440 437 ++ lib.optional withPCRE2 pcre2 441 438 ++ lib.optional withSelinux libselinux ··· 445 442 ++ lib.optionals withLibBPF [ libbpf ] 446 443 ++ lib.optional withTpm2Tss tpm2-tss 447 444 ++ lib.optional withUkify (python3Packages.python.withPackages (ps: with ps; [ pefile ])) 445 + ++ lib.optionals withPasswordQuality [ libpwquality ] 446 + ++ lib.optionals withQrencode [ qrencode ] 448 447 ; 449 448 450 449 mesonBuildType = "release"; 451 450 452 451 mesonFlags = [ 453 - "-Dversion-tag=${version}" 452 + # Options 453 + 454 454 # We bump this variable on every (major) version change to ensure 455 455 # that we have known-good value for a timestamp that is in the (not so distant) past. 456 456 # This serves as a lower bound for valid system timestamps during startup. Systemd will 457 457 # reset the system timestamp if this date is +- 15 years from the system time. 458 458 # See the systemd v250 release notes for further details: 459 459 # https://github.com/systemd/systemd/blob/60e930fc3e6eb8a36fbc184773119eb8d2f30364/NEWS#L258-L266 460 - "-Dtime-epoch=${releaseTimestamp}" 460 + (lib.mesonOption "time-epoch" releaseTimestamp) 461 461 462 - "-Dmode=release" 463 - "-Ddbuspolicydir=${placeholder "out"}/share/dbus-1/system.d" 464 - "-Ddbussessionservicedir=${placeholder "out"}/share/dbus-1/services" 465 - "-Ddbussystemservicedir=${placeholder "out"}/share/dbus-1/system-services" 466 - "-Dpam=${lib.boolToString withPam}" 467 - "-Dpamconfdir=${placeholder "out"}/etc/pam.d" 468 - "-Drootprefix=${placeholder "out"}" 469 - "-Dpkgconfiglibdir=${placeholder "dev"}/lib/pkgconfig" 470 - "-Dpkgconfigdatadir=${placeholder "dev"}/share/pkgconfig" 471 - "-Dloadkeys-path=${kbd}/bin/loadkeys" 472 - "-Dsetfont-path=${kbd}/bin/setfont" 473 - "-Dtty-gid=3" # tty in NixOS has gid 3 474 - "-Ddebug-shell=${bashInteractive}/bin/bash" 475 - "-Dglib=${lib.boolToString withTests}" 476 - # while we do not run tests we should also not build them. Removes about 600 targets 477 - "-Dtests=false" 478 - "-Dacl=${lib.boolToString withAcl}" 479 - "-Danalyze=${lib.boolToString withAnalyze}" 480 - "-Daudit=${lib.boolToString withAudit}" 481 - "-Dgcrypt=${lib.boolToString wantGcrypt}" 482 - "-Dimportd=${lib.boolToString withImportd}" 483 - "-Dlz4=${lib.boolToString withCompression}" 484 - "-Dhomed=${lib.boolToString withHomed}" 485 - "-Dlogind=${lib.boolToString withLogind}" 486 - "-Dlocaled=${lib.boolToString withLocaled}" 487 - "-Dhostnamed=${lib.boolToString withHostnamed}" 488 - "-Dmachined=${lib.boolToString withMachined}" 489 - "-Dnetworkd=${lib.boolToString withNetworkd}" 490 - "-Doomd=${lib.boolToString withOomd}" 491 - "-Dpolkit=${lib.boolToString withPolkit}" 492 - "-Dlibcryptsetup=${lib.boolToString withCryptsetup}" 493 - "-Dportabled=${lib.boolToString withPortabled}" 494 - "-Dhwdb=${lib.boolToString withHwdb}" 495 - "-Dremote=${lib.boolToString withRemote}" 496 - "-Dtimedated=${lib.boolToString withTimedated}" 497 - "-Dtimesyncd=${lib.boolToString withTimesyncd}" 498 - "-Duserdb=${lib.boolToString withUserDb}" 499 - "-Dcoredump=${lib.boolToString withCoredump}" 500 - "-Dfirstboot=false" 501 - "-Dresolve=${lib.boolToString withResolved}" 502 - "-Dsplit-usr=false" 503 - "-Dlibcurl=${lib.boolToString wantCurl}" 504 - "-Dlibidn=false" 505 - "-Dlibidn2=${lib.boolToString withLibidn2}" 506 - "-Dfirstboot=${lib.boolToString withFirstboot}" 507 - "-Dsysusers=${lib.boolToString withSysusers}" 508 - "-Drepart=${lib.boolToString withRepart}" 509 - "-Dsysupdate=${lib.boolToString withSysupdate}" 510 - "-Dquotacheck=false" 511 - "-Dldconfig=false" 512 - "-Dsmack=true" 513 - "-Db_pie=true" 514 - "-Dinstall-sysconfdir=false" 515 - "-Dsbat-distro=nixos" 516 - "-Dsbat-distro-summary=NixOS" 517 - "-Dsbat-distro-url=https://nixos.org/" 518 - "-Dsbat-distro-pkgname=${pname}" 519 - "-Dsbat-distro-version=${version}" 520 - /* 521 - As of now, systemd doesn't allow runtime configuration of these values. So 522 - the settings in /etc/login.defs have no effect on it. Many people think this 523 - should be supported however, see 524 - - https://github.com/systemd/systemd/issues/3855 525 - - https://github.com/systemd/systemd/issues/4850 526 - - https://github.com/systemd/systemd/issues/9769 527 - - https://github.com/systemd/systemd/issues/9843 528 - - https://github.com/systemd/systemd/issues/10184 529 - */ 530 - "-Dsystem-uid-max=999" 531 - "-Dsystem-gid-max=999" 532 - 533 - "-Dsysvinit-path=" 534 - "-Dsysvrcnd-path=" 535 - 536 - "-Dsulogin-path=${util-linux.login}/bin/sulogin" 537 - "-Dnologin-path=${util-linux.login}/bin/nologin" 538 - "-Dmount-path=${lib.getOutput "mount" util-linux}/bin/mount" 539 - "-Dumount-path=${lib.getOutput "mount" util-linux}/bin/umount" 540 - "-Dcreate-log-dirs=false" 541 - 462 + (lib.mesonOption "version-tag" version) 463 + (lib.mesonOption "mode" "release") 464 + (lib.mesonOption "tty-gid" "3") # tty in NixOS has gid 3 465 + (lib.mesonOption "debug-shell" "${bashInteractive}/bin/bash") 466 + (lib.mesonOption "pamconfdir" "${placeholder "out"}/etc/pam.d") 542 467 # Use cgroupsv2. This is already the upstream default, but better be explicit. 543 - "-Ddefault-hierarchy=unified" 544 - # Upstream defaulted to disable manpages since they optimize for the much 545 - # more frequent development builds 546 - "-Dman=true" 468 + (lib.mesonOption "default-hierarchy" "unified") 469 + (lib.mesonOption "kmod-path" "${kmod}/bin/kmod") 547 470 548 - "-Defi=${lib.boolToString withEfi}" 549 - "-Dbootloader=${lib.boolToString withBootloader}" 471 + # D-Bus 472 + (lib.mesonOption "dbuspolicydir" "${placeholder "out"}/share/dbus-1/system.d") 473 + (lib.mesonOption "dbussessionservicedir" "${placeholder "out"}/share/dbus-1/services") 474 + (lib.mesonOption "dbussystemservicedir" "${placeholder "out"}/share/dbus-1/system-services") 550 475 551 - "-Dukify=${lib.boolToString withUkify}" 476 + # pkgconfig 477 + (lib.mesonOption "pkgconfiglibdir" "${placeholder "dev"}/lib/pkgconfig") 478 + (lib.mesonOption "pkgconfigdatadir" "${placeholder "dev"}/share/pkgconfig") 479 + 480 + # Keyboard 481 + (lib.mesonOption "loadkeys-path" "${kbd}/bin/loadkeys") 482 + (lib.mesonOption "setfont-path" "${kbd}/bin/setfont") 483 + 484 + # SBAT 485 + (lib.mesonOption "sbat-distro" "nixos") 486 + (lib.mesonOption "sbat-distro-summary" "NixOS") 487 + (lib.mesonOption "sbat-distro-url" "https://nixos.org/") 488 + (lib.mesonOption "sbat-distro-pkgname" pname) 489 + (lib.mesonOption "sbat-distro-version" version) 490 + 491 + # Users 492 + (lib.mesonOption "system-uid-max" "999") 493 + (lib.mesonOption "system-gid-max" "999") 494 + 495 + # SysVinit 496 + (lib.mesonOption "sysvinit-path" "") 497 + (lib.mesonOption "sysvrcnd-path" "") 498 + 499 + # Login 500 + (lib.mesonOption "sulogin-path" "${util-linux.login}/bin/sulogin") 501 + (lib.mesonOption "nologin-path" "${util-linux.login}/bin/nologin") 502 + 503 + # Mount 504 + (lib.mesonOption "mount-path" "${lib.getOutput "mount" util-linux}/bin/mount") 505 + (lib.mesonOption "umount-path" "${lib.getOutput "mount" util-linux}/bin/umount") 506 + 507 + 508 + # Features 509 + 510 + # Tests 511 + (lib.mesonBool "tests" withTests) 512 + (lib.mesonEnable "glib" withTests) 513 + (lib.mesonEnable "dbus" withTests) 514 + 515 + # Compression 516 + (lib.mesonEnable "bzip2" withCompression) 517 + (lib.mesonEnable "lz4" withCompression) 518 + (lib.mesonEnable "xz" withCompression) 519 + (lib.mesonEnable "zstd" withCompression) 520 + (lib.mesonEnable "zlib" withCompression) 521 + 522 + # NSS 523 + (lib.mesonEnable "nss-mymachines" withNss) 524 + (lib.mesonEnable "nss-resolve" withNss) 525 + (lib.mesonBool "nss-myhostname" withNss) 526 + (lib.mesonBool "nss-systemd" withNss) 527 + 528 + # Cryptsetup 529 + (lib.mesonEnable "libcryptsetup" withCryptsetup) 530 + (lib.mesonEnable "libcryptsetup-plugins" withCryptsetup) 531 + (lib.mesonEnable "p11kit" (withHomed || withCryptsetup)) 532 + 533 + # FIDO2 534 + (lib.mesonEnable "libfido2" withFido2) 535 + (lib.mesonEnable "openssl" withFido2) 536 + 537 + # Password Quality 538 + (lib.mesonEnable "pwquality" withPasswordQuality) 539 + (lib.mesonEnable "passwdqc" false) 540 + 541 + # Remote 542 + (lib.mesonEnable "remote" withRemote) 543 + (lib.mesonEnable "microhttpd" withRemote) 544 + 545 + (lib.mesonEnable "pam" withPam) 546 + (lib.mesonEnable "acl" withAcl) 547 + (lib.mesonEnable "audit" withAudit) 548 + (lib.mesonEnable "apparmor" withApparmor) 549 + (lib.mesonEnable "gcrypt" wantGcrypt) 550 + (lib.mesonEnable "importd" withImportd) 551 + (lib.mesonEnable "homed" withHomed) 552 + (lib.mesonEnable "polkit" withPolkit) 553 + (lib.mesonEnable "elfutils" withCoredump) 554 + (lib.mesonEnable "libcurl" wantCurl) 555 + (lib.mesonEnable "libidn" false) 556 + (lib.mesonEnable "libidn2" withLibidn2) 557 + (lib.mesonEnable "libiptc" withIptables) 558 + (lib.mesonEnable "repart" withRepart) 559 + (lib.mesonEnable "sysupdate" withSysupdate) 560 + (lib.mesonEnable "selinux" withSelinux) 561 + (lib.mesonEnable "tpm2" withTpm2Tss) 562 + (lib.mesonEnable "pcre2" withPCRE2) 563 + (lib.mesonEnable "bpf-framework" withLibBPF) 564 + (lib.mesonEnable "bootloader" withBootloader) 565 + (lib.mesonEnable "ukify" withUkify) 566 + (lib.mesonEnable "kmod" withKmod) 567 + (lib.mesonEnable "qrencode" withQrencode) 568 + (lib.mesonEnable "vmspawn" withVmspawn) 569 + (lib.mesonEnable "xenctrl" false) 570 + (lib.mesonEnable "gnutls" false) 571 + (lib.mesonEnable "xkbcommon" false) 572 + (lib.mesonEnable "man" true) 573 + 574 + (lib.mesonBool "analyze" withAnalyze) 575 + (lib.mesonBool "logind" withLogind) 576 + (lib.mesonBool "localed" withLocaled) 577 + (lib.mesonBool "hostnamed" withHostnamed) 578 + (lib.mesonBool "machined" withMachined) 579 + (lib.mesonBool "networkd" withNetworkd) 580 + (lib.mesonBool "oomd" withOomd) 581 + (lib.mesonBool "portabled" withPortabled) 582 + (lib.mesonBool "hwdb" withHwdb) 583 + (lib.mesonBool "timedated" withTimedated) 584 + (lib.mesonBool "timesyncd" withTimesyncd) 585 + (lib.mesonBool "userdb" withUserDb) 586 + (lib.mesonBool "coredump" withCoredump) 587 + (lib.mesonBool "firstboot" withFirstboot) 588 + (lib.mesonBool "resolve" withResolved) 589 + (lib.mesonBool "sysusers" withSysusers) 590 + (lib.mesonBool "efi" withEfi) 591 + (lib.mesonBool "utmp" withUtmp) 592 + (lib.mesonBool "log-trace" withLogTrace) 593 + (lib.mesonBool "quotacheck" false) 594 + (lib.mesonBool "ldconfig" false) 595 + (lib.mesonBool "install-sysconfdir" false) 596 + (lib.mesonBool "create-log-dirs" false) 597 + (lib.mesonBool "smack" true) 598 + (lib.mesonBool "b_pie" true) 599 + 552 600 ] ++ lib.optionals (withShellCompletions == false) [ 553 - "-Dbashcompletiondir=no" 554 - "-Dzshcompletiondir=no" 555 - ] ++ lib.optionals (!withNss) [ 556 - "-Dnss-myhostname=false" 557 - "-Dnss-mymachines=false" 558 - "-Dnss-resolve=false" 559 - "-Dnss-systemd=false" 560 - ] ++ lib.optionals withLibBPF [ 561 - "-Dbpf-framework=true" 562 - ] ++ lib.optionals withTpm2Tss [ 563 - "-Dtpm2=true" 564 - ] ++ lib.optionals (!withUtmp) [ 565 - "-Dutmp=false" 601 + (lib.mesonOption "bashcompletiondir" "no") 602 + (lib.mesonOption "zshcompletiondir" "no") 566 603 ] ++ lib.optionals stdenv.hostPlatform.isMusl [ 567 - "-Dgshadow=false" 568 - "-Didn=false" 569 - ] ++ lib.optionals withKmod [ 570 - "-Dkmod=true" 571 - "-Dkmod-path=${kmod}/bin/kmod" 572 - ] ++ lib.optionals withLogTrace [ 573 - "-Dlog-trace=true" 604 + (lib.mesonBool "gshadow" false) 605 + (lib.mesonBool "idn" false) 574 606 ]; 575 607 preConfigure = 576 608 let ··· 782 744 783 745 # Wrap in the correct path for LUKS2 tokens. 784 746 postFixup = lib.optionalString withCryptsetup '' 785 - for f in lib/systemd/systemd-cryptsetup bin/systemd-cryptenroll; do 747 + for f in bin/systemd-cryptsetup bin/systemd-cryptenroll; do 786 748 # This needs to be in LD_LIBRARY_PATH because rpath on a binary is not propagated to libraries using dlopen, in this case `libcryptsetup.so` 787 749 wrapProgram $out/$f --prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib/cryptsetup 788 750 done ··· 792 754 # To cross compile a derivation that builds a UKI with ukify, we need to wrap 793 755 # ukify with the correct binutils. When wrapping, no splicing happens so we 794 756 # have to explicitly pull binutils from targetPackages. 795 - wrapProgram $out/lib/systemd/ukify --prefix PATH : ${lib.makeBinPath [ targetPackages.stdenv.cc.bintools ] }:${placeholder "out"}/lib/systemd 757 + wrapProgram $out/bin/ukify --prefix PATH : ${lib.makeBinPath [ targetPackages.stdenv.cc.bintools ] }:${placeholder "out"}/lib/systemd 796 758 ''; 797 759 798 760 disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
+4
pkgs/top-level/all-packages.nix
··· 28721 28721 withHomed = false; 28722 28722 withHwdb = false; 28723 28723 withImportd = false; 28724 + withIptables = false; 28724 28725 withLibBPF = false; 28725 28726 withLibidn2 = false; 28726 28727 withLocaled = false; ··· 28745 28744 withUserDb = false; 28746 28745 withUkify = false; 28747 28746 withBootloader = false; 28747 + withPasswordQuality = false; 28748 + withVmspawn = false; 28749 + withQrencode = false; 28748 28750 }; 28749 28751 systemdLibs = systemdMinimal.override { 28750 28752 pname = "systemd-minimal-libs";