summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bash
AgeCommit message (Collapse)Author
2019-06-24bash: Remove .build files for reproducible buildsJoshua Watt
Bash has an internal "build number" that it tracks and automatically increments ever time a given builds is made from the same sandbox. However, this can make builds non-reproducible in the event that a build directory is reused multiple times. Remove the .build files after every build if reproducible builds have been requested which will reset the build build number for the next build. (From OE-Core rev: 9754be5c22de877bd53226908d03d2eef5751808) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-18bash: use setpriv, sed.sed to run ptestsRandy MacLeod
The execscript test in bash fails when run with ptest-runner calling 'su', with the error: bash: cannot set terminal process group (16036): Inappropriate ioctl for device Even with ptest-runner fixed to make a child process use the right process group, 'su' still results in the warning above. Use 'setpriv' instead. 'runuser' was considered and works but depends on pam so it's ruled out. Now that all bash tests are run as a user, the patch: fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch can be removed. Also to create the account 'bashtest' in the 'run-ptest' script the bash-ptest must depend on 'shadow'. Also, in 'run-ptest', ensure that the bash ptests are owned by the 'bashtest' user. Add 'sed' as a dependency for ptests since tests/exp8.sub runs: var=$'x\001y\177z' declare -p var | sed -n l and that results in: sed.busybox: "" sed.sed: declare -- var="x\001y\177z"$ This appears to be a feature that busybox sed has not implemented. With this series of changes, bash-ptest for qemux86-64 passes 79 of 81 tests. The remaining failures are: 1. run-read: # cat tests/read6.sub # test read with a timeout of 0 -- input polling # sleep with fractional seconds argument is not universal echo abcde | { sleep 0.25 2>/dev/null ; read -t 0; } echo $? read -t 0 < $0 echo $? read -t 0 echo $? <-- returns 1, when 0 is expected. I can reproduce this on my workstation but only when using ptest-runner and initially logging into the console as root. That's a little odd and seems like I need to continue to improve ptest-runner. 2. run-trap: # cat tests/trap3.sub PS4='+[$LINENO] ' trap 'echo trap: $LINENO' ERR set -x echo 1 echo 2 echo 3 | cat | false <--- error echo 4 This is a scheduler behaviour difference between the common case on a workstation and the common case in qemu. The test case does warn about the completion order not being deterministic so I plan to ignore it. >From tests/run-trap: UNIX versions number signals and schedule processes differently. If output differing only in line numbers is produced, please do not consider this a test failure. Still, it's notable and slightly odd that the common case output is different. (From OE-Core rev: 81e3f01867cf114b728ab5a417c29426c9bf8122) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-07bash: Replace uninative loader path in ptestJoshua Watt
The Makefile used for bash-ptest can pick up the path to the uninative loader through BUILD_LDFLAGS. This includes the full path to the uninative loader, which is not reproducible. Replace it with /bin/false. It doesn't appear as if these native programs are used in the test suites and if there are likely to be other problems related to building them using the BUILD_* flags. (From OE-Core rev: 1208ff934a2bb6378aa8b219345110a0d56bf767) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-01bash: run bash ptest as non-root userSakib Sajal
new-exp ptest fails as it expects non-root user. >From the failed ptest log: < new-exp.tests: the test suite should not be run as root 628c627 < argv[1] = <host(2)[5.0]# > --- > argv[1] = <host(2)[5.0]$ > FAIL: run-new-exp Many of the ptests declare that they should not be run as root and a few fail since the expected result strings are for a user shell. When ptests are run as bash_user (non-root) the glob test fails with error: run-glob-test 59,60d58 < touch: cannot touch 'a?': Permission denied < touch: cannot touch 'aa': Permission denied So ensure that the bash/ptest/tests directory is owned by the bash_user while the tests are being run and return it to root owner afterwards. (From OE-Core rev: c125609886b36048cfde6e694eee7fb47f197241) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy Macleod <randy.macleod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-01bash: add big5hkscs gconv RDEPENDS needed by bash-ptest.Sakib Sajal
glob-test failed beacuse it could not convert big5hkscs encoding to perform comparison. (From OE-Core rev: 8e147863c4c0fdc22da92e2e5e35502906eac916) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy Macleod <randy.macleod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-29bash: add iso8859-1 gconv RDEPENDS needed by bash-ptest.Sakib Sajal
One of the ptests failed for internationalization. >From the failed ptest log: run-intl fr_FR.ISO8859-1: Error Encoding U+00000080 to [ "$'\200'" != "\\u0080" ] (125 similar errors related to same encoding) The test was unable to convert iso8859-1 encoding to perform comparison. (From OE-Core rev: ec1849d7a5964bef53462b9d4763e22433f9d246) Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy Macleod <randy.macleod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-22bash: Fix bash-ptest dependenciesRichard Purdie
Bash's ptest needs glibc-utils (for locale), some extra locales for various tests it uses options busybox doesn't support for some tools, hence coreutils and also runs perl for some tests. (From OE-Core rev: 7ce6f69e56ef7ccc0187722cd78728a6505073b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12bash: upgrade 4.4.18 -> 5.0Hongxu Jia
- Rebase build-tests.patch and execute_cmd.patch to 5.0 - Drop 0001-help-fix-printf-format-security-warning.patch and pathexp-dep.patch, upstream has fixed them in commit [d233b48 bash-5.0 distribution sources and documentation] (From OE-Core rev: db044235e72a1519a081c4f6541f7d7cfe70d49f) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-27bash: 4.4.18 -> 4.4.23Jeroen Hofstee
Apply point release patches from upstream which includes a fix for indefinitely spinning process and a zombie by a simple $() statement in a long running script. (From OE-Core rev: eb39670fb2fe9735a1a0434c63b64ec66599f850) Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08bash: add -fomit-frame-pointer to DEBUG_OPTIMIZATION for armv[45] with thumb ↵Martin Jansa
enabled with thumb and debug enabled bash gets stuck forever when building for qemuarm. bash/4.4.18-r0/build/builtins$ arm-webos-linux-gnueabi-gcc -march=armv5te -mthumb -fstack-protector-strong --sysroot=bash/4.4.18-r0/recipe-sysroot -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I../../bash-4.4.18 -I../../bash-4.4.18/include -I../../bash-4.4.18/lib -I../../bash-4.4.18/builtins -O -fno-omit-frame-pointer -g -DNON_INTERACTIVE_LOGIN_SHELLS read.c when -mthumb, -fstack-protector-strong, -fno-omit-frame-pointer appear together, removing one of them is enough for successful build. similar to: http://lists.openembedded.org/pipermail/openembedded-core/2018-May/150654.html but in this case the build gets stuck instead of failure (From OE-Core rev: ae41e1f263d20d5d83b2a7ca95dc955840d793e1) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18bash: fix wrong exit status offsetRui Wang
In Linux,8 bits of the return code and 8 bits of the number of the killing signal are mixed into a single value on the exit code, so the exit status offset should be 8. But the autoconf checker can not determine it while cross compiling, and then it is set to the default value 0, which will cause generating the wrong exit code if program exit with an error code. (From OE-Core rev: e2dea46607a24620d6d2c250efc9b2e95bfd5ad8) Signed-off-by: Rui Wang <rui.wang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-04bash: 4.4.12 -> 4.4.18Hongxu Jia
- Drop bash-memleak-bug-fix-for-builtin-command-read.patch which has been accepted since 4.4.17 (From OE-Core rev: ec6da604012b54769db3371a8ed9ac0be4c9d0e6) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-09bash: refresh patchesRoss Burton
The patch tool will apply patches by default with "fuzz", which is where if the hunk context isn't present but what is there is close enough, it will force the patch in. Whilst this is useful when there's just whitespace changes, when applied to source it is possible for a patch applied with fuzz to produce broken code which still compiles (see #10450). This is obviously bad. We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For that to be realistic the existing patches with fuzz need to be rebased and reviewed. (From OE-Core rev: 33dadb98c10fdf04d9ed9b6ba57de6257873bcea) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-22bash: 4.4 -> 4.4.12Huang Qiyu
1.Upgrade bash from 4.4 to 4.4.12. 2.Delete bash44-001, bash44-002, bash44-003, bash44-004, bash44-005, bash44-006, bash44-007,bash44-008, bash44-009, bash44-0010, bash44-0011, bash44-0012, since it is integrated upstream. (From OE-Core rev: 0b7a1a52e4640bb1f8a6fbe00db175df1356ebe1) Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-13bash: ptest dependency on locale should honor virtual/libc-localeDenys Dmytriyenko
meta/conf/distro/include/tclibc-glibc.inc weakly assigns PREFERRED_PROVIDER for virtual/libc-locale to glibc-locale, but allows adjusting it if needed. Hence, bash should not depend on glibc-locale directly, but instead use this virtual/libc-locale variable. (From OE-Core rev: 6454c610eb6565360d29334f5f19845758dbf2c6) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10bash: fix build race under muslRoss Burton
Under musl bash uses its own libintl clone but there are some missing dependencies so it is possible for pathexp.o to be built whilst libintl.h is being written, leading to compile errors. (From OE-Core rev: d58c20fd45f4808cbc1726ec5b46edb1c60b9cf8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10bash: disable aclocalRoss Burton
Bash hand-maintains their aclocal.m4, so stop autoreconf from invoking aclocal and overwriting it. This means we can remove the kludge to copy aclocal.m4 to acinclude.m4. (From OE-Core rev: 57fe9f61dd4c43f8267b831c1b177ad67010d78c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-16bash: add missing build dependencies for ptestRoss Burton
(From OE-Core rev: 2820a2c530018f59895fb57770caa8511d31afd4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07bash-ptest: install additional localesJuro Bystricky
bash-ptest fails several tests. This patch fixes: FAIL: run-intl The test used to fail because of missing locales (fr_FR, de_DE) [YOCTO #12145] (From OE-Core rev: 70e544452b6825686f06484d994936ded677825f) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31bash.inc: improve reproducibilityJuro Bystricky
Remove all host build references from the following bash packages: bash-ptest, bash-bashbug, bash-dev, bash-loadable. [YOCTO #11918] (From OE-Core rev: 26a29d85648b68bb1d2badd59de76f850054e059) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-27bash: memleak bug fix for builtin command readZhang Xiao
Built in command "read" with "-e" use Readline to obtain the line in an interactive shell. In this process, a string "rlbuf" is just allocated without free operation thus cause memory leak. This patch had been submitted to upstream: http://lists.gnu.org/archive/html/bug-bash/2017-02/msg00061.html (From OE-Core rev: a2b278a6eaa9e9b48d858e3be6712267c0122598) Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-18bash: 4.3.30 -> 4.4Hongxu Jia
1. Rebase patches: - fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch - test-output.patch 2. Drop backported patches: - CVE-2016-9401.patch - fix-run-intl.patch 3. Add ${PN}-loadable for loadable builtins which is new features in Bash 4.4 4. The 4.4 fixed CVE-2017-5932 and CVE-2016-0634 - https://security-tracker.debian.org/tracker/CVE-2017-5932 - https://security-tracker.debian.org/tracker/CVE-2016-0634 5. The 4.4 installed include header files, fix bash-dev confilicts with lib32-bash-dev ..... $ bitbake lib32-core-image-sato-sdk ... |Error: Transaction check error: file /usr/include/bash/config.h conflicts between attempted installs |of lib32-bash-dev-4.4-r0.x86 and bash-dev-4.4-r0.core2_64 ...... (From OE-Core rev: 4097694b13cd5f0d68987551c3f9af80c87dc6ae) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14bash: changes to support merged /usrAmarnath Valluri
Most of shell scripts refer to '#!/bin/{sh,bash}' inside the script. But when 'usrmege' feature is enabled this path will be /usr/bin/{sh, bash}. so to satisify build dependency add '/bin/{sh,bash}' to its providers list. (From OE-Core rev: 4759408677a4e60c5fa7131afcb5bc184cf2f90a) Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-12bash: CVE-2016-0634Zhixiong Chi
A vulnerability was found in a way bash expands the $HOSTNAME. Injecting the hostname with malicious code would cause it to run each time bash expanded \h in the prompt string. Porting patch from <https://ftp.gnu.org/gnu/bash/bash-4.3-patches/ bash43-047> to solve CVE-2016-0634 CVE: CVE-2016-0634 (From OE-Core rev: 7dd6aa1a4bf6e9fc8a1998cda6ac5397bb5cd5cb) Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11bash: package bashbug separatelyAlexander Kanavin
It's a machine-specific script, which is causing conflicts when multiple versions of bash are installed in multilib setting, and it also does not really make sense for embedded systems anyway. (From OE-Core rev: dbe57bd0aec855c81b03850367b3b483f622c328) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-07recipes: Move out stale GPLv2 versions to a seperate layerRichard Purdie
These are recipes where the upstream has moved to GPLv3 and these old versions are the last ones under the GPLv2 license. There are several reasons for making this move. There is a different quality of service with these recipes in that they don't get security fixes and upstream no longer care about them, in fact they're actively hostile against people using old versions. The recipes tend to need a different kind of maintenance to work with changes in the wider ecosystem and there needs to be isolation between changes made in the v3 versions and those in the v2 versions. There are probably better ways to handle a "non-GPLv3" system but right now having these in OE-Core makes them look like a first class citizen when I believe they have potential for a variety of undesireable issues. Moving them into a separate layer makes their different needs clearer, it also makes it clear how many of these there are. Some are probably not needed (e.g. mc), I also wonder whether some are useful (e.g. gmp) since most things that use them are GPLv3 only already. Someone could now more clearly see how to streamline the list of recipes here. I'm proposing we mmove to this separate layer for 2.3 with its future maintinership and testing to be determined in 2.4 and beyond. (From OE-Core rev: 19b7e950346fb1dde6505c45236eba6cd9b33b4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15bash: fix CVE-2016-9401Li Zhou
popd in bash might allow local users to bypass the restricted shell and cause a use-after-free via a crafted address. Porting patch from <https://ftp.gnu.org/pub/gnu/bash/bash-4.4-patches/ bash44-006> to solve CVE-2016-9401. (From OE-Core rev: 6987b317d5ce8dc50a37ebba395aa8424bec358c) Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05bash: use update-alternatives for the bash binaryAndreas Oberritter
Busybox may offer a bash applet. If enabled, the alternatives mechanism avoids breaking logins if bash gets deinstalled while /bin/bash is configured as a login shell. (From OE-Core rev: cf0fd8bff79a12b6eec45145ef168ebf5afebdcc) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-06bash_3.2.x: update recipe version to match what we're shippingAndré Draszik
Make sure the recipe version matches what we're actually shipping, so that tools like cve-check can do the right thing. Rather than fetching version 3.2.48 and applying all patches up to and including version 3.2.57, we just fetch the latter in the first place. (From OE-Core rev: 614ac87f2832c5359f371439559be88d6106cd6b) Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-23bash: fix run-intl ptest failedDengke Du
1. Filter the extra white space in intl.right When the sub-test unicode2.sub of intl.tests executed, it produced compact results without extra white space, compared to intl.right, it failed. So we need to filter the extra white space in 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 have this: printf %q "$payload" The payload variable was assigned by ASCII characters, when using '%q' format strings, it means print the associated argument shell-quoted. When the strings contain the non-alpha && non-digit && non-punctuation && non-ISO 646 character(7-bit), it would output like this: " $'...', ANSI-C style quoted string. We can check the bash source code at: http://git.savannah.gnu.org/cgit/bash.git/tree/builtins/printf.def#n557 http://git.savannah.gnu.org/cgit/bash.git/tree/lib/sh/strtrans.c#n331 So we need to change the intl.right contain the correct output of unicode3.sub. Import parts of this patch for intl.right from bash devel branch: http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel Commit is: 74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3 3. Add the sanity check for locales When run the intl.tests, we need the following locales: en_US & fr_FR & de_DE So add the locales check for the intl.tests in run-ptest. (From OE-Core rev: 640676226bb351420a0a8b2d2a3c120ae42da11e) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-18bash: 4.3.39 -> 4.3.46Dengke Du
(From OE-Core rev: 2e12615ca5ab4acf7ec2952b7555054ca88e147d) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-01bash: add patch to build w/ -Wformat-securityAndré Draszik
(From OE-Core rev: 45bc8a2c4bbe252526d5eee2547f8b9e06165e5a) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20bash: fix string format errors when enabling security flagsRoss Burton
If security_flags.inc is included then bash 3.2.48 fails to build: | ../bash-3.2.48/print_cmd.c:1152:3: error: format not a string literal and no format arguments [-Werror=format-security] | cprintf (indentation_string); Backport a patch from upstream to solve this. (From OE-Core rev: 293d90d757d0d1e292c90cb0e9c576faf911ffcc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20bash: ensure LDFLAGS is passed when building ptestRoss Burton
(From OE-Core rev: 71794837b477a78e2f5408348e269f58f9b1ec7e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bash: fix dependencies and QA IssueMaxin B. John
Fix the following QA warning: WARNING: bash-4.3.30-r0 do_package_qa: QA Issue: bash rdepends on libiconv, but it isn't a build dependency, missing libiconv in DEPENDS or PACKAGECONFIG? [build-deps] (From OE-Core rev: 5c6b10c7c37d9ca216d56c1667dce29998a2f525) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29bash: fixed ptest run-builtins failedDengke Du
1. redirect the stderr output of the command exec with -l option to /dev/null. Because when we run command exec with -l option in builtins.tests, it is a login shell, so it would read the file /etc/profile, that file executes the /usr/bin/resize which added by commit: cc6360f4c4d97e0000f9d3545f381224ee99ce7d The /usr/bin/resize is produced by busybox that source code resize.c contains: fprintf(stderr, ESC"7" ESC"[r" ESC"[999;999H" ESC"[6n"); In the end, it outputs an escape sequence to the stderr, so when we compare the test output file /tmp/xx with builtins.right, it failed. we need to redirect the stderr output to the /dev/null to solve the problem. 2. ensure the target system contains the locales "en_US.UTF-8". Because when run the run-builtins, it executes the source5.sub file that contain: LC_ALL=en_US.UTF-8 such as add the following to the local.conf: IMAGE_LINGUAS_append = " en-us" (From OE-Core rev: 5f82f3df7d4a7d6ae9a1ea3b6bc1d620a3d6c329) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07bash: fix buildpaths qa check errorKai Kang
Script bashbug and Makefile for ptest contain build related paths which cause fail to pass buldpaths QA check. Remove such paths from these 2 files. (From OE-Core rev: b600adb4297798f108cb38d8ad7581bc517ae56b) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-12bash: fix testcase run-coproc/run-execscript/run-test/run-heredoc failedHongxu Jia
Add user 'test' to fix the failure of 'the test suite should not be run as root'(run-execscript and run-test) Backport test case from git://git.sv.gnu.org/bash.git to fix run-execscript and run-heredoc Still failed cases: FAIL: run-intl FAIL: run-lastpipe FAIL: run-trap YOCTO: 5698 (From OE-Core rev: 1096140cb1d2532ecb38ac5fbbbe13d40fdaf6af) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-12bash: Disable custom memory allocatorAníbal Limón
Bash is failing trying to allocate memory [1] using the custom memory allocator if we disable it the issue is fixed. The major distributions also disabled by default [2], so we don't have a good reason to use it. The underlying issue is due to bash’s malloc using brk() calls to allocate memory, which fail when address randomization is enabled in kernel. sbrk() based custom allocators are obsolete. There may be some performance impact of this however correctness is more important. [YOCTO #8452] [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0 [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5 (From OE-Core rev: e42d8eff9eed7d1454b4f331d96dcee6dea232df) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-16bash: append srcdir to run-ptest scriptAjay M
If srcdir is not set, we get below error while running ptest for bash on qemu target, -- snip -- root@qemux86:/usr/lib/bash/ptest# ./run-ptest /bin/sh: line 0: cd: /home/ajay/Downloads/poky-fido-13.0.0/build/tmp/work/i586-poky-linux/bash/4.3-r1/bash-4.3/tests: No such file or directory Makefile:879: recipe for target 'runtest' failed make: *** [runtest] Error 1 root@qemux86:/usr/lib/bash/ptest# vi run-ptest root@qemux86:/usr/lib/bash/ptest# -- CUT -- So, set srcdir to current directory, where tests binaries exist. [YOCTO #8145] (From OE-Core rev: 00d94314679eb4345b5012389aa6252abe871a76) Signed-off-by: Ajay M <ajay.gju@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10bash_3.2.48: dont include target CFLAGS in host LDFLAGSAndre McCurdy
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. (From OE-Core rev: 7a8ec63f38f7a387e01343fbb971b75a66e0f851) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10bash: 4.3 -> 4.3.30Robert Yang
Remove patch001 -> patch030 since they are already in source, add patch031 -> patch039 (From OE-Core rev: 781ec1061306f43265f9d756a89d1b86bd5d19a0) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-24bash: explicitly define NON_INTERACTIVE_LOGIN_SHELLS in CFLAGSChen Qi
If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the startup files, even if they are not interactive. This is the behaviour of other major distros like Ubuntu and Fedora. We also need to set it so that when executing `su -l xxx -c env' command, /etc/profile is parsed. [YOCTO #5359] [YOCTO #7137] (From OE-Core rev: 33af68d62bb427c588f5eeecb75fbc31b55f8459) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-10bash 3.2.48: disable parallel buildRobert Yang
It's Makefile has the two rules: $(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1 ${DEFDIR}/builtext.h: $(BUILTIN_DEFS) @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) builtext.h ) || exit 1 which causes parallel issues: mkbuiltins.o: file not recognized: File truncated collect2: ld returned 1 exit status I don't have any good ideas to fix the problem, so disable parallel build for it. (From OE-Core rev: efbee563af4ab56f93ac0a6238426d1d3eb80b98) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-15meta: enable parallel build for several recipesRobert Yang
I used a for loop to build these packages more than 520 times, these recipes never failed. (From OE-Core rev: 7957c5bc2771a763d26e50e716733c6335cef3c2) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16bash: separate B and SRobert Yang
It works well now, and bump the PR to avoid: x86_64-poky-linux-ar: shmatch.o: No such file or directory (From OE-Core rev: f31f86b4c81d409b91feb77a46d362de1ad29b69) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03bash: use EXTRA_AUTORECONF to disable autoheaderRoss Burton
Disable autoheader by setting EXTRA_AUTORECONF to --exclude=autoheader instead of setting AUTOHEADER to true. (From OE-Core rev: cdb5bf9ce2eed0c1608b33d8272e755c26e376f9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-25bash: clean host path in bashbugShiqun Lin
* /usr/bin/bashbug (From OE-Core rev: a745b4b790fe2550fafa731c02f33dd39a9d8651) Signed-off-by: Shiqun Lin <Shiqun.Lin@windriver.com> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06bash: update and CVE-2014-6278 fixMark Hatle
Update both bash 3.2.48 (to 57), and bash 4.3 (to 30) to fix the remaining 'shellshock' security issues, CVE-2014-6278. (From OE-Core rev: a2709547644ae417fbd5435e1372068c7cd5db4c) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06bash: Upgrade bash to latest patch level to fix CVEsMark Hatle
We upgrade bash_4.3 to patch revision 29, and bash_3.2.48 to 56. There are numerous community bug fixes included with this set, but the key items are: bash32-052 CVE-2014-6271 9/24/2014 bash32-053 CVE-2014-7169 9/26/2014 bash32-054 exported function namespace change 9/27/2014 bash32-055 CVE-2014-7186/CVE-2014-7187 10/1/2014 bash32-056 CVE-2014-6277 10/2/2014 bash43-025 CVE-2014-6271 9/24/2014 bash43-026 CVE-2014-7169 9/26/2014 bash43-027 exported function namespace change 9/27/2014 bash43-028 CVE-2014-7186/CVE-2014-7187 10/1/2014 bash43-029 CVE-2014-6277 10/2/2014 (From OE-Core rev: 43deeff0c6b0ea7729d3e5f1887dfd1647dea1da) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>