From d425e27396c8e29c158d97bdc1aaa85f73367acf Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Thu, 16 May 2024 12:11:13 +0800 Subject: [PATCH] fix log message print not match when glob patterns passed to disable service (cherry picked from commit d8914bfc58b92818f088396d41e22c63ef6e59bd) --- ...b-patterns-passed-to-disable-command.patch | 27 +++++++++++++++++++ systemd.spec | 6 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 backport-fix-log-message-not-match-glob-patterns-passed-to-disable-command.patch diff --git a/backport-fix-log-message-not-match-glob-patterns-passed-to-disable-command.patch b/backport-fix-log-message-not-match-glob-patterns-passed-to-disable-command.patch new file mode 100644 index 0000000..b6dde46 --- /dev/null +++ b/backport-fix-log-message-not-match-glob-patterns-passed-to-disable-command.patch @@ -0,0 +1,27 @@ +From 819f3f0be986848d0b1ed82166e1244a6bd6d508 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Wed, 1 May 2024 15:14:37 +0900 +Subject: [PATCH] systemctl: fix log message when glob patterns passed to + disable command and friends + +Fixes #32599. + +(cherry picked from commit 1cca93f7f33547629cc174ec3690a2d40971d021) +--- + src/systemctl/systemctl-enable.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c +index 7d9b7c794a1..fc746b2b2be 100644 +--- a/src/systemctl/systemctl-enable.c ++++ b/src/systemctl/systemctl-enable.c +@@ -71,7 +71,8 @@ int verb_enable(int argc, char *argv[], void *userdata) { + if (!argv[1]) + return 0; + +- r = mangle_names("to enable", strv_skip(argv, 1), &names); ++ const char *operation = strjoina("to ", verb); ++ r = mangle_names(operation, strv_skip(argv, 1), &names); + if (r < 0) + return r; + diff --git a/systemd.spec b/systemd.spec index bb91a9f..5fa7a8a 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 15 +Release: 16 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -65,6 +65,7 @@ Patch6011: backport-fix-conf-parser-oom-check-issue.patch Patch6012: backport-unit-check-for-correct-function-in-vtable.patch Patch6013: backport-fix-homed-log-message-typo-error.patch Patch6014: backport-bash-completion-add-systemctl-service-log-level-target.patch +Patch6015: backport-fix-log-message-not-match-glob-patterns-passed-to-disable-command.patch Patch9008: update-rtc-with-system-clock-when-shutdown.patch Patch9009: udev-add-actions-while-rename-netif-failed.patch @@ -1644,6 +1645,9 @@ fi %{_libdir}/security/pam_systemd_loadkey.so %changelog +* Thu May 16 2024 Han Jinpeng - 255-16 +- Fix log message print not match when glob patterns passed to disable service + * Thu May 9 2024 Han Jinpeng - 255-15 - Add bash completion for systemctl service-log-level/target -- Gitee