diff options
Diffstat (limited to 'external/poky/meta/recipes-extended/bash')
10 files changed, 124 insertions, 149 deletions
diff --git a/external/poky/meta/recipes-extended/bash/bash.inc b/external/poky/meta/recipes-extended/bash/bash.inc index 2e7f261a..1ebb33bd 100644 --- a/external/poky/meta/recipes-extended/bash/bash.inc +++ b/external/poky/meta/recipes-extended/bash/bash.inc @@ -23,16 +23,27 @@ ALTERNATIVE_PRIORITY = "100" RDEPENDS_${PN} += "base-files" RDEPENDS_${PN}_class-nativesdk = "" -RDEPENDS_${PN}-ptest += "make" - -DEPENDS_append_libc-glibc = " virtual/libc-locale" -RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-fr-fr locale-base-de-de" - -USERADD_PACKAGES = "${PN}-ptest" -USERADD_PARAM_${PN}-ptest = "--create-home --user-group test" +RDEPENDS_${PN}-ptest += "make coreutils perl sed shadow util-linux-setpriv" + +RDEPENDS_${PN}-ptest_append_libc-glibc = " \ + glibc-gconv-big5hkscs \ + glibc-gconv-iso8859-1 \ + glibc-utils \ + locale-base-de-de \ + locale-base-en-us \ + locale-base-fr-fr \ + locale-base-fr-fr.iso-8859-1 \ + locale-base-zh-hk.big5-hkscs \ + " CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}" +do_compile_prepend() { + # Remove any leftover .build files. This ensures that bash always has the + # same version number and keeps builds reproducible + rm -f ${B}/.build +} + do_compile_ptest () { oe_runmake buildtest } @@ -66,12 +77,18 @@ do_install_append_class-target () { do_install_ptest () { make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test cp ${B}/Makefile ${D}${PTEST_PATH} + install -D ${WORKDIR}/run-bash-ptests ${D}${PTEST_PATH}/run-bash-ptests sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ -e 's|${DEBUG_PREFIX_MAP}||g' \ -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \ -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${UNINATIVE_LOADER}:${base_bindir}/false:g' \ ${D}${PTEST_PATH}/Makefile } +# The uninative loader is different on i386 & x86_64 hosts. Since it is only +# being replaced with /bin/false anyway, it doesn't need to be part of the task +# hash +do_install_ptest[vardepsexclude] += "UNINATIVE_LOADER" pkg_postinst_${PN} () { grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells diff --git a/external/poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch b/external/poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch deleted file mode 100644 index 5405c84c..00000000 --- a/external/poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e5837a42f8f48a6a721805ff8f7fcd32861d09ca Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> -Date: Tue, 26 Jul 2016 13:09:47 +0100 -Subject: [PATCH] help: fix printf() format security warning -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def: In function 'help_builtin': -| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def:130:7: error: format not a string literal and no format arguments [-Werror=format-security] -| printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); -| ^~~~~~ - -Signed-off-by: André Draszik <adraszik@tycoint.com> ---- -Upstream-Status: Pending - builtins/help.def | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builtins/help.def b/builtins/help.def -index 1894f17..cf624c6 100644 ---- a/builtins/help.def -+++ b/builtins/help.def -@@ -127,7 +127,7 @@ help_builtin (list) - - if (glob_pattern_p (list->word->word)) - { -- printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); -+ printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1))); - print_word_list (list, ", "); - printf ("'\n\n"); - } --- -2.8.1 - diff --git a/external/poky/meta/recipes-extended/bash/bash/build-tests.patch b/external/poky/meta/recipes-extended/bash/bash/build-tests.patch index 73a81b60..5f2dae94 100644 --- a/external/poky/meta/recipes-extended/bash/bash/build-tests.patch +++ b/external/poky/meta/recipes-extended/bash/bash/build-tests.patch @@ -2,15 +2,18 @@ Add 'ptest' target to Makefile, to run tests without checking dependencies. Upstream-Status: Pending Signed-off-by: Anders Roxell <anders.roxell@enea.com> + +Rebase to 5.0 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 +index 5fcb44b..de1c255 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -848,20 +848,34 @@ maybe-clean: +@@ -932,20 +932,34 @@ maybe-clean: fi recho$(EXEEXT): $(SUPPORT_SRC)recho.c @@ -51,5 +54,5 @@ diff --git a/Makefile.in b/Makefile.in PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) -- -1.8.1.2 +2.7.4 diff --git a/external/poky/meta/recipes-extended/bash/bash/execute_cmd.patch b/external/poky/meta/recipes-extended/bash/bash/execute_cmd.patch index 9970b4d8..7a9e9a90 100644 --- a/external/poky/meta/recipes-extended/bash/bash/execute_cmd.patch +++ b/external/poky/meta/recipes-extended/bash/bash/execute_cmd.patch @@ -1,10 +1,16 @@ Upstream-Status: Inappropriate [embedded specific] -Index: execute_cmd.c -=================================================================== ---- execute_cmd.c.orig -+++ execute_cmd.c -@@ -2459,7 +2459,11 @@ execute_pipeline (command, asynchronous, +Rebase to 5.0 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + execute_cmd.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/execute_cmd.c b/execute_cmd.c +index f1d74bf..31674b4 100644 +--- a/execute_cmd.c ++++ b/execute_cmd.c +@@ -2567,7 +2567,11 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) /* 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. */ @@ -17,3 +23,6 @@ Index: execute_cmd.c { lstdin = move_to_high_fd (0, 1, -1); if (lstdin > 0) +-- +2.7.4 + diff --git a/external/poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch b/external/poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch deleted file mode 100644 index 9ac2461a..00000000 --- a/external/poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch +++ /dev/null @@ -1,45 +0,0 @@ -From d1cd4c31ea0ed7406a3ad4bdaa211f581063f655 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Tue, 15 Aug 2017 10:21:21 +0800 -Subject: [PATCH 2/2] fix run-execscript/run-test/ failed - -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/run-execscript | 3 ++- - tests/run-test | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/tests/run-execscript b/tests/run-execscript -index de78644..38397c1 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 > ${BASH_TSTOUT} 2>&1 -+rm -f ${BASH_TSTOUT} -+su -c "${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1" test - diff ${BASH_TSTOUT} exec.right && rm -f ${BASH_TSTOUT} -diff --git a/tests/run-test b/tests/run-test -index d68791c..d6317d2 100644 ---- a/tests/run-test -+++ b/tests/run-test -@@ -1,4 +1,5 @@ - unset GROUPS UID 2>/dev/null - --${THIS_SH} ./test.tests >${BASH_TSTOUT} 2>&1 -+rm -f ${BASH_TSTOUT} -+su -c "${THIS_SH} ./test.tests > ${BASH_TSTOUT} 2>&1" test - diff ${BASH_TSTOUT} test.right && rm -f ${BASH_TSTOUT} --- -1.8.3.1 - diff --git a/external/poky/meta/recipes-extended/bash/bash/pathexp-dep.patch b/external/poky/meta/recipes-extended/bash/bash/pathexp-dep.patch deleted file mode 100644 index e05bbda3..00000000 --- a/external/poky/meta/recipes-extended/bash/bash/pathexp-dep.patch +++ /dev/null @@ -1,13 +0,0 @@ -pathexp includes libintl.h but doesn't depend on it, thus a build race can occur. - -Upstream-Status: Submitted (https://savannah.gnu.org/patch/index.php?9503) -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/Makefile.in b/Makefile.in -index c7b62bc0..241cbf12 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -1281,2 +1281,3 @@ nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h - y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -+pathexp.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h - pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h diff --git a/external/poky/meta/recipes-extended/bash/bash/run-bash-ptests b/external/poky/meta/recipes-extended/bash/bash/run-bash-ptests new file mode 100644 index 00000000..d73a2722 --- /dev/null +++ b/external/poky/meta/recipes-extended/bash/bash/run-bash-ptests @@ -0,0 +1,4 @@ +#!/bin/sh +cd "$(dirname "$0")" +make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest + diff --git a/external/poky/meta/recipes-extended/bash/bash/run-ptest b/external/poky/meta/recipes-extended/bash/bash/run-ptest index c61fabd0..738ad3c4 100644 --- a/external/poky/meta/recipes-extended/bash/bash/run-ptest +++ b/external/poky/meta/recipes-extended/bash/bash/run-ptest @@ -19,4 +19,8 @@ then echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it." fi -make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest +useradd bashtest +chown -R bashtest:bashtest tests +setpriv --reuid bashtest --rgid bashtest --clear-groups --reset-env $(dirname "$0")/run-bash-ptests +chown -R root:root tests +userdel -r bashtest diff --git a/external/poky/meta/recipes-extended/bash/bash_4.4.18.bb b/external/poky/meta/recipes-extended/bash/bash_4.4.18.bb deleted file mode 100644 index 8fa0978d..00000000 --- a/external/poky/meta/recipes-extended/bash/bash_4.4.18.bb +++ /dev/null @@ -1,41 +0,0 @@ -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.4-patches/bash44-019;apply=yes;striplevel=0;name=patch019 \ - ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-020;apply=yes;striplevel=0;name=patch020 \ - ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-021;apply=yes;striplevel=0;name=patch021 \ - ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-022;apply=yes;striplevel=0;name=patch022 \ - ${GNU_MIRROR}/bash/bash-4.4-patches/bash44-023;apply=yes;striplevel=0;name=patch023 \ - 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 \ - file://fix-run-builtins.patch \ - file://0001-help-fix-printf-format-security-warning.patch \ - file://pathexp-dep.patch \ - " - -SRC_URI[tarball.md5sum] = "518e2c187cc11a17040f0915dddce54e" -SRC_URI[tarball.sha256sum] = "604d9eec5e4ed5fd2180ee44dd756ddca92e0b6aa4217bbab2b6227380317f23" - -SRC_URI[patch019.md5sum] = "8f43e1d277b02f3319a34c1cd4a4ff3e" -SRC_URI[patch019.sha256sum] = "27170d6edfe8819835407fdc08b401d2e161b1400fe9d0c5317a51104c89c11e" -SRC_URI[patch020.md5sum] = "5217ff08c444446ec306dce60437c288" -SRC_URI[patch020.sha256sum] = "1840e2cbf26ba822913662f74037594ed562361485390c52813b38156c99522c" -SRC_URI[patch021.md5sum] = "282c7d9b38da8005d25b4f816328a2f4" -SRC_URI[patch021.sha256sum] = "bd8f59054a763ec1c64179ad5cb607f558708a317c2bdb22b814e3da456374c1" -SRC_URI[patch022.md5sum] = "0b709c9d7f8e6cf267a8b863efb899f7" -SRC_URI[patch022.sha256sum] = "45331f0936e36ab91bfe44b936e33ed8a1b1848fa896e8a1d0f2ef74f297cb79" -SRC_URI[patch023.md5sum] = "fe2e0ca4cf9409ff0e9428e1236f983e" -SRC_URI[patch023.sha256sum] = "4fec236f3fbd3d0c47b893fdfa9122142a474f6ef66c20ffb6c0f4864dd591b6" - -DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" -DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" - -BBCLASSEXTEND = "nativesdk" diff --git a/external/poky/meta/recipes-extended/bash/bash_5.0.bb b/external/poky/meta/recipes-extended/bash/bash_5.0.bb new file mode 100644 index 00000000..8ff9e6ed --- /dev/null +++ b/external/poky/meta/recipes-extended/bash/bash_5.0.bb @@ -0,0 +1,72 @@ +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-${PV}-patches/bash50-001;apply=yes;striplevel=0;name=patch001 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-002;apply=yes;striplevel=0;name=patch002 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-003;apply=yes;striplevel=0;name=patch003 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-004;apply=yes;striplevel=0;name=patch004 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-005;apply=yes;striplevel=0;name=patch005 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-006;apply=yes;striplevel=0;name=patch006 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-007;apply=yes;striplevel=0;name=patch007 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-008;apply=yes;striplevel=0;name=patch008 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-009;apply=yes;striplevel=0;name=patch009 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-010;apply=yes;striplevel=0;name=patch010 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-011;apply=yes;striplevel=0;name=patch011 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-012;apply=yes;striplevel=0;name=patch012 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-013;apply=yes;striplevel=0;name=patch013 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-014;apply=yes;striplevel=0;name=patch014 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-015;apply=yes;striplevel=0;name=patch015 \ + ${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-016;apply=yes;striplevel=0;name=patch016 \ + file://execute_cmd.patch \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://run-ptest \ + file://run-bash-ptests \ + file://fix-run-builtins.patch \ + " + +SRC_URI[tarball.md5sum] = "2b44b47b905be16f45709648f671820b" +SRC_URI[tarball.sha256sum] = "b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d" + +SRC_URI[patch001.md5sum] = "b026862ab596a5883bb4f0d1077a3819" +SRC_URI[patch001.sha256sum] = "f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289" +SRC_URI[patch002.md5sum] = "2f4a7787365790ae57f36b311701ea7e" +SRC_URI[patch002.sha256sum] = "87e87d3542e598799adb3e7e01c8165bc743e136a400ed0de015845f7ff68707" +SRC_URI[patch003.md5sum] = "af7f2dd93fd5429fb5e9a642ff74f87d" +SRC_URI[patch003.sha256sum] = "4eebcdc37b13793a232c5f2f498a5fcbf7da0ecb3da2059391c096db620ec85b" +SRC_URI[patch004.md5sum] = "b60545b273bfa4e00a760f2c648bed9c" +SRC_URI[patch004.sha256sum] = "14447ad832add8ecfafdce5384badd933697b559c4688d6b9e3d36ff36c62f08" +SRC_URI[patch005.md5sum] = "875a0bedf48b74e453e3997c84b5d8a4" +SRC_URI[patch005.sha256sum] = "5bf54dd9bd2c211d2bfb34a49e2c741f2ed5e338767e9ce9f4d41254bf9f8276" +SRC_URI[patch006.md5sum] = "4a8ee95adb72c3aba03d9e8c9f96ece6" +SRC_URI[patch006.sha256sum] = "d68529a6ff201b6ff5915318ab12fc16b8a0ebb77fda3308303fcc1e13398420" +SRC_URI[patch007.md5sum] = "411560d81fde2dc5b17b83c3f3b58c6f" +SRC_URI[patch007.sha256sum] = "17b41e7ee3673d8887dd25992417a398677533ab8827938aa41fad70df19af9b" +SRC_URI[patch008.md5sum] = "dd7cf7a784d1838822cad8d419315991" +SRC_URI[patch008.sha256sum] = "eec64588622a82a5029b2776e218a75a3640bef4953f09d6ee1f4199670ad7e3" +SRC_URI[patch009.md5sum] = "c1b3e937cd6dccbb7fd772f32812a0da" +SRC_URI[patch009.sha256sum] = "ed3ca21767303fc3de93934aa524c2e920787c506b601cc40a4897d4b094d903" +SRC_URI[patch010.md5sum] = "19b41e73b03602d0e261c471b53e670c" +SRC_URI[patch010.sha256sum] = "d6fbc325f0b5dc54ddbe8ee43020bced8bd589ddffea59d128db14b2e52a8a11" +SRC_URI[patch011.md5sum] = "414339330a3634137081a97f2c8615a8" +SRC_URI[patch011.sha256sum] = "2c4de332b91eaf797abbbd6c79709690b5cbd48b12e8dfe748096dbd7bf474ea" +SRC_URI[patch012.md5sum] = "1870268f62b907221b078ad109e1fa94" +SRC_URI[patch012.sha256sum] = "2943ee19688018296f2a04dbfe30b7138b889700efa8ff1c0524af271e0ee233" +SRC_URI[patch013.md5sum] = "40d923af4b952b01983ed4c889ae2653" +SRC_URI[patch013.sha256sum] = "f5d7178d8da30799e01b83a0802018d913d6aa972dd2ddad3b927f3f3eb7099a" +SRC_URI[patch014.md5sum] = "57857b22053c8167677e5e5ac5c6669b" +SRC_URI[patch014.sha256sum] = "5d6eee6514ee6e22a87bba8d22be0a8621a0ae119246f1c5a9a35db1f72af589" +SRC_URI[patch015.md5sum] = "c4c6ea23d09a74eaa9385438e48fdf02" +SRC_URI[patch015.sha256sum] = "a517df2dda93b26d5cbf00effefea93e3a4ccd6652f152f4109170544ebfa05e" +SRC_URI[patch016.md5sum] = "a682ed6fa2c2e7a7c3ba6bdeada07fb5" +SRC_URI[patch016.sha256sum] = "ffd1d7a54a99fa7f5b1825e4f7e95d8c8876bc2ca151f150e751d429c650b06d" + +DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" +DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" + +BBCLASSEXTEND = "nativesdk" |