All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][scarthgap 16/21] bash: Fix file-substitution error-handling bug
Date: Mon, 20 May 2024 06:33:27 -0700	[thread overview]
Message-ID: <6a81ccc68f8389ca1c9c8eed009388045beea9e4.1716211838.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1716211838.git.steve@sakoman.com>

From: Zev Weiss <zev@bewilderbeest.net>

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 <zev@bewilderbeest.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit bf384d6618780dea2df24adac88ba4364cb65b9b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 .../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 0000000000..60f1852316
--- /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 <chet.ramey@case.edu>
+Date: Fri, 7 Apr 2023 00:28:46 -0700
+Subject: [PATCH] $(<nosuchfile) is no longer a fatal error with errexit
+ enabled
+
+This is a trimmed-down version of a commit in the bash 'devel' branch
+[1] that contains this fix as well as other unrelated ones.
+
+[1] https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=ec9447ce9392a0f93d96789c3741285fede8a150
+
+Upstream-Status: Backport
+
+Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
+---
+ 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 46d921bbe6..532adf4c1a 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"
-- 
2.34.1



  parent reply	other threads:[~2024-05-20 13:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-20 13:33 [OE-core][scarthgap 00/21] Patch review Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 01/21] ncurses: Fix CVE-2023-50495 Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 02/21] openssl: patch CVE-2024-4603 Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 03/21] glib-2.0: Upgrade 2.78.4 -> 2.78.5 Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 04/21] glib-2.0: Upgrade 2.78.5 -> 2.78.6 Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 05/21] glibc: Update to latest on stable 2.39 branch Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 06/21] " Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 07/21] glibc: correct license Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 08/21] llvm: upgrade 18.1.2 -> 18.1.3 Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 09/21] webkitgtk: 2.44.0 -> 2.44.1 Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 10/21] uboot-sign: fix loop in do_uboot_assemble_fitimage Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 11/21] go: Drop the linkmode completely Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 12/21] Revert "goarch: disable dynamic linking globally" Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 13/21] classes: image_types: apply EXTRA_IMAGECMD:squashfs* in oe_mksquashfs() Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 14/21] libcgroup_3.1.0: fix build on non-systemd systems Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 15/21] patchtest: test_metadata: fix invalid escape sequences Steve Sakoman
2024-05-20 13:33 ` Steve Sakoman [this message]
2024-05-20 13:33 ` [OE-core][scarthgap 17/21] recipetool: Handle unclean response in go resolver Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 18/21] recipetool: Handle several go-import tags " Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 19/21] lib/oe/package-manager: allow including self in create_packages_dir Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 20/21] selftest/classes: add localpkgfeed class Steve Sakoman
2024-05-20 13:33 ` [OE-core][scarthgap 21/21] oeqa/selftest/debuginfod: use localpkgfeed to speed server startup Steve Sakoman

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=6a81ccc68f8389ca1c9c8eed009388045beea9e4.1716211838.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.