From 31eb09a888729fcfd17d02f2a47375e10e87f79a Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 3 Mar 2014 18:55:57 +0800 Subject: bash: upgrade to 4.3 The bash-4.2-patches is obsolete. Signed-off-by: Hongxu Jia Signed-off-by: Richard Purdie --- .../bash/bash-4.2/execute_cmd.patch | 17 -------- .../bash/bash-4.2/mkbuiltins_have_stringize.patch | 26 ----------- meta/recipes-extended/bash/bash-4.2/run-ptest | 2 - .../bash/bash-4.2/test-output.patch | 25 ----------- meta/recipes-extended/bash/bash/execute_cmd.patch | 17 ++++++++ .../bash/bash/mkbuiltins_have_stringize.patch | 26 +++++++++++ meta/recipes-extended/bash/bash/run-ptest | 2 + meta/recipes-extended/bash/bash/test-output.patch | 25 +++++++++++ meta/recipes-extended/bash/bash_4.2.bb | 50 ---------------------- meta/recipes-extended/bash/bash_4.3.bb | 18 ++++++++ 10 files changed, 88 insertions(+), 120 deletions(-) delete mode 100644 meta/recipes-extended/bash/bash-4.2/execute_cmd.patch delete mode 100644 meta/recipes-extended/bash/bash-4.2/mkbuiltins_have_stringize.patch delete mode 100644 meta/recipes-extended/bash/bash-4.2/run-ptest delete mode 100644 meta/recipes-extended/bash/bash-4.2/test-output.patch create mode 100644 meta/recipes-extended/bash/bash/execute_cmd.patch create mode 100644 meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch create mode 100644 meta/recipes-extended/bash/bash/run-ptest create mode 100644 meta/recipes-extended/bash/bash/test-output.patch delete mode 100644 meta/recipes-extended/bash/bash_4.2.bb create mode 100644 meta/recipes-extended/bash/bash_4.3.bb (limited to 'meta/recipes-extended') diff --git a/meta/recipes-extended/bash/bash-4.2/execute_cmd.patch b/meta/recipes-extended/bash/bash-4.2/execute_cmd.patch deleted file mode 100644 index 81f8f0a9cd..0000000000 --- a/meta/recipes-extended/bash/bash-4.2/execute_cmd.patch +++ /dev/null @@ -1,17 +0,0 @@ -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/meta/recipes-extended/bash/bash-4.2/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-4.2/mkbuiltins_have_stringize.patch deleted file mode 100644 index a9391d6cac..0000000000 --- a/meta/recipes-extended/bash/bash-4.2/mkbuiltins_have_stringize.patch +++ /dev/null @@ -1,26 +0,0 @@ -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/meta/recipes-extended/bash/bash-4.2/run-ptest b/meta/recipes-extended/bash/bash-4.2/run-ptest deleted file mode 100644 index 8dd3b9981d..0000000000 --- a/meta/recipes-extended/bash/bash-4.2/run-ptest +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -make -k THIS_SH=/bin/bash BUILD_DIR=. runtest diff --git a/meta/recipes-extended/bash/bash-4.2/test-output.patch b/meta/recipes-extended/bash/bash-4.2/test-output.patch deleted file mode 100644 index 2b09b7d977..0000000000 --- a/meta/recipes-extended/bash/bash-4.2/test-output.patch +++ /dev/null @@ -1,25 +0,0 @@ -Add FAIL/PASS output to test output. - -Signed-off-by: Björn Stenberg -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/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch new file mode 100644 index 0000000000..81f8f0a9cd --- /dev/null +++ b/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/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch new file mode 100644 index 0000000000..a9391d6cac --- /dev/null +++ b/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/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest new file mode 100644 index 0000000000..8dd3b9981d --- /dev/null +++ b/meta/recipes-extended/bash/bash/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +make -k THIS_SH=/bin/bash BUILD_DIR=. runtest diff --git a/meta/recipes-extended/bash/bash/test-output.patch b/meta/recipes-extended/bash/bash/test-output.patch new file mode 100644 index 0000000000..2b09b7d977 --- /dev/null +++ b/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 +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/meta/recipes-extended/bash/bash_4.2.bb b/meta/recipes-extended/bash/bash_4.2.bb deleted file mode 100644 index fefe7b799d..0000000000 --- a/meta/recipes-extended/bash/bash_4.2.bb +++ /dev/null @@ -1,50 +0,0 @@ -require bash.inc - -# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -PR = "r6" - -SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-001;apply=yes;striplevel=0;name=patch001 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-002;apply=yes;striplevel=0;name=patch002 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-003;apply=yes;striplevel=0;name=patch003 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-004;apply=yes;striplevel=0;name=patch004 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-005;apply=yes;striplevel=0;name=patch005 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-006;apply=yes;striplevel=0;name=patch006 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-007;apply=yes;striplevel=0;name=patch007 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-008;apply=yes;striplevel=0;name=patch008 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-009;apply=yes;striplevel=0;name=patch009 \ - ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-010;apply=yes;striplevel=0;name=patch010 \ - file://execute_cmd.patch;striplevel=0 \ - file://mkbuiltins_have_stringize.patch \ - file://build-tests.patch \ - file://test-output.patch \ - file://run-ptest \ - " - -SRC_URI[tarball.md5sum] = "3fb927c7c33022f1c327f14a81c0d4b0" -SRC_URI[tarball.sha256sum] = "a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8" -SRC_URI[patch001.md5sum] = "1100bc1dda2cdc06ac44d7e5d17864a3" -SRC_URI[patch001.sha256sum] = "8d6ca028576c4af23e660a2fbc2112221a11c8a785c0b37f033967e5cd12b47a" -SRC_URI[patch002.md5sum] = "30e7948079921d3261efcc6a40722135" -SRC_URI[patch002.sha256sum] = "febac927e199aceeba2004908d971d4afb49b521796c3f42d1166f9fbbfbcef9" -SRC_URI[patch003.md5sum] = "9ea06decec43a198f3d7cf29acc602f8" -SRC_URI[patch003.sha256sum] = "5a0a7c15018c87348ea87cb0beea14345faf878dbb0e25c17fa70677194cb4cd" -SRC_URI[patch004.md5sum] = "fb48f6134d7b013135929476aa0c250c" -SRC_URI[patch004.sha256sum] = "4e34b0f830d2583d56e14225a66937abc81f45bbafcd2eb49daf61c9462140c1" -SRC_URI[patch005.md5sum] = "e70e45de33426b38153b390be0dbbcd4" -SRC_URI[patch005.sha256sum] = "a81749e73004b81cfdf0fe075bec365dc1fef756ee5e3fd142821e317d1459a0" -SRC_URI[patch006.md5sum] = "ce4e5c484993705b27daa151eca242c2" -SRC_URI[patch006.sha256sum] = "c91148945a2ddafa792682d7c8668c59e7e645eae1334b15b0d5d9ad22634bd1" -SRC_URI[patch007.md5sum] = "88d1f96db29461767602e2546803bda7" -SRC_URI[patch007.sha256sum] = "405826acf443dd1084f236a15cb76d7f0ee2dbe5edff45c5fb836db571fb7e95" -SRC_URI[patch008.md5sum] = "24c574bf6d6a581e300823d9c1276af6" -SRC_URI[patch008.sha256sum] = "23080d11a60a78941210e2477f6bca066b45db03defa60da86fd765107ba2437" -SRC_URI[patch009.md5sum] = "4c5835f2fbab36c4292bb334977e5b6d" -SRC_URI[patch009.sha256sum] = "e7ed5440b4c19765786e90e4f1ded43195d38b3e4d1c4b39fcc23de9a74ccb20" -SRC_URI[patch010.md5sum] = "0a51602b535ef661ee707be6c8bdb373" -SRC_URI[patch010.sha256sum] = "acfc5482c25e6923116fcf4b4f7f6345b80f75ad7299749db4b736ad67aa43dc" - -BBCLASSEXTEND = "nativesdk" diff --git a/meta/recipes-extended/bash/bash_4.3.bb b/meta/recipes-extended/bash/bash_4.3.bb new file mode 100644 index 0000000000..25b7410c52 --- /dev/null +++ b/meta/recipes-extended/bash/bash_4.3.bb @@ -0,0 +1,18 @@ +require bash.inc + +# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \ + file://execute_cmd.patch;striplevel=0 \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://run-ptest \ + " + +SRC_URI[tarball.md5sum] = "81348932d5da294953e15d4814c74dd1" +SRC_URI[tarball.sha256sum] = "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4" + +BBCLASSEXTEND = "nativesdk" -- cgit 1.2.3-korg