Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific
@ 2018-03-03  1:46 Denys Dmytriyenko
  2018-03-03  1:46 ` [PATCH 2/2] layer.conf: add busybox-inittab to SIGGEN_EXCLUDERECIPES_ABISAFE Denys Dmytriyenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2018-03-03  1:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

* Create busybox-inittab recipe to produce machine-specific package with /etc/inittab
  and necessary getty calls for a machine, based on SERIAL_CONSOLES, similar to how
  sysvinit-inittab was done

* Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-RUNTIME_init_manager, make
  main busybox package RDEPENDS on busybox-inittab when init_manager is set to busybox

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../recipes-core/busybox/busybox-inittab_1.27.2.bb | 32 ++++++++++++++++++++++
 meta/recipes-core/busybox/busybox.inc              | 12 ++------
 2 files changed, 34 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-core/busybox/busybox-inittab_1.27.2.bb

diff --git a/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb b/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
new file mode 100644
index 0000000..a83620e
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
@@ -0,0 +1,32 @@
+SUMMARY = "inittab configuration for BusyBox"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI = "file://inittab"
+
+S = "${WORKDIR}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile() {
+	:
+}
+
+do_install() {
+    install -d ${D}${sysconfdir}
+    install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
+    tmp="${SERIAL_CONSOLES}"
+    for i in $tmp
+    do
+            j=`echo ${i} | sed s/\;/\ /g`
+            id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
+            echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+    done
+}
+
+# SERIAL_CONSOLES is generally defined by the MACHINE .conf.
+# Set PACKAGE_ARCH appropriately.
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} = "${sysconfdir}/inittab"
+CONFFILES_${PN} = "${sysconfdir}/inittab"
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 157aea3..ac6d7ca 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -48,6 +48,8 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
+RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
+
 inherit cml1 systemd update-rc.d ptest
 
 # internal helper
@@ -310,16 +312,6 @@ do_install () {
                 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 "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then
-                        install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
-                        tmp="${SERIAL_CONSOLES}"
-                        for i in $tmp
-                        do
-                                j=`echo ${i} | sed s/\;/\ /g`
-                                id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
-                                echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
-                        done
-                fi
         fi
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-- 
2.7.4



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

* [PATCH 2/2] layer.conf: add busybox-inittab to SIGGEN_EXCLUDERECIPES_ABISAFE
  2018-03-03  1:46 [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Denys Dmytriyenko
@ 2018-03-03  1:46 ` Denys Dmytriyenko
  2018-03-03  3:18 ` [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Khem Raj
  2018-03-04 17:25 ` Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2018-03-03  1:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Similar to sysvinit-inittab

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta/conf/layer.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index df67716..91935e4 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -21,6 +21,7 @@ COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
 # opkg-utils is for update-alternatives :(
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
   sysvinit-inittab \
+  busybox-inittab \
   shadow-securetty \
   opkg-arch-config \
   netbase \
-- 
2.7.4



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

