diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-extended/bash | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | talos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz talos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-extended/bash')
14 files changed, 585 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch new file mode 100644 index 000000000..91341ee69 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch @@ -0,0 +1,44 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Signed-off-by: Anders Roxell <anders.roxell@enea.com> +Upstream-Status: Pending +--- +diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in +--- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500 ++++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500 +@@ -803,17 +803,31 @@ + fi + + recho$(EXEEXT): $(SUPPORT_SRC)recho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) -o $@ $< + + zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) -o $@ $< + + printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) -o $@ $< + +-test tests check: force $(Program) $(TESTS_SUPPORT) ++test tests check: ++ @$(MAKE) install-test ++ @$(MAKE) runtest ++ ++install-test: buildtest ++ifeq ($(origin INSTALL_TEST_DIR), undefined) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests ++else ++ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) ++ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ ++ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) ++endif ++ ++buildtest: force $(Program) $(TESTS_SUPPORT) ++ ++runtest: + @( cd $(srcdir)/tests && \ + PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch new file mode 100644 index 000000000..ee756dc9e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch @@ -0,0 +1,33 @@ +From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Wed, 15 Jul 2015 00:54:33 -0700 +Subject: [PATCH] dont include target CFLAGS in host LDFLAGS + +Building the host tool 'mkbuiltins' will fail if the target CFLAGS +contains an option which isn't supported by the host's gcc. To prevent +the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead +of CFLAGS. + +Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only] + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + builtins/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/builtins/Makefile.in b/builtins/Makefile.in +index e027f7a..ebfddf3 100644 +--- a/builtins/Makefile.in ++++ b/builtins/Makefile.in +@@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@ + + LIBS = @LIBS@ + LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) +-LDFLAGS_FOR_BUILD = $(LDFLAGS) ++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) + LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ + #LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ + LIBS_FOR_BUILD = $(LIBS) +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch new file mode 100644 index 000000000..c4229a7ed --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch @@ -0,0 +1,29 @@ +On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by +the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers +use the STRING() macro from unistd.h. A header in the bash sources overrides +the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the +wrappers to generate calls to 'xread' and 'xopen', which do not exist, +resulting in a failure to link. + +Assume we have stringize support when cross-compiling, which works around the +issue. + +It may be best for upstream to either give up on supporting compilers without +stringize support, or to not define STRING() at all when FORTIFY_SOURCES is +defined, letting the unistd.h one be used, instead. + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson <chris_larson@mentor.com> +Signed-off-by: Saul Wold <sgw@linux.intel.com> + +--- bash-4.2.orig/builtins/mkbuiltins.c ++++ bash-4.2/builtins/mkbuiltins.c +@@ -28,6 +28,7 @@ + # define HAVE_STDLIB_H + + # define HAVE_RENAME ++# define HAVE_STRINGIZE + #endif /* CROSS_COMPILING */ + + #if defined (HAVE_UNISTD_H) diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/run-ptest new file mode 100644 index 000000000..8dd3b9981 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +make -k THIS_SH=/bin/bash BUILD_DIR=. runtest diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/test-output.patch new file mode 100644 index 000000000..2b09b7d97 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/test-output.patch @@ -0,0 +1,25 @@ +Add FAIL/PASS output to test output. + +Signed-off-by: Björn Stenberg <bjst@enea.com> +Upstream-Status: Pending +--- +diff -uNr a/tests/run-all b/tests/run-all +--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 ++++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 +@@ -22,7 +22,15 @@ + case $x in + $0|run-minimal|run-gprof) ;; + *.orig|*~) ;; +- *) echo $x ; sh $x ;; ++ *) echo $x ++ output=`sh $x` ++ if [ -n "$output" ]; then ++ echo "$output" ++ echo "FAIL: $x" ++ else ++ echo "PASS: $x" ++ fi ++ ;; + esac + done + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc new file mode 100644 index 000000000..93ca00b25 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc @@ -0,0 +1,65 @@ +SUMMARY = "An sh-compatible command language interpreter" +HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html" +SECTION = "base/shell" + +DEPENDS = "ncurses bison-native" + +inherit autotools gettext texinfo update-alternatives ptest + +EXTRA_AUTORECONF += "--exclude=autoheader" +EXTRA_OECONF = "--enable-job-control --without-bash-malloc" + +# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the +# startup files, even if they are not interactive. +# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137. +CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS" + +ALTERNATIVE_${PN} = "sh" +ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" +ALTERNATIVE_PRIORITY = "100" + +RDEPENDS_${PN} += "base-files" +RDEPENDS_${PN}_class-nativesdk = "" +RDEPENDS_${PN}-ptest += "make" + +USERADD_PACKAGES = "${PN}-ptest" +USERADD_PARAM_${PN}-ptest = "--create-home --user-group test" + +do_configure_prepend () { + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +do_compile_ptest () { + oe_runmake buildtest +} + +do_install_append () { + # Move /usr/bin/bash to /bin/bash, if need + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + mv ${D}${bindir}/bash ${D}${base_bindir} + fi +} +do_install_append_class-target () { + # Clean host path in bashbug + sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e "s,-I${WORKDIR}/\S* ,,g" ${D}${bindir}/bashbug +} + +do_install_ptest () { + make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test + cp ${B}/Makefile ${D}${PTEST_PATH} + sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" ${D}${PTEST_PATH}/Makefile +} + +pkg_postinst_${PN} () { + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells +} + +pkg_postrm_${PN} () { + printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells +} diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/build-tests.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/build-tests.patch new file mode 100644 index 000000000..73a81b60d --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/build-tests.patch @@ -0,0 +1,55 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Upstream-Status: Pending +Signed-off-by: Anders Roxell <anders.roxell@enea.com> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Makefile.in | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -848,20 +848,34 @@ maybe-clean: + fi + + recho$(EXEEXT): $(SUPPORT_SRC)recho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + + zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + + printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + + xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + +-test tests check: force $(Program) $(TESTS_SUPPORT) ++test tests check: ++ @$(MAKE) install-test ++ @$(MAKE) runtest ++ ++install-test: buildtest ++ifeq ($(origin INSTALL_TEST_DIR), undefined) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests ++else ++ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) ++ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ ++ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) ++endif ++ ++buildtest: force $(Program) $(TESTS_SUPPORT) ++ ++runtest: + @( cd $(srcdir)/tests && \ + PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) + +-- +1.8.1.2 + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch new file mode 100644 index 000000000..81f8f0a9c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/execute_cmd.patch @@ -0,0 +1,17 @@ +Upstream-Status: Inappropriate [embedded specific] + +--- execute_cmd.c.orig Fri Jun 3 13:34:42 2011 ++++ execute_cmd.c Fri Jun 3 13:36:41 2011 +@@ -2202,7 +2202,11 @@ + /* If the `lastpipe' option is set with shopt, and job control is not + enabled, execute the last element of non-async pipelines in the + current shell environment. */ +- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) ++ if (lastpipe_opt && ++#if defined(JOB_CONTROL) ++ job_control == 0 && ++#endif ++ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { + lstdin = move_to_high_fd (0, 0, 255); + if (lstdin > 0) diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch new file mode 100644 index 000000000..7f099ae0c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch @@ -0,0 +1,169 @@ +From 2c30dff8ea8b17ad5ba9881e35ad1eba9c515f13 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 26 Nov 2015 22:09:07 -0500 +Subject: [PATCH] fix run-coproc/run-heredoc/run-execscript/run-test/ failed + +FAIL: run-coproc +update test case:tests/coproc.right, tests/coproc.tests +git://git.sv.gnu.org/bash.git bash-4.4-testing + +FAIL: run-heredoc +update test case: tests/heredoc.right tests/heredoc3.sub +git://git.sv.gnu.org/bash.git bash-4.4-testing + +FAIL: run-execscript: +the test suite should not be run as root + +FAIL: run-test +the test suite should not be run as root + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + tests/coproc.right | 5 +---- + tests/coproc.tests | 30 +++++++++++++++++++++++++----- + tests/heredoc.right | 5 ++--- + tests/heredoc3.sub | 3 ++- + tests/run-execscript | 3 ++- + tests/run-test | 3 ++- + 6 files changed, 34 insertions(+), 15 deletions(-) + +diff --git a/tests/coproc.right b/tests/coproc.right +index 6d9deaa..94b001c 100644 +--- a/tests/coproc.right ++++ b/tests/coproc.right +@@ -1,11 +1,8 @@ +-84575 + 63 60 + a b c +-84577 + 63 60 + flop +-./coproc.tests: line 22: 84577 Terminated coproc REFLECT { cat -; } +-84579 ++coproc.tests: REFLECT: status 143 + 63 60 + FOO + 63 60 +diff --git a/tests/coproc.tests b/tests/coproc.tests +index 8be3563..d347eb7 100644 +--- a/tests/coproc.tests ++++ b/tests/coproc.tests +@@ -1,6 +1,13 @@ ++: ${TMPDIR:=/tmp} ++TMPOUT=${TMPDIR}/coproc-wait-$BASHPID ++ + coproc { echo a b c; sleep 2; } + +-echo $COPROC_PID ++case $COPROC_PID in ++[0-9]*) ;; ++*) echo COPROC_PID not integer ;; ++esac ++ + echo ${COPROC[@]} + + read LINE <&${COPROC[0]} +@@ -10,7 +17,11 @@ wait $COPROC_PID + + coproc REFLECT { cat - ; } + +-echo $REFLECT_PID ++case $REFLECT_PID in ++[0-9]*) ;; ++*) echo REFLECT_PID not integer ;; ++esac ++ + echo ${REFLECT[@]} + + echo flop >&${REFLECT[1]} +@@ -18,12 +29,21 @@ read LINE <&${REFLECT[0]} + + echo $LINE + +-kill $REFLECT_PID +-wait $REFLECT_PID ++{ sleep 1; kill $REFLECT_PID; } & ++wait $REFLECT_PID >$TMPOUT 2>&1 || echo "coproc.tests: REFLECT: status $?" ++grep 'Terminated.*coproc.*REFLECT' < $TMPOUT >/dev/null 2>&1 || { ++ echo "coproc.tests: wait for REFLECT failed" >&2 ++} ++rm -f $TMPOUT ++exec 2>&1 + + coproc xcase -n -u + +-echo $COPROC_PID ++case $COPROC_PID in ++[0-9]*) ;; ++*) echo COPROC_PID not integer ;; ++esac ++ + echo ${COPROC[@]} + + echo foo >&${COPROC[1]} +diff --git a/tests/heredoc.right b/tests/heredoc.right +index 6abaa1f..8df91c5 100644 +--- a/tests/heredoc.right ++++ b/tests/heredoc.right +@@ -76,15 +76,14 @@ ENDEND + end ENDEND + hello + end hello +-x star x + end x*x + helloEND + end helloEND + hello + \END + end hello<NL>\END +-./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF') +-./heredoc3.sub: line 75: syntax error: unexpected end of file ++./heredoc3.sub: line 75: warning: here-document at line 73 delimited by end-of-file (wanted `EOF') ++./heredoc3.sub: line 76: syntax error: unexpected end of file + comsub here-string + ./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF') + hi +diff --git a/tests/heredoc3.sub b/tests/heredoc3.sub +index 73a111e..9d3d846 100644 +--- a/tests/heredoc3.sub ++++ b/tests/heredoc3.sub +@@ -49,9 +49,10 @@ hello + END + echo end hello + +-cat <<x*x & touch 'x*x' ++cat <<x*x >/dev/null & touch 'x*x' + x star x + x*x ++wait $! + echo end 'x*x' + rm 'x*x' + +diff --git a/tests/run-execscript b/tests/run-execscript +index f97ab21..0d00a1b 100644 +--- a/tests/run-execscript ++++ b/tests/run-execscript +@@ -5,5 +5,6 @@ echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory" + echo "warning: produce diff output, please do not consider this a test failure" >&2 + echo "warning: if diff output differing only in the location of the bash" >&2 + echo "warning: binary appears, please do not consider this a test failure" >&2 +-${THIS_SH} ./execscript > /tmp/xx 2>&1 ++rm -f /tmp/xx ++su -c "${THIS_SH} ./execscript > /tmp/xx 2>&1" test + diff /tmp/xx exec.right && rm -f /tmp/xx +diff --git a/tests/run-test b/tests/run-test +index b2482c3..2e8f049 100644 +--- a/tests/run-test ++++ b/tests/run-test +@@ -1,4 +1,5 @@ + unset GROUPS UID 2>/dev/null + +-${THIS_SH} ./test.tests >/tmp/xx 2>&1 ++rm -f /tmp/xx ++su -c "${THIS_SH} ./test.tests >/tmp/xx 2>&1" test + diff /tmp/xx test.right && rm -f /tmp/xx +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch new file mode 100644 index 000000000..a9391d6ca --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch @@ -0,0 +1,26 @@ +On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by +the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers +use the STRING() macro from unistd.h. A header in the bash sources overrides +the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the +wrappers to generate calls to 'xread' and 'xopen', which do not exist, +resulting in a failure to link. + +Assume we have stringize support when cross-compiling, which works around the +issue. + +It may be best for upstream to either give up on supporting compilers without +stringize support, or to not define STRING() at all when FORTIFY_SOURCES is +defined, letting the unistd.h one be used, instead. + +Upstream-Status: Pending + +--- bash-4.2.orig/builtins/mkbuiltins.c ++++ bash-4.2/builtins/mkbuiltins.c +@@ -28,6 +28,7 @@ + # define HAVE_STDLIB_H + + # define HAVE_RENAME ++# define HAVE_STRINGIZE + #endif /* CROSS_COMPILING */ + + #if defined (HAVE_UNISTD_H) diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest new file mode 100644 index 000000000..2098fa46b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/test-output.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/test-output.patch new file mode 100644 index 000000000..2b09b7d97 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/test-output.patch @@ -0,0 +1,25 @@ +Add FAIL/PASS output to test output. + +Signed-off-by: Björn Stenberg <bjst@enea.com> +Upstream-Status: Pending +--- +diff -uNr a/tests/run-all b/tests/run-all +--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 ++++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 +@@ -22,7 +22,15 @@ + case $x in + $0|run-minimal|run-gprof) ;; + *.orig|*~) ;; +- *) echo $x ; sh $x ;; ++ *) echo $x ++ output=`sh $x` ++ if [ -n "$output" ]; then ++ echo "$output" ++ echo "FAIL: $x" ++ else ++ echo "PASS: $x" ++ fi ++ ;; + esac + done + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb new file mode 100644 index 000000000..d42b292b0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb @@ -0,0 +1,46 @@ +require bash.inc + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a" + +PR = "r11" + +SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://run-ptest \ + file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \ + " + +SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8" +SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348" +SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c" +SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f" +SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377" +SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642" +SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849" +SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef" +SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1" +SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61" +SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46" +SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e" +SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6" +SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359" +SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05" +SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a" +SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a" +SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4" +SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913" +SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0" + +PARALLEL_MAKE = "" diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb new file mode 100644 index 000000000..4426cf00a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb @@ -0,0 +1,47 @@ +require bash.inc + +# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-031;apply=yes;striplevel=0;name=patch031 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-032;apply=yes;striplevel=0;name=patch032 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-033;apply=yes;striplevel=0;name=patch033 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-034;apply=yes;striplevel=0;name=patch034 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-035;apply=yes;striplevel=0;name=patch035 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-036;apply=yes;striplevel=0;name=patch036 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-037;apply=yes;striplevel=0;name=patch037 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-038;apply=yes;striplevel=0;name=patch038 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-039;apply=yes;striplevel=0;name=patch039 \ + file://execute_cmd.patch;striplevel=0 \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \ + file://run-ptest \ + " + +SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447" +SRC_URI[tarball.sha256sum] = "317881019bbf2262fb814b7dd8e40632d13c3608d2f237800a8828fbb8a640dd" + +SRC_URI[patch031.md5sum] = "236df1ac1130a033ed0dbe2d2115f28f" +SRC_URI[patch031.sha256sum] = "cd529f59dd0f2fdd49d619fe34691da6f0affedf87cc37cd460a9f3fe812a61d" +SRC_URI[patch032.md5sum] = "2360f7e79cfb28526f80021025ea5909" +SRC_URI[patch032.sha256sum] = "889357d29a6005b2c3308ca5b6286cb223b5e9c083219e5db3156282dd554f4a" +SRC_URI[patch033.md5sum] = "b551c4ee7b8713759e4143499d0bbd48" +SRC_URI[patch033.sha256sum] = "fb2a7787a13fbe027a7335aca6eb3c21cdbd813e9edc221274b6a9d8692eaa16" +SRC_URI[patch034.md5sum] = "c9a56fbe0348e05a886dff97f2872b74" +SRC_URI[patch034.sha256sum] = "f1694f04f110defe1330a851cc2768e7e57ddd2dfdb0e3e350ca0e3c214ff889" +SRC_URI[patch035.md5sum] = "e564e8ab44ed1ca3a4e315a9f6cabdc9" +SRC_URI[patch035.sha256sum] = "370d85e51780036f2386dc18c5efe996eba8e652fc1973f0f4f2ab55a993c1e3" +SRC_URI[patch036.md5sum] = "b00ff66c41a7c0f06e191200981980b0" +SRC_URI[patch036.sha256sum] = "ac5f82445b36efdb543dbfae64afed63f586d7574b833e9aa9cd5170bc5fd27c" +SRC_URI[patch037.md5sum] = "be2a7b05f6ae560313f3c9d5f7127bda" +SRC_URI[patch037.sha256sum] = "33f170dd7400ab3418d749c55c6391b1d161ef2de7aced1873451b3a3fca5813" +SRC_URI[patch038.md5sum] = "61e0522830b24fbe8c0d1b010f132470" +SRC_URI[patch038.sha256sum] = "adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367" +SRC_URI[patch039.md5sum] = "a4775487abe958536751c8ce53cdf6f9" +SRC_URI[patch039.sha256sum] = "ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec" + +BBCLASSEXTEND = "nativesdk" |