[meta-poky,2/2] poky.conf: make systemd as default init manager

Submitted by Kang Kai on July 4, 2019, 1:45 p.m. | Patch ID: 162775

Details

Message ID 20190704134520.16320-3-kai.kang@windriver.com
State New
Headers show

Commit Message

Kang Kai July 4, 2019, 1:45 p.m.
From: Kai Kang <kai.kang@windriver.com>

Make systemd as default init manager for distro poky. And set sysvinit
as default value for musl considering security.

Update poky-tiny.conf to use new introduced variable INIT_MANGER.

[YOCTO #13031]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-poky/conf/distro/poky-tiny.conf | 8 ++------
 meta-poky/conf/distro/poky.conf      | 5 +++++
 2 files changed, 7 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
index 1f8b6e8ff3..e847c59676 100644
--- a/meta-poky/conf/distro/poky-tiny.conf
+++ b/meta-poky/conf/distro/poky-tiny.conf
@@ -82,12 +82,8 @@  DISTRO_FEATURES_class-native = "${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO
 DISTRO_FEATURES_class-nativesdk = "${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO_FEATURES}"
 
 # enable mdev/busybox for init
-VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
-VIRTUAL-RUNTIME_login_manager = "busybox"
-VIRTUAL-RUNTIME_init_manager = "busybox"
-VIRTUAL-RUNTIME_initscripts = "initscripts"
-VIRTUAL-RUNTIME_keymaps = "keymaps"
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+# because poky-tiny uses musl, set with override libc-musl
+INIT_MANAGER_libc-musl = "mdev-busybox"
 
 # FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
 # packagegroup-core-base to select modutils-initscripts or not.  Similar with "net" and
diff --git a/meta-poky/conf/distro/poky.conf b/meta-poky/conf/distro/poky.conf
index 78621e6dbf..20ea5637d3 100644
--- a/meta-poky/conf/distro/poky.conf
+++ b/meta-poky/conf/distro/poky.conf
@@ -84,3 +84,8 @@  require conf/distro/include/no-static-libs.inc
 require conf/distro/include/yocto-uninative.inc
 require conf/distro/include/security_flags.inc
 INHERIT += "uninative"
+
+# Make systemd as default init manager for poky
+# and set sysvinit for musl consider security
+INIT_MANAGER ?= "systemd"
+INIT_MANAGER_libc-musl ?= "sysvinit"

Comments

Richard Purdie July 4, 2019, 10:34 p.m.
On Thu, 2019-07-04 at 21:45 +0800, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Make systemd as default init manager for distro poky. And set
> sysvinit
> as default value for musl considering security.
> 
> Update poky-tiny.conf to use new introduced variable INIT_MANGER.
> 
> [YOCTO #13031]
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta-poky/conf/distro/poky-tiny.conf | 8 ++------
>  meta-poky/conf/distro/poky.conf      | 5 +++++
>  2 files changed, 7 insertions(+), 6 deletions(-)

I tested this in a build:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/259

and there are a number of failures in there which look related to this
and will need to be resolved before we can make this switch. I'll still
aim to get patch 1 in since we should be able to do that and at least
clean up poky to use it, then its just the switch ti systemd we need to
do.

Cheers,

Richard