All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] busybox: fix conflict with runlevel applet
@ 2018-10-04 10:41 Andrej Valek
  2018-10-04 10:48 ` Martin Jansa
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-04 10:41 UTC (permalink / raw)
  To: openembedded-core

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 <andrej.valek@siemens.com>
---
 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



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH] busybox: fix conflict with runlevel applet
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
@ 2018-10-04 10:48 ` Martin Jansa
  2018-10-04 10:59   ` Andrej Valek
  2018-10-09 11:07 ` ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev4) Patchwork
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Martin Jansa @ 2018-10-04 10:48 UTC (permalink / raw)
  To: andrej.valek; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4352 bytes --]

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 <andrej.valek@siemens.com>
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 <andrej.valek@siemens.com>
> ---
>  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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 5554 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] busybox: fix conflict with runlevel applet
  2018-10-04 10:48 ` Martin Jansa
@ 2018-10-04 10:59   ` Andrej Valek
  2018-10-04 11:27     ` Martin Jansa
  0 siblings, 1 reply; 19+ messages in thread
From: Andrej Valek @ 2018-10-04 10:59 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

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

On 10/4/18 12:48 PM, Martin Jansa wrote:
> 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 <andrej.valek@siemens.com 
> <mailto:andrej.valek@siemens.com>> 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 <andrej.valek@siemens.com
>     <mailto:andrej.valek@siemens.com>>
>     ---
>       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
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] busybox: fix conflict with runlevel applet
  2018-10-04 10:59   ` Andrej Valek
@ 2018-10-04 11:27     ` Martin Jansa
  2018-10-08 15:39       ` Burton, Ross
  0 siblings, 1 reply; 19+ messages in thread
From: Martin Jansa @ 2018-10-04 11:27 UTC (permalink / raw)
  To: Andrej Valek; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 5900 bytes --]

On Thu, Oct 04, 2018 at 12:59:37PM +0200, Andrej Valek wrote:
> 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.

> On 10/4/18 12:48 PM, Martin Jansa wrote:
> > 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 <andrej.valek@siemens.com 
> > <mailto:andrej.valek@siemens.com>> 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 <andrej.valek@siemens.com
> >     <mailto:andrej.valek@siemens.com>>
> >     ---
> >       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
> >     Openembedded-core@lists.openembedded.org
> >     <mailto:Openembedded-core@lists.openembedded.org>
> >     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> > 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] busybox: fix conflict with runlevel applet
  2018-10-04 11:27     ` Martin Jansa
@ 2018-10-08 15:39       ` Burton, Ross
  2018-10-08 15:44         ` Khem Raj
  0 siblings, 1 reply; 19+ messages in thread
From: Burton, Ross @ 2018-10-08 15:39 UTC (permalink / raw)
  To: Martin Jansa, Khem Raj; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

On Thu, 4 Oct 2018 at 12:28, Martin Jansa <martin.jansa@gmail.com> wrote:

> On Thu, Oct 04, 2018 at 12:59:37PM +0200, Andrej Valek wrote:
> > 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.


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

[-- Attachment #2: Type: text/html, Size: 1494 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] busybox: fix conflict with runlevel applet
  2018-10-08 15:39       ` Burton, Ross
@ 2018-10-08 15:44         ` Khem Raj
  2018-10-09  7:38           ` [PATCH v2 1/3] " Andrej Valek
                             ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Khem Raj @ 2018-10-08 15:44 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Mon, Oct 8, 2018 at 8:39 AM Burton, Ross <ross.burton@intel.com> wrote:
>
> On Thu, 4 Oct 2018 at 12:28, Martin Jansa <martin.jansa@gmail.com> wrote:
>>
>> On Thu, Oct 04, 2018 at 12:59:37PM +0200, Andrej Valek wrote:
>> > 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.
>
>
> 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.

