summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:28:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-02 15:44:10 +0100
commitbb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch)
tree76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/recipes-core/busybox/busybox.inc
parentfcc456ee4b8f619134abb4649db53c638074082c (diff)
downloadpoky-bb6ddc3691ab04162ec5fd69a2d5e7876713fd15.tar.gz
Convert to new override syntax
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r--meta/recipes-core/busybox/busybox.inc68
1 files changed, 34 insertions, 34 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 47fcb59302..d85e2a3d7a 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -23,39 +23,39 @@ EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${
23 23
24PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" 24PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
25 25
26FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" 26FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
27FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" 27FILES:${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
28FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" 28FILES:${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
29FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" 29FILES:${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
30FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" 30FILES:${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
31FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" 31FILES:${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
32 32
33INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock" 33INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock"
34 34
35INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" 35INITSCRIPT_NAME:${PN}-httpd = "busybox-httpd"
36INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" 36INITSCRIPT_NAME:${PN}-hwclock = "hwclock.sh"
37INITSCRIPT_NAME_${PN}-mdev = "mdev" 37INITSCRIPT_NAME:${PN}-mdev = "mdev"
38INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ." 38INITSCRIPT_PARAMS:${PN}-mdev = "start 04 S ."
39INITSCRIPT_NAME_${PN}-syslog = "syslog" 39INITSCRIPT_NAME:${PN}-syslog = "syslog"
40INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 40INITSCRIPT_NAME:${PN}-udhcpd = "busybox-udhcpd"
41 41
42SYSTEMD_PACKAGES = "${PN}-syslog" 42SYSTEMD_PACKAGES = "${PN}-syslog"
43SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}" 43SYSTEMD_SERVICE:${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}"
44 44
45RDEPENDS_${PN}-syslog = "busybox" 45RDEPENDS:${PN}-syslog = "busybox"
46CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf" 46CONFFILES:${PN}-syslog = "${sysconfdir}/syslog-startup.conf"
47RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng" 47RCONFLICTS:${PN}-syslog = "rsyslog sysklogd syslog-ng"
48 48
49CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" 49CONFFILES:${PN}-mdev = "${sysconfdir}/mdev.conf"
50 50
51RRECOMMENDS_${PN} = "${PN}-udhcpc" 51RRECOMMENDS:${PN} = "${PN}-udhcpc"
52 52
53RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}" 53RDEPENDS:${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
54 54
55inherit cml1 systemd update-rc.d ptest 55inherit cml1 systemd update-rc.d ptest
56 56
57# busybox's unzip test case needs zip command, which busybox itself does not provide 57# busybox's unzip test case needs zip command, which busybox itself does not provide
58RDEPENDS_${PN}-ptest = "zip" 58RDEPENDS:${PN}-ptest = "zip"
59 59
60# internal helper 60# internal helper
61def busybox_cfg(feature, tokens, cnf, rem): 61def busybox_cfg(feature, tokens, cnf, rem):
@@ -97,12 +97,12 @@ DO_IPv6 := "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 1, 0, d)}"
97 97
98python () { 98python () {
99 if "${OE_DEL}": 99 if "${OE_DEL}":
100 d.setVar('configmangle_append', "${OE_DEL}" + "\n") 100 d.setVar('configmangle:append', "${OE_DEL}" + "\n")
101 if "${OE_FEATURES}": 101 if "${OE_FEATURES}":
102 d.setVar('configmangle_append', 102 d.setVar('configmangle:append',
103 "/^### DISTRO FEATURES$/a\\\n%s\n\n" % 103 "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
104 ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) 104 ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
105 d.setVar('configmangle_append', 105 d.setVar('configmangle:append',
106 "/^### CROSS$/a\\\n%s\n" % 106 "/^### CROSS$/a\\\n%s\n" %
107 ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS} ${HOST_CC_ARCH}\"" 107 ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS} ${HOST_CC_ARCH}\""
108 ]) 108 ])
@@ -356,7 +356,7 @@ inherit update-alternatives
356 356
357ALTERNATIVE_PRIORITY = "50" 357ALTERNATIVE_PRIORITY = "50"
358 358
359python do_package_prepend () { 359python do_package:prepend () {
360 # We need to load the full set of busybox provides from the /etc/busybox.links 360 # We need to load the full set of busybox provides from the /etc/busybox.links
361 # Use this to see the update-alternatives with the right information 361 # Use this to see the update-alternatives with the right information
362 362
@@ -373,9 +373,9 @@ python do_package_prepend () {
373 if alt_name == '[': 373 if alt_name == '[':
374 alt_name = 'lbracket' 374 alt_name = 'lbracket'
375 if alt_name == 'klogd' or alt_name == 'syslogd': 375 if alt_name == 'klogd' or alt_name == 'syslogd':
376 d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' ' + alt_name) 376 d.appendVar('ALTERNATIVE:%s-syslog' % (pn), ' ' + alt_name)
377 else: 377 else:
378 d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name) 378 d.appendVar('ALTERNATIVE:%s' % (pn), ' ' + alt_name)
379 d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name) 379 d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
380 if os.path.exists('%s%s' % (dvar, target)): 380 if os.path.exists('%s%s' % (dvar, target)):
381 d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target) 381 d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
@@ -395,7 +395,7 @@ python do_package_prepend () {
395# These symlinks will later be updated by update-alternatives calls. 395# These symlinks will later be updated by update-alternatives calls.
396# The update-alternatives.bbclass' postinst script runs firstly before other 396# The update-alternatives.bbclass' postinst script runs firstly before other
397# postinst, but this part of code needs run firstly, so add this funtion. 397# postinst, but this part of code needs run firstly, so add this funtion.
398python populate_packages_updatealternatives_append() { 398python populate_packages_updatealternatives:append() {
399 postinst = """ 399 postinst = """
400test -n 2 > /dev/null || alias test='busybox test' 400test -n 2 > /dev/null || alias test='busybox test'
401if test "x$D" = "x"; then 401if test "x$D" = "x"; then
@@ -422,10 +422,10 @@ if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
422fi 422fi
423 423
424""" 424"""
425 d.prependVar('pkg_postinst_%s' % pkg, postinst) 425 d.prependVar('pkg_postinst:%s' % pkg, postinst)
426} 426}
427 427
428pkg_postinst_${PN}_prepend () { 428pkg_postinst:${PN}:prepend () {
429 # Need path to saved utils, but they may have be removed on upgrade of busybox 429 # Need path to saved utils, but they may have be removed on upgrade of busybox
430 # Only use shell to get paths. Also capture if busybox was saved. 430 # Only use shell to get paths. Also capture if busybox was saved.
431 BUSYBOX="" 431 BUSYBOX=""
@@ -441,7 +441,7 @@ pkg_postinst_${PN}_prepend () {
441 fi 441 fi
442} 442}
443 443
444pkg_postinst_${PN}_append () { 444pkg_postinst:${PN}:append () {
445 # If busybox exists in the remove directory it is because it was the only shell left. 445 # If busybox exists in the remove directory it is because it was the only shell left.
446 if [ "x$D" = "x" ] ; then 446 if [ "x$D" = "x" ] ; then
447 if [ "x$BUSYBOX" != "x" ] ; then 447 if [ "x$BUSYBOX" != "x" ] ; then
@@ -451,7 +451,7 @@ pkg_postinst_${PN}_append () {
451 fi 451 fi
452} 452}
453 453
454pkg_prerm_${PN} () { 454pkg_prerm:${PN} () {
455 # This is so you can make busybox commit suicide - removing busybox with no other packages 455 # This is so you can make busybox commit suicide - removing busybox with no other packages
456 # providing its files, this will make update-alternatives work, but the update-rc.d part 456 # providing its files, this will make update-alternatives work, but the update-rc.d part
457 # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh 457 # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
@@ -481,7 +481,7 @@ pkg_prerm_${PN} () {
481 fi 481 fi
482} 482}
483 483
484pkg_postrm_${PN} () { 484pkg_postrm:${PN} () {
485 # Add path to remove dir in case we removed our only grep 485 # Add path to remove dir in case we removed our only grep
486 if [ "x$D" = "x" ] ; then 486 if [ "x$D" = "x" ] ; then
487 for busybox_rmdir in /tmp/busyboxrm-*; do 487 for busybox_rmdir in /tmp/busyboxrm-*; do
@@ -496,7 +496,7 @@ pkg_postrm_${PN} () {
496 fi 496 fi
497} 497}
498 498
499pkg_prerm_${PN}-syslog () { 499pkg_prerm:${PN}-syslog () {
500 # remove syslog 500 # remove syslog
501 if test "x$D" = "x"; then 501 if test "x$D" = "x"; then
502 if test "$1" = "upgrade" -o "$1" = "remove"; then 502 if test "$1" = "upgrade" -o "$1" = "remove"; then
@@ -505,4 +505,4 @@ pkg_prerm_${PN}-syslog () {
505 fi 505 fi
506} 506}
507 507
508RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/ash', '', d)}" 508RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/ash', '', d)}"