From patchwork Thu Apr 11 00:46:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zev Weiss X-Patchwork-Id: 42201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57F67CD11C2 for ; Thu, 11 Apr 2024 00:46:43 +0000 (UTC) Received: from thorn.bewilderbeest.net (thorn.bewilderbeest.net [71.19.156.171]) by mx.groups.io with SMTP id smtpd.web10.6493.1712796399475774165 for ; Wed, 10 Apr 2024 17:46:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bewilderbeest.net header.s=thorn header.b=eA1sORgi; spf=pass (domain: bewilderbeest.net, ip: 71.19.156.171, mailfrom: zev@bewilderbeest.net) Received: from hatter.bewilderbeest.net (unknown [IPv6:2602:61:712b:6300::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id 0DC6B77D; Wed, 10 Apr 2024 17:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1712796399; bh=raV87bOTGJVJGNc05b5JkhJwNPN6gu519j9/NWndzkA=; h=From:To:Cc:Subject:Date:From; b=eA1sORgiGg8Px9yCsS7eqKLtdcDkt4iGhkHKCmiOIezd2fpO9nYinNcbV1dYaOy5M kL3jZwsk2EMaWjtjR54900aKWAEm+nN4exCMzfrkihm+uCmuyiy03E7ik/SeZaLvfb 74PCpFEFZ9Kg2udYkuCYRctwLeVwqbB86h+2rsTw= From: Zev Weiss To: openembedded-core@lists.openembedded.org Cc: Zev Weiss , openbmc@lists.ozlabs.org Subject: [OE-core][PATCH v2] bash: Fix file-substitution error-handling bug Date: Wed, 10 Apr 2024 17:46:24 -0700 Message-ID: <20240411004626.17264-1-zev@bewilderbeest.net> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Apr 2024 00:46:43 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198112 This is part of a patch that's been upstream for a while but hasn't yet been released. The bug is causing some downstream difficulties, so a local patch to tide us over until the next release makes things a bit easier. Signed-off-by: Zev Weiss --- Changes in v2: - Added s-o-b line to patch file [patchtest] .../bash/bash/fix-filesubst-errexit.patch | 34 +++++++++++++++++++ meta/recipes-extended/bash/bash_5.2.21.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-extended/bash/bash/fix-filesubst-errexit.patch diff --git a/meta/recipes-extended/bash/bash/fix-filesubst-errexit.patch b/meta/recipes-extended/bash/bash/fix-filesubst-errexit.patch new file mode 100644 index 000000000000..60f1852316e8 --- /dev/null +++ b/meta/recipes-extended/bash/bash/fix-filesubst-errexit.patch @@ -0,0 +1,34 @@ +From 59ddfda14e3c9aa6286bb4c4c0748f7c1324a65a Mon Sep 17 00:00:00 2001 +From: Chet Ramey +Date: Fri, 7 Apr 2023 00:28:46 -0700 +Subject: [PATCH] $( +--- + builtins/evalstring.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builtins/evalstring.c b/builtins/evalstring.c +index df3dd68e2a7e..6612081cd646 100644 +--- a/builtins/evalstring.c ++++ b/builtins/evalstring.c +@@ -753,7 +753,7 @@ open_redir_file (r, fnp) + fd = open(fn, O_RDONLY); + if (fd < 0) + { +- file_error (fn); ++ internal_error ("%s: %s", fn, strerror (errno)); + free (fn); + if (fnp) + *fnp = 0; +-- +2.40.0 + diff --git a/meta/recipes-extended/bash/bash_5.2.21.bb b/meta/recipes-extended/bash/bash_5.2.21.bb index 46d921bbe6c6..532adf4c1a0d 100644 --- a/meta/recipes-extended/bash/bash_5.2.21.bb +++ b/meta/recipes-extended/bash/bash_5.2.21.bb @@ -13,6 +13,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ file://fix-run-builtins.patch \ file://use_aclocal.patch \ file://0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch \ + file://fix-filesubst-errexit.patch \ " SRC_URI[tarball.sha256sum] = "c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8"