busybox: detects customized configs when do_install
PATCH 1/2 busybox: detects customized configs when do_install
From: Ting Liu <[email protected]>
After using 'bitbake -c menuconfig busybox' to customize defconfig, do_install fail to detect the changes. Grep configs in ${S}/.config instead of defconfig.
--- meta/recipes-core/busybox/busybox.inc | 22 +++++++++++----------- meta/recipes-core/busybox/busybox_1.20.2.bb | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-)
meta/recipes-core/busybox/busybox.inc +11 -11
@@ -149,11 +149,11 @@ do_install () { install -d ${D}${sysconfdir}/init.d - if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${WORKDIR}/defconfig; then + if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${S}/.config; then # Install /bin/busybox, and the /bin/sh link so the postinst script # can run. Let update-alternatives handle the rest. install -d ${D}${base_bindir} - if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_FEATURE_SUID=y" ${S}/.config; then install -m 4755 ${S}/busybox ${D}${base_bindir} else install -m 0755 ${S}/busybox ${D}${base_bindir}
@@ -179,36 +179,36 @@ do_install () { fi fi - if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_SYSLOGD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} fi - if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_CROND=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HTTPD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ install -d ${D}/srv/www fi - if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HWCLOCK=y" ${S}/.config; then install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPC=y" ${S}/.config; then install -d ${D}${sysconfdir}/udhcpc.d install -d ${D}${datadir}/udhcpc install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script fi - if grep "CONFIG_INETD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_INETD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/ fi - if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_MDEV=y" ${S}/.config; then install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev - if grep "CONFIG_FEATURE_MDEV_CONF=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_FEATURE_MDEV_CONF=y" ${S}/.config; then install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf fi fi
meta/recipes-core/busybox/busybox_1.20.2.bb +2 -1
@@ -1,5 +1,5 @@ require busybox.inc -PR = "r5" +PR = "r6" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://B921600.patch \
@@ -30,6 +30,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://stat-usr-bin.patch \ file://testsuite-du-du-k-works-fix-false-positive.patch" + SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
Signature · 1 line
1.7.5.4
PATCH 2/2 busybox: Add inetd related files
From: Ting Liu <[email protected]>
Add back inetd and inetd.conf files which are needed if CONFIG_INETD is enabled in the defconfig. Grabbed these files from oe-classic
This patch is based on the previous patch for denzil:
http://patches.openembedded.org/patch/33235/
--- meta/recipes-core/busybox/busybox.inc | 1 + meta/recipes-core/busybox/busybox_1.20.2.bb | 6 +++- meta/recipes-core/busybox/files/inetd | 33 +++++++++++++++++++++++++++ meta/recipes-core/busybox/files/inetd.conf | 20 ++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/busybox/files/inetd create mode 100644 meta/recipes-core/busybox/files/inetd.conf
meta/recipes-core/busybox/busybox.inc +1 -0
@@ -204,6 +204,7 @@ do_install () { fi if grep "CONFIG_INETD=y" ${S}/.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" ${S}/.config; then
meta/recipes-core/busybox/busybox_1.20.2.bb +4 -2
@@ -1,5 +1,5 @@ require busybox.inc -PR = "r6" +PR = "r7" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://B921600.patch \
@@ -28,7 +28,9 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://fix-for-spurious-testsuite-failure.patch \ file://busybox-1.20.2-kernel_ver.patch \ file://stat-usr-bin.patch \ - file://testsuite-du-du-k-works-fix-false-positive.patch" + file://testsuite-du-du-k-works-fix-false-positive.patch \ + file://inetd.conf \ + file://inetd" SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
meta/recipes-core/busybox/files/inetd new file +33 -0
@@ -0,0 +1,33 @@ +#!/bin/sh +# +# start/stop inetd super server. + +if ! [ -x /usr/sbin/inetd ]; then + exit 0 +fi + +case "$1" in + start) + echo -n "Starting internet superserver:" + echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null + echo "." + ;; + stop) + echo -n "Stopping internet superserver:" + echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null + echo "." + ;; + restart) + echo -n "Restarting internet superserver:" + echo -n " inetd " + killall -HUP inetd + echo "." + ;; + *) + echo "Usage: /etc/init.d/inetd {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 +
meta/recipes-core/busybox/files/inetd.conf new file +20 -0
@@ -0,0 +1,20 @@ +# /etc/inetd.conf: see inetd(8) for further informations. +# +# Internet server configuration database +# +# If you want to disable an entry so it isn't touched during +# package updates just comment it out with a single '#' character. +# +# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> +# +#:INTERNAL: Internal services +#echo stream tcp nowait root internal +#echo dgram udp wait root internal +#chargen stream tcp nowait root internal +#chargen dgram udp wait root internal +#discard stream tcp nowait root internal +#discard dgram udp wait root internal +#daytime stream tcp nowait root internal +#daytime dgram udp wait root internal +#time stream tcp nowait root internal +#time dgram udp wait root internal
Signature · 1 line
1.7.5.4
Quoted 6 lines · On 03/12/2013 03:52 AM, [email protected] wrote:
From: Ting Liu <[email protected]>
After using 'bitbake -c menuconfig busybox' to customize defconfig,
do_installfail to detect the changes. Grep configs in ${S}/.config instead of defconfig.
With the recent changes from Richard to move towards using a separate ${B} directory for build vs ${S} directory for source (marked read-only in the future), this change should be updated to use ${B} instead of ${S} for checking the .config file.
The overall change is good, we just need to use the right directory for checking the build related changes to the .config file.
Thanks
Sau!
Quoted 91 lines
Change-Id I958c232eb9f8096e4113a1c3a2748f5f2eccdeb5Signed-off-by Ting Liu <[email protected]>--- meta/recipes-core/busybox/busybox.inc | 22 +++++++++++----------- meta/recipes-core/busybox/busybox_1.20.2.bb | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-)meta/recipes-core/busybox/busybox.inc +11
-11@@ -149,11 +149,11 @@ do_install () { install -d ${D}${sysconfdir}/init.d - if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${WORKDIR}/defconfig; then + if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${S}/.config; then # Install /bin/busybox, and the /bin/sh link so the postinst script # can run. Let update-alternatives handle the rest. install -d ${D}${base_bindir} - if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_FEATURE_SUID=y" ${S}/.config; then install -m 4755 ${S}/busybox ${D}${base_bindir} else install -m 0755 ${S}/busybox ${D}${base_bindir}@@ -179,36 +179,36 @@ do_install () { fi fi - if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_SYSLOGD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} fi - if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_CROND=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HTTPD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ install -d ${D}/srv/www fi - if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HWCLOCK=y" ${S}/.config; then install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPC=y" ${S}/.config; then install -d ${D}${sysconfdir}/udhcpc.d install -d ${D}${datadir}/udhcpc install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script fi - if grep "CONFIG_INETD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_INETD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/ fi - if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_MDEV=y" ${S}/.config; then install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev - if grep "CONFIG_FEATURE_MDEV_CONF=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_FEATURE_MDEV_CONF=y" ${S}/.config; then install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf fi fimeta/recipes-core/busybox/busybox_1.20.2.bb +2
-1@@ -1,5 +1,5 @@ require busybox.inc -PR = "r5" +PR = "r6" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://B921600.patch \@@ -30,6 +30,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://stat-usr-bin.patch \ file://testsuite-du-du-k-works-fix-false-positive.patch" + SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
Quoted 15 lines
-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Thursday, March 21, 2013 1:05 AM
To: Liu Ting-B28495
Cc: [email protected]
Subject: Re: [OE-core] [oe-core][PATCH 1/2] busybox: detects customized configs whendo_installQuoted 6 lines · On 03/12/2013 03:52 AM, [email protected] wrote:
From: Ting Liu <[email protected]>
After using 'bitbake -c menuconfig busybox' to customize defconfig,
do_installfail to detect the changes. Grep configs in ${S}/.config instead of defconfig.
Quoted 9 lines
With the recent changes from Richard to move towards using a separate ${B} directory for build vs ${S} directory for source (marked read-only in the future), this change should be updated to use ${B} instead of ${S} for checking the .config file.
The overall change is good, we just need to use the right directory for checking the build related changes to the .config file.
Patch v2 sent out. Please review.
Quoted 114 lines
Thanks
Sau!Quoted 4 lines
Change-Id I958c232eb9f8096e4113a1c3a2748f5f2eccdeb5Signed-off-by Ting Liu <[email protected]>--- meta/recipes-core/busybox/busybox.inc | 22 +++++++++++-----------
meta/recipes-
Quoted 4 lines
meta/recipes-core/busybox/busybox_1.20.2.bb | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-)meta/recipes- renamed from meta/recipes-core/busybox/busybox.inc +0
-0core/busybox/busybox.inc
meta/recipes-core/busybox/busybox.inc do_install () { · line 152
Quoted 8 lines
index fc6ca91..093bf2e 100644
meta/recipes-core/busybox/busybox.inc +0
-1@@ -149,11 +149,11 @@ do_install () { install -d ${D}${sysconfdir}/init.d - if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${WORKDIR}/defconfig;then
meta/recipes-core/busybox/busybox.inc do_install () { · line 153
Quoted 2 lines
meta/recipes-core/busybox/busybox.inc +1
-0+ if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${S}/.config; then # Install /bin/busybox, and the /bin/sh link so the postinstscript
Quoted 8 lines
meta/recipes-core/busybox/busybox.inc +1
-1# can run. Let update-alternatives handle the rest. install -d ${D}${base_bindir} - if grep -q "CONFIG_FEATURE_SUID=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_FEATURE_SUID=y" ${S}/.config; then install -m 4755 ${S}/busybox ${D}${base_bindir} else install -m 0755 ${S}/busybox ${D}${base_bindir}meta/recipes-core/busybox/busybox.inc do_install () { · line 183
Quoted 6 lines
meta/recipes-core/busybox/busybox.inc +1
-1@@ -179,36 +179,36 @@ do_install () { fi fi - if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then + if grep -q "CONFIG_SYSLOGD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/syslog${D}${sysconfdir}/init.d/syslog.${BPN}
meta/recipes-core/busybox/busybox.inc do_install () { · line 184
Quoted 1 line
meta/recipes-core/busybox/busybox.inc +0
-0install -m 644 ${WORKDIR}/syslog-startup.conf${D}${sysconfdir}/syslog-startup.conf.${BPN}
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 4 lines
meta/recipes-core/busybox/busybox.inc +1
-1fi - if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_CROND=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-cron${D}${sysconfdir}/init.d/
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 4 lines
meta/recipes-core/busybox/busybox.inc +1
-1fi - if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HTTPD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-httpd${D}${sysconfdir}/init.d/
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 5 lines
meta/recipes-core/busybox/busybox.inc +1
-1install -d ${D}/srv/www fi - if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/busybox-udhcpd${D}${sysconfdir}/init.d/
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 4 lines
meta/recipes-core/busybox/busybox.inc +1
-1fi - if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_HWCLOCK=y" ${S}/.config; then install -m 0755 ${WORKDIR}/hwclock.sh${D}${sysconfdir}/init.d/
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 6 lines
meta/recipes-core/busybox/busybox.inc +1
-1fi - if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_UDHCPC=y" ${S}/.config; then install -d ${D}${sysconfdir}/udhcpc.d install -d ${D}${datadir}/udhcpc install -m 0755 ${WORKDIR}/simple.script${D}${sysconfdir}/udhcpc.d/50default
meta/recipes-core/busybox/busybox.inc do_install () { · line 203
Quoted 1 line
meta/recipes-core/busybox/busybox.inc +0
-0install -m 0755 ${WORKDIR}/default.script${D}${datadir}/udhcpc/default.script
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 4 lines
meta/recipes-core/busybox/busybox.inc +1
-1fi - if grep "CONFIG_INETD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_INETD=y" ${S}/.config; then install -m 0755 ${WORKDIR}/inetd${D}${sysconfdir}/init.d/inetd.${BPN}
meta/recipes-core/busybox/busybox.inc do_install () {
Quoted 5 lines
meta/recipes-core/busybox/busybox.inc +1
-1install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/ fi - if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_MDEV=y" ${S}/.config; then install -m 0755 ${WORKDIR}/mdev${D}${sysconfdir}/init.d/mdev
meta/recipes-core/busybox/busybox.inc do_install () { · line 211
Quoted 1 line
meta/recipes-core/busybox/busybox.inc +0
-1- if grep "CONFIG_FEATURE_MDEV_CONF=y"${WORKDIR}/defconfig; then
meta/recipes-core/busybox/busybox.inc do_install () { · line 212
Quoted 2 lines
meta/recipes-core/busybox/busybox.inc +1
-0+ if grep "CONFIG_FEATURE_MDEV_CONF=y" ${S}/.config; then install -m 644 ${WORKDIR}/mdev.conf
${D}${sysconfdir}/mdev.confReview
Quoted 3 lines
meta/recipes-core/busybox/busybox.inc +0
-0fi fi(quoted diff) +0
-0b/meta/recipes-core/busybox/busybox_1.20.2.bb
meta/recipes-core/busybox/busybox_1.20.2.bb line 4
Quoted 9 lines
index 783261e..255d56c 100644
meta/recipes-core/busybox/busybox_1.20.2.bb +1
-1@@ -1,5 +1,5 @@ require busybox.inc -PR = "r5" +PR = "r6" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
meta/recipes-core/busybox/busybox_1.20.2.bb SRC_URI = "http://www.busybox.net/downloads/busybox-
Quoted 2 lines
meta/recipes-core/busybox/busybox_1.20.2.bb +0
-0file://B921600.patch \@@ -30,6 +30,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
meta/recipes-core/busybox/busybox_1.20.2.bb SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
Quoted 6 lines
meta/recipes-core/busybox/busybox_1.20.2.bb +1
-0file://stat-usr-bin.patch \ file://testsuite-du-du-k-works-fix-false-positive.patch" + SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" SRC_URI[tarball.sha256sum] ="
eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"Quoted 2 lines