All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-poky][PATCH v4 0/3] Make systemd as default init manager and configure wired network
@ 2019-05-30  9:22 ` kai.kang
  0 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, peter.kjellerstedt, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

v4:
* move the configures to poky.conf. Introduce a new variable
  'POKY_INIT_MANAGER' whose value should be either 'systemd' or 'sysvinit'
  to configure the init manager setting.

Kai Kang (3):
  poky.conf: make systemd as default init manager
  poky-tiny.conf: not backfill distro feature systemd
  systemd-conf: configure wired network with dhcp

 meta-poky/conf/distro/poky-tiny.conf                 |  2 +-
 meta-poky/conf/distro/poky.conf                      | 10 ++++++++++
 meta-poky/conf/local.conf.sample.extended            |  9 ---------
 meta/recipes-core/systemd/systemd-conf/wired.network |  9 +++++++++
 meta/recipes-core/systemd/systemd-conf_242.bb        |  6 ++++++
 5 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd-conf/wired.network

--
2.20.0



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

* [meta-poky][PATCH v4 0/3] Make systemd as default init manager and configure wired network
@ 2019-05-30  9:22 ` kai.kang
  0 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

v4:
* move the configures to poky.conf. Introduce a new variable
  'POKY_INIT_MANAGER' whose value should be either 'systemd' or 'sysvinit'
  to configure the init manager setting.

Kai Kang (3):
  poky.conf: make systemd as default init manager
  poky-tiny.conf: not backfill distro feature systemd
  systemd-conf: configure wired network with dhcp

 meta-poky/conf/distro/poky-tiny.conf                 |  2 +-
 meta-poky/conf/distro/poky.conf                      | 10 ++++++++++
 meta-poky/conf/local.conf.sample.extended            |  9 ---------
 meta/recipes-core/systemd/systemd-conf/wired.network |  9 +++++++++
 meta/recipes-core/systemd/systemd-conf_242.bb        |  6 ++++++
 5 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd-conf/wired.network

--
2.20.0



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

