From 734cdfa9ed53dad9164d52286686e618564274ec Mon Sep 17 00:00:00 2001 From: h30032433 Date: Tue, 5 Dec 2023 20:47:28 +0800 Subject: [PATCH] sync community patches: fix line number in conf_parser error message --- ...ser-fix-line-number-in-error-message.patch | 39 +++++++++++++++++++ systemd.spec | 6 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 backport-conf-parser-fix-line-number-in-error-message.patch diff --git a/backport-conf-parser-fix-line-number-in-error-message.patch b/backport-conf-parser-fix-line-number-in-error-message.patch new file mode 100644 index 0000000..57bf30f --- /dev/null +++ b/backport-conf-parser-fix-line-number-in-error-message.patch @@ -0,0 +1,39 @@ +From 68c1ac1568910037a224c301d5c871af73493c16 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Fri, 28 Feb 2020 02:37:11 +0900 +Subject: [PATCH] conf-parser: fix line number in error message + +Fixes #14929. + +Conflict:NA +Reference:https://github.com/systemd/systemd/commit/68c1ac1568910037a224c301d5c871af73493c16 + +--- + src/shared/conf-parser.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c +index 318588cc1f..657df0a517 100644 +--- a/src/shared/conf-parser.c ++++ b/src/shared/conf-parser.c +@@ -334,6 +334,8 @@ int config_parse(const char *unit, + return r; + } + ++ line++; ++ + l = skip_leading_chars(buf, WHITESPACE); + if (*l != '\0' && strchr(COMMENTS, *l)) + continue; +@@ -390,7 +392,7 @@ int config_parse(const char *unit, + + r = parse_line(unit, + filename, +- ++line, ++ line, + sections, + lookup, + table, +-- +2.27.0 + diff --git a/systemd.spec b/systemd.spec index 7d71ba5..a3e4dbb 100644 --- a/systemd.spec +++ b/systemd.spec @@ -16,7 +16,7 @@ Name: systemd Url: https://www.freedesktop.org/wiki/Software/systemd Version: 243 -Release: 62 +Release: 63 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -212,6 +212,7 @@ Patch0164: backport-argv-util-also-update-program_invocation_short_name.pat Patch0165: backport-pid1-fix-segv-triggered-by-status-query.patch Patch0166: backport-main-log-which-process-send-SIGNAL-to-PID1.patch Patch0167: backport-main-drop-get_process_cmdline-from-crash-handler.patch +Patch0168: backport-conf-parser-fix-line-number-in-error-message.patch #openEuler Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch @@ -1619,6 +1620,9 @@ fi %exclude /usr/share/man/man3/* %changelog +* Tue Dec 5 2023 huyubiao - 243-63 +- sync community patches: fix line number in conf_parser error message + * Sun Apr 23 2023 hongjinghao - 243-62 - sync community patches