From patchwork Sun Apr 7 18:41:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1920597 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VCLgC16hcz1yYt for ; Mon, 8 Apr 2024 04:42:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2222160A6A; Sun, 7 Apr 2024 18:42:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6BNQjrdAUKut; Sun, 7 Apr 2024 18:42:10 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2999B60A76 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 2999B60A76; Sun, 7 Apr 2024 18:42:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 58A771BF293 for ; Sun, 7 Apr 2024 18:42:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CB9E3404B4 for ; Sun, 7 Apr 2024 18:42:08 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id J-A_tXctcO9u for ; Sun, 7 Apr 2024 18:42:08 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32e; helo=mail-wm1-x32e.google.com; envelope-from=fontaine.fabrice@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 8F79740103 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8F79740103 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by smtp2.osuosl.org (Postfix) with ESMTPS id 8F79740103 for ; Sun, 7 Apr 2024 18:42:07 +0000 (UTC) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4162b7f18b6so20156885e9.3 for ; Sun, 07 Apr 2024 11:42:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712515324; x=1713120124; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RtH78fBnW1m4qhHwX5HA4eQVy3PPlVz9eCLPoU0f1Wg=; b=H4iY4JM3DIINmuxL7xFbG/ugaKn/Pw6Ls+lu8GATVAxnLDDe5Bca0gApHXu3rvMLRe o8UMqXROqVYq8716mNuotLkM52d4tDG2JKLUZcPcsTltATtt0ARgkCAm/En3nCI/wXim uTE1xRyBK9Xhk3ZMpUCOTZMNkz9x2pu+cgpP+h1q8RN1SyTOntq6B8raQJ7EnpLqaGmN sKrcuTCC59OJVW6WVYQ2H0CEYMjPuSaU8Awnypzvs0U25M+jTFe8JmgR42r6758evu4r Tgo6Nn6TPV4CMvEgYEg/fFJskmM/r2KcPFel6TWT+5YHJ4spY/YJ/tMjYht+V6zxyoeK sh5w== X-Gm-Message-State: AOJu0YwIhUMCkBJIjorOzWWmq3gAFk95EbrTERysw7Z9ttS2nhy/iBsh hQF6flFOP8xp3yatLwkLVv9k0eHULcwqhZCzhjsqDbfvrupB1AkQzB4UV+ld X-Google-Smtp-Source: AGHT+IH/P5ZV+MxPgCy50VhK5YX97YOixQ5steRiJfpZFyJ+fn16xpED15otpWjtEa3+Ls9nZxvNyQ== X-Received: by 2002:a05:600c:3ac6:b0:416:2c21:96c with SMTP id d6-20020a05600c3ac600b004162c21096cmr5082739wms.40.1712515323984; Sun, 07 Apr 2024 11:42:03 -0700 (PDT) Received: from kali.home (lfbn-ren-1-787-165.w83-197.abo.wanadoo.fr. [83.197.114.165]) by smtp.gmail.com with ESMTPSA id j31-20020a05600c1c1f00b004163de5135dsm5774524wms.34.2024.04.07.11.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 11:41:57 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sun, 7 Apr 2024 20:41:52 +0200 Message-ID: <20240407184152.3241588-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712515324; x=1713120124; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RtH78fBnW1m4qhHwX5HA4eQVy3PPlVz9eCLPoU0f1Wg=; b=Tg4BWEzNbmtNe072q9NjS+vZrrVgtv773gPqfmqbFTkPA8TKF1wXb+zoazyu971dyo flVta1TlyRNCO6utypHjIPrQ4qO3gAFryeDkdZ2d4wrMynswQM5l2+W0G57NA50QBvke r17JKvpW6lOmswR5QhqDXDEz3isIxpluYzC0oQIhyoqDp0fgrG5kXA/fLf1KuP9fQUHg LQgUzIil4s0P7wAOW+ohqC/FQDlTk5VAZHLmOTe/OVeDoZTYmL1UvzIVPBlF2TCBtwTh h1s9HAJWA+vD5QL821Nqz3bU6y2X6FgV7dCjXrevhbaUKgwdU7yeSMJksQhLwbhSV9qa afeQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Tg4BWEzN Subject: [Buildroot] [PATCH 1/1] package/systemd: fix build with gcc >= 13 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Norbert Lange , Fabrice Fontaine , Sen Hastings , "Yann E . MORIN" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Fix the following build failure with gcc >= 13: In file included from ../src/basic/macro.h:446, from ../src/basic/alloc-util.h:10, from ../src/shared/install.c:12: ../src/shared/install.c: In function ‘install_changes_dump’: ../src/shared/install.c:444:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 444 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/e0d6b7d41fefec539a17a3ef5c89c192ce29fd04 Signed-off-by: Fabrice Fontaine --- ...rning-about-empty-directive-argument.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/systemd/0001-install-fix-compiler-warning-about-empty-directive-argument.patch diff --git a/package/systemd/0001-install-fix-compiler-warning-about-empty-directive-argument.patch b/package/systemd/0001-install-fix-compiler-warning-about-empty-directive-argument.patch new file mode 100644 index 0000000000..9408a6da0e --- /dev/null +++ b/package/systemd/0001-install-fix-compiler-warning-about-empty-directive-argument.patch @@ -0,0 +1,45 @@ +From 8040fa55a1cbc34dede3205a902095ecd26c21e3 Mon Sep 17 00:00:00 2001 +From: Luca Boccassi +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.", + +Upstream: https://github.com/systemd/systemd/commit/8040fa55a1cbc34dede3205a902095ecd26c21e3 +Signed-off-by: Fabrice Fontaine +--- + src/shared/install.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/shared/install.c b/src/shared/install.c +index fabf5db7ed2e1..c3a94d1912165 100644 +--- 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. */ +