diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc index b2f196022..adc6e9a71 100644 --- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc +++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc @@ -18,7 +18,6 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -# We don't want '-e MAKEFLAGS=' in EXTRA_OEMAKE EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" @@ -63,8 +62,8 @@ def busybox_cfg(feature, tokens, cnf, rem): def features_to_busybox_settings(d): cnf, rem = ([], []) busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IPV6', cnf, rem) - busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'largefile', True, False, d), 'CONFIG_LFS', cnf, rem) - busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'largefile', True, False, d), 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem) + busybox_cfg(True, 'CONFIG_LFS', cnf, rem) + busybox_cfg(True, 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem) busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'nls', True, False, d), 'CONFIG_LOCALE_SUPPORT', cnf, rem) busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem) busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem) @@ -141,6 +140,10 @@ do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 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 + if [ -e .config.orig ]; then + # Need to guard again an interrupted do_compile - restore any backup + cp .config.orig .config + fi cp .config .config.orig oe_runmake busybox.cfg.suid oe_runmake busybox.cfg.nosuid @@ -331,21 +334,21 @@ ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" python () { if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - pn = d.getVar('PN', True) + pn = d.getVar('PN') d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init') - d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir', True))) - d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True))) + d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir'))) + d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir'), d.getVar('BPN'))) d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf') - d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir', True))) - d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True))) + d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir'))) + d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir'), d.getVar('BPN'))) } python do_package_prepend () { # We need to load the full set of busybox provides from the /etc/busybox.links # Use this to see the update-alternatives with the right information - dvar = d.getVar('D', True) - pn = d.getVar('PN', True) + dvar = d.getVar('D') + pn = d.getVar('PN') def set_alternative_vars(links, target): links = d.expand(links) target = d.expand(target) @@ -395,6 +398,9 @@ pkg_postinst_${PN} () { fi done fi + if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells + fi } pkg_prerm_${PN} () { @@ -419,6 +425,12 @@ pkg_prerm_${PN} () { export PATH=$PATH:$tmpdir } +pkg_postrm_${PN} () { + if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links* && [ ! -e $D${base_bindir}/bash ]; then + printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells + fi +} + pkg_prerm_${PN}-syslog () { # remove syslog if test "x$D" = "x"; then |