diff --git a/systemd-fstab-generator-print-logs-only-to-kmsg.patch b/systemd-fstab-generator-print-logs-only-to-kmsg.patch new file mode 100644 index 0000000000000000000000000000000000000000..bfc9d7bc23a01e75bf3b702237a7889db0ea0e9d --- /dev/null +++ b/systemd-fstab-generator-print-logs-only-to-kmsg.patch @@ -0,0 +1,30 @@ +From edba446b58f96db6d01968db0fc398be46188b72 Mon Sep 17 00:00:00 2001 +From: zhangyao +Date: Mon, 23 Dec 2024 16:14:37 +0800 +Subject: [PATCH] systemd-fstab-generator print logs only to kmsg + +--- + src/fstab-generator/fstab-generator.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index 016f3ba..54b84c0 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -1631,6 +1631,13 @@ static int run(int argc, char **argv) { + } else { + /* Run in generator mode */ + log_setup_generator(); ++ /* ++ * Writing logs to the journal may cause sendmsg to time out, ++ * which leads to systemd startup failure. Therefore, we need ++ * to print logs only to kmsg. ++ */ ++ log_set_target(LOG_TARGET_KMSG); ++ log_open(); + + if (!IN_SET(strv_length(argv), 2, 4)) + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), +-- +2.33.0 + diff --git a/systemd.spec b/systemd.spec index 55695e9c0e63ff1d1debda13acac13b36aff97fb..eaff11bea2bd674d00b15f9f2b7993b5c2ed09d3 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 33 +Release: 34 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -132,6 +132,7 @@ Patch9055: delete-journal-files-except-system.journal-when-jour.patch Patch9056: set-the-cpuset.cpus-mems-of-machine.slice-to-all-by-.patch Patch9057: add-a-new-switch-to-control-whether-udev-complies-wi.patch Patch9058: journal-don-t-enable-systemd-journald-audit.socket.patch +Patch9059: systemd-fstab-generator-print-logs-only-to-kmsg.patch Patch9801: Systemd-Add-sw64-architecture.patch Patch9802: backport-repart-fix-memory-leak.patch @@ -1672,6 +1673,9 @@ fi %{_unitdir}/veritysetup.target %changelog +* Mon Dec 23 2024 zhangyao - 255-34 +- systemd-fstab-generator print logs only to kmsg + * Fri Dec 13 2024 zhangyao - 255-33 - Fix the varlink connection is disconnected when systemd upgrade