From patchwork Sun Oct 27 03:38:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 69532 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2E1DD27BBEC; Sun, 27 Oct 2024 03:40:03 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3737E27BBEA for ; Sun, 27 Oct 2024 03:40:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4u7m-0004hJ-UJ; Sat, 26 Oct 2024 23:39:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4u7k-0004h1-HJ for guix-patches@gnu.org; Sat, 26 Oct 2024 23:39:28 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4u7k-0007tt-8q for guix-patches@gnu.org; Sat, 26 Oct 2024 23:39:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=IC5Ab2Drbo8hpV5KcZOJDitS5fh3R1gm4Aa3fAr3Te0=; b=OO9ew81UpKrW8vT2tVHg4JnLSzDAg+N/T0WiEAjkszt5QF+OTtXdM0gJMnI98MgaJgkXKhWmU8Rjb/WtKGHCHBMQ44BN+jb7AAtMkKT4mv8kVfQKlmnn8gTwl4RfjYWAnXOmYQAtfC/0PJdt5XF4n8WHdp2nbuYb507w3GV113wAtDV9q2MftLdOhc0oi7YaGvykSTlHlEQwkvQGGVjGFKbvOhYbgoZgicMHPTnfXrlrQ2VCLJtFH6g6pG+PotRjlaAcbAJzl67dQf8MRE6nxFx3qPF2Gs6x+sH7jKqUQ4R7tRnWZa3Wlw3Ijr8wZOBVit24jItdA1yKrdI6Lg4cPA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4u8I-0003cP-As for guix-patches@gnu.org; Sat, 26 Oct 2024 23:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74004] [PATCH] gnu: busybox: Update to 1.37.0. [security fixes] Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Oct 2024 03:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74004 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 74004@debbugs.gnu.org, 74004-done@debbugs.gnu.org, Nicolas Graves Received: via spool by 74004-done@debbugs.gnu.org id=D74004.173000037813848 (code D ref 74004); Sun, 27 Oct 2024 03:40:02 +0000 Received: (at 74004-done) by debbugs.gnu.org; 27 Oct 2024 03:39:38 +0000 Received: from localhost ([127.0.0.1]:43437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4u7u-0003bG-0n for submit@debbugs.gnu.org; Sat, 26 Oct 2024 23:39:38 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:49190 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4u7p-0003ap-K5; Sat, 26 Oct 2024 23:39:36 -0400 Received: from m (unknown [107.174.64.25]) by APP-01 (Coremail) with SMTP id qwCowAAXAH_CtR1nGETnCg--.55912S2; Sun, 27 Oct 2024 11:38:47 +0800 (CST) From: Zheng Junjie In-Reply-To: <87ed42o3f8.fsf@gnu.org> ("Ludovic =?utf-8?q?Court=C3=A8s?= "'s message of "Sun, 27 Oct 2024 01:22:19 +0200") References: <20241025073849.8217-1-ngraves@ngraves.fr> <87ed43ipc3.fsf@iscas.ac.cn> <87ed42o3f8.fsf@gnu.org> Date: Sun, 27 Oct 2024 11:38:39 +0800 Message-ID: <87wmhu43ls.fsf@iscas.ac.cn> MIME-Version: 1.0 X-CM-TRANSID: qwCowAAXAH_CtR1nGETnCg--.55912S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Jr45XF18tFyfCF45XrW5KFg_yoWfKwcEva 47J3WUW34Ygr4kXFWjgr4DXr12yw1qqF17AF1Utr4Yqr9xZr4UGF48WrWkZF1YgF97KwnI yr18uw18JF1ftjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbskYjsxI4VWkKwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z2 80aVCY1x0267AKxVW8JVW8Jr1lnx0Ee4C267I2x7xF54xIwI0E7I0Y6sxI4wAS0I0E0xvY zxvE52x082IY62kv0487M2AExVA0xI801c8C04v7Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r 4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF 67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2I x0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2 z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73Uj IFyTuYvjxU6cdbDUUUU X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Ludovic Courtès writes: > The updated package fails to build on powerpc64le-linux: > > https://ci.guix.gnu.org/build/6263835/details > > Excerpt: > > --8<---------------cut here---------------start------------->8--- > libbb/hash_md5_sha.c: In function ‘sha1_end’: > libbb/hash_md5_sha.c:1316:35: error: ‘sha1_process_block64_shaNI’ undeclared (first use in this function); did you mean ‘sha1_process_block64’? > 1316 | || ctx->process_block == sha1_process_block64_shaNI > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > | sha1_process_block64 > libbb/hash_md5_sha.c:1316:35: note: each undeclared identifier is reported only once for each function it appears in > make[1]: *** [scripts/Makefile.build:198: libbb/hash_md5_sha.o] Error 1 > make: *** [Makefile:744: libbb] Error 2 > --8<---------------cut here---------------end--------------->8--- > > Ludo’. please try this patch. From f50eacabce6a9955e3b673c202d6a0a6fa2c2623 Mon Sep 17 00:00:00 2001 Message-ID: From: Zheng Junjie Date: Sun, 27 Oct 2024 11:20:16 +0800 Subject: [PATCH] gnu: busybox: Fix build on non x86 platform. * gnu/packages/patches/busybox-add-missing-sha-NI-guard.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/busybox.scm (busybox): Use it. Change-Id: I1e6a24dd5b86871a3479ab6ecd247b31c746ec75 --- gnu/local.mk | 1 + gnu/packages/busybox.scm | 5 +- .../busybox-add-missing-sha-NI-guard.patch | 48 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/busybox-add-missing-sha-NI-guard.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6bd7c750900..af9a08f0613 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1032,6 +1032,7 @@ dist_patch_DATA = \ %D%/packages/patches/breezy-fix-gio.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ + %D%/packages/patches/busybox-add-missing-sha-NI-guard.patch \ %D%/packages/patches/cadical-add-shared-library.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm index 46398da2136..053994a52af 100644 --- a/gnu/packages/busybox.scm +++ b/gnu/packages/busybox.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016-2020, 2023 Efraim Flashner ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice ;;; Copyright © 2022 LuHui +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,7 +45,9 @@ (define-public busybox version ".tar.bz2")) (sha256 (base32 - "1923f21rnlbv1qjvk2qhgqnki5mkgr6z0p8dvzs9jr3l5vrxy49k")))) + "1923f21rnlbv1qjvk2qhgqnki5mkgr6z0p8dvzs9jr3l5vrxy49k")) + (patches + (search-patches "busybox-add-missing-sha-NI-guard.patch")))) (build-system gnu-build-system) (arguments (list #:phases diff --git a/gnu/packages/patches/busybox-add-missing-sha-NI-guard.patch b/gnu/packages/patches/busybox-add-missing-sha-NI-guard.patch new file mode 100644 index 00000000000..9fe78cb0bed --- /dev/null +++ b/gnu/packages/patches/busybox-add-missing-sha-NI-guard.patch @@ -0,0 +1,48 @@ +from https://lists.busybox.net/pipermail/busybox/2024-September/090899.html + +The ENABLE_SHA1_HWACCEL Kconfig symbol is meant to be archicture +agnostic, so can be enabled regardless of whether your build +architecture provides hardware acceleration or not. + At the moment only +x86 implements this, so every piece of optimised code should be guarded +by both ENABLE_SHA1_HWACCEL and (__x86_64__ || __i386__). + This is missing +at one place, so compiling for arm64 breaks when ENABLE_SHA1_HWACCEL is +enabled: +================================ +libbb/hash_md5_sha.c: In function ‘sha1_end’: +libbb/hash_md5_sha.c:1316:28: error: ‘sha1_process_block64_shaNI’ undeclared (first use in this function); did you mean ‘sha1_process_block64’? + + 1316 | || ctx->process_block == sha1_process_block64_shaNI + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ + | sha1_process_block64 +libbb/hash_md5_sha.c:1316:28: note: each undeclared identifier is reported only once for each function it appears in +make[1]: *** [scripts/Makefile.build:197: libbb/hash_md5_sha.o] Error 1 +make: *** [Makefile:744: libbb] Error 2 +================================ + +Add the missing guards around the call to sha1_process_block64_shaNI to +fix the build on other architectures with ENABLE_SHA1_HWACCEL enabled. + +Change-Id: I40bba388422625f4230abf15a5de23e1fdc654fc +Signed-off-by: Andre Przywara +--- + libbb/hash_md5_sha.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c +index 57a801459..75a61c32c 100644 +--- a/libbb/hash_md5_sha.c ++++ b/libbb/hash_md5_sha.c +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf) + hash_size = 8; + if (ctx->process_block == sha1_process_block64 + #if ENABLE_SHA1_HWACCEL ++# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + || ctx->process_block == sha1_process_block64_shaNI ++# endif + #endif + ) { + hash_size = 5; +-- +2.25.1 \ No newline at end of file base-commit: 269e4034fcaf55324187efffb6ed5ba14d5e9286 prerequisite-patch-id: f64c7b345e9d8e398b2f8c146ea8f161679ad369 prerequisite-patch-id: b752a2999f51803f96394183d08b19003d1e6bc0 -- 2.46.0