* Re: [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific
  2018-03-03  1:46 [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Denys Dmytriyenko
  2018-03-03  1:46 ` [PATCH 2/2] layer.conf: add busybox-inittab to SIGGEN_EXCLUDERECIPES_ABISAFE Denys Dmytriyenko
@ 2018-03-03  3:18 ` Khem Raj
  2018-03-04 17:25 ` Richard Purdie
  2 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2018-03-03  3:18 UTC (permalink / raw)
  To: Denys Dmytriyenko, openembedded-core; +Cc: Denys Dmytriyenko

On 3/2/18 5:46 PM, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> * Create busybox-inittab recipe to produce machine-specific package with /etc/inittab
>   and necessary getty calls for a machine, based on SERIAL_CONSOLES, similar to how
>   sysvinit-inittab was done
> 
> * Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-RUNTIME_init_manager, make
>   main busybox package RDEPENDS on busybox-inittab when init_manager is set to busybox
> 

thanks for taking care of this. I atleast owe a review to it. So here it
looks good to me.

> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../recipes-core/busybox/busybox-inittab_1.27.2.bb | 32 ++++++++++++++++++++++
>  meta/recipes-core/busybox/busybox.inc              | 12 ++------
>  2 files changed, 34 insertions(+), 10 deletions(-)
>  create mode 100644 meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
> 
> diff --git a/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb b/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
> new file mode 100644
> index 0000000..a83620e
> --- /dev/null
> +++ b/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
> @@ -0,0 +1,32 @@
> +SUMMARY = "inittab configuration for BusyBox"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
> +
> +SRC_URI = "file://inittab"
> +
> +S = "${WORKDIR}"
> +
> +INHIBIT_DEFAULT_DEPS = "1"
> +
> +do_compile() {
> +	:
> +}
> +
> +do_install() {
> +    install -d ${D}${sysconfdir}
> +    install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
> +    tmp="${SERIAL_CONSOLES}"
> +    for i in $tmp
> +    do
> +            j=`echo ${i} | sed s/\;/\ /g`
> +            id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
> +            echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
> +    done
> +}
> +
> +# SERIAL_CONSOLES is generally defined by the MACHINE .conf.
> +# Set PACKAGE_ARCH appropriately.
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +FILES_${PN} = "${sysconfdir}/inittab"
> +CONFFILES_${PN} = "${sysconfdir}/inittab"
> diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
> index 157aea3..ac6d7ca 100644
> --- a/meta/recipes-core/busybox/busybox.inc
> +++ b/meta/recipes-core/busybox/busybox.inc
> @@ -48,6 +48,8 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
>  
>  RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
>  
> +RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}"
> +
>  inherit cml1 systemd update-rc.d ptest
>  
>  # internal helper
> @@ -310,16 +312,6 @@ do_install () {
>                  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 "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then
> -                        install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
> -                        tmp="${SERIAL_CONSOLES}"
> -                        for i in $tmp
> -                        do
> -                                j=`echo ${i} | sed s/\;/\ /g`
> -                                id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
> -                                echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
> -                        done
> -                fi
>          fi
>  
>      if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> 



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

* Re: [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific
  2018-03-03  1:46 [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Denys Dmytriyenko
  2018-03-03  1:46 ` [PATCH 2/2] layer.conf: add busybox-inittab to SIGGEN_EXCLUDERECIPES_ABISAFE Denys Dmytriyenko
  2018-03-03  3:18 ` [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Khem Raj
@ 2018-03-04 17:25 ` Richard Purdie
  2018-03-04 18:57   ` Denys Dmytriyenko
  2018-03-04 19:12   ` [PATCH] maintainers.inc: add myself as maintainer for the new busybox-inittab Denys Dmytriyenko
  2 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2018-03-04 17:25 UTC (permalink / raw)
  To: Denys Dmytriyenko, openembedded-core; +Cc: Denys Dmytriyenko

On Fri, 2018-03-02 at 20:46 -0500, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> * Create busybox-inittab recipe to produce machine-specific package
> with /etc/inittab
>   and necessary getty calls for a machine, based on SERIAL_CONSOLES,
> similar to how
>   sysvinit-inittab was done
> 
> * Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-
> RUNTIME_init_manager, make
>   main busybox package RDEPENDS on busybox-inittab when init_manager
> is set to busybox
> 
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../recipes-core/busybox/busybox-inittab_1.27.2.bb | 32
> ++++++++++++++++++++++
>  meta/recipes-core/busybox/busybox.inc              | 12 ++------
>  2 files changed, 34 insertions(+), 10 deletions(-)
>  create mode 100644 meta/recipes-core/busybox/busybox-
> inittab_1.27.2.bb


Can you send a patch to fix:

https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/878/steps/Running%20oe-selftest/logs/stdio

i.e. 

oe-selftest -r distrodata.Distrodata.test_maintainers

please? (missing maintainers entry for busybox-inittab)

Cheers,

Richard


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

* Re: [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific
  2018-03-04 17:25 ` Richard Purdie
@ 2018-03-04 18:57   ` Denys Dmytriyenko
  2018-03-04 19:12   ` [PATCH] maintainers.inc: add myself as maintainer for the new busybox-inittab Denys Dmytriyenko
  1 sibling, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2018-03-04 18:57 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Denys Dmytriyenko, openembedded-core

On Sun, Mar 04, 2018 at 05:25:25PM +0000, Richard Purdie wrote:
> On Fri, 2018-03-02 at 20:46 -0500, Denys Dmytriyenko wrote:
> > From: Denys Dmytriyenko <denys@ti.com>
> > 
> > * Create busybox-inittab recipe to produce machine-specific package
> > with /etc/inittab
> >   and necessary getty calls for a machine, based on SERIAL_CONSOLES,
> > similar to how
> >   sysvinit-inittab was done
> > 
> > * Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-
> > RUNTIME_init_manager, make
> >   main busybox package RDEPENDS on busybox-inittab when init_manager
> > is set to busybox
> > 
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > ---
> >  .../recipes-core/busybox/busybox-inittab_1.27.2.bb | 32
> > ++++++++++++++++++++++
> >  meta/recipes-core/busybox/busybox.inc              | 12 ++------
> >  2 files changed, 34 insertions(+), 10 deletions(-)
> >  create mode 100644 meta/recipes-core/busybox/busybox-
> > inittab_1.27.2.bb
> 
> 
> Can you send a patch to fix:
> 
> https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/878/steps/Running%20oe-selftest/logs/stdio
> 
> i.e. 
> 
> oe-selftest -r distrodata.Distrodata.test_maintainers
> 
> please? (missing maintainers entry for busybox-inittab)

Ah, I was hoping it would be covered by the main busybox entry...

Should I add myself for busybox-inittab, or original maintainer, Armin?

-- 
Denys


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

* [PATCH] maintainers.inc: add myself as maintainer for the new busybox-inittab
  2018-03-04 17:25 ` Richard Purdie
  2018-03-04 18:57   ` Denys Dmytriyenko
@ 2018-03-04 19:12   ` Denys Dmytriyenko
  1 sibling, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2018-03-04 19:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta/conf/distro/include/maintainers.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index fe485a6..d85923f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -88,6 +88,7 @@ RECIPE_MAINTAINER_pn-build-sysroots = "Richard Purdie <richard.purdie@linuxfound
 RECIPE_MAINTAINER_pn-builder = "Cristian Iorga <cristian.iorga@intel.com>"
 RECIPE_MAINTAINER_pn-buildtools-tarball = "Cristian Iorga <cristian.iorga@intel.com>"
 RECIPE_MAINTAINER_pn-busybox = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-busybox-inittab = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-byacc = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-bzip2 = "Denys Dmytriyenko <denys@ti.com>"
 RECIPE_MAINTAINER_pn-ca-certificates = "Alexander Kanavin <alexander.kanavin@intel.com>"
-- 
2.7.4



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

end of thread, other threads:[~2018-03-04 19:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03  1:46 [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Denys Dmytriyenko
2018-03-03  1:46 ` [PATCH 2/2] layer.conf: add busybox-inittab to SIGGEN_EXCLUDERECIPES_ABISAFE Denys Dmytriyenko
2018-03-03  3:18 ` [PATCH 1/2] busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific Khem Raj
2018-03-04 17:25 ` Richard Purdie
2018-03-04 18:57   ` Denys Dmytriyenko
2018-03-04 19:12   ` [PATCH] maintainers.inc: add myself as maintainer for the new busybox-inittab Denys Dmytriyenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox