From 1b28f949c6ff47bf87bc7c576ed01121a4ae54e7 Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Wed, 10 Apr 2024 17:46:24 -0700 Subject: bash: Fix file-substitution error-handling bug 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. (From OE-Core rev: bf384d6618780dea2df24adac88ba4364cb65b9b) Signed-off-by: Zev Weiss Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../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 +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 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" -- cgit v1.2.3-54-g00ecf