From 9a0266ff7b8c0cd4b1020813e0a3929766970353 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mar 03 2023 19:14:38 +0000 Subject: Include two more patches that didn't make it into the stable tag [skip changelog] --- diff --git a/465d48dfa23ef01ce1888e440f24b3d22d633a60.patch b/465d48dfa23ef01ce1888e440f24b3d22d633a60.patch new file mode 100644 index 0000000..4cdc037 --- /dev/null +++ b/465d48dfa23ef01ce1888e440f24b3d22d633a60.patch @@ -0,0 +1,36 @@ +From 465d48dfa23ef01ce1888e440f24b3d22d633a60 Mon Sep 17 00:00:00 2001 +From: Samanta Navarro +Date: Thu, 16 Feb 2023 11:59:05 +0000 +Subject: [PATCH] bootctl: Fix debug messages + +Remove duplicate KERNEL_INSTALL_MACHINE_ID from message and also +specify the correct origin of layout variable. + +Signed-off-by: Samanta Navarro +(cherry picked from commit 2d5ccb0818a7c9fdc280eb84478a6b89cd46b6fe) +--- + src/boot/bootctl-install.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/boot/bootctl-install.c b/src/boot/bootctl-install.c +index c795e75bc3..ebb0d486c9 100644 +--- a/src/boot/bootctl-install.c ++++ b/src/boot/bootctl-install.c +@@ -67,7 +67,7 @@ static int load_etc_machine_info(void) { + if (r < 0) + return log_error_errno(r, "Failed to parse KERNEL_INSTALL_MACHINE_ID=%s in /etc/machine-info: %m", s); + +- log_debug("Loaded KERNEL_INSTALL_MACHINE_ID=%s from KERNEL_INSTALL_MACHINE_ID in /etc/machine-info.", ++ log_debug("Loaded KERNEL_INSTALL_MACHINE_ID=%s from /etc/machine-info.", + SD_ID128_TO_STRING(arg_machine_id)); + } + +@@ -98,7 +98,7 @@ static int load_etc_kernel_install_conf(void) { + return log_error_errno(r, "Failed to parse %s: %m", p); + + if (!isempty(layout)) { +- log_debug("layout=%s is specified in /etc/machine-info.", layout); ++ log_debug("layout=%s is specified in %s.", layout, p); + free_and_replace(arg_install_layout, layout); + } + diff --git a/fef2e88b92287aa97ce21eee22aca0c74dfa6570.patch b/fef2e88b92287aa97ce21eee22aca0c74dfa6570.patch new file mode 100644 index 0000000..6db934d --- /dev/null +++ b/fef2e88b92287aa97ce21eee22aca0c74dfa6570.patch @@ -0,0 +1,40 @@ +From fef2e88b92287aa97ce21eee22aca0c74dfa6570 Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Fri, 3 Mar 2023 12:17:27 +0100 +Subject: [PATCH] systemctl: explicitly cast the constants to uint64_t + +Otherwise under certain conditions `va_arg()` might get garbage instead +of the expected value, i.e.: + +$ sudo build-o0/systemctl disable asdfasfaf +sd_bus_message_appendv: Got uint64_t: 0 +Failed to disable unit: Unit file asdfasfaf.service does not exist. + +$ sudo build-o1/systemctl disable asdfasfaf +sd_bus_message_appendv: Got uint64_t: 7954875719681572864 +Failed to disable unit: Invalid argument + +(reproduced on an armv7hl machine) + +Resolves: #26568 +Follow-up to: bf1bea43f15 +Related issue: https://github.com/systemd/systemd/pull/14470#discussion_r362893735 + +(cherry picked from commit c63bfd0884cf20e48befbee49d41f667660a8802) +--- + src/systemctl/systemctl-enable.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c +index 86d9f602fa..f94a286122 100644 +--- a/src/systemctl/systemctl-enable.c ++++ b/src/systemctl/systemctl-enable.c +@@ -211,7 +211,7 @@ int verb_enable(int argc, char *argv[], void *userdata) { + + if (send_runtime) { + if (streq(method, "DisableUnitFilesWithFlagsAndInstallInfo")) +- r = sd_bus_message_append(m, "t", arg_runtime ? UNIT_FILE_RUNTIME : 0); ++ r = sd_bus_message_append(m, "t", arg_runtime ? (uint64_t) UNIT_FILE_RUNTIME : UINT64_C(0)); + else + r = sd_bus_message_append(m, "b", arg_runtime); + if (r < 0) diff --git a/systemd.spec b/systemd.spec index db1a7d3..4b46258 100644 --- a/systemd.spec +++ b/systemd.spec @@ -98,6 +98,9 @@ Patch0001: https://github.com/systemd/systemd/pull/26494.patch # Fix build with gnu-efi-3.0.11-13.fc39 Patch0002: https://github.com/systemd/systemd-stable/pull/265.patch +Patch0003: https://github.com/systemd/systemd-stable/commit/fef2e88b92287aa97ce21eee22aca0c74dfa6570.patch +Patch0004: https://github.com/systemd/systemd-stable/commit/465d48dfa23ef01ce1888e440f24b3d22d633a60.patch + # Those are downstream-only patches, but we don't want them in packit builds: # https://bugzilla.redhat.com/show_bug.cgi?id=1738828 Patch0490: use-bfq-scheduler.patch