>
> Ross


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v2 1/3] busybox: fix conflict with runlevel applet
  2018-10-08 15:44         ` Khem Raj
@ 2018-10-09  7:38           ` Andrej Valek
  2018-10-09 10:51             ` Burton, Ross
  2018-10-09  7:38           ` [PATCH v2 2/3] busybox: do not write grep outputs into log Andrej Valek
  2018-10-09  7:38           ` [PATCH v2 3/3] busybox: unify recipe style Andrej Valek
  2 siblings, 1 reply; 19+ messages in thread
From: Andrej Valek @ 2018-10-09  7:38 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc      | 4 +---
 meta/recipes-core/busybox/busybox/init.cfg | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index e1fba4243a..7b427ab0f7 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
diff --git a/meta/recipes-core/busybox/busybox/init.cfg b/meta/recipes-core/busybox/busybox/init.cfg
index 3c1fdd42b6..b69fe0ea9c 100644
--- a/meta/recipes-core/busybox/busybox/init.cfg
+++ b/meta/recipes-core/busybox/busybox/init.cfg
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 2/3] busybox: do not write grep outputs into log
  2018-10-08 15:44         ` Khem Raj
  2018-10-09  7:38           ` [PATCH v2 1/3] " Andrej Valek
@ 2018-10-09  7:38           ` Andrej Valek
  2018-10-09  7:38           ` [PATCH v2 3/3] busybox: unify recipe style Andrej Valek
  2 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09  7:38 UTC (permalink / raw)
  To: openembedded-core

Make grep quiet for prevent to write information into logs.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 7b427ab0f7..97b73c1dc0 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 3/3] busybox: unify recipe style
  2018-10-08 15:44         ` Khem Raj
  2018-10-09  7:38           ` [PATCH v2 1/3] " Andrej Valek
  2018-10-09  7:38           ` [PATCH v2 2/3] busybox: do not write grep outputs into log Andrej Valek
@ 2018-10-09  7:38           ` Andrej Valek
  2 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09  7:38 UTC (permalink / raw)
  To: openembedded-core

- change spaces to tabs and unify indent level

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc | 98 +++++++++++++++++------------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 97b73c1dc0..10582a7534 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 1/3] busybox: fix conflict with runlevel applet
  2018-10-09  7:38           ` [PATCH v2 1/3] " Andrej Valek
@ 2018-10-09 10:51             ` Burton, Ross
  2018-10-09 10:59               ` [PATCH v3 " Andrej Valek
                                 ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Burton, Ross @ 2018-10-09 10:51 UTC (permalink / raw)
  To: Andrej Valek; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2331 bytes --]

Don't you want to delete runlevel here too?

Ross

On Tue, 9 Oct 2018 at 08:45, Andrej Valek <andrej.valek@siemens.com> wrote:

