summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bash
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/bash')
-rw-r--r--meta/recipes-extended/bash/bash.inc53
-rw-r--r--meta/recipes-extended/bash/bash/0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch226
-rw-r--r--meta/recipes-extended/bash/bash/build-tests.patch2
-rw-r--r--meta/recipes-extended/bash/bash/execute_cmd.patch28
-rw-r--r--meta/recipes-extended/bash/bash/fix-filesubst-errexit.patch34
-rw-r--r--meta/recipes-extended/bash/bash/makerace.patch52
-rw-r--r--meta/recipes-extended/bash/bash/use_aclocal.patch27
-rw-r--r--meta/recipes-extended/bash/bash_5.1.bb32
-rw-r--r--meta/recipes-extended/bash/bash_5.2.21.bb24
9 files changed, 341 insertions, 137 deletions
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index db326660ea..e541161c75 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -1,5 +1,6 @@
1SUMMARY = "An sh-compatible command language interpreter" 1SUMMARY = "An sh-compatible command language interpreter"
2HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html" 2HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
3DESCRIPTION = "Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features."
3SECTION = "base/shell" 4SECTION = "base/shell"
4 5
5DEPENDS = "ncurses bison-native virtual/libiconv" 6DEPENDS = "ncurses bison-native virtual/libiconv"
@@ -21,18 +22,18 @@ CFLAGS += "-DHEREDOC_PIPESIZE=65536"
21# causes a lot of garbage in non-interactive shells 22# causes a lot of garbage in non-interactive shells
22CFLAGS += "-DBRACKETED_PASTE_DEFAULT=0" 23CFLAGS += "-DBRACKETED_PASTE_DEFAULT=0"
23 24
24ALTERNATIVE_${PN} = "bash sh" 25ALTERNATIVE:${PN} = "bash sh"
25ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash" 26ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
26ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash" 27ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
27ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" 28ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
28ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}" 29ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
29ALTERNATIVE_PRIORITY = "100" 30ALTERNATIVE_PRIORITY = "100"
30 31
31RDEPENDS_${PN} += "base-files" 32RDEPENDS:${PN} += "base-files"
32RDEPENDS_${PN}_class-nativesdk = "" 33RDEPENDS:${PN}:class-nativesdk = ""
33RDEPENDS_${PN}-ptest += "make coreutils perl sed shadow util-linux-setpriv" 34RDEPENDS:${PN}-ptest += "make coreutils perl sed shadow util-linux-setpriv"
34 35
35RDEPENDS_${PN}-ptest_append_libc-glibc = " \ 36RDEPENDS:${PN}-ptest:append:libc-glibc = " \
36 glibc-gconv-big5hkscs \ 37 glibc-gconv-big5hkscs \
37 glibc-gconv-iso8859-1 \ 38 glibc-gconv-iso8859-1 \
38 glibc-utils \ 39 glibc-utils \
@@ -45,13 +46,13 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = " \
45 46
46CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}" 47CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
47 48
48do_configure_prepend () { 49do_configure:prepend () {
49 if [ ! -e ${S}/acinclude.m4 ]; then 50 if [ ! -e ${S}/acinclude.m4 ]; then
50 cat ${S}/aclocal.m4 > ${S}/acinclude.m4 51 cat ${S}/aclocal.m4 > ${S}/acinclude.m4
51 fi 52 fi
52} 53}
53 54
54do_compile_prepend() { 55do_compile:prepend() {
55 # Remove any leftover .build files. This ensures that bash always has the 56 # Remove any leftover .build files. This ensures that bash always has the
56 # same version number and keeps builds reproducible 57 # same version number and keeps builds reproducible
57 rm -f ${B}/.build 58 rm -f ${B}/.build
@@ -61,14 +62,20 @@ do_compile_ptest () {
61 oe_runmake buildtest 62 oe_runmake buildtest
62} 63}
63 64
64do_install_append () { 65do_install:prepend () {
66 # Ensure determinism as this counter increases for each make call
67 rm -f ${B}/.build
68}
69
70do_install:append () {
65 # Move /usr/bin/bash to /bin/bash, if need 71 # Move /usr/bin/bash to /bin/bash, if need
66 if [ "${base_bindir}" != "${bindir}" ]; then 72 if [ "${base_bindir}" != "${bindir}" ]; then
67 mkdir -p ${D}${base_bindir} 73 mkdir -p ${D}${base_bindir}
68 mv ${D}${bindir}/bash ${D}${base_bindir} 74 mv ${D}${bindir}/bash ${D}${base_bindir}
69 fi 75 fi
70} 76}
71do_install_append_class-target () { 77
78fix_absolute_paths () {
72 # Clean buildhost references in bashbug 79 # Clean buildhost references in bashbug
73 sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ 80 sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
74 -e "s,-I${WORKDIR}/\S* ,,g" \ 81 -e "s,-I${WORKDIR}/\S* ,,g" \
@@ -87,12 +94,24 @@ do_install_append_class-target () {
87 ${D}${libdir}/bash/Makefile.inc 94 ${D}${libdir}/bash/Makefile.inc
88} 95}
89 96
97do_install:append:class-target () {
98 fix_absolute_paths
99}
100
101do_install:append:class-nativesdk () {
102 fix_absolute_paths
103}
104
90do_install_ptest () { 105do_install_ptest () {
91 make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test 106 make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
92 cp ${B}/Makefile ${D}${PTEST_PATH} 107 cp ${B}/Makefile ${D}${PTEST_PATH}
108 cp ${B}/config.h ${D}${PTEST_PATH}
109 cp ${B}/version.h ${D}${PTEST_PATH}
110 cp ${S}/y.tab.[ch] ${D}${PTEST_PATH}
93 install -D ${WORKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests 111 install -D ${WORKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests
94 sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ 112 sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
95 -e 's|${DEBUG_PREFIX_MAP}||g' \ 113 -e 's|${DEBUG_PREFIX_MAP}||g' \
114 -e 's|${BUILD_LDFLAGS}||g' \
96 -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \ 115 -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \
97 -e 's:${HOSTTOOLS_DIR}/::g' \ 116 -e 's:${HOSTTOOLS_DIR}/::g' \
98 -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \ 117 -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \
@@ -103,20 +122,22 @@ do_install_ptest () {
103# hash 122# hash
104do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER" 123do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER"
105 124
106pkg_postinst_${PN} () { 125pkg_postinst:${PN} () {
107 grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells 126 grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
108} 127}
109 128
110pkg_postrm_${PN} () { 129pkg_postrm:${PN} () {
111 printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells 130 printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
112} 131}
113 132
114PACKAGES += "${PN}-bashbug" 133PACKAGES += "${PN}-bashbug"
115FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash" 134FILES:${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
116FILES_${PN}-bashbug = "${bindir}/bashbug" 135FILES:${PN}-bashbug = "${bindir}/bashbug"
117 136
118PACKAGE_BEFORE_PN += "${PN}-loadable" 137PACKAGE_BEFORE_PN += "${PN}-loadable"
119RDEPENDS_${PN}-loadable += "${PN}" 138RDEPENDS:${PN}-loadable += "${PN}"
120FILES_${PN}-loadable += "${libdir}/bash/*" 139FILES:${PN}-loadable += "${libdir}/bash/*"
121 140
122RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}" 141# Limit the RPROVIDES here to class target so that if usrmerge is enabled for nativesdk, it does not
142# include host system paths in /bin/
143RPROVIDES:${PN}:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"
diff --git a/meta/recipes-extended/bash/bash/0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch b/meta/recipes-extended/bash/bash/0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch
new file mode 100644
index 0000000000..77d770b364
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch
@@ -0,0 +1,226 @@
1From 721d5be99eb37d31e48bd66d61808a66a4c5ab84 Mon Sep 17 00:00:00 2001
2From: Chet Ramey <chet.ramey@case.edu>
3Date: Mon, 30 Oct 2023 12:16:07 -0400
4Subject: [PATCH] changes to SIGINT handler while waiting for a child; skip
5 vertical whitespace after translating an integer
6
7Upstream-Status: Backport from
8[https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=fe24a6a55e8850298b496c5b9d82f1866eba190e]
9
10[Adjust and drop some codes to be applicable the tree]
11
12Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
13---
14 general.c | 5 +++--
15 jobs.c | 24 ++++++++++++++++--------
16 tests/redir.right | 4 ++--
17 tests/redir11.sub | 2 ++
18 tests/type.right | 16 ++++++++--------
19 tests/type.tests | 24 ++++++++++++------------
20 6 files changed, 43 insertions(+), 32 deletions(-)
21
22diff --git a/general.c b/general.c
23index 85c5a8b6..65e2ee06 100644
24--- a/general.c
25+++ b/general.c
26@@ -262,8 +262,9 @@ legal_number (string, result)
27 if (errno || ep == string)
28 return 0; /* errno is set on overflow or underflow */
29
30- /* Skip any trailing whitespace, since strtoimax does not. */
31- while (whitespace (*ep))
32+ /* Skip any trailing whitespace, since strtoimax does not, using the same
33+ test that strtoimax uses for leading whitespace. */
34+ while (isspace ((unsigned char) *ep))
35 ep++;
36
37 /* If *string is not '\0' but *ep is '\0' on return, the entire string
38diff --git a/jobs.c b/jobs.c
39index 6b986ed7..262d78de 100644
40--- a/jobs.c
41+++ b/jobs.c
42@@ -2718,6 +2718,10 @@ wait_for_background_pids (ps)
43 #define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids
44 static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER;
45
46+/* The current SIGINT handler as set by restore_sigint_handler. Only valid
47+ immediately after restore_sigint_handler, used for continuations. */
48+static SigHandler *cur_sigint_handler = INVALID_SIGNAL_HANDLER;
49+
50 static int wait_sigint_received;
51 static int child_caught_sigint;
52
53@@ -2735,6 +2739,7 @@ wait_sigint_cleanup ()
54 static void
55 restore_sigint_handler ()
56 {
57+ cur_sigint_handler = old_sigint_handler;
58 if (old_sigint_handler != INVALID_SIGNAL_HANDLER)
59 {
60 set_signal_handler (SIGINT, old_sigint_handler);
61@@ -2758,8 +2763,7 @@ wait_sigint_handler (sig)
62 restore_sigint_handler ();
63 /* If we got a SIGINT while in `wait', and SIGINT is trapped, do
64 what POSIX.2 says (see builtins/wait.def for more info). */
65- if (this_shell_builtin && this_shell_builtin == wait_builtin &&
66- signal_is_trapped (SIGINT) &&
67+ if (signal_is_trapped (SIGINT) &&
68 ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler))
69 {
70 trap_handler (SIGINT); /* set pending_traps[SIGINT] */
71@@ -2782,6 +2786,8 @@ wait_sigint_handler (sig)
72 {
73 set_exit_status (128+SIGINT);
74 restore_sigint_handler ();
75+ if (cur_sigint_handler == INVALID_SIGNAL_HANDLER)
76+ set_sigint_handler (); /* XXX - only do this in one place */
77 kill (getpid (), SIGINT);
78 }
79
80@@ -2926,11 +2932,13 @@ wait_for (pid, flags)
81 {
82 SigHandler *temp_sigint_handler;
83
84- temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
85- if (temp_sigint_handler == wait_sigint_handler)
86- internal_debug ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap);
87- else
88- old_sigint_handler = temp_sigint_handler;
89+ temp_sigint_handler = old_sigint_handler;
90+ old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
91+ if (old_sigint_handler == wait_sigint_handler)
92+ {
93+ internal_debug ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap);
94+ old_sigint_handler = temp_sigint_handler;
95+ }
96 waiting_for_child = 0;
97 if (old_sigint_handler == SIG_IGN)
98 set_signal_handler (SIGINT, old_sigint_handler);
99@@ -4136,7 +4144,7 @@ set_job_status_and_cleanup (job)
100 SIGINT (if we reset the sighandler to the default).
101 In this case, we have to fix things up. What a crock. */
102 if (temp_handler == trap_handler && signal_is_trapped (SIGINT) == 0)
103- temp_handler = trap_to_sighandler (SIGINT);
104+ temp_handler = trap_to_sighandler (SIGINT);
105 restore_sigint_handler ();
106 if (temp_handler == SIG_DFL)
107 termsig_handler (SIGINT); /* XXX */
108diff --git a/tests/redir.right b/tests/redir.right
109index 8db10414..9e1403c8 100644
110--- a/tests/redir.right
111+++ b/tests/redir.right
112@@ -154,10 +154,10 @@ foo
113 1
114 7
115 after: 42
116-./redir11.sub: line 53: $(ss= declare -i ss): ambiguous redirect
117+./redir11.sub: line 55: $(ss= declare -i ss): ambiguous redirect
118 after: 42
119 a+=3
120 foo
121 foo
122-./redir11.sub: line 75: 42: No such file or directory
123+./redir11.sub: line 77: 42: No such file or directory
124 42
125diff --git a/tests/redir11.sub b/tests/redir11.sub
126index d417cdb6..ca9854cd 100644
127--- a/tests/redir11.sub
128+++ b/tests/redir11.sub
129@@ -34,6 +34,8 @@ a=4 b=7 ss=4 declare -i ss
130 a=4 b=7 foo
131 echo after: $a
132
133+exec 7>&- 4>&-
134+
135 unset a
136 a=4 echo foo 2>&1 >&$(foo) | { grep -q 'Bad file' || echo 'redir11 bad 3'; }
137 a=1 echo foo 2>&1 >&$(foo) | { grep -q 'Bad file' || echo 'redir11 bad 4'; }
138diff --git a/tests/type.right b/tests/type.right
139index bbc228e8..e0a66745 100644
140--- a/tests/type.right
141+++ b/tests/type.right
142@@ -24,15 +24,15 @@ func ()
143 }
144 while
145 while is a shell keyword
146-./type.tests: line 56: type: m: not found
147-alias m='more'
148-alias m='more'
149-m is aliased to `more'
150+./type.tests: line 56: type: morealias: not found
151+alias morealias='more'
152+alias morealias='more'
153+morealias is aliased to `more'
154 alias
155-alias m='more'
156-alias m='more'
157-alias m='more'
158-m is aliased to `more'
159+alias morealias='more'
160+alias morealias='more'
161+alias morealias='more'
162+morealias is aliased to `more'
163 builtin
164 builtin is a shell builtin
165 /bin/sh
166diff --git a/tests/type.tests b/tests/type.tests
167index fd39c18a..ddc15407 100644
168--- a/tests/type.tests
169+++ b/tests/type.tests
170@@ -25,8 +25,6 @@ type -r ${THIS_SH}
171 type notthere
172 command -v notthere
173
174-alias m=more
175-
176 unset -f func 2>/dev/null
177 func() { echo this is func; }
178
179@@ -49,24 +47,26 @@ command -V func
180 command -v while
181 command -V while
182
183+alias morealias=more
184+
185 # the following two lines should produce the same output
186 # post-3.0 patch makes command -v silent, as posix specifies
187 # first test with alias expansion off (should all fail or produce no output)
188-type -t m
189-type m
190-command -v m
191+type -t morealias
192+type morealias
193+command -v morealias
194 alias -p
195-alias m
196+alias morealias
197
198 # then test with alias expansion on
199 shopt -s expand_aliases
200-type m
201-type -t m
202-command -v m
203+type morealias
204+type -t morealias
205+command -v morealias
206 alias -p
207-alias m
208+alias morealias
209
210-command -V m
211+command -V morealias
212 shopt -u expand_aliases
213
214 command -v builtin
215@@ -76,7 +76,7 @@ command -V /bin/sh
216
217 unset -f func
218 type func
219-unalias m
220+unalias morealias
221 type m
222
223 hash -r
224--
2252.35.5
226
diff --git a/meta/recipes-extended/bash/bash/build-tests.patch b/meta/recipes-extended/bash/bash/build-tests.patch
index ea38bace9b..c1b9b8261f 100644
--- a/meta/recipes-extended/bash/bash/build-tests.patch
+++ b/meta/recipes-extended/bash/bash/build-tests.patch
@@ -4,7 +4,7 @@ Date: Wed, 19 Dec 2012 17:18:31 +0100
4Subject: [PATCH] Add 'ptest' target to Makefile, to run tests without checking 4Subject: [PATCH] Add 'ptest' target to Makefile, to run tests without checking
5 dependencies. 5 dependencies.
6 6
7Upstream-Status: Pending 7Upstream-Status: Inappropriate [ptest specific]
8Signed-off-by: Anders Roxell <anders.roxell@enea.com> 8Signed-off-by: Anders Roxell <anders.roxell@enea.com>
9 9
10Rebase to 5.0 10Rebase to 5.0
diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch
deleted file mode 100644
index 7a9e9a902f..0000000000
--- a/meta/recipes-extended/bash/bash/execute_cmd.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Rebase to 5.0
4Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
5---
6 execute_cmd.c | 6 +++++-
7 1 file changed, 5 insertions(+), 1 deletion(-)
8
9diff --git a/execute_cmd.c b/execute_cmd.c
10index f1d74bf..31674b4 100644
11--- a/execute_cmd.c
12+++ b/execute_cmd.c
13@@ -2567,7 +2567,11 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
14 /* If the `lastpipe' option is set with shopt, and job control is not
15 enabled, execute the last element of non-async pipelines in the
16 current shell environment. */
17- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
18+ if (lastpipe_opt &&
19+#if defined(JOB_CONTROL)
20+ job_control == 0 &&
21+#endif
22+ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
23 {
24 lstdin = move_to_high_fd (0, 1, -1);
25 if (lstdin > 0)
26--
272.7.4
28
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 @@
1From 59ddfda14e3c9aa6286bb4c4c0748f7c1324a65a Mon Sep 17 00:00:00 2001
2From: Chet Ramey <chet.ramey@case.edu>
3Date: Fri, 7 Apr 2023 00:28:46 -0700
4Subject: [PATCH] $(<nosuchfile) is no longer a fatal error with errexit
5 enabled
6
7This is a trimmed-down version of a commit in the bash 'devel' branch
8[1] that contains this fix as well as other unrelated ones.
9
10[1] https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=ec9447ce9392a0f93d96789c3741285fede8a150
11
12Upstream-Status: Backport
13
14Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
15---
16 builtins/evalstring.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/builtins/evalstring.c b/builtins/evalstring.c
20index df3dd68e2a7e..6612081cd646 100644
21--- a/builtins/evalstring.c
22+++ b/builtins/evalstring.c
23@@ -753,7 +753,7 @@ open_redir_file (r, fnp)
24 fd = open(fn, O_RDONLY);
25 if (fd < 0)
26 {
27- file_error (fn);
28+ internal_error ("%s: %s", fn, strerror (errno));
29 free (fn);
30 if (fnp)
31 *fnp = 0;
32--
332.40.0
34
diff --git a/meta/recipes-extended/bash/bash/makerace.patch b/meta/recipes-extended/bash/bash/makerace.patch
deleted file mode 100644
index 9bd7c280fe..0000000000
--- a/meta/recipes-extended/bash/bash/makerace.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1We're seeing pipesize.h being created in parallel:
2
3/bin/sh ../../bash-5.1/builtins/psize.sh > pipesize.h
4/bin/sh ../../bash-5.1/builtins/psize.sh > pipesize.h
5
6./mkbuiltins -D ../../bash-5.1/builtins ../../bash-5.1/builtins/ulimit.def
7x86_64-pokysdk-linux-gcc --sysroot=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/recipe-sysroot -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I../../bash-5.1 -I../../bash-5.1/include -I../../bash-5.1/lib -I../../bash-5.1/builtins -O2 -pipe -fmacro-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0=/usr/src/debug/nativesdk-bash/5.1-r0 -fdebug-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0=/usr/src/debug/nativesdk-bash/5.1-r0 -fdebug-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/recipe-sysroot= -fdebug-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/recipe-sysroot-native= ulimit.c || ( rm -f ulimit.c ; exit 1 )
8make[1]: Leaving directory '/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/build/builtins'
9rm -f redir.o
10x86_64-pokysdk-linux-gcc --sysroot=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/recipe-sysroot -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-pokysdk-linux-gnu"' -DCONF_VENDOR='"pokysdk"' -DLOCALEDIR='"/opt/poky/3.2+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I../bash-5.1 -I../bash-5.1/include -I../bash-5.1/lib -O2 -pipe -fmacro-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0=/usr/src/debug/nativesdk-bash/5.1-r0 -fdebug-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0=/usr/src/debug/nativesdk-bash/5.1-r0 -fdebug-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/recipe-sysroot= -fdebug-prefix-map=/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/recipe-sysroot-native= -c ../bash-5.1/redir.c
11In file included from ../../bash-5.1/builtins/../../bash-5.1/builtins/ulimit.def:95:
12pipesize.h:9:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
13 9 | bash-5.1/builtins/psize.sh: 37: ../../bash-5.1/builtins/psize.sh: ./psize.aux: Text file busy
14 | ^
15make[1]: *** [Makefile:119: ulimit.o] Error 1
16make[1]: Leaving directory '/home/pokybuild/yocto-worker/multilib/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-bash/5.1-r0/build/builtins'
17make: *** [Makefile:737: builtins/libbuiltins.a] Error 1
18make: *** Waiting for unfinished jobs....
19In file included from ../bash-5.1/redir.c:61:
20./builtins/pipesize.h:9:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
21 9 | bash-5.1/builtins/psize.sh: 37: ../../bash-5.1/builtins/psize.sh: ./psize.aux: Text file busy
22 | ^
23make: *** [Makefile:101: redir.o] Error 1
24WARNING: exit code 1 from a shell command.
25
26which happens since builtins/ulimit.o depends on pipesize.h as well as a top
27level dependency. This means:
28
29 @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) pipesize.h ) || exit 1
30
31races with:
32
33 @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} targets ) || exit 1
34
35Hack around this by forcing BUILTINS_LIBRARY onto pipesize.h as a dependency.
36
37Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-bash/2021-01/msg00152.html]
38Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
39
40Index: bash-5.1/Makefile.in
41===================================================================
42--- bash-5.1.orig/Makefile.in
43+++ bash-5.1/Makefile.in
44@@ -746,7 +746,7 @@ ${DEFDIR}/bashgetopt.o: $(BUILTIN_SRCDIR
45 ${DEFDIR}/builtext.h: $(BUILTIN_DEFS)
46 @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) builtext.h ) || exit 1
47
48-${DEFDIR}/pipesize.h:
49+${DEFDIR}/pipesize.h: $(BUILTINS_LIBRARY)
50 @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) pipesize.h ) || exit 1
51
52 $(SDIR)/man2html$(EXEEXT): ${SUPPORT_SRC}/man2html.c
diff --git a/meta/recipes-extended/bash/bash/use_aclocal.patch b/meta/recipes-extended/bash/bash/use_aclocal.patch
index bebaa08bfe..bd6870b386 100644
--- a/meta/recipes-extended/bash/bash/use_aclocal.patch
+++ b/meta/recipes-extended/bash/bash/use_aclocal.patch
@@ -1,3 +1,8 @@
1From d1bf23817afffd5917b74da6946e0c3b7e63e336 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 28 Dec 2020 21:04:27 +0100
4Subject: [PATCH] bash: update 5.0 -> 5.1
5
1Including m4 files directly like this confuses autotools.bbclass, remove 6Including m4 files directly like this confuses autotools.bbclass, remove
2the references and rely upon aclocal to collect the m4 files together 7the references and rely upon aclocal to collect the m4 files together
3as needed instead making it work like other autotools based projects. 8as needed instead making it work like other autotools based projects.
@@ -5,17 +10,23 @@ as needed instead making it work like other autotools based projects.
5Upstream-Status: Inappropriate [OE configuration specific] 10Upstream-Status: Inappropriate [OE configuration specific]
6RP 2021/1/20 11RP 2021/1/20
7 12
8Index: bash-5.1/configure.ac 13---
9=================================================================== 14 configure.ac | 43 -------------------------------------------
10--- bash-5.1.orig/configure.ac 15 1 file changed, 43 deletions(-)
11+++ bash-5.1/configure.ac 16
12@@ -688,47 +688,6 @@ if test x$SIZE = x; then 17diff --git a/configure.ac b/configure.ac
18index 50a6e20..a3b5bd7 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -710,49 +710,6 @@ if test x$SIZE = x; then
13 fi 22 fi
14 AC_SUBST(SIZE) 23 AC_SUBST(SIZE)
15 24
16-m4_include([m4/stat-time.m4]) 25-m4_include([m4/stat-time.m4])
17-m4_include([m4/timespec.m4]) 26-m4_include([m4/timespec.m4])
18- 27-
28-m4_include([m4/strtoimax.m4])
29-
19-dnl include files for gettext 30-dnl include files for gettext
20- 31-
21-m4_include([m4/codeset.m4]) 32-m4_include([m4/codeset.m4])
@@ -54,6 +65,6 @@ Index: bash-5.1/configure.ac
54-m4_include([m4/wint_t.m4]) 65-m4_include([m4/wint_t.m4])
55-m4_include([m4/xsize.m4]) 66-m4_include([m4/xsize.m4])
56- 67-
57 dnl Turn on any extensions available in the GNU C library. 68 dnl C compiler characteristics
58 AC_DEFINE(_GNU_SOURCE, 1) 69 AC_C_CONST
59 70 AC_C_INLINE
diff --git a/meta/recipes-extended/bash/bash_5.1.bb b/meta/recipes-extended/bash/bash_5.1.bb
deleted file mode 100644
index e5e013b734..0000000000
--- a/meta/recipes-extended/bash/bash_5.1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
1require bash.inc
2
3# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6
7SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
8 ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-001;apply=yes;striplevel=0;name=patch001 \
9 ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-002;apply=yes;striplevel=0;name=patch002 \
10 ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-003;apply=yes;striplevel=0;name=patch003 \
11 ${GNU_MIRROR}/bash/bash-${PV}-patches/bash51-004;apply=yes;striplevel=0;name=patch004 \
12 file://execute_cmd.patch \
13 file://mkbuiltins_have_stringize.patch \
14 file://build-tests.patch \
15 file://test-output.patch \
16 file://run-ptest \
17 file://run-bash-ptests \
18 file://fix-run-builtins.patch \
19 file://use_aclocal.patch \
20 file://makerace.patch \
21 "
22
23SRC_URI[tarball.sha256sum] = "cc012bc860406dcf42f64431bcd3d2fa7560c02915a601aba9cd597a39329baa"
24SRC_URI[patch001.sha256sum] = "ebb07b3dbadd98598f078125d0ae0d699295978a5cdaef6282fe19adef45b5fa"
25SRC_URI[patch002.sha256sum] = "15ea6121a801e48e658ceee712ea9b88d4ded022046a6147550790caf04f5dbe"
26SRC_URI[patch003.sha256sum] = "22f2cc262f056b22966281babf4b0a2f84cb7dd2223422e5dcd013c3dcbab6b1"
27SRC_URI[patch004.sha256sum] = "9aaeb65664ef0d28c0067e47ba5652b518298b3b92d33327d84b98b28d873c86"
28
29DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
30DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
31
32BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/bash/bash_5.2.21.bb b/meta/recipes-extended/bash/bash_5.2.21.bb
new file mode 100644
index 0000000000..532adf4c1a
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_5.2.21.bb
@@ -0,0 +1,24 @@
1require bash.inc
2
3# GPL-2.0-or-later (< 4.0), GPL-3.0-or-later (>= 4.0)
4LICENSE = "GPL-3.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6
7SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
8 file://mkbuiltins_have_stringize.patch \
9 file://build-tests.patch \
10 file://test-output.patch \
11 file://run-ptest \
12 file://run-bash-ptests \
13 file://fix-run-builtins.patch \
14 file://use_aclocal.patch \
15 file://0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch \
16 file://fix-filesubst-errexit.patch \
17 "
18
19SRC_URI[tarball.sha256sum] = "c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8"
20
21DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
22DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
23
24BBCLASSEXTEND = "nativesdk"