* [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
  2019-05-30  9:22 ` kai.kang
@ 2019-05-30  9:22   ` kai.kang
  -1 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, peter.kjellerstedt, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Move configurations from local.conf.sample.extended to poky.conf to make
systemd as default init manager for poky. Introduce a new variable
'POKY_INIT_MANAGER' whose value should be either 'systemd' or 'sysvinit'
to configure the init manager setting.

For users who still want to use sysvinit, set in local.conf or any other
configure file with:

  POKY_INIT_MANAGER = "sysvinit"

[YOCTO #13031]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-poky/conf/distro/poky.conf           | 10 ++++++++++
 meta-poky/conf/local.conf.sample.extended |  9 ---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/meta-poky/conf/distro/poky.conf b/meta-poky/conf/distro/poky.conf
index 78621e6dbf..2d73bbcd03 100644
--- a/meta-poky/conf/distro/poky.conf
+++ b/meta-poky/conf/distro/poky.conf
@@ -21,6 +21,16 @@ POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
 
 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO_FEATURES}"
 
+#
+# Use systemd for system initialization
+#
+POKY_INIT_MANAGER ?= "systemd"
+DISTRO_FEATURES_BACKFILL += "${POKY_INIT_MANAGER}"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "${@bb.utils.contains('POKY_INIT_MANAGER', 'systemd', 'sysvinit', 'systemd', d)}"
+VIRTUAL-RUNTIME_login_manager = "${@bb.utils.contains('POKY_INIT_MANAGER', 'systemd', 'shadow-base', 'busybox', d)}"
+VIRTUAL-RUNTIME_init_manager = "${POKY_INIT_MANAGER}"
+VIRTUAL-RUNTIME_initscripts = "${@bb.utils.contains('POKY_INIT_MANAGER', 'systemd', 'systemd-compat-units', 'initscripts', d)}"
+
 PREFERRED_VERSION_linux-yocto ?= "5.0%"
 
 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
diff --git a/meta-poky/conf/local.conf.sample.extended b/meta-poky/conf/local.conf.sample.extended
index 26603debe6..e20fc5dbf3 100644
--- a/meta-poky/conf/local.conf.sample.extended
+++ b/meta-poky/conf/local.conf.sample.extended
@@ -377,12 +377,3 @@ DISTRO_FEATURES_remove = "x11"
 #VIRTUAL-RUNTIME_initscripts = "initscripts"
 #VIRTUAL-RUNTIME_keymaps = "keymaps"
 #DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
-
-#
-# Use systemd for system initialization
-#
-#DISTRO_FEATURES_append = " systemd"
-#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
-#VIRTUAL-RUNTIME_login_manager = "shadow-base"
-#VIRTUAL-RUNTIME_init_manager = "systemd"
-#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
-- 
2.20.0



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

* [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
@ 2019-05-30  9:22   ` kai.kang
  0 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Move configurations from local.conf.sample.extended to poky.conf to make
systemd as default init manager for poky. Introduce a new variable
'POKY_INIT_MANAGER' whose value should be either 'systemd' or 'sysvinit'
to configure the init manager setting.

For users who still want to use sysvinit, set in local.conf or any other
configure file with:

  POKY_INIT_MANAGER = "sysvinit"

[YOCTO #13031]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-poky/conf/distro/poky.conf           | 10 ++++++++++
 meta-poky/conf/local.conf.sample.extended |  9 ---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/meta-poky/conf/distro/poky.conf b/meta-poky/conf/distro/poky.conf
index 78621e6dbf..2d73bbcd03 100644
--- a/meta-poky/conf/distro/poky.conf
+++ b/meta-poky/conf/distro/poky.conf
@@ -21,6 +21,16 @@ POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
 
 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO_FEATURES}"
 
+#
+# Use systemd for system initialization
+#
+POKY_INIT_MANAGER ?= "systemd"
+DISTRO_FEATURES_BACKFILL += "${POKY_INIT_MANAGER}"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "${@bb.utils.contains('POKY_INIT_MANAGER', 'systemd', 'sysvinit', 'systemd', d)}"
+VIRTUAL-RUNTIME_login_manager = "${@bb.utils.contains('POKY_INIT_MANAGER', 'systemd', 'shadow-base', 'busybox', d)}"
+VIRTUAL-RUNTIME_init_manager = "${POKY_INIT_MANAGER}"
+VIRTUAL-RUNTIME_initscripts = "${@bb.utils.contains('POKY_INIT_MANAGER', 'systemd', 'systemd-compat-units', 'initscripts', d)}"
+
 PREFERRED_VERSION_linux-yocto ?= "5.0%"
 
 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
diff --git a/meta-poky/conf/local.conf.sample.extended b/meta-poky/conf/local.conf.sample.extended
index 26603debe6..e20fc5dbf3 100644
--- a/meta-poky/conf/local.conf.sample.extended
+++ b/meta-poky/conf/local.conf.sample.extended
@@ -377,12 +377,3 @@ DISTRO_FEATURES_remove = "x11"
 #VIRTUAL-RUNTIME_initscripts = "initscripts"
 #VIRTUAL-RUNTIME_keymaps = "keymaps"
 #DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
-
-#
-# Use systemd for system initialization
-#
-#DISTRO_FEATURES_append = " systemd"
-#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
-#VIRTUAL-RUNTIME_login_manager = "shadow-base"
-#VIRTUAL-RUNTIME_init_manager = "systemd"
-#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
-- 
2.20.0



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

* [meta-poky][PATCH v4 2/3] poky-tiny.conf: not backfill distro feature systemd
  2019-05-30  9:22 ` kai.kang
@ 2019-05-30  9:22   ` kai.kang
  -1 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, peter.kjellerstedt, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

systemd has been added to DISTRO_FEATURES_BACKFILL for poky by default,
but it is compatible with poky-tiny. So not backfile it to
DISTRO_FEATURES by adding it to DISTRO_FEATURES_BACKFILL_CONSIDERED.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-poky/conf/distro/poky-tiny.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
index 1f8b6e8ff3..ad95919e6c 100644
--- a/meta-poky/conf/distro/poky-tiny.conf
+++ b/meta-poky/conf/distro/poky-tiny.conf
@@ -87,7 +87,7 @@ VIRTUAL-RUNTIME_login_manager = "busybox"
 VIRTUAL-RUNTIME_init_manager = "busybox"
 VIRTUAL-RUNTIME_initscripts = "initscripts"
 VIRTUAL-RUNTIME_keymaps = "keymaps"
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "systemd sysvinit"
 
 # FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
 # packagegroup-core-base to select modutils-initscripts or not.  Similar with "net" and
-- 
2.20.0



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

* [meta-poky][PATCH v4 2/3] poky-tiny.conf: not backfill distro feature systemd
@ 2019-05-30  9:22   ` kai.kang
  0 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

systemd has been added to DISTRO_FEATURES_BACKFILL for poky by default,
but it is compatible with poky-tiny. So not backfile it to
DISTRO_FEATURES by adding it to DISTRO_FEATURES_BACKFILL_CONSIDERED.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-poky/conf/distro/poky-tiny.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
index 1f8b6e8ff3..ad95919e6c 100644
--- a/meta-poky/conf/distro/poky-tiny.conf
+++ b/meta-poky/conf/distro/poky-tiny.conf
@@ -87,7 +87,7 @@ VIRTUAL-RUNTIME_login_manager = "busybox"
 VIRTUAL-RUNTIME_init_manager = "busybox"
 VIRTUAL-RUNTIME_initscripts = "initscripts"
 VIRTUAL-RUNTIME_keymaps = "keymaps"
-DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "systemd sysvinit"
 
 # FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
 # packagegroup-core-base to select modutils-initscripts or not.  Similar with "net" and
-- 
2.20.0



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

* [meta-poky][PATCH v4 3/3] systemd-conf: configure wired network with dhcp
  2019-05-30  9:22 ` kai.kang
@ 2019-05-30  9:22   ` kai.kang
  -1 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, peter.kjellerstedt, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Add a configure file for systemd.networkd to configure wired network
interfaces with dhcp. It works with common network interfaces such eth0
and eno1. And do not install it for qemu bsps.

Refer to
https://github.com/YoeDistro/meta-yoe/tree/master/recipes-core/systemd

[YOCTO #13057]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-core/systemd/systemd-conf/wired.network | 9 +++++++++
 meta/recipes-core/systemd/systemd-conf_242.bb        | 6 ++++++
 2 files changed, 15 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd-conf/wired.network

diff --git a/meta/recipes-core/systemd/systemd-conf/wired.network b/meta/recipes-core/systemd/systemd-conf/wired.network
new file mode 100644
index 0000000000..253aee9382
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/wired.network
@@ -0,0 +1,9 @@
+[Match]
+Name=en* eth*
+
+[Network]
+DHCP=yes
+
+[DHCP]
+RouteMetric=10
+ClientIdentifier=mac
diff --git a/meta/recipes-core/systemd/systemd-conf_242.bb b/meta/recipes-core/systemd/systemd-conf_242.bb
index 96beea53a7..d9ec023bfd 100644
--- a/meta/recipes-core/systemd/systemd-conf_242.bb
+++ b/meta/recipes-core/systemd/systemd-conf_242.bb
@@ -10,17 +10,22 @@ SRC_URI = "\
     file://logind.conf \
     file://system.conf \
     file://system.conf-qemuall \
+    file://wired.network \
 "
 
 do_install() {
 	install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf
 	install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf
 	install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf
+	install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network
 }
 
 # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
 do_install_append_qemuall() {
 	install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
+
+	# Do not install wired.network for qemu bsps
+	rm -rf ${D}${systemd_unitdir}/network
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -29,4 +34,5 @@ FILES_${PN} = "\
     ${systemd_unitdir}/journald.conf.d/ \
     ${systemd_unitdir}/logind.conf.d/ \
     ${systemd_unitdir}/system.conf.d/ \
+    ${systemd_unitdir}/network/ \
 "
-- 
2.20.0



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

* [meta-poky][PATCH v4 3/3] systemd-conf: configure wired network with dhcp
@ 2019-05-30  9:22   ` kai.kang
  0 siblings, 0 replies; 16+ messages in thread
From: kai.kang @ 2019-05-30  9:22 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Add a configure file for systemd.networkd to configure wired network
interfaces with dhcp. It works with common network interfaces such eth0
and eno1. And do not install it for qemu bsps.

Refer to
https://github.com/YoeDistro/meta-yoe/tree/master/recipes-core/systemd

[YOCTO #13057]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-core/systemd/systemd-conf/wired.network | 9 +++++++++
 meta/recipes-core/systemd/systemd-conf_242.bb        | 6 ++++++
 2 files changed, 15 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd-conf/wired.network

diff --git a/meta/recipes-core/systemd/systemd-conf/wired.network b/meta/recipes-core/systemd/systemd-conf/wired.network
new file mode 100644
index 0000000000..253aee9382
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf/wired.network
@@ -0,0 +1,9 @@
+[Match]
+Name=en* eth*
+
+[Network]
+DHCP=yes
+
+[DHCP]
+RouteMetric=10
+ClientIdentifier=mac
diff --git a/meta/recipes-core/systemd/systemd-conf_242.bb b/meta/recipes-core/systemd/systemd-conf_242.bb
index 96beea53a7..d9ec023bfd 100644
--- a/meta/recipes-core/systemd/systemd-conf_242.bb
+++ b/meta/recipes-core/systemd/systemd-conf_242.bb
@@ -10,17 +10,22 @@ SRC_URI = "\
     file://logind.conf \
     file://system.conf \
     file://system.conf-qemuall \
+    file://wired.network \
 "
 
 do_install() {
 	install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf
 	install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf
 	install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf
+	install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network
 }
 
 # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
 do_install_append_qemuall() {
 	install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
+
+	# Do not install wired.network for qemu bsps
+	rm -rf ${D}${systemd_unitdir}/network
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -29,4 +34,5 @@ FILES_${PN} = "\
     ${systemd_unitdir}/journald.conf.d/ \
     ${systemd_unitdir}/logind.conf.d/ \
     ${systemd_unitdir}/system.conf.d/ \
+    ${systemd_unitdir}/network/ \
 "
-- 
2.20.0



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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
  2019-05-30  9:22   ` kai.kang
@ 2019-05-30 11:44     ` richard.purdie
  -1 siblings, 0 replies; 16+ messages in thread
From: richard.purdie @ 2019-05-30 11:44 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, peter.kjellerstedt, openembedded-core

On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Move configurations from local.conf.sample.extended to poky.conf to
> make
> systemd as default init manager for poky. Introduce a new variable
> 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
> 'sysvinit'
> to configure the init manager setting.
> 
> For users who still want to use sysvinit, set in local.conf or any
> other
> configure file with:
> 
>   POKY_INIT_MANAGER = "sysvinit"
> 
> [YOCTO #13031]
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta-poky/conf/distro/poky.conf           | 10 ++++++++++
>  meta-poky/conf/local.conf.sample.extended |  9 ---------
>  2 files changed, 10 insertions(+), 9 deletions(-)

Thanks for working on this patchset, I think its nearly there. I'm
wondering if we should set 

POKY_INIT_MANAGER_libc-musl = "sysvinit"

since I am worried about what I read about musl and systemd from a
security perspective.

I'm also wondering what we need to do with the autobuilder init system
tests, I think those may need rewriting to add some sysvinit tests.

Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where we
allow old sysvinit scripts for compatibility?

Cheers,

Richard



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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
@ 2019-05-30 11:44     ` richard.purdie
  0 siblings, 0 replies; 16+ messages in thread
From: richard.purdie @ 2019-05-30 11:44 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, openembedded-core

On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Move configurations from local.conf.sample.extended to poky.conf to
> make
> systemd as default init manager for poky. Introduce a new variable
> 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
> 'sysvinit'
> to configure the init manager setting.
> 
> For users who still want to use sysvinit, set in local.conf or any
> other
> configure file with:
> 
>   POKY_INIT_MANAGER = "sysvinit"
> 
> [YOCTO #13031]
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta-poky/conf/distro/poky.conf           | 10 ++++++++++
>  meta-poky/conf/local.conf.sample.extended |  9 ---------
>  2 files changed, 10 insertions(+), 9 deletions(-)

Thanks for working on this patchset, I think its nearly there. I'm
wondering if we should set 

POKY_INIT_MANAGER_libc-musl = "sysvinit"

since I am worried about what I read about musl and systemd from a
security perspective.

I'm also wondering what we need to do with the autobuilder init system
tests, I think those may need rewriting to add some sysvinit tests.

Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where we
allow old sysvinit scripts for compatibility?

Cheers,

Richard



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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
  2019-05-30 11:44     ` richard.purdie
@ 2019-05-31  2:07       ` Kang Kai
  -1 siblings, 0 replies; 16+ messages in thread
From: Kang Kai @ 2019-05-31  2:07 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, peter.kjellerstedt, openembedded-core

On 2019/5/30 下午7:44, richard.purdie@linuxfoundation.org wrote:
> On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Move configurations from local.conf.sample.extended to poky.conf to
>> make
>> systemd as default init manager for poky. Introduce a new variable
>> 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
>> 'sysvinit'
>> to configure the init manager setting.
>>
>> For users who still want to use sysvinit, set in local.conf or any
>> other
>> configure file with:
>>
>>    POKY_INIT_MANAGER = "sysvinit"
>>
>> [YOCTO #13031]
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta-poky/conf/distro/poky.conf           | 10 ++++++++++
>>   meta-poky/conf/local.conf.sample.extended |  9 ---------
>>   2 files changed, 10 insertions(+), 9 deletions(-)
> Thanks for working on this patchset, I think its nearly there. I'm
> wondering if we should set
>
> POKY_INIT_MANAGER_libc-musl = "sysvinit"
>
> since I am worried about what I read about musl and systemd from a
> security perspective.

OK. I'll add it.


>
> I'm also wondering what we need to do with the autobuilder init system
> tests, I think those may need rewriting to add some sysvinit tests.

Something likes meta/lib/oeqa/runtime/cases/systemd.py? I think it is 
better to do in next milestone and create a defect to address it.
If it is ok, I'll create one.


>
> Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where we
> allow old sysvinit scripts for compatibility?

  I am afraid only one value could be set for POKY_INIT_MANAGER. And I 
believe that most packages have been supporting systemd. If there is,
we can add a systemd service file for it.

BTW, POKY_INIT_MANAGER doesn't consider the case of mdev/busybox. If 
want to use mdev/busybox for init, just set DISTRO with poky-tiny and
everything have been set properly in poky-tiny.conf.

Regards,
Kai


>
> Cheers,
>
> Richard
>
>

-- 
Kai Kang



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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
@ 2019-05-31  2:07       ` Kang Kai
  0 siblings, 0 replies; 16+ messages in thread
From: Kang Kai @ 2019-05-31  2:07 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

On 2019/5/30 下午7:44, richard.purdie@linuxfoundation.org wrote:
> On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Move configurations from local.conf.sample.extended to poky.conf to
>> make
>> systemd as default init manager for poky. Introduce a new variable
>> 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
>> 'sysvinit'
>> to configure the init manager setting.
>>
>> For users who still want to use sysvinit, set in local.conf or any
>> other
>> configure file with:
>>
>>    POKY_INIT_MANAGER = "sysvinit"
>>
>> [YOCTO #13031]
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta-poky/conf/distro/poky.conf           | 10 ++++++++++
>>   meta-poky/conf/local.conf.sample.extended |  9 ---------
>>   2 files changed, 10 insertions(+), 9 deletions(-)
> Thanks for working on this patchset, I think its nearly there. I'm
> wondering if we should set
>
> POKY_INIT_MANAGER_libc-musl = "sysvinit"
>
> since I am worried about what I read about musl and systemd from a
> security perspective.

OK. I'll add it.


>
> I'm also wondering what we need to do with the autobuilder init system
> tests, I think those may need rewriting to add some sysvinit tests.

Something likes meta/lib/oeqa/runtime/cases/systemd.py? I think it is 
better to do in next milestone and create a defect to address it.
If it is ok, I'll create one.


>
> Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where we
> allow old sysvinit scripts for compatibility?

  I am afraid only one value could be set for POKY_INIT_MANAGER. And I 
believe that most packages have been supporting systemd. If there is,
we can add a systemd service file for it.

BTW, POKY_INIT_MANAGER doesn't consider the case of mdev/busybox. If 
want to use mdev/busybox for init, just set DISTRO with poky-tiny and
everything have been set properly in poky-tiny.conf.

Regards,
Kai


>
> Cheers,
>
> Richard
>
>

-- 
Kai Kang



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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
  2019-05-31  2:07       ` Kang Kai
@ 2019-05-31  9:00         ` richard.purdie
  -1 siblings, 0 replies; 16+ messages in thread
From: richard.purdie @ 2019-05-31  9:00 UTC (permalink / raw)
  To: Kang Kai; +Cc: poky, peter.kjellerstedt, openembedded-core

On Fri, 2019-05-31 at 10:07 +0800, Kang Kai wrote:
> On 2019/5/30 下午7:44, richard.purdie@linuxfoundation.org wrote:
> > On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
> > > From: Kai Kang <kai.kang@windriver.com>
> > > 
> > > Move configurations from local.conf.sample.extended to poky.conf
> > > to
> > > make
> > > systemd as default init manager for poky. Introduce a new
> > > variable
> > > 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
> > > 'sysvinit'
> > > to configure the init manager setting.
> > > 
> > > For users who still want to use sysvinit, set in local.conf or
> > > any
> > > other
> > > configure file with:
> > > 
> > >    POKY_INIT_MANAGER = "sysvinit"
> > > 
> > > [YOCTO #13031]
> > > 
> > > Signed-off-by: Kai Kang <kai.kang@windriver.com>
> > > ---
> > >   meta-poky/conf/distro/poky.conf           | 10 ++++++++++
> > >   meta-poky/conf/local.conf.sample.extended |  9 ---------
> > >   2 files changed, 10 insertions(+), 9 deletions(-)
> > Thanks for working on this patchset, I think its nearly there. I'm
> > wondering if we should set
> > 
> > POKY_INIT_MANAGER_libc-musl = "sysvinit"
> > 
> > since I am worried about what I read about musl and systemd from a
> > security perspective.
> 
> OK. I'll add it.
> 
> 
> > I'm also wondering what we need to do with the autobuilder init
> > system
> > tests, I think those may need rewriting to add some sysvinit tests.
> 
> Something likes meta/lib/oeqa/runtime/cases/systemd.py? I think it
> is better to do in next milestone and create a defect to address it.
> If it is ok, I'll create one.

No, I mean:

http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/config.json#n813

which corresponds to steps 5-7 of 'qa-extras2' on the autobuilder.

We're going to need to update the test configuration on master to cover
the things we no longer test and remove the duplication.

> > Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where
> > we allow old sysvinit scripts for compatibility?
> 
> I am afraid only one value could be set for POKY_INIT_MANAGER. And I 
> believe that most packages have been supporting systemd. If there is,
> we can add a systemd service file for it.

This isn't the point, we support 3 different configurations of this and
the variable needs to reflect that.

How about a slightly different approach. We define POKY_INIT_MANAGER to
take three different values, sysvinit, systemd and systemd-compat.

We do something like:

require conf/distro/include/init-template-${POKY_INIT_MANAGER}.inc

and then put the appropriate configuration in each .inc file?

> BTW, POKY_INIT_MANAGER doesn't consider the case of mdev/busybox. If 
> want to use mdev/busybox for init, just set DISTRO with poky-tiny and
> everything have been set properly in poky-tiny.conf.

This might be an opportunity to have another setting for
POKY_INIT_MANAGER which covers this too through an additional .inc?

Cheers,

Richard




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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
@ 2019-05-31  9:00         ` richard.purdie
  0 siblings, 0 replies; 16+ messages in thread
From: richard.purdie @ 2019-05-31  9:00 UTC (permalink / raw)
  To: Kang Kai; +Cc: poky, openembedded-core

On Fri, 2019-05-31 at 10:07 +0800, Kang Kai wrote:
> On 2019/5/30 下午7:44, richard.purdie@linuxfoundation.org wrote:
> > On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
> > > From: Kai Kang <kai.kang@windriver.com>
> > > 
> > > Move configurations from local.conf.sample.extended to poky.conf
> > > to
> > > make
> > > systemd as default init manager for poky. Introduce a new
> > > variable
> > > 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
> > > 'sysvinit'
> > > to configure the init manager setting.
> > > 
> > > For users who still want to use sysvinit, set in local.conf or
> > > any
> > > other
> > > configure file with:
> > > 
> > >    POKY_INIT_MANAGER = "sysvinit"
> > > 
> > > [YOCTO #13031]
> > > 
> > > Signed-off-by: Kai Kang <kai.kang@windriver.com>
> > > ---
> > >   meta-poky/conf/distro/poky.conf           | 10 ++++++++++
> > >   meta-poky/conf/local.conf.sample.extended |  9 ---------
> > >   2 files changed, 10 insertions(+), 9 deletions(-)
> > Thanks for working on this patchset, I think its nearly there. I'm
> > wondering if we should set
> > 
> > POKY_INIT_MANAGER_libc-musl = "sysvinit"
> > 
> > since I am worried about what I read about musl and systemd from a
> > security perspective.
> 
> OK. I'll add it.
> 
> 
> > I'm also wondering what we need to do with the autobuilder init
> > system
> > tests, I think those may need rewriting to add some sysvinit tests.
> 
> Something likes meta/lib/oeqa/runtime/cases/systemd.py? I think it
> is better to do in next milestone and create a defect to address it.
> If it is ok, I'll create one.

No, I mean:

http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/config.json#n813

which corresponds to steps 5-7 of 'qa-extras2' on the autobuilder.

We're going to need to update the test configuration on master to cover
the things we no longer test and remove the duplication.

> > Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where
> > we allow old sysvinit scripts for compatibility?
> 
> I am afraid only one value could be set for POKY_INIT_MANAGER. And I 
> believe that most packages have been supporting systemd. If there is,
> we can add a systemd service file for it.

This isn't the point, we support 3 different configurations of this and
the variable needs to reflect that.

How about a slightly different approach. We define POKY_INIT_MANAGER to
take three different values, sysvinit, systemd and systemd-compat.

We do something like:

require conf/distro/include/init-template-${POKY_INIT_MANAGER}.inc

and then put the appropriate configuration in each .inc file?

> BTW, POKY_INIT_MANAGER doesn't consider the case of mdev/busybox. If 
> want to use mdev/busybox for init, just set DISTRO with poky-tiny and
> everything have been set properly in poky-tiny.conf.

This might be an opportunity to have another setting for
POKY_INIT_MANAGER which covers this too through an additional .inc?

Cheers,

Richard




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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
  2019-05-31  9:00         ` richard.purdie
@ 2019-05-31  9:07           ` Kang Kai
  -1 siblings, 0 replies; 16+ messages in thread
From: Kang Kai @ 2019-05-31  9:07 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, peter.kjellerstedt, openembedded-core

On 2019/5/31 下午5:00, richard.purdie@linuxfoundation.org wrote:
> On Fri, 2019-05-31 at 10:07 +0800, Kang Kai wrote:
>> On 2019/5/30 下午7:44, richard.purdie@linuxfoundation.org wrote:
>>> On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
>>>> From: Kai Kang <kai.kang@windriver.com>
>>>>
>>>> Move configurations from local.conf.sample.extended to poky.conf
>>>> to
>>>> make
>>>> systemd as default init manager for poky. Introduce a new
>>>> variable
>>>> 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
>>>> 'sysvinit'
>>>> to configure the init manager setting.
>>>>
>>>> For users who still want to use sysvinit, set in local.conf or
>>>> any
>>>> other
>>>> configure file with:
>>>>
>>>>     POKY_INIT_MANAGER = "sysvinit"
>>>>
>>>> [YOCTO #13031]
>>>>
>>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>>> ---
>>>>    meta-poky/conf/distro/poky.conf           | 10 ++++++++++
>>>>    meta-poky/conf/local.conf.sample.extended |  9 ---------
>>>>    2 files changed, 10 insertions(+), 9 deletions(-)
>>> Thanks for working on this patchset, I think its nearly there. I'm
>>> wondering if we should set
>>>
>>> POKY_INIT_MANAGER_libc-musl = "sysvinit"
>>>
>>> since I am worried about what I read about musl and systemd from a
>>> security perspective.
>> OK. I'll add it.
>>
>>
>>> I'm also wondering what we need to do with the autobuilder init
>>> system
>>> tests, I think those may need rewriting to add some sysvinit tests.
>> Something likes meta/lib/oeqa/runtime/cases/systemd.py? I think it
>> is better to do in next milestone and create a defect to address it.
>> If it is ok, I'll create one.
> No, I mean:
>
> http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/config.json#n813
>
> which corresponds to steps 5-7 of 'qa-extras2' on the autobuilder.
>
> We're going to need to update the test configuration on master to cover
> the things we no longer test and remove the duplication.
>
>>> Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where
>>> we allow old sysvinit scripts for compatibility?
>> I am afraid only one value could be set for POKY_INIT_MANAGER. And I
>> believe that most packages have been supporting systemd. If there is,
>> we can add a systemd service file for it.
> This isn't the point, we support 3 different configurations of this and
> the variable needs to reflect that.
>
> How about a slightly different approach. We define POKY_INIT_MANAGER to
> take three different values, sysvinit, systemd and systemd-compat.
>
> We do something like:
>
> require conf/distro/include/init-template-${POKY_INIT_MANAGER}.inc
>
> and then put the appropriate configuration in each .inc file?
>
>> BTW, POKY_INIT_MANAGER doesn't consider the case of mdev/busybox. If
>> want to use mdev/busybox for init, just set DISTRO with poky-tiny and
>> everything have been set properly in poky-tiny.conf.
> This might be an opportunity to have another setting for
> POKY_INIT_MANAGER which covers this too through an additional .inc?

Got it.

Regards,
Kai


>
> Cheers,
>
> Richard
>
>
>

-- 
Kai Kang



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

* Re: [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager
@ 2019-05-31  9:07           ` Kang Kai
  0 siblings, 0 replies; 16+ messages in thread
From: Kang Kai @ 2019-05-31  9:07 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

On 2019/5/31 下午5:00, richard.purdie@linuxfoundation.org wrote:
> On Fri, 2019-05-31 at 10:07 +0800, Kang Kai wrote:
>> On 2019/5/30 下午7:44, richard.purdie@linuxfoundation.org wrote:
>>> On Thu, 2019-05-30 at 05:22 -0400, kai.kang@windriver.com wrote:
>>>> From: Kai Kang <kai.kang@windriver.com>
>>>>
>>>> Move configurations from local.conf.sample.extended to poky.conf
>>>> to
>>>> make
>>>> systemd as default init manager for poky. Introduce a new
>>>> variable
>>>> 'POKY_INIT_MANAGER' whose value should be either 'systemd' or
>>>> 'sysvinit'
>>>> to configure the init manager setting.
>>>>
>>>> For users who still want to use sysvinit, set in local.conf or
>>>> any
>>>> other
>>>> configure file with:
>>>>
>>>>     POKY_INIT_MANAGER = "sysvinit"
>>>>
>>>> [YOCTO #13031]
>>>>
>>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>>> ---
>>>>    meta-poky/conf/distro/poky.conf           | 10 ++++++++++
>>>>    meta-poky/conf/local.conf.sample.extended |  9 ---------
>>>>    2 files changed, 10 insertions(+), 9 deletions(-)
>>> Thanks for working on this patchset, I think its nearly there. I'm
>>> wondering if we should set
>>>
>>> POKY_INIT_MANAGER_libc-musl = "sysvinit"
>>>
>>> since I am worried about what I read about musl and systemd from a
>>> security perspective.
>> OK. I'll add it.
>>
>>
>>> I'm also wondering what we need to do with the autobuilder init
>>> system
>>> tests, I think those may need rewriting to add some sysvinit tests.
>> Something likes meta/lib/oeqa/runtime/cases/systemd.py? I think it
>> is better to do in next milestone and create a defect to address it.
>> If it is ok, I'll create one.
> No, I mean:
>
> http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/config.json#n813
>
> which corresponds to steps 5-7 of 'qa-extras2' on the autobuilder.
>
> We're going to need to update the test configuration on master to cover
> the things we no longer test and remove the duplication.
>
>>> Does POKY_INIT_MANAGER = "sysvinit systemd" work for the mode where
>>> we allow old sysvinit scripts for compatibility?
>> I am afraid only one value could be set for POKY_INIT_MANAGER. And I
>> believe that most packages have been supporting systemd. If there is,
>> we can add a systemd service file for it.
> This isn't the point, we support 3 different configurations of this and
> the variable needs to reflect that.
>
> How about a slightly different approach. We define POKY_INIT_MANAGER to
> take three different values, sysvinit, systemd and systemd-compat.
>
> We do something like:
>
> require conf/distro/include/init-template-${POKY_INIT_MANAGER}.inc
>
> and then put the appropriate configuration in each .inc file?
>
>> BTW, POKY_INIT_MANAGER doesn't consider the case of mdev/busybox. If
>> want to use mdev/busybox for init, just set DISTRO with poky-tiny and
>> everything have been set properly in poky-tiny.conf.
> This might be an opportunity to have another setting for
> POKY_INIT_MANAGER which covers this too through an additional .inc?

Got it.

Regards,
Kai


>
> Cheers,
>
> Richard
>
>
>

-- 
Kai Kang



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

end of thread, other threads:[~2019-05-31  9:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30  9:22 [meta-poky][PATCH v4 0/3] Make systemd as default init manager and configure wired network kai.kang
2019-05-30  9:22 ` kai.kang
2019-05-30  9:22 ` [meta-poky][PATCH v4 1/3] poky.conf: make systemd as default init manager kai.kang
2019-05-30  9:22   ` kai.kang
2019-05-30 11:44   ` richard.purdie
2019-05-30 11:44     ` richard.purdie
2019-05-31  2:07     ` Kang Kai
2019-05-31  2:07       ` Kang Kai
2019-05-31  9:00       ` richard.purdie
2019-05-31  9:00         ` richard.purdie
2019-05-31  9:07         ` Kang Kai
2019-05-31  9:07           ` Kang Kai
2019-05-30  9:22 ` [meta-poky][PATCH v4 2/3] poky-tiny.conf: not backfill distro feature systemd kai.kang
2019-05-30  9:22   ` kai.kang
2019-05-30  9:22 ` [meta-poky][PATCH v4 3/3] systemd-conf: configure wired network with dhcp kai.kang
2019-05-30  9:22   ` kai.kang

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.