Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd: 254.6 -> 255.2 #265951

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nixos/modules/system/boot/luksroot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1076,15 +1076,15 @@ in
boot.initrd.systemd = {
contents."/etc/crypttab".source = stage1Crypttab;

extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup";
extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup";

additionalUpstreamUnits = [
"cryptsetup-pre.target"
"cryptsetup.target"
"remote-cryptsetup.target"
];
storePaths = [
"${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup"
"${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup"
"${config.boot.initrd.systemd.package}/lib/systemd/system-generators/systemd-cryptsetup-generator"
];

Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/system/boot/systemd/initrd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ let
"systemd-tmpfiles-setup.service"
"timers.target"
"umount.target"
"systemd-bsod.service"
] ++ cfg.additionalUpstreamUnits;

upstreamWants = [
Expand Down Expand Up @@ -424,6 +425,7 @@ in {

storePaths = [
# systemd tooling
"${cfg.package}/lib/systemd/systemd-executor"
"${cfg.package}/lib/systemd/systemd-fsck"
"${cfg.package}/lib/systemd/systemd-hibernate-resume"
"${cfg.package}/lib/systemd/systemd-journald"
Expand All @@ -433,6 +435,7 @@ in {
"${cfg.package}/lib/systemd/systemd-shutdown"
"${cfg.package}/lib/systemd/systemd-sulogin-shell"
"${cfg.package}/lib/systemd/systemd-sysctl"
"${cfg.package}/lib/systemd/systemd-bsod"

# generators
"${cfg.package}/lib/systemd/system-generators/systemd-debug-generator"
Expand Down
15 changes: 8 additions & 7 deletions pkgs/development/libraries/qrencode/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv, libobjc }:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: rec {
pname = "qrencode";
version = "4.1.1";

Expand All @@ -16,13 +16,9 @@ stdenv.mkDerivation rec {
buildInputs = [ libiconv libpng ]
++ lib.optionals stdenv.isDarwin [ libobjc ];

configureFlags = [
"--with-tests"
];

nativeCheckInputs = [ SDL2 ];

doCheck = true;
doCheck = false;

checkPhase = ''
runHook preCheck
Expand All @@ -34,6 +30,11 @@ stdenv.mkDerivation rec {
runHook postCheck
'';

passthru.tests = finalAttrs.finalPackage.overrideAttrs (_: {
configureFlags = [ "--with-tests" ];
doCheck = true;
});

meta = with lib; {
homepage = "https://fukuchi.org/works/qrencode/";
description = "C library for encoding data in a QR Code symbol";
Expand All @@ -47,4 +48,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
mainProgram = "qrencode";
};
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -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 c0defc31de..8f80235731 100644
index 0d68f31d36..6b52f7ed4b 100644
--- a/rules.d/99-systemd.rules.in
+++ b/rules.d/99-systemd.rules.in
@@ -20,10 +20,6 @@ SUBSYSTEM=="block", TAG+="systemd"
@@ -22,10 +22,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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
index 4ffec25c75..b99031c54e 100644
index 55e76b6e16..015a608035 100644
--- a/src/shared/fstab-util.c
+++ b/src/shared/fstab-util.c
@@ -43,6 +43,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
@@ -66,6 +66,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
/* Don't bother with the OS data itself */
if (PATH_IN_SET(mount,
"/",
Expand All @@ -27,7 +27,7 @@ index 4ffec25c75..b99031c54e 100644
"/etc"))
return true;
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 1586c2e214..fcae95f824 100644
index 1a9b99d761..04ef9af1ea 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) {
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 e170958fc5..898a674631 100644
index 38196ef3d6..57d1750b00 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5648,6 +5648,7 @@ static int run(int argc, char *argv[]) {
@@ -5602,6 +5602,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
_cleanup_free_ char *p = NULL;

if (arg_pivot_root_new)
@@ -5662,6 +5663,7 @@ static int run(int argc, char *argv[]) {
@@ -5618,6 +5619,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 @@ -11,12 +11,12 @@ Also, remove /usr and /lib as these don't exist on NixOS.

Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
---
src/basic/path-lookup.c | 17 ++---------------
src/basic/path-lookup.c | 18 ++----------------
src/core/systemd.pc.in | 8 ++++----
2 files changed, 6 insertions(+), 19 deletions(-)
2 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
index 7d158a8295..f9bd62b631 100644
index 4e3d59fc56..0d18b9a2d0 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 All @@ -31,7 +31,7 @@ index 7d158a8295..f9bd62b631 100644
NULL
};

@@ -617,15 +613,13 @@ int lookup_paths_init(
@@ -613,16 +609,13 @@ int lookup_paths_init(
persistent_config,
SYSTEM_CONFIG_UNIT_DIR,
"/etc/systemd/system",
Expand All @@ -44,11 +44,12 @@ index 7d158a8295..f9bd62b631 100644
- "/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;

@@ -641,14 +635,11 @@ int lookup_paths_init(
@@ -638,14 +631,11 @@ int lookup_paths_init(
persistent_config,
USER_CONFIG_UNIT_DIR,
"/etc/systemd/user",
Expand All @@ -64,23 +65,23 @@ index 7d158a8295..f9bd62b631 100644
STRV_IFNOTNULL(generator_late));
break;

@@ -808,7 +799,6 @@ char **generator_binary_paths(RuntimeScope scope) {
@@ -805,7 +795,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;

@@ -816,7 +806,6 @@ char **generator_binary_paths(RuntimeScope scope) {
@@ -813,7 +802,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;

@@ -855,14 +844,12 @@ char **env_generator_binary_paths(RuntimeScope runtime_scope) {
@@ -852,14 +840,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",
Expand All @@ -96,10 +97,10 @@ index 7d158a8295..f9bd62b631 100644
break;

diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index 693433b34b..5932a21b5b 100644
index f3b85b0190..8ae544b495 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -38,10 +38,10 @@ systemdsystemconfdir=${systemd_system_conf_dir}
@@ -43,10 +43,10 @@ systemdsystemconfdir=${systemd_system_conf_dir}
systemd_user_conf_dir=${sysconfdir}/systemd/user
systemduserconfdir=${systemd_user_conf_dir}

Expand All @@ -111,8 +112,8 @@ index 693433b34b..5932a21b5b 100644
+systemd_user_unit_path=${systemd_user_conf_dir}:/etc/systemd/user:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/user:${systemduserunitdir}
systemduserunitpath=${systemd_user_unit_path}

systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
@@ -50,10 +50,10 @@ systemdsystemgeneratordir=${systemd_system_generator_dir}
systemd_system_generator_dir=${prefix}/lib/systemd/system-generators
@@ -55,10 +55,10 @@ systemdsystemgeneratordir=${systemd_system_generator_dir}
systemd_user_generator_dir=${prefix}/lib/systemd/user-generators
systemdusergeneratordir=${systemd_user_generator_dir}

Expand All @@ -124,4 +125,4 @@ index 693433b34b..5932a21b5b 100644
+systemd_user_generator_path=/run/systemd/user-generators:/etc/systemd/user-generators:${systemd_user_generator_dir}
systemdusergeneratorpath=${systemd_user_generator_path}

systemd_sleep_dir=${root_prefix}/lib/systemd/system-sleep
systemd_sleep_dir=${prefix}/lib/systemd/system-sleep
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 22ec6e79b1..771e8e7f16 100644
index e61ebee253..22cc5cc843 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1559,7 +1559,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
@@ -1562,7 +1562,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,7 +11,7 @@ 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 9ef45f8e75..99b1ec2e36 100644
index e1d53f2395..a224e6dadc 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -1053,6 +1053,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
Expand All @@ -35,7 +35,7 @@ index 9ef45f8e75..99b1ec2e36 100644

context_read_machine_info(c);
diff --git a/src/locale/localed.c b/src/locale/localed.c
index f544a73580..ce00c262cc 100644
index 5d96237fae..9af35cd29c 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -229,6 +229,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
Expand Down Expand Up @@ -69,10 +69,10 @@ index f544a73580..ce00c262cc 100644

r = x11_context_verify_and_warn(&in, LOG_ERR, error);
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index ad1d492d6b..331af34505 100644
index c7be30f563..50f8aa8675 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -665,6 +665,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
@@ -659,6 +659,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 ad1d492d6b..331af34505 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);

@@ -743,6 +747,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
@@ -737,6 +741,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 ad1d492d6b..331af34505 100644
if (lrtc == c->local_rtc && !fix_system)
return sd_bus_reply_method_return(m, NULL);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ index e486474c44..5f373d0723 100644
<literal>Etc/UTC</literal>. The resulting link should lead to the
corresponding binary
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 1db630003a..31744c3e68 100644
index f9014dc560..3ee0363369 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1350,7 +1350,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {
@@ -1412,7 +1412,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {

assert(ret);

Expand All @@ -47,7 +47,7 @@ index 1db630003a..31744c3e68 100644
if (!f)
return -errno;

@@ -1391,7 +1391,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {
@@ -1453,7 +1453,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {

assert(ret);

Expand All @@ -56,7 +56,7 @@ index 1db630003a..31744c3e68 100644
if (!f)
return -errno;

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

Expand All @@ -65,7 +65,7 @@ index 1db630003a..31744c3e68 100644

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

Expand All @@ -75,10 +75,10 @@ index 1db630003a..31744c3e68 100644
return -EINVAL;

diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 1956ab3b13..9ef356f8af 100644
index f77a5f6266..63bac85b29 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -630,7 +630,7 @@ static int process_timezone(int rfd) {
@@ -632,7 +632,7 @@ static int process_timezone(int rfd) {
if (isempty(arg_timezone))
return 0;

Expand All @@ -88,10 +88,10 @@ index 1956ab3b13..9ef356f8af 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 898a674631..c41a416e04 100644
index e48ebe8342..41796f3358 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1924,8 +1924,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
@@ -1845,8 +1845,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,10 +103,10 @@ index 898a674631..c41a416e04 100644

static bool etc_writable(void) {
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 331af34505..722c4b5b4f 100644
index 50f8aa8675..aff156ab42 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -282,7 +282,7 @@ static int context_read_data(Context *c) {
@@ -276,7 +276,7 @@ static int context_read_data(Context *c) {

r = get_timezone(&t);
if (r == -EINVAL)
Expand All @@ -115,7 +115,7 @@ index 331af34505..722c4b5b4f 100644
else if (r < 0)
log_warning_errno(r, "Failed to get target of /etc/localtime: %m");

@@ -306,7 +306,7 @@ static int context_write_data_timezone(Context *c) {
@@ -300,7 +300,7 @@ static int context_write_data_timezone(Context *c) {

if (isempty(c->zone) || streq(c->zone, "UTC")) {

Expand All @@ -124,7 +124,7 @@ index 331af34505..722c4b5b4f 100644

if (unlink("/etc/localtime") < 0 && errno != ENOENT)
return -errno;
@@ -314,9 +314,9 @@ static int context_write_data_timezone(Context *c) {
@@ -308,9 +308,9 @@ static int context_write_data_timezone(Context *c) {
return 0;
}

Expand Down
Loading