From 81ac6b13f9043211374f831ee08b7e66898006f6 Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Wed, 24 Apr 2024 12:31:24 +0800 Subject: [PATCH] Fix systemd-analyze -q option invalid issue --- ...t-fix-analyze-q-option-invalid-issue.patch | 52 +++++++++++++++++++ systemd.spec | 6 ++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 backport-fix-analyze-q-option-invalid-issue.patch diff --git a/backport-fix-analyze-q-option-invalid-issue.patch b/backport-fix-analyze-q-option-invalid-issue.patch new file mode 100644 index 0000000..7d48459 --- /dev/null +++ b/backport-fix-analyze-q-option-invalid-issue.patch @@ -0,0 +1,52 @@ +From b0d294099790e75b0d8a1c90847895f5c7925354 Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Tue, 9 Jan 2024 09:05:50 +0100 +Subject: [PATCH] analyze: fix -q option + +Follow-up to 52117f5af831a816c47ceebb83c8244ee93b72fe + +(cherry picked from commit 7c0e0bbb6b13d70500da79ce0270ed6da09327a0) +--- + man/systemd-analyze.xml | 1 + + shell-completion/bash/systemd-analyze | 2 +- + src/analyze/analyze.c | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml +index 2f2873452ac..63232ad1f02 100644 +--- a/man/systemd-analyze.xml ++++ b/man/systemd-analyze.xml +@@ -1481,6 +1481,7 @@ NR NAME SHA256 + + + ++ + + + Suppress hints and other non-essential output. +diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze +index 8ecf9935715..1fde67218b9 100644 +--- a/shell-completion/bash/systemd-analyze ++++ b/shell-completion/bash/systemd-analyze +@@ -57,7 +57,7 @@ _systemd_analyze() { + + local -A OPTS=( + [STANDALONE]='-h --help --version --system --user --global --order --require --no-pager +- --man=no --generators=yes --quiet' ++ --man=no --generators=yes -q --quiet' + [ARG]='-H --host -M --machine --fuzz --from-pattern --to-pattern --root' + ) + +diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c +index d2be144f4f4..ba95bbaba59 100644 +--- a/src/analyze/analyze.c ++++ b/src/analyze/analyze.c +@@ -360,7 +360,7 @@ static int parse_argv(int argc, char *argv[]) { + assert(argc >= 0); + assert(argv); + +- while ((c = getopt_long(argc, argv, "hH:M:U:", options, NULL)) >= 0) ++ while ((c = getopt_long(argc, argv, "hH:M:U:q", options, NULL)) >= 0) + switch (c) { + + case 'h': diff --git a/systemd.spec b/systemd.spec index 50a971b..26a8028 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 10 +Release: 11 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -57,6 +57,7 @@ Patch6003: backport-temporarily-disable-test-seccomp.patch Patch6004: backport-core-exec-do-not-crash-with-UtmpMode-user-without-Us.patch Patch6005: backport-CVE-2023-50387.patch Patch6006: backport-CVE-2023-50868.patch +Patch6007: backport-fix-analyze-q-option-invalid-issue.patch Patch9008: update-rtc-with-system-clock-when-shutdown.patch Patch9009: udev-add-actions-while-rename-netif-failed.patch @@ -1636,6 +1637,9 @@ fi %{_libdir}/security/pam_systemd_loadkey.so %changelog +* Wed Apr 24 2024 Han Jinpeng - 255-11 +- Fix systemd-analyze -q option invalid issue + * Thu Apr 18 2024 Han Jinpeng - 255-10 - Fix warning for file not found during rpm packaging -- Gitee