> - remove OE runlevel script which conflicts with busybox's applet
> - don't install empty directories
>
> Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
> ---
>  meta/recipes-core/busybox/busybox.inc      | 4 +---
>  meta/recipes-core/busybox/busybox/init.cfg | 1 +
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-core/busybox/busybox.inc
> b/meta/recipes-core/busybox/busybox.inc
> index e1fba4243a..7b427ab0f7 100644
> --- a/meta/recipes-core/busybox/busybox.inc
> +++ b/meta/recipes-core/busybox/busybox.inc
> @@ -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
> diff --git a/meta/recipes-core/busybox/busybox/init.cfg
> b/meta/recipes-core/busybox/busybox/init.cfg
> index 3c1fdd42b6..b69fe0ea9c 100644
> --- a/meta/recipes-core/busybox/busybox/init.cfg
> +++ b/meta/recipes-core/busybox/busybox/init.cfg
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3149 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 1/3] busybox: fix conflict with runlevel applet
  2018-10-09 10:51             ` Burton, Ross
@ 2018-10-09 10:59               ` Andrej Valek
  2018-10-09 10:59               ` [PATCH v3 2/3] busybox: do not write grep outputs into log Andrej Valek
  2018-10-09 10:59               ` [PATCH v3 3/3] busybox: unify recipe style Andrej Valek
  2 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 10:59 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 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

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index e1fba4243a..7b427ab0f7 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
diff --git a/meta/recipes-core/busybox/busybox/init.cfg b/meta/recipes-core/busybox/busybox/init.cfg
index 3c1fdd42b6..b69fe0ea9c 100644
--- a/meta/recipes-core/busybox/busybox/init.cfg
+++ b/meta/recipes-core/busybox/busybox/init.cfg
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
diff --git a/meta/recipes-core/busybox/busybox_1.29.2.bb b/meta/recipes-core/busybox/busybox_1.29.2.bb
index 3496a857c4..df3ea5906b 100644
--- a/meta/recipes-core/busybox/busybox_1.29.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.29.2.bb
@@ -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 "
diff --git a/meta/recipes-core/busybox/files/runlevel b/meta/recipes-core/busybox/files/runlevel
deleted file mode 100644
index 866f3b5945..0000000000
--- a/meta/recipes-core/busybox/files/runlevel
+++ /dev/null
@@ -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"
-
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 2/3] busybox: do not write grep outputs into log
  2018-10-09 10:51             ` Burton, Ross
  2018-10-09 10:59               ` [PATCH v3 " Andrej Valek
@ 2018-10-09 10:59               ` Andrej Valek
  2018-10-09 10:59               ` [PATCH v3 3/3] busybox: unify recipe style Andrej Valek
  2 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 10:59 UTC (permalink / raw)
  To: openembedded-core

Make grep quiet for prevent to write information into logs.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 7b427ab0f7..97b73c1dc0 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v3 3/3] busybox: unify recipe style
  2018-10-09 10:51             ` Burton, Ross
  2018-10-09 10:59               ` [PATCH v3 " Andrej Valek
  2018-10-09 10:59               ` [PATCH v3 2/3] busybox: do not write grep outputs into log Andrej Valek
@ 2018-10-09 10:59               ` Andrej Valek
  2 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 10:59 UTC (permalink / raw)
  To: openembedded-core

- change spaces to tabs and unify indent level

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc | 98 +++++++++++++++++------------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 97b73c1dc0..10582a7534 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev4)
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
  2018-10-04 10:48 ` Martin Jansa
@ 2018-10-09 11:07 ` Patchwork
  2018-10-09 11:07 ` ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev5) Patchwork
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-10-09 11:07 UTC (permalink / raw)
  To: Andrej Valek; +Cc: openembedded-core

== 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 (openembedded-core@lists.openembedded.org) 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



^ permalink raw reply	[flat|nested] 19+ messages in thread

* ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev5)
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
  2018-10-04 10:48 ` Martin Jansa
  2018-10-09 11:07 ` ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev4) Patchwork
@ 2018-10-09 11:07 ` Patchwork
  2018-10-09 12:55 ` [PATCH v4 0/3] busybox: refactor Andrej Valek
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2018-10-09 11:07 UTC (permalink / raw)
  To: Andrej Valek; +Cc: openembedded-core

== 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 (openembedded-core@lists.openembedded.org) 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



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v4 0/3] busybox: refactor
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
                   ` (2 preceding siblings ...)
  2018-10-09 11:07 ` ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev5) Patchwork
@ 2018-10-09 12:55 ` Andrej Valek
  2018-10-09 12:56 ` [PATCH v4 1/3] busybox: fix conflict with runlevel applet Andrej Valek
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 12:55 UTC (permalink / raw)
  To: openembedded-core

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

-- 
2.11.0



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v4 1/3] busybox: fix conflict with runlevel applet
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
                   ` (3 preceding siblings ...)
  2018-10-09 12:55 ` [PATCH v4 0/3] busybox: refactor Andrej Valek
@ 2018-10-09 12:56 ` Andrej Valek
  2018-10-09 12:56 ` [PATCH v4 2/3] busybox: do not write grep outputs into log Andrej Valek
  2018-10-09 12:56 ` [PATCH v4 3/3] busybox: unify recipe style Andrej Valek
  6 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 12:56 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 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

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index e1fba4243a..7b427ab0f7 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
diff --git a/meta/recipes-core/busybox/busybox/init.cfg b/meta/recipes-core/busybox/busybox/init.cfg
index 3c1fdd42b6..b69fe0ea9c 100644
--- a/meta/recipes-core/busybox/busybox/init.cfg
+++ b/meta/recipes-core/busybox/busybox/init.cfg
@@ -1,4 +1,5 @@
 CONFIG_INIT=y
