mirror of
https://git.yoctoproject.org/poky
synced 2026-02-11 19:23:03 +01:00
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>
80 lines
2.5 KiB
PHP
80 lines
2.5 KiB
PHP
SUMMARY = "An sh-compatible command language interpreter"
|
|
HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
|
|
SECTION = "base/shell"
|
|
|
|
DEPENDS = "ncurses bison-native virtual/libiconv"
|
|
|
|
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} = "bash sh"
|
|
ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
|
|
ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
|
|
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
|
|
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
|
|
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"
|
|
|
|
CACHED_CONFIGUREVARS += "headersdir=${includedir}/${PN}"
|
|
|
|
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
|
|
}
|
|
|
|
PACKAGES += "${PN}-bashbug"
|
|
FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
|
|
FILES_${PN}-bashbug = "${bindir}/bashbug"
|
|
|
|
PACKAGE_BEFORE_PN += "${PN}-loadable"
|
|
RDEPENDS_${PN}-loadable += "${PN}"
|
|
FILES_${PN}-loadable += "${libdir}/bash/*"
|
|
|
|
RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"
|