public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/, sys-apps/systemd/files/
Date: Mon,  4 Mar 2024 02:51:55 +0000 (UTC)	[thread overview]
Message-ID: <1709520692.a25cf19d6f0dd41643c17cdfebbd87fde5e0e336.sam@gentoo> (raw)

commit:     a25cf19d6f0dd41643c17cdfebbd87fde5e0e336
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  4 02:50:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar  4 02:51:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a25cf19d

sys-apps/systemd: backport another stringop-truncation fix

No revbump as this is a false positive (the stringop-* warnings are known
to be noisy/flaky).

Closes: https://bugs.gentoo.org/916518
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/255-install-format-overflow.patch        | 43 ++++++++++++++++++++++
 sys-apps/systemd/systemd-255.4.ebuild              |  1 +
 2 files changed, 44 insertions(+)

diff --git a/sys-apps/systemd/files/255-install-format-overflow.patch b/sys-apps/systemd/files/255-install-format-overflow.patch
new file mode 100644
index 000000000000..3dca7d8e8ec7
--- /dev/null
+++ b/sys-apps/systemd/files/255-install-format-overflow.patch
@@ -0,0 +1,43 @@
+https://github.com/systemd/systemd-stable/commit/f85d2c6d1023b1fe558142440b1d63c4fc5f7c98
+https://github.com/systemd/systemd/issues/30448
+https://bugs.gentoo.org/916518
+
+From f85d2c6d1023b1fe558142440b1d63c4fc5f7c98 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <bluca@debian.org>
+Date: Sat, 24 Feb 2024 12:05:44 +0000
+Subject: [PATCH] install: fix compiler warning about empty directive argument
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On ppc64el with gcc 13.2 on Ubuntu 24.04:
+
+3s In file included from ../src/basic/macro.h:386,
+483s                  from ../src/basic/alloc-util.h:10,
+483s                  from ../src/shared/install.c:12:
+483s ../src/shared/install.c: In function ‘install_changes_dump’:
+483s ../src/shared/install.c:432:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
+483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
+483s       |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+483s ../src/shared/install.c:432:75: note: format string is defined here
+483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
+
+(cherry picked from commit 8040fa55a1cbc34dede3205a902095ecd26c21e3)
+--- a/src/shared/install.c
++++ b/src/shared/install.c
+@@ -340,9 +340,12 @@ void install_changes_dump(int r, const char *verb, const InstallChange *changes,
+         assert(verb || r >= 0);
+ 
+         for (size_t i = 0; i < n_changes; i++) {
+-                if (changes[i].type < 0)
+-                        assert(verb);
+                 assert(changes[i].path);
++                /* This tries to tell the compiler that it's safe to use 'verb' in a string format if there
++                 * was an error, but the compiler doesn't care and fails anyway, so strna(verb) is used
++                 * too. */
++                assert(verb || changes[i].type >= 0);
++                verb = strna(verb);
+ 
+                 /* When making changes here, make sure to also change install_error() in dbus-manager.c. */
+ 
+

diff --git a/sys-apps/systemd/systemd-255.4.ebuild b/sys-apps/systemd/systemd-255.4.ebuild
index 183166373f1d..c1d288b695d5 100644
--- a/sys-apps/systemd/systemd-255.4.ebuild
+++ b/sys-apps/systemd/systemd-255.4.ebuild
@@ -248,6 +248,7 @@ src_unpack() {
 
 src_prepare() {
 	local PATCHES=(
+		"${FILESDIR}"/255-install-format-overflow.patch
 	)
 
 	if ! use vanilla; then


             reply	other threads:[~2024-03-04  2:51 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04  2:51 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-28  0:51 [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/, sys-apps/systemd/files/ Sam James
2024-05-05 15:43 Sam James
2024-04-18  4:20 Mike Gilbert
2024-02-24 15:51 Mike Gilbert
2023-12-24 11:58 Sam James
2023-12-12  2:50 Sam James
2023-08-17  1:08 Mike Gilbert
2023-08-05 23:07 Sam James
2023-08-02 21:14 Sam James
2023-07-27 22:55 Sam James
2023-02-26 19:27 Mike Gilbert
2022-11-07 16:15 Mike Gilbert
2022-10-19 18:13 Mike Gilbert
2022-05-21 22:23 Mike Gilbert
2022-03-25  4:56 Sam James
2021-12-25 18:20 Mike Gilbert
2021-12-09 19:40 Mike Gilbert
2021-11-14 23:53 Mike Gilbert
2021-11-07  5:27 Georgy Yakovlev
2021-09-14 23:47 Mike Gilbert
2021-09-08 18:29 Mike Gilbert
2021-09-08 18:29 Mike Gilbert
2021-07-08 20:23 Mike Gilbert
2021-06-20 17:18 Mike Gilbert
2021-05-19 19:37 Mike Gilbert
2020-11-08 17:51 Mike Gilbert
2020-05-21  0:13 Mike Gilbert
2020-04-27 14:41 Mike Gilbert
2020-04-17 16:36 Mike Gilbert
2020-02-06 15:24 Mike Gilbert
2020-02-05 18:24 Mike Gilbert
2019-11-17 19:56 Mike Gilbert
2019-08-11 16:28 Mike Gilbert
2019-07-10 18:21 Mike Gilbert
2019-07-10 15:37 Mike Gilbert
2019-07-08 15:47 Mike Gilbert
2019-06-08 20:44 Mike Gilbert
2019-02-18 23:32 Mike Gilbert
2018-12-26  4:02 Mike Gilbert
2018-05-24 20:33 Mike Gilbert
2018-04-18 16:50 Mike Gilbert
2018-04-05 20:12 Mike Gilbert
2018-04-01 16:31 Mike Gilbert
2018-04-01 16:31 Mike Gilbert
2018-03-26 21:17 Mike Gilbert
2018-03-10 17:29 Mike Gilbert
2018-02-08 17:17 Jason Donenfeld
2017-12-19  2:01 Mike Gilbert
2017-12-17 19:03 Mike Gilbert
2017-11-19 20:09 Mike Gilbert
2017-10-26 21:37 Mike Gilbert
2017-10-08 14:40 Mike Gilbert
2017-08-13 23:08 Mike Gilbert
2017-07-17 15:28 Mike Gilbert
2017-07-02 15:56 Mike Gilbert
2017-06-28 20:31 Mike Gilbert
2017-01-10 22:22 Mike Gilbert
2017-01-10 22:22 Mike Gilbert
2016-11-04  1:06 Mike Gilbert
2016-10-30  3:52 Mike Gilbert
2016-04-10  1:05 Mike Gilbert
2015-09-26  1:53 Mike Gilbert
2015-09-25 14:52 Mike Gilbert
2015-08-22 17:16 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1709520692.a25cf19d6f0dd41643c17cdfebbd87fde5e0e336.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox