Skip to contentSkip to conversation

busybox: fix conflict with runlevel applet

PATCH Superseded Andrej Valek 5 participants 19 messages Oct 4, 2018 – Oct 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox: fix conflict with runlevel applet

When CONFIG_RUNLEVEL is enabled, it conflicts with installed OE's script. Make grep quite for prevent to write information into logs.

---
 meta/recipes-core/busybox/busybox.inc | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
meta/recipes-core/busybox/busybox.inc +11 -9
index e1fba4243a..9c546927ab 100644
@@ -279,32 +279,32 @@ 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
+        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
@@ -313,10 +313,12 @@ do_install () {
                        install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
                fi
 	fi
-        if grep "CONFIG_INIT=y" ${B}/.config; then
+        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
-                install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel
+                if ! grep -q "CONFIG_RUNLEVEL=y" ${B}/.config; then
+                        install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel
+                fi
         fi
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
Signature · 1 line
2.11.0
#1 lore raw

I'm not against this change, but would it make sense to enable runlevel applet in:
meta/recipes-core/busybox/busybox/init.cfg
and drop the runlevel shell script completely?

Quoted 96 lines · Andrej Valek

When CONFIG_RUNLEVEL is enabled, it conflicts with installed OE's script. Make grep quite for prevent to write information into logs.

---
 meta/recipes-core/busybox/busybox.inc | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
meta/recipes-core/busybox/busybox.inc +0 -0
index e1fba4243a..9c546927ab 100644
@@ -279,32 +279,32 @@ 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

meta/recipes-core/busybox/busybox.inc +1 -1
-       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

meta/recipes-core/busybox/busybox.inc +1 -1
-       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
meta/recipes-core/busybox/busybox.inc +1 -1
-       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

meta/recipes-core/busybox/busybox.inc +1 -1
-       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

meta/recipes-core/busybox/busybox.inc +1 -1
-       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

meta/recipes-core/busybox/busybox.inc +1 -1
-       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
meta/recipes-core/busybox/busybox.inc +1 -1
-        if grep "CONFIG_MDEV=y" ${B}/.config; then
+        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

meta/recipes-core/busybox/busybox.inc +0 -0
@@ -313,10 +313,12 @@ do_install () {
                        install -m 0755 ${WORKDIR}/mdev-mount.sh

${D}${sysconfdir}/mdev
fi
fi

meta/recipes-core/busybox/busybox.inc +1 -1
-        if grep "CONFIG_INIT=y" ${B}/.config; then
+        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
- install -D -m 0755 ${WORKDIR}/runlevel
${D}${base_sbindir}/runlevel

meta/recipes-core/busybox/busybox.inc +2 -0
+                if ! grep -q "CONFIG_RUNLEVEL=y" ${B}/.config; then
+                        install -D -m 0755 ${WORKDIR}/runlevel

${D}${base_sbindir}/runlevel
+ fi
fi

if
${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then --
2.11.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

This init feature was introduced via
http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116109.html
which is from 2016. Busybox has this runlevel applet available from 2005.

I think, Raj was trying to make this system really tiny. So, I am not sure, what would be the impact, if we dropped this runlevel script.

Regards,
Andrej

Quoted 101 lines · Martin Jansa

I'm not against this change, but would it make sense to enable runlevel applet in:
meta/recipes-core/busybox/busybox/init.cfg
and drop the runlevel shell script completely?

On Thu, Oct 4, 2018 at 12:42 PM Andrej Valek <[email protected] <mailto:[email protected]>> wrote:

    When CONFIG_RUNLEVEL is enabled, it conflicts with installed OE's script.
    Make grep quite for prevent to write information into logs.

    Signed-off-by: Andrej Valek <[email protected]
    <mailto:[email protected]>>
    ---
      meta/recipes-core/busybox/busybox.inc | 20 +++++++++++---------
      1 file changed, 11 insertions(+), 9 deletions(-)

    diff --git a/meta/recipes-core/busybox/busybox.inc
    b/meta/recipes-core/busybox/busybox.inc
    index e1fba4243a..9c546927ab 100644
    --- a/meta/recipes-core/busybox/busybox.inc
    +++ b/meta/recipes-core/busybox/busybox.inc
    @@ -279,32 +279,32 @@ 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
    +        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
    @@ -313,10 +313,12 @@ do_install () {
                             install -m 0755 ${WORKDIR}/mdev-mount.sh
    ${D}${sysconfdir}/mdev
                     fi
             fi
    -        if grep "CONFIG_INIT=y" ${B}/.config; then
    +        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
    -                install -D -m 0755 ${WORKDIR}/runlevel
    ${D}${base_sbindir}/runlevel
    +                if ! grep -q "CONFIG_RUNLEVEL=y" ${B}/.config; then
    +                        install -D -m 0755 ${WORKDIR}/runlevel
    ${D}${base_sbindir}/runlevel
    +                fi
              fi

          if
    ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
    -- 
    2.11.0

    -- 
    _______________________________________________
    Openembedded-core mailing list
    [email protected]
    <mailto:[email protected]>
    http://lists.openembedded.org/mailman/listinfo/openembedded-core
#3 lore raw
Quoted 6 lines · Andrej Valek

This init feature was introduced via
http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116109.html
which is from 2016. Busybox has this runlevel applet available from 2005.

I think, Raj was trying to make this system really tiny. So, I am not sure, what would be the impact, if we dropped this runlevel script.

OK, fair enough. I don't use busybox init anyway.

I was just curious, because there is also runlevel from upstart which we were using (and I have u-a for runlevel in busybox.bbappend because of that). So I was surprised that there is actually 3rd implementation as OE specific shell script.

Quoted 102 lines · Martin Jansa
Quoted 101 lines

I'm not against this change, but would it make sense to enable runlevel applet in:
meta/recipes-core/busybox/busybox/init.cfg
and drop the runlevel shell script completely?

On Thu, Oct 4, 2018 at 12:42 PM Andrej Valek <[email protected] <mailto:[email protected]>> wrote:

    When CONFIG_RUNLEVEL is enabled, it conflicts with installed OE's script.
    Make grep quite for prevent to write information into logs.

    Signed-off-by: Andrej Valek <[email protected]
    <mailto:[email protected]>>
    ---
      meta/recipes-core/busybox/busybox.inc | 20 +++++++++++---------
      1 file changed, 11 insertions(+), 9 deletions(-)

    diff --git a/meta/recipes-core/busybox/busybox.inc
    b/meta/recipes-core/busybox/busybox.inc
    index e1fba4243a..9c546927ab 100644
    --- a/meta/recipes-core/busybox/busybox.inc
    +++ b/meta/recipes-core/busybox/busybox.inc
    @@ -279,32 +279,32 @@ 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
    +        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
    @@ -313,10 +313,12 @@ do_install () {
                             install -m 0755 ${WORKDIR}/mdev-mount.sh
    ${D}${sysconfdir}/mdev
                     fi
             fi
    -        if grep "CONFIG_INIT=y" ${B}/.config; then
    +        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
    -                install -D -m 0755 ${WORKDIR}/runlevel
    ${D}${base_sbindir}/runlevel
    +                if ! grep -q "CONFIG_RUNLEVEL=y" ${B}/.config; then
    +                        install -D -m 0755 ${WORKDIR}/runlevel
    ${D}${base_sbindir}/runlevel
    +                fi
              fi

          if
    ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
    -- 
    2.11.0

    -- 
    _______________________________________________
    Openembedded-core mailing list
    [email protected]
    <mailto:[email protected]>
    http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw
Quoted 9 lines · Martin Jansa
Quoted 2 lines · Andrej Valek

This init feature was introduced via

http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116109.html

Quoted 4 lines

which is from 2016. Busybox has this runlevel applet available from 2005.

I think, Raj was trying to make this system really tiny. So, I am not sure, what would be the impact, if we dropped this runlevel script.

Quoted 7 lines

OK, fair enough. I don't use busybox init anyway.

I was just curious, because there is also runlevel from upstart which we were
using (and I have u-a for runlevel in busybox.bbappend because of that). So I was surprised that there is actually 3rd implementation as OE specific shell script.

Khem, do you have an opinion? I suspect that shell script including comment is longer than the compiled size of the runlevel applet in busybox... We could simplify by just having the applet and removing that runlevel stub.

Ross

#5 lore raw
Quoted 13 lines · Ross
Quoted 11 lines · Martin Jansa
Quoted 6 lines · Andrej Valek

This init feature was introduced via
http://lists.openembedded.org/pipermail/openembedded-core/2016-January/116109.html
which is from 2016. Busybox has this runlevel applet available from 2005.

I think, Raj was trying to make this system really tiny. So, I am not sure, what would be the impact, if we dropped this runlevel script.

OK, fair enough. I don't use busybox init anyway.

Quoted 7 lines
Quoted 4 lines

I was just curious, because there is also runlevel from upstart which we were using (and I have u-a for runlevel in busybox.bbappend because of that). So I was surprised that there is actually 3rd implementation as OE specific shell script.

Khem, do you have an opinion? I suspect that shell script including comment is longer than the compiled size of the runlevel applet in busybox... We could simplify by just having the applet and removing that runlevel stub.

we should enable runlevel unconditionally when selecting busybox init and delete the file that I added for runlevel, that way we will be inline with busybox for this applet.

Quoted 2 lines

Ross

#6 lore raw

PATCH v2 1/3 busybox: fix conflict with runlevel applet

- remove OE runlevel script which conflicts with busybox's applet
- don't install empty directories

---
 meta/recipes-core/busybox/busybox.inc      | 4 +---
 meta/recipes-core/busybox/busybox/init.cfg | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)
meta/recipes-core/busybox/busybox.inc +1 -3
index e1fba4243a..7b427ab0f7 100644
@@ -254,8 +254,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}"
@@ -316,7 +315,6 @@ do_install () {
         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
meta/recipes-core/busybox/busybox/init.cfg +1 -0
index 3c1fdd42b6..b69fe0ea9c 100644
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
Signature · 1 line
2.11.0
#7 lore raw

PATCH v2 2/3 busybox: do not write grep outputs into log

Make grep quiet for prevent to write information into logs.

---
 meta/recipes-core/busybox/busybox.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
meta/recipes-core/busybox/busybox.inc +8 -8
index 7b427ab0f7..97b73c1dc0 100644
@@ -278,32 +278,32 @@ 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
+        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
@@ -312,7 +312,7 @@ do_install () {
                        install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
                fi
 	fi
-        if grep "CONFIG_INIT=y" ${B}/.config; then
+        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
Signature · 1 line
2.11.0
#8 lore raw

PATCH v2 3/3 busybox: unify recipe style

In reply to Andrej Valek

- change spaces to tabs and unify indent level

---
 meta/recipes-core/busybox/busybox.inc | 98 +++++++++++++++++------------------
 1 file changed, 49 insertions(+), 49 deletions(-)
meta/recipes-core/busybox/busybox.inc +49 -49
index 97b73c1dc0..10582a7534 100644
@@ -117,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
@@ -151,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
@@ -303,51 +303,51 @@ do_install () {
 		sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN}
 		install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/
 	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
+	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 -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
 }
 
 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
Signature · 1 line
2.11.0
#9 lore raw
In reply to Andrej Valek

Don't you want to delete runlevel here too?

Ross

Quoted 56 lines · Andrej Valek

- remove OE runlevel script which conflicts with busybox's applet
- don't install empty directories

---
 meta/recipes-core/busybox/busybox.inc      | 4 +---
 meta/recipes-core/busybox/busybox/init.cfg | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)
meta/recipes-core/busybox/busybox.inc +1 -2
index e1fba4243a..7b427ab0f7 100644
@@ -254,8 +254,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}"
@@ -316,7 +315,6 @@ do_install () {
         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

meta/recipes-core/busybox/busybox/init.cfg +1 -1
index 3c1fdd42b6..b69fe0ea9c 100644
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
--

2.11.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#10 lore raw

PATCH v3 1/3 busybox: fix conflict with runlevel applet

- remove OE runlevel script which conflicts with busybox's applet
- don't install empty directories

---
 meta/recipes-core/busybox/busybox.inc       |  4 +---
 meta/recipes-core/busybox/busybox/init.cfg  |  1 +
 meta/recipes-core/busybox/busybox_1.29.2.bb |  1 -
 meta/recipes-core/busybox/files/runlevel    | 11 -----------
 4 files changed, 2 insertions(+), 15 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/files/runlevel
meta/recipes-core/busybox/busybox.inc +1 -3
index e1fba4243a..7b427ab0f7 100644
@@ -254,8 +254,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}"
@@ -316,7 +315,6 @@ do_install () {
         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
meta/recipes-core/busybox/busybox/init.cfg +1 -0
index 3c1fdd42b6..b69fe0ea9c 100644
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
meta/recipes-core/busybox/busybox_1.29.2.bb +0 -1
index 3496a857c4..df3ea5906b 100644
@@ -40,7 +40,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://inittab \
            file://rcS \
            file://rcK \
-           file://runlevel \
            file://makefile-libbb-race.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
meta/recipes-core/busybox/files/runlevel deleted +0 -11
deleted file mode 100644
index 866f3b5945..0000000000
@@ -1,11 +0,0 @@
-#!/bin/sh
-# busybox init does not have LSB ( sysvinit ) like initlevels
-# so lets fake it to 5 which is what we default anyway
-# this helps with opkg post installs where it tries to invoke
-# update-rc.d ad post install step.
-# for package upgrades
-# See code in update-rc.d around line 190 where it calls runlevel
-# program
-#
-echo "5"
-
Signature · 1 line
2.11.0
#11 lore raw

PATCH v3 2/3 busybox: do not write grep outputs into log

Make grep quiet for prevent to write information into logs.

---
 meta/recipes-core/busybox/busybox.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
meta/recipes-core/busybox/busybox.inc +8 -8
index 7b427ab0f7..97b73c1dc0 100644
@@ -278,32 +278,32 @@ 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
+        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
@@ -312,7 +312,7 @@ do_install () {
                        install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
                fi
 	fi
-        if grep "CONFIG_INIT=y" ${B}/.config; then
+        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
Signature · 1 line
2.11.0
#12 lore raw

PATCH v3 3/3 busybox: unify recipe style

In reply to Andrej Valek

- change spaces to tabs and unify indent level

---
 meta/recipes-core/busybox/busybox.inc | 98 +++++++++++++++++------------------
 1 file changed, 49 insertions(+), 49 deletions(-)
meta/recipes-core/busybox/busybox.inc +49 -49
index 97b73c1dc0..10582a7534 100644
@@ -117,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
@@ -151,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
@@ -303,51 +303,51 @@ do_install () {
 		sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN}
 		install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/
 	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
+	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 -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
 }
 
 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
Signature · 1 line
2.11.0
#13 lore raw

✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev4)

In reply to Andrej Valek

== Series Details ==

Series: busybox: fix conflict with runlevel applet (rev4)
Revision: 4
URL : https://patchwork.openembedded.org/series/14363/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 9a84114a27)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#14 lore raw

✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev5)

In reply to Andrej Valek

== Series Details ==

Series: busybox: fix conflict with runlevel applet (rev5)
Revision: 5
URL : https://patchwork.openembedded.org/series/14363/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 9a84114a27)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#15 lore raw

v4 cover busybox: refactor

In reply to Andrej Valek

Changes:

[v2]
- split into 3 commits
- fix indent

[v3]
- remove missed runlevel script

[v4]
- sync changes with current master

Andrej Valek (3):
busybox: fix conflict with runlevel applet
busybox: do not write grep outputs into log
busybox: unify recipe style

 meta/recipes-core/busybox/busybox.inc       | 114 ++++++++++++++--------------
 meta/recipes-core/busybox/busybox/init.cfg  |   1 +
 meta/recipes-core/busybox/busybox_1.29.2.bb |   1 -
 meta/recipes-core/busybox/files/runlevel    |  11 ---
 4 files changed, 57 insertions(+), 70 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/files/runlevel
Signature · 1 line
2.11.0
#16 lore raw

PATCH v4 1/3 busybox: fix conflict with runlevel applet

In reply to Andrej Valek

- remove OE runlevel script which conflicts with busybox's applet
- don't install empty directories

---
 meta/recipes-core/busybox/busybox.inc       |  4 +---
 meta/recipes-core/busybox/busybox/init.cfg  |  1 +
 meta/recipes-core/busybox/busybox_1.29.2.bb |  1 -
 meta/recipes-core/busybox/files/runlevel    | 11 -----------
 4 files changed, 2 insertions(+), 15 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/files/runlevel
meta/recipes-core/busybox/busybox.inc +1 -3
index e1fba4243a..7b427ab0f7 100644
@@ -254,8 +254,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}"
@@ -316,7 +315,6 @@ do_install () {
         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
meta/recipes-core/busybox/busybox/init.cfg +1 -0
index 3c1fdd42b6..b69fe0ea9c 100644
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
meta/recipes-core/busybox/busybox_1.29.2.bb +0 -1
index 3496a857c4..df3ea5906b 100644
@@ -40,7 +40,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://inittab \
            file://rcS \
            file://rcK \
-           file://runlevel \
            file://makefile-libbb-race.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
meta/recipes-core/busybox/files/runlevel deleted +0 -11
deleted file mode 100644
index 866f3b5945..0000000000
@@ -1,11 +0,0 @@
-#!/bin/sh
-# busybox init does not have LSB ( sysvinit ) like initlevels
-# so lets fake it to 5 which is what we default anyway
-# this helps with opkg post installs where it tries to invoke
-# update-rc.d ad post install step.
-# for package upgrades
-# See code in update-rc.d around line 190 where it calls runlevel
-# program
-#
-echo "5"
-
Signature · 1 line
2.11.0
#17 lore raw

PATCH v4 2/3 busybox: do not write grep outputs into log

Make grep quiet for prevent to write information into logs.

---
 meta/recipes-core/busybox/busybox.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
meta/recipes-core/busybox/busybox.inc +8 -8
index 7b427ab0f7..97b73c1dc0 100644
@@ -278,32 +278,32 @@ 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
+        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
@@ -312,7 +312,7 @@ do_install () {
                        install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
                fi
 	fi
-        if grep "CONFIG_INIT=y" ${B}/.config; then
+        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
Signature · 1 line
2.11.0
#18 lore raw

PATCH v4 3/3 busybox: unify recipe style

In reply to Andrej Valek

- change spaces to tabs and unify indent level

---
 meta/recipes-core/busybox/busybox.inc | 98 +++++++++++++++++------------------
 1 file changed, 49 insertions(+), 49 deletions(-)
meta/recipes-core/busybox/busybox.inc +49 -49
index 97b73c1dc0..10582a7534 100644
@@ -117,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
@@ -151,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
@@ -303,51 +303,51 @@ do_install () {
 		sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN}
 		install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/
 	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
+	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 -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
 }
 
 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
Signature · 1 line
2.11.0