systemd: 257.6 -> 257.7 (#423479)
This commit is contained in:
@@ -27,10 +27,10 @@ index d6a256c4a7..f74d5198f1 100644
|
||||
"/etc"))
|
||||
return true;
|
||||
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
|
||||
index 4bc01c75e0..ede9ac7b87 100644
|
||||
index 84da5eed63..d6e2f36d52 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) {
|
||||
@@ -175,8 +175,10 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) {
|
||||
static bool nonunmountable_path(const char *path) {
|
||||
assert(path);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ 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 500725d35f..2b735e4df4 100644
|
||||
index 6f90f2f418..74b2a237d3 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -6189,6 +6189,7 @@ static int run(int argc, char *argv[]) {
|
||||
|
||||
@@ -13,7 +13,7 @@ in containers.
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index f21a4f7ceb..4c24ce5c98 100644
|
||||
index 4ccaba9054..9577b89783 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -1672,7 +1672,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
|
||||
|
||||
@@ -75,7 +75,7 @@ index 29afb08ebc..398ff340cd 100644
|
||||
return -EINVAL;
|
||||
if (!timezone_is_valid(e, LOG_DEBUG))
|
||||
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
|
||||
index 9be62b8df3..2044e9f8d0 100644
|
||||
index a389eeae10..c817e91991 100644
|
||||
--- a/src/firstboot/firstboot.c
|
||||
+++ b/src/firstboot/firstboot.c
|
||||
@@ -598,7 +598,7 @@ static int process_timezone(int rfd) {
|
||||
@@ -88,7 +88,7 @@ index 9be62b8df3..2044e9f8d0 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 2b735e4df4..7a21f34edd 100644
|
||||
index 74b2a237d3..cf9eabf0f2 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -1851,8 +1851,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
|
||||
|
||||
@@ -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 4c24ce5c98..3c944559fc 100644
|
||||
index 9577b89783..9cfd2798b9 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -4135,9 +4135,17 @@ static int build_generator_environment(Manager *m, char ***ret) {
|
||||
@@ -4158,9 +4158,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. */
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ 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 36a0f906da..e0f42abca2 100644
|
||||
index 5b6b3ea93c..8ab04241b6 100644
|
||||
--- a/src/shared/tpm2-util.c
|
||||
+++ b/src/shared/tpm2-util.c
|
||||
@@ -721,7 +721,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) {
|
||||
|
||||
@@ -30,7 +30,7 @@ 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 c42a31153d..154dbf0402 100644
|
||||
index 7165fa1cf7..7498cf9f4c 100644
|
||||
--- a/src/systemctl/systemctl-edit.c
|
||||
+++ b/src/systemctl/systemctl-edit.c
|
||||
@@ -323,6 +323,9 @@ int verb_edit(int argc, char *argv[], void *userdata) {
|
||||
|
||||
@@ -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 bffda86845..cb5dcec0f9 100644
|
||||
index 7ede6f7a96..90860be99a 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -2781,7 +2781,6 @@ install_data('LICENSE.GPL2',
|
||||
@@ -2795,7 +2795,6 @@ install_data('LICENSE.GPL2',
|
||||
install_subdir('LICENSES',
|
||||
install_dir : docdir)
|
||||
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jared Baur <jaredbaur@fastmail.com>
|
||||
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;
|
||||
@@ -0,0 +1,89 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Date: Wed, 19 Jun 2024 15:55:59 +0900
|
||||
Subject: [PATCH] bootctl: do not try to update the same file multiple times
|
||||
|
||||
Otherwise, copy_file_with_version_check() -> version_check() will fail
|
||||
and warn about that the same version is already installed.
|
||||
|
||||
Fixes a regression caused by 929f41c6528fb630753d4e2f588a8eb6c2f6a609.
|
||||
Fixes #33392.
|
||||
|
||||
bootctl: add missing error messages in version_check()
|
||||
|
||||
bootctl: check file type before update
|
||||
|
||||
This also adds missing assertions.
|
||||
|
||||
Follow-up for 929f41c6528fb630753d4e2f588a8eb6c2f6a609.
|
||||
---
|
||||
src/bootctl/bootctl-install.c | 22 ++++++++++++++++++----
|
||||
1 file changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/bootctl/bootctl-install.c b/src/bootctl/bootctl-install.c
|
||||
index e15c2c6bed..7828ce1f08 100644
|
||||
--- a/src/bootctl/bootctl-install.c
|
||||
+++ b/src/bootctl/bootctl-install.c
|
||||
@@ -195,14 +195,14 @@ static int version_check(int fd_from, const char *from, int fd_to, const char *t
|
||||
if (r == -ESRCH)
|
||||
return log_notice_errno(r, "Source file \"%s\" does not carry version information!", from);
|
||||
if (r < 0)
|
||||
- return r;
|
||||
+ return log_error_errno(r, "Failed to get version information of source file \"%s\": %m", from);
|
||||
|
||||
r = get_file_version(fd_to, &b);
|
||||
if (r == -ESRCH)
|
||||
return log_notice_errno(r, "Skipping \"%s\", it's owned by another boot loader (no version info found).",
|
||||
to);
|
||||
if (r < 0)
|
||||
- return r;
|
||||
+ return log_error_errno(r, "Failed to get version information of \"%s\": %m", to);
|
||||
if (compare_product(a, b) != 0)
|
||||
return log_notice_errno(SYNTHETIC_ERRNO(ESRCH),
|
||||
"Skipping \"%s\", it's owned by another boot loader.", to);
|
||||
@@ -324,11 +324,15 @@ 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) {
|
||||
+static int update_efi_boot_binaries(const char *esp_path, const char *source_path, const char *exclude_path) {
|
||||
_cleanup_closedir_ DIR *d = NULL;
|
||||
_cleanup_free_ char *p = NULL;
|
||||
int r, ret = 0;
|
||||
|
||||
+ assert(esp_path);
|
||||
+ assert(source_path);
|
||||
+ assert(exclude_path);
|
||||
+
|
||||
r = chase_and_opendir("/EFI/BOOT", esp_path, CHASE_PREFIX_ROOT|CHASE_PROHIBIT_SYMLINKS, &p, &d);
|
||||
if (r == -ENOENT)
|
||||
return 0;
|
||||
@@ -339,9 +343,19 @@ static int update_efi_boot_binaries(const char *esp_path, const char *source_pat
|
||||
_cleanup_close_ int fd = -EBADF;
|
||||
_cleanup_free_ char *v = NULL;
|
||||
|
||||
+ if (!IN_SET(de->d_type, DT_REG, DT_UNKNOWN))
|
||||
+ continue;
|
||||
+
|
||||
if (!endswith_no_case(de->d_name, ".efi"))
|
||||
continue;
|
||||
|
||||
+ /* Skip the file that is already updated. We cannot check if the paths are equal because the
|
||||
+ * file system is likely case insensitve. It's easiest to just check if the inodes are the
|
||||
+ * same.
|
||||
+ */
|
||||
+ if (inode_same_at(dirfd(d), de->d_name, 0, exclude_path, 0))
|
||||
+ continue;
|
||||
+
|
||||
fd = xopenat_full(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW, /* xopen_flags= */ 0, /* mode= */ 0);
|
||||
if (fd < 0)
|
||||
return log_error_errno(fd, "Failed to open \"%s/%s\" for reading: %m", p, de->d_name);
|
||||
@@ -429,7 +443,7 @@ static int copy_one_file(const char *esp_path, const char *name, bool 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));
|
||||
+ RET_GATHER(ret, update_efi_boot_binaries(esp_path, source_path, default_dest_path));
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] meson: Don't link ssh dropins
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index d392610625..c17d0a1feb 100644
|
||||
index 90860be99a..f021f76031 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -211,13 +211,13 @@ sshconfdir = get_option('sshconfdir')
|
||||
@@ -207,13 +207,13 @@ sshconfdir = get_option('sshconfdir')
|
||||
if sshconfdir == ''
|
||||
sshconfdir = sysconfdir / 'ssh/ssh_config.d'
|
||||
endif
|
||||
@@ -27,6 +27,3 @@ index d392610625..c17d0a1feb 100644
|
||||
|
||||
sshdprivsepdir = get_option('sshdprivsepdir')
|
||||
conf.set10('CREATE_SSHDPRIVSEPDIR', sshdprivsepdir != 'no' and not sshdprivsepdir.startswith('/usr/'))
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7be486fb25dc4ea212cb17f6a3f4a434a557b0d9 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Marie Ramlow <me@nycode.dev>
|
||||
Date: Fri, 10 Jan 2025 15:51:33 +0100
|
||||
Subject: [PATCH] install: unit_file_exists_full: follow symlinks
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] install: unit_file_exists_full: follow symlinks
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/shared/install.c b/src/shared/install.c
|
||||
index 53566b7eef..0975cd47c7 100644
|
||||
index 6d87858a3c..8da022eb64 100644
|
||||
--- a/src/shared/install.c
|
||||
+++ b/src/shared/install.c
|
||||
@@ -3217,7 +3217,7 @@ int unit_file_exists_full(RuntimeScope scope, const LookupPaths *lp, const char
|
||||
@@ -3226,7 +3226,7 @@ int unit_file_exists_full(RuntimeScope scope, const LookupPaths *lp, const char
|
||||
&c,
|
||||
lp,
|
||||
name,
|
||||
@@ -20,6 +20,3 @@ index 53566b7eef..0975cd47c7 100644
|
||||
ret_path ? &info : NULL,
|
||||
/* changes= */ NULL,
|
||||
/* n_changes= */ NULL);
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ assert withBootloader -> withEfi;
|
||||
let
|
||||
wantCurl = withRemote || withImportd;
|
||||
|
||||
version = "257.6";
|
||||
version = "257.7";
|
||||
|
||||
# Use the command below to update `releaseTimestamp` on every (major) version
|
||||
# change. More details in the commentary at mesonFlags.
|
||||
@@ -215,7 +215,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "systemd";
|
||||
repo = "systemd";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Myb/ra7NQTDzN7B9jn8svbhTrLSfiqWaSxREe/nDyYo=";
|
||||
hash = "sha256-9OnjeMrfV5DSAoX/aetI4r/QLPYITUd2aOY0DYfkTzQ=";
|
||||
};
|
||||
|
||||
# On major changes, or when otherwise required, you *must* :
|
||||
@@ -245,11 +245,17 @@ 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
|
||||
./0018-Revert-bootctl-update-list-remove-all-instances-of-s.patch # https://github.com/systemd/systemd/issues/33392
|
||||
|
||||
# https://github.com/systemd/systemd/issues/33392
|
||||
# This patch is a slightly modified version of this PR:
|
||||
# https://github.com/systemd/systemd/pull/33400
|
||||
./0018-bootctl-do-not-try-to-update-the-same-file-multiple-.patch
|
||||
|
||||
# systemd tries to link the systemd-ssh-proxy ssh config snippet with tmpfiles
|
||||
# if the install prefix is not /usr, but that does not work for us
|
||||
# because we include the config snippet manually
|
||||
./0019-meson-Don-t-link-ssh-dropins.patch
|
||||
|
||||
./0020-install-unit_file_exists_full-follow-symlinks.patch
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu) [
|
||||
|
||||
Reference in New Issue
Block a user