diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-12-17 04:11:34 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-09 02:21:44 +0300 |
commit | 1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch) | |
tree | 79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /poky/meta/recipes-core/busybox/busybox.inc | |
parent | 5b9ede0403237c7dace972affa65cf64a1aadd0e (diff) | |
download | openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.xz |
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD:
poky: 87e3a9739d
meta-openembedded: 6094ae18c8
meta-security: 31dc4e7532
meta-raspberrypi: a48743dc36
meta-xilinx: c42016e2e6
Also re-apply backports that didn't make it into thud:
poky:
17726d0 systemd-systemctl-native: handle Install wildcards
meta-openembedded:
4321a5d libtinyxml2: update to 7.0.1
042f0a3 libcereal: Add native and nativesdk classes
e23284f libcereal: Allow empty package
030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG
179a1b9 gtest: update to 1.8.1
Squashed OpenBMC subtree compatibility updates:
meta-aspeed:
Brad Bishop (1):
aspeed: add yocto 2.6 compatibility
meta-ibm:
Brad Bishop (1):
ibm: prepare for yocto 2.6
meta-ingrasys:
Brad Bishop (1):
ingrasys: set layer compatibility to yocto 2.6
meta-openpower:
Brad Bishop (1):
openpower: set layer compatibility to yocto 2.6
meta-phosphor:
Brad Bishop (3):
phosphor: set layer compatibility to thud
phosphor: libgpg-error: drop patches
phosphor: react to fitimage artifact rename
Ed Tanous (4):
Dropbear: upgrade options for latest upgrade
yocto2.6: update openssl options
busybox: remove upstream watchdog patch
systemd: Rebase CONFIG_CGROUP_BPF patch
Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-core/busybox/busybox.inc')
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox.inc | 128 |
1 files changed, 67 insertions, 61 deletions
diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index f1b09d95ce..09433dd824 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -3,7 +3,7 @@ DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into HOMEPAGE = "http://www.busybox.net" BUGTRACKER = "https://bugs.busybox.net/" -DEPENDS += "kern-tools-native" +DEPENDS += "kern-tools-native virtual/crypt" # bzip2 applet in busybox is based on lightly-modified bzip2 source # the GPL is version 2 only @@ -41,12 +41,13 @@ INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" SYSTEMD_PACKAGES = "${PN}-syslog" SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}" +RDEPENDS_${PN}-syslog = "busybox" CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf" RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng" CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" -RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" +RRECOMMENDS_${PN} = "${PN}-udhcpc" RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}" @@ -116,13 +117,13 @@ do_prepare_config () { ${S}/.config sed -i -e '${configmangle}' ${S}/.config if test ${DO_IPv4} -eq 0 && test ${DO_IPv6} -eq 0; then - # disable networking applets - mv ${S}/.config ${S}/.config.oe-tmp - awk 'BEGIN{net=0} - /^# Networking Utilities/{net=1} - /^#$/{if(net){net=net+1}} - {if(net==2&&$0 !~ /^#/&&$1){print("# "$1" is not set")}else{print}}' \ - ${S}/.config.oe-tmp > ${S}/.config + # disable networking applets + mv ${S}/.config ${S}/.config.oe-tmp + awk 'BEGIN{net=0} + /^# Networking Utilities/{net=1} + /^#$/{if(net){net=net+1}} + {if(net==2&&$0 !~ /^#/&&$1){print("# "$1" is not set")}else{print}}' \ + ${S}/.config.oe-tmp > ${S}/.config fi sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config @@ -150,7 +151,7 @@ do_compile() { export KCONFIG_NOTIMESTAMP=1 fi if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then - # split the .config into two parts, and make two busybox binaries + # split the .config into two parts, and make two busybox binaries if [ -e .config.orig ]; then # Need to guard again an interrupted do_compile - restore any backup cp .config.orig .config @@ -209,6 +210,10 @@ do_install () { sed -i "s:^/usr/bin/:BINDIR/:" busybox.links* sed -i "s:^/usr/sbin/:SBINDIR/:" busybox.links* + # Move arch/link to BINDIR to match coreutils + sed -i "s:^BASE_BINDIR/arch:BINDIR/arch:" busybox.links* + sed -i "s:^BASE_BINDIR/link:BINDIR/link:" busybox.links* + sed -i "s:^BASE_BINDIR/:${base_bindir}/:" busybox.links* sed -i "s:^BASE_SBINDIR/:${base_sbindir}/:" busybox.links* sed -i "s:^BINDIR/:${bindir}/:" busybox.links* @@ -250,8 +255,7 @@ do_install () { ln -sf busybox ${D}${base_bindir}/busybox.nosuid fi else - install -d ${D}${base_bindir} ${D}${base_sbindir} - install -d ${D}${libdir} ${D}${bindir} ${D}${sbindir} + install -d ${D}${base_bindir} ${D}${bindir} ${D}${libdir} cat busybox.links | while read FILE; do NAME=`basename "$FILE"` install -m 0755 "0_lib/$NAME" "${D}$FILE.${BPN}" @@ -275,77 +279,76 @@ do_install () { install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf fi - if grep "CONFIG_CROND=y" ${B}/.config; then + if grep -q "CONFIG_CROND=y" ${B}/.config; then install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HTTPD=y" ${B}/.config; then + if grep -q "CONFIG_HTTPD=y" ${B}/.config; then install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ install -d ${D}/srv/www fi - if grep "CONFIG_UDHCPD=y" ${B}/.config; then + if grep -q "CONFIG_UDHCPD=y" ${B}/.config; then install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HWCLOCK=y" ${B}/.config; then + if grep -q "CONFIG_HWCLOCK=y" ${B}/.config; then install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_UDHCPC=y" ${B}/.config; then + if grep -q "CONFIG_UDHCPC=y" ${B}/.config; then install -d ${D}${sysconfdir}/udhcpc.d install -d ${D}${datadir}/udhcpc install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default sed -i "s:/SBIN_DIR/:${base_sbindir}/:" ${D}${sysconfdir}/udhcpc.d/50default install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script fi - if grep "CONFIG_INETD=y" ${B}/.config; then + if grep -q "CONFIG_INETD=y" ${B}/.config; then install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN} install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/ fi - if grep "CONFIG_MDEV=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev - if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then - install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf - install -d ${D}${sysconfdir}/mdev - install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev - install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev - fi + if grep -q "CONFIG_MDEV=y" ${B}/.config; then + install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev + if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then + install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf + install -d ${D}${sysconfdir}/mdev + install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev + install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev + fi + fi + if grep -q "CONFIG_INIT=y" ${B}/.config; then + install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS + install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + fi + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + if grep -q "CONFIG_KLOGD=y" ${B}/.config; then + install -d ${D}${systemd_unitdir}/system + sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ + > ${D}${systemd_unitdir}/system/busybox-klogd.service + fi + + if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then + install -d ${D}${systemd_unitdir}/system + sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ + > ${D}${systemd_unitdir}/system/busybox-syslog.service + if [ ! -e ${D}${systemd_unitdir}/system/busybox-klogd.service ] ; then + sed -i '/klog/d' ${D}${systemd_unitdir}/system/busybox-syslog.service + fi + if [ -f ${WORKDIR}/busybox-syslog.default ] ; then + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog + fi + fi + fi + + # Remove the sysvinit specific configuration file for systemd systems to avoid confusion + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then + rm -f ${D}${sysconfdir}/syslog-startup.conf fi - if grep "CONFIG_INIT=y" ${B}/.config; then - install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS - install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK - install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel - fi - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - if grep -q "CONFIG_KLOGD=y" ${B}/.config; then - install -d ${D}${systemd_unitdir}/system - sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ - > ${D}${systemd_unitdir}/system/busybox-klogd.service - fi - - if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then - install -d ${D}${systemd_unitdir}/system - sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ - > ${D}${systemd_unitdir}/system/busybox-syslog.service - if [ ! -e ${D}${systemd_unitdir}/system/busybox-klogd.service ] ; then - sed -i '/klog/d' ${D}${systemd_unitdir}/system/busybox-syslog.service - fi - if [ -f ${WORKDIR}/busybox-syslog.default ] ; then - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog - fi - fi - fi - - # Remove the sysvinit specific configuration file for systemd systems to avoid confusion - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then - rm -f ${D}${sysconfdir}/syslog-startup.conf - fi } do_install_ptest () { - cp -r ${B}/testsuite ${D}${PTEST_PATH}/ - cp ${B}/.config ${D}${PTEST_PATH}/ - ln -s /bin/busybox ${D}${PTEST_PATH}/busybox + cp -r ${B}/testsuite ${D}${PTEST_PATH}/ + cp ${B}/.config ${D}${PTEST_PATH}/ + ln -s /bin/busybox ${D}${PTEST_PATH}/busybox } inherit update-alternatives @@ -368,7 +371,10 @@ python do_package_prepend () { # Match coreutils if alt_name == '[': alt_name = 'lbracket' - d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name) + if alt_name == 'klogd' or alt_name == 'syslogd': + d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' ' + alt_name) + else: + d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name) d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name) if os.path.exists('%s%s' % (dvar, target)): d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target) |