summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r--meta/recipes-core/busybox/busybox.inc110
1 files changed, 50 insertions, 60 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 6cfdcd7344..69fa499737 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -5,10 +5,11 @@ BUGTRACKER = "https://bugs.busybox.net/"
DEPENDS += "kern-tools-native virtual/crypt"
-# bzip2 applet in busybox is based on lightly-modified bzip2 source
+# bzip2 applet in busybox is based on lightly-modified bzip2-1.0.4 source
# the GPL is version 2 only
-LICENSE = "GPLv2 & bzip2-1.0.6"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb"
+LICENSE = "GPL-2.0-only & bzip2-1.0.4"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb \
+ file://archival/libarchive/bz/LICENSE;md5=28e3301eae987e8cfe19988e98383dae"
SECTION = "base"
@@ -22,39 +23,39 @@ EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${
PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
-FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
-FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
-FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
-FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
-FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
+FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
+FILES:${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_system_unitdir}/syslog.service ${sysconfdir}/default/busybox-syslog"
+FILES:${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
+FILES:${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
+FILES:${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
+FILES:${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock"
-INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
-INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
-INITSCRIPT_NAME_${PN}-mdev = "mdev"
-INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ."
-INITSCRIPT_NAME_${PN}-syslog = "syslog"
-INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
+INITSCRIPT_NAME:${PN}-httpd = "busybox-httpd"
+INITSCRIPT_NAME:${PN}-hwclock = "hwclock.sh"
+INITSCRIPT_NAME:${PN}-mdev = "mdev"
+INITSCRIPT_PARAMS:${PN}-mdev = "start 04 S ."
+INITSCRIPT_NAME:${PN}-syslog = "syslog"
+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)}"
+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"
+RDEPENDS:${PN}-syslog = "busybox"
+CONFFILES:${PN}-syslog = "${sysconfdir}/syslog-startup.conf"
+RCONFLICTS:${PN}-syslog = "rsyslog sysklogd syslog-ng"
-CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
+CONFFILES:${PN}-mdev = "${sysconfdir}/mdev.conf"
-RRECOMMENDS_${PN} = "${PN}-udhcpc"
+RRECOMMENDS:${PN} = "${PN}-udhcpc"
-RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
+RDEPENDS:${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
inherit cml1 systemd update-rc.d ptest
# busybox's unzip test case needs zip command, which busybox itself does not provide
-RDEPENDS_${PN}-ptest = "zip"
+RDEPENDS:${PN}-ptest = "zip"
# internal helper
def busybox_cfg(feature, tokens, cnf, rem):
@@ -96,12 +97,12 @@ DO_IPv6 := "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 1, 0, d)}"
python () {
if "${OE_DEL}":
- d.setVar('configmangle_append', "${OE_DEL}" + "\n")
+ d.setVar('configmangle:append', "${OE_DEL}" + "\n")
if "${OE_FEATURES}":
- d.setVar('configmangle_append',
+ d.setVar('configmangle:append',
"/^### DISTRO FEATURES$/a\\\n%s\n\n" %
("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
- d.setVar('configmangle_append',
+ d.setVar('configmangle:append',
"/^### CROSS$/a\\\n%s\n" %
("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS} ${HOST_CC_ARCH}\""
])
@@ -109,9 +110,8 @@ python () {
}
do_prepare_config () {
- if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
- export KCONFIG_NOTIMESTAMP=1
- fi
+ export KCONFIG_NOTIMESTAMP=1
+
sed -e '/CONFIG_STATIC/d' \
< ${WORKDIR}/defconfig > ${S}/.config
echo "# CONFIG_STATIC is not set" >> .config
@@ -133,16 +133,6 @@ do_prepare_config () {
fi
}
-# returns all the elements from the src uri that are .cfg files
-def find_cfgs(d):
- sources=src_patches(d, True)
- sources_list=[]
- for s in sources:
- if s.endswith('.cfg'):
- sources_list.append(s)
-
- return sources_list
-
do_configure () {
set -x
do_prepare_config
@@ -152,9 +142,8 @@ do_configure () {
do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
- export KCONFIG_NOTIMESTAMP=1
- fi
+ export KCONFIG_NOTIMESTAMP=1
+
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
@@ -318,24 +307,25 @@ do_install () {
install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
fi
fi
- if grep -q "CONFIG_INIT=y" ${B}/.config; then
+ if grep -q "CONFIG_INIT=y" ${B}/.config && ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','busybox','true','false',d)}; then
install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS
install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK
+ install -D -m 0755 ${WORKDIR}/rcS.default ${D}${sysconfdir}/default/rcS
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
+ install -d ${D}${systemd_system_unitdir}
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
- > ${D}${systemd_unitdir}/system/busybox-klogd.service
+ > ${D}${systemd_system_unitdir}/busybox-klogd.service
fi
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
- install -d ${D}${systemd_unitdir}/system
+ install -d ${D}${systemd_system_unitdir}
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
+ > ${D}${systemd_system_unitdir}/busybox-syslog.service
+ if [ ! -e ${D}${systemd_system_unitdir}/busybox-klogd.service ] ; then
+ sed -i '/klog/d' ${D}${systemd_system_unitdir}/busybox-syslog.service
fi
if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
install -d ${D}${sysconfdir}/default
@@ -364,7 +354,7 @@ inherit update-alternatives
ALTERNATIVE_PRIORITY = "50"
-python do_package_prepend () {
+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
@@ -381,9 +371,9 @@ python do_package_prepend () {
if alt_name == '[':
alt_name = 'lbracket'
if alt_name == 'klogd' or alt_name == 'syslogd':
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' ' + alt_name)
+ d.appendVar('ALTERNATIVE:%s-syslog' % (pn), ' ' + alt_name)
else:
- d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
+ 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)
@@ -403,7 +393,7 @@ python do_package_prepend () {
# These symlinks will later be updated by update-alternatives calls.
# The update-alternatives.bbclass' postinst script runs firstly before other
# postinst, but this part of code needs run firstly, so add this funtion.
-python populate_packages_updatealternatives_append() {
+python populate_packages_updatealternatives:append() {
postinst = """
test -n 2 > /dev/null || alias test='busybox test'
if test "x$D" = "x"; then
@@ -430,10 +420,10 @@ if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
fi
"""
- d.prependVar('pkg_postinst_%s' % pkg, postinst)
+ d.prependVar('pkg_postinst:%s' % pkg, postinst)
}
-pkg_postinst_${PN}_prepend () {
+pkg_postinst:${PN}:prepend () {
# Need path to saved utils, but they may have be removed on upgrade of busybox
# Only use shell to get paths. Also capture if busybox was saved.
BUSYBOX=""
@@ -449,7 +439,7 @@ pkg_postinst_${PN}_prepend () {
fi
}
-pkg_postinst_${PN}_append () {
+pkg_postinst:${PN}:append () {
# If busybox exists in the remove directory it is because it was the only shell left.
if [ "x$D" = "x" ] ; then
if [ "x$BUSYBOX" != "x" ] ; then
@@ -459,7 +449,7 @@ pkg_postinst_${PN}_append () {
fi
}
-pkg_prerm_${PN} () {
+pkg_prerm:${PN} () {
# This is so you can make busybox commit suicide - removing busybox with no other packages
# providing its files, this will make update-alternatives work, but the update-rc.d part
# for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
@@ -489,7 +479,7 @@ pkg_prerm_${PN} () {
fi
}
-pkg_postrm_${PN} () {
+pkg_postrm:${PN} () {
# Add path to remove dir in case we removed our only grep
if [ "x$D" = "x" ] ; then
for busybox_rmdir in /tmp/busyboxrm-*; do
@@ -504,7 +494,7 @@ pkg_postrm_${PN} () {
fi
}
-pkg_prerm_${PN}-syslog () {
+pkg_prerm:${PN}-syslog () {
# remove syslog
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
@@ -513,4 +503,4 @@ pkg_prerm_${PN}-syslog () {
fi
}
-RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/ash', '', d)}"
+RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/ash', '', d)}"