diff --git a/0004-Revert-rfkill-fix-the-format-string-to-prevent-compi.patch b/0004-Revert-rfkill-fix-the-format-string-to-prevent-compi.patch new file mode 100644 index 0000000..238b94f --- /dev/null +++ b/0004-Revert-rfkill-fix-the-format-string-to-prevent-compi.patch @@ -0,0 +1,26 @@ +From 1a19da5c83ee7775a98324aeff69b06b811e6784 Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Fri, 14 May 2021 16:25:51 +0200 +Subject: [PATCH] Revert "rfkill: fix the format string to prevent compilation + error" + +This reverts commit 54f0c86b083a4782e37754d3bbe27d4d81c53d23. + +Resolves: #1931710 +--- + src/rfkill/rfkill.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c +index 0b6ba65c3a..6126e9b0c4 100644 +--- a/src/rfkill/rfkill.c ++++ b/src/rfkill/rfkill.c +@@ -336,7 +336,7 @@ static int run(int argc, char *argv[]) { + } + + if ((size_t) l < RFKILL_EVENT_SIZE_V1) +- return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %lu)", ++ return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %d)", + l, RFKILL_EVENT_SIZE_V1); + log_debug("Reading struct rfkill_event: got %zd bytes.", l); + diff --git a/0005-Revert-rfkill-don-t-compare-values-of-different-sign.patch b/0005-Revert-rfkill-don-t-compare-values-of-different-sign.patch new file mode 100644 index 0000000..12fa532 --- /dev/null +++ b/0005-Revert-rfkill-don-t-compare-values-of-different-sign.patch @@ -0,0 +1,34 @@ +From 0f0bf5f2adef31405a51a470d1ce268390cf403c Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Fri, 14 May 2021 16:25:52 +0200 +Subject: [PATCH] Revert "rfkill: don't compare values of different signedness" + +This reverts commit 01095757986d9c93151cab01bb39d888c2094a78. + +Resolves: #1931710 +--- + src/rfkill/rfkill.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c +index 6126e9b0c4..e2d1a1be5f 100644 +--- a/src/rfkill/rfkill.c ++++ b/src/rfkill/rfkill.c +@@ -177,7 +177,7 @@ static int load_state(Context *c, const struct rfkill_event *event) { + ssize_t l = write(c->rfkill_fd, &we, sizeof we); + if (l < 0) + return log_error_errno(errno, "Failed to restore rfkill state for %i: %m", event->idx); +- if ((size_t) l < RFKILL_EVENT_SIZE_V1) ++ if (l < RFKILL_EVENT_SIZE_V1) + return log_error_errno(SYNTHETIC_ERRNO(EIO), + "Couldn't write rfkill event structure, too short (wrote %zd of %zu bytes).", + l, sizeof we); +@@ -335,7 +335,7 @@ static int run(int argc, char *argv[]) { + break; + } + +- if ((size_t) l < RFKILL_EVENT_SIZE_V1) ++ if (l < RFKILL_EVENT_SIZE_V1) + return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %d)", + l, RFKILL_EVENT_SIZE_V1); + log_debug("Reading struct rfkill_event: got %zd bytes.", l); diff --git a/0006-rfkill-add-some-casts-to-silence-Werror-sign-compare.patch b/0006-rfkill-add-some-casts-to-silence-Werror-sign-compare.patch new file mode 100644 index 0000000..9b4fef2 --- /dev/null +++ b/0006-rfkill-add-some-casts-to-silence-Werror-sign-compare.patch @@ -0,0 +1,38 @@ +From 4b396f2546551c81621531d913e0dfab41be522c Mon Sep 17 00:00:00 2001 +From: Luca Boccassi +Date: Tue, 13 Apr 2021 13:17:53 +0100 +Subject: [PATCH] rfkill: add some casts to silence -Werror=sign-compare + +(cherry picked from commit ab1aa6368a883bce88e3162fee2bea14aacedf23) + +Resolves: #1931710 +--- + src/rfkill/rfkill.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c +index e2d1a1be5f..bff1a2886b 100644 +--- a/src/rfkill/rfkill.c ++++ b/src/rfkill/rfkill.c +@@ -177,7 +177,7 @@ static int load_state(Context *c, const struct rfkill_event *event) { + ssize_t l = write(c->rfkill_fd, &we, sizeof we); + if (l < 0) + return log_error_errno(errno, "Failed to restore rfkill state for %i: %m", event->idx); +- if (l < RFKILL_EVENT_SIZE_V1) ++ if ((size_t)l < RFKILL_EVENT_SIZE_V1) /* l cannot be < 0 here. Cast to fix -Werror=sign-compare */ + return log_error_errno(SYNTHETIC_ERRNO(EIO), + "Couldn't write rfkill event structure, too short (wrote %zd of %zu bytes).", + l, sizeof we); +@@ -335,9 +335,9 @@ static int run(int argc, char *argv[]) { + break; + } + +- if (l < RFKILL_EVENT_SIZE_V1) +- return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %d)", +- l, RFKILL_EVENT_SIZE_V1); ++ if ((size_t)l < RFKILL_EVENT_SIZE_V1) /* l cannot be < 0 here. Cast to fix -Werror=sign-compare */ ++ return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %zu)", ++ l, (size_t) RFKILL_EVENT_SIZE_V1); /* Casting necessary to make compiling with different kernel versions happy */ + log_debug("Reading struct rfkill_event: got %zd bytes.", l); + + /* The event structure has more fields. We only care about the first few, so it's OK if we diff --git a/systemd.spec b/systemd.spec index 9ee2c43..d7574a2 100644 --- a/systemd.spec +++ b/systemd.spec @@ -21,7 +21,7 @@ Name: systemd Url: https://www.freedesktop.org/wiki/Software/systemd Version: 248 -Release: 4%{?dist} +Release: 5%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -80,6 +80,9 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[ Patch0001: 0001-rfkill-don-t-compare-values-of-different-signedness.patch Patch0002: 0002-rfkill-fix-the-format-string-to-prevent-compilation-.patch Patch0003: 0003-logind-set-RemoveIPC-to-false-by-default.patch +Patch0004: 0004-Revert-rfkill-fix-the-format-string-to-prevent-compi.patch +Patch0005: 0005-Revert-rfkill-don-t-compare-values-of-different-sign.patch +Patch0006: 0006-rfkill-add-some-casts-to-silence-Werror-sign-compare.patch # Downstream-only patches (9000–9999) # https://github.com/systemd/systemd/pull/17050 @@ -903,6 +906,11 @@ getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-res %files standalone-sysusers -f .file-list-standalone-sysusers %changelog +* Mon May 17 2021 systemd maintenance team - 248-5 +- Revert "rfkill: fix the format string to prevent compilation error" (#1931710) +- Revert "rfkill: don't compare values of different signedness" (#1931710) +- rfkill: add some casts to silence -Werror=sign-compare (#1931710) + * Fri May 14 2021 systemd maintenance team - 248-4 - logind: set RemoveIPC to false by default (#1959836)