diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-extended/bash/bash')
4 files changed, 198 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch new file mode 100644 index 000000000..5405c84c7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch @@ -0,0 +1,35 @@ +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/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch new file mode 100644 index 000000000..2fa388302 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch @@ -0,0 +1,33 @@ +From 0c4cab9594c96c2dc435a8d9724605824bcbf917 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Tue, 19 Apr 2016 02:57:45 -0400 +Subject: [PATCH] fix run-builtins failed + +FAIL: run-builtins +1. redirect the stderr output of command exec with -l option in + builtins.tests to /dev/null +2. ensure the system contain the locales "en_US.UTF-8" + +Upstream-Status: Pending + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + tests/builtins.tests | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/builtins.tests b/tests/builtins.tests +index 9d77520..63f3af8 100644 +--- a/tests/builtins.tests ++++ b/tests/builtins.tests +@@ -109,7 +109,7 @@ esac + + # test options to exec + (exec -a specialname ${THIS_SH} -c 'echo $0' ) +-(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) ++(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) 2> /dev/null + # test `clean' environment. if /bin/sh is bash, and the script version of + # printenv is run, there will be variables in the environment that bash + # sets on startup. Also test code that prefixes argv[0] with a dash. +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch new file mode 100644 index 000000000..d4a3409ec --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch @@ -0,0 +1,110 @@ +From a00d3161fd7b6a698bdd2ed5f0ac5faac580ee2a Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Wed, 3 Aug 2016 23:13:00 -0400 +Subject: [PATCH] fix run-intl failed + +1. Filter extra white space of intl.right + + Due to the extra white space of intl.right, when the result of + sub-test unicode2.sub of intl.tests compared to it, the test + failed. + + So we need to filter the extra white space of intl.right. + + Import this patch for intl.right from bash devel branch: + + http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel + + commit is: + + 85ec0778f9d778e1820fb8c0e3e996f2d1103b45 + +2. Change intl.right correspond to the unicode3.sub's output + + In sub-test unicode3.sub of intl.tests, the payload value is: + + payload=$'\065\247\100\063\231\053\306\123\070\237\242\352\263' + + It used quoted string expansion(escaped octal) to assign ASCII + characters to variables. So when the test run the following: + + printf %q "$payload" + + It produced: + + $'5\247@3\231+\306S8\237\242\352\263' + + When compared to the intl.right(contain the converted character), it failed. + + Import parts of patch for intl.right from bash devel branch: + + http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel + + commit is: + + 74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3 + +Upstream-Status: Backport + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + tests/intl.right | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/tests/intl.right b/tests/intl.right +index acf108a..1efdfbe 100644 +--- a/tests/intl.right ++++ b/tests/intl.right +@@ -18,34 +18,34 @@ aéb + 1.0000 + 1,0000 + Passed all 1378 Unicode tests +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 357 277 277 012 ++0000000 357 277 277 012 + 0000004 +-0000000 357 277 277 012 ++0000000 357 277 277 012 + 0000004 +-0000000 012 ++0000000 012 + 0000001 +-0000000 012 ++0000000 012 + 0000001 +-0000000 012 ++0000000 012 + 0000001 +-0000000 012 ++0000000 012 + 0000001 +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 303 277 012 ++0000000 303 277 012 + 0000003 +-0000000 101 040 302 243 040 305 222 012 ++0000000 101 040 302 243 040 305 222 012 + 0000010 + ./unicode3.sub: line 2: 5§@3™+ÆS8Ÿ¢ê³: command not found +-5§@3™+ÆS8Ÿ¢ê³ ++$'5\247@3\231+\306S8\237\242\352\263' + + : $'5\247@3\231+\306S8\237\242\352\263' +-- +2.8.1 + 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 index 2098fa46b..c61fabd02 100644 --- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest @@ -1,2 +1,22 @@ #!/bin/sh + +en_US=`locale -a | grep en_US*` +fr_FR=`locale -a | grep fr_FR*` +de_DE=`locale -a | grep de_DE*` + +if [ -z "$en_US" ] +then + echo "Warning: The en_US* locales is needed to run the intl.tests, please add it." +fi + +if [ -z "$fr_FR" ] +then + echo "Warning: The fr_FR* locales is needed to run the intl.tests, please add it." +fi + +if [ -z "$de_DE" ] +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 |