+CONFIG_RUNLEVEL=y
 CONFIG_FEATURE_USE_INITTAB=y
 CONFIG_HALT=y
 CONFIG_POWEROFF=y
diff --git a/meta/recipes-core/busybox/busybox_1.29.2.bb b/meta/recipes-core/busybox/busybox_1.29.2.bb
index 3496a857c4..df3ea5906b 100644
--- a/meta/recipes-core/busybox/busybox_1.29.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.29.2.bb
@@ -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 "
diff --git a/meta/recipes-core/busybox/files/runlevel b/meta/recipes-core/busybox/files/runlevel
deleted file mode 100644
index 866f3b5945..0000000000
--- a/meta/recipes-core/busybox/files/runlevel
+++ /dev/null
@@ -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"
-
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v4 2/3] busybox: do not write grep outputs into log
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
                   ` (4 preceding siblings ...)
  2018-10-09 12:56 ` [PATCH v4 1/3] busybox: fix conflict with runlevel applet Andrej Valek
@ 2018-10-09 12:56 ` Andrej Valek
  2018-10-09 12:56 ` [PATCH v4 3/3] busybox: unify recipe style Andrej Valek
  6 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 12:56 UTC (permalink / raw)
  To: openembedded-core

Make grep quiet for prevent to write information into logs.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 7b427ab0f7..97b73c1dc0 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v4 3/3] busybox: unify recipe style
  2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
                   ` (5 preceding siblings ...)
  2018-10-09 12:56 ` [PATCH v4 2/3] busybox: do not write grep outputs into log Andrej Valek
@ 2018-10-09 12:56 ` Andrej Valek
  6 siblings, 0 replies; 19+ messages in thread
From: Andrej Valek @ 2018-10-09 12:56 UTC (permalink / raw)
  To: openembedded-core

- change spaces to tabs and unify indent level

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 meta/recipes-core/busybox/busybox.inc | 98 +++++++++++++++++------------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 97b73c1dc0..10582a7534 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-10-09 12:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 10:41 [PATCH] busybox: fix conflict with runlevel applet Andrej Valek
2018-10-04 10:48 ` Martin Jansa
2018-10-04 10:59   ` Andrej Valek
2018-10-04 11:27     ` Martin Jansa
2018-10-08 15:39       ` Burton, Ross
2018-10-08 15:44         ` Khem Raj
2018-10-09  7:38           ` [PATCH v2 1/3] " Andrej Valek
2018-10-09 10:51             ` Burton, Ross
2018-10-09 10:59               ` [PATCH v3 " Andrej Valek
2018-10-09 10:59               ` [PATCH v3 2/3] busybox: do not write grep outputs into log Andrej Valek
2018-10-09 10:59               ` [PATCH v3 3/3] busybox: unify recipe style Andrej Valek
2018-10-09  7:38           ` [PATCH v2 2/3] busybox: do not write grep outputs into log Andrej Valek
2018-10-09  7:38           ` [PATCH v2 3/3] busybox: unify recipe style Andrej Valek
2018-10-09 11:07 ` ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev4) Patchwork
2018-10-09 11:07 ` ✗ patchtest: failure for busybox: fix conflict with runlevel applet (rev5) Patchwork
2018-10-09 12:55 ` [PATCH v4 0/3] busybox: refactor Andrej Valek
2018-10-09 12:56 ` [PATCH v4 1/3] busybox: fix conflict with runlevel applet Andrej Valek
2018-10-09 12:56 ` [PATCH v4 2/3] busybox: do not write grep outputs into log Andrej Valek
2018-10-09 12:56 ` [PATCH v4 3/3] busybox: unify recipe style Andrej Valek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.