All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/2] Make systemd as default init manager
@ 2019-07-04 13:45 kai.kang
  2019-07-04 13:45   ` [oe-core][PATCH " kai.kang
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: kai.kang @ 2019-07-04 13:45 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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

v7:
* move the main logical to oe-core that not only poky could use it
* rename POKY_INIT_MANAGER with INIT_MANAGER
* remove init-manager-systemd-compat.inc which is not a real separated init manager

Tested with
1
for arch in qemux86 qemux86-64 qemuarm qemuarm64 qemuppc qemumips qemumips64; do
    MACHINE=$arch bitbake core-image-minimal
done


2 run

  bitbake core-image-full-cmdline -c testimage

without error with the auto.conf from Yocto autobuilder:

$ cat conf/auto.conf
MACHINE = "qemux86"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
#DL_DIR =
'/srv/autobuilder/autobuilder.yoctoproject.org/current_sources'
PRSERV_HOST = 'localhost:0'
#SSTATE_DIR ?=
'/srv/autobuilder/autobuilder.yoctoproject.org/pub/sstate'
TCLIBC = 'musl'
QEMU_USE_KVM = 'True'
INHERIT += 'report-error'
PREMIRRORS = ''
BB_GENERATE_MIRROR_TARBALLS = '1'
#BB_NUMBER_THREADS = '16'
#PARALLEL_MAKE = '-j 16'
BB_TASK_NICE_LEVEL = '5'
BB_TASK_NICE_LEVEL_task-testimage = '0'
BB_TASK_IONICE_LEVEL = '2.7'
BB_TASK_IONICE_LEVEL_task-testimage = '2.1'
INHERIT += 'testimage'
TEST_QEMUBOOT_TIMEOUT = '1500'
SANITY_TESTED_DISTROS = ''
SDK_EXT_TYPE = 'minimal'
SDK_INCLUDE_TOOLCHAIN = '1'
BB_DISKMON_DIRS = 'STOPTASKS,${TMPDIR},1G,100K STOPTASKS,${DL_DIR},1G
STOPTASKS,${SSTATE_DIR},1G STOPTASKS,/tmp,100M,100K
ABORT,${TMPDIR},100M,1K ABORT,${DL_DIR},100M ABORT,${SSTATE_DIR},100M
ABORT,/tmp,10M,1K'


Kai Kang (2):
  defaultsetup.conf: enable select init manager
  poky.conf: make systemd as default init manager

 meta-poky/conf/distro/poky-tiny.conf                   | 8 ++------
 meta-poky/conf/distro/poky.conf                        | 5 +++++
 meta/conf/distro/defaultsetup.conf                     | 3 +++
 meta/conf/distro/include/init-manager-mdev-busybox.inc | 7 +++++++
 meta/conf/distro/include/init-manager-systemd.inc      | 6 ++++++
 meta/conf/distro/include/init-manager-sysvinit.inc     | 6 ++++++
 6 files changed, 29 insertions(+), 6 deletions(-)
 create mode 100644 meta/conf/distro/include/init-manager-mdev-busybox.inc
 create mode 100644 meta/conf/distro/include/init-manager-systemd.inc
 create mode 100644 meta/conf/distro/include/init-manager-sysvinit.inc

--
2.18.0



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

* [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-04 13:45 [PATCH v7 0/2] Make systemd as default init manager kai.kang
@ 2019-07-04 13:45   ` kai.kang
  2019-07-04 13:45 ` [meta-poky][PATCH 2/2] poky.conf: make systemd as default " kai.kang
  2019-07-04 15:00 ` ✗ patchtest: failure for Make " Patchwork
  2 siblings, 0 replies; 32+ messages in thread
From: kai.kang @ 2019-07-04 13:45 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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

Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
files to configure init manager settings. Available values of
INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
by default for compatibility.

[YOCTO #13031]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/conf/distro/defaultsetup.conf                     | 3 +++
 meta/conf/distro/include/init-manager-mdev-busybox.inc | 7 +++++++
 meta/conf/distro/include/init-manager-systemd.inc      | 6 ++++++
 meta/conf/distro/include/init-manager-sysvinit.inc     | 6 ++++++
 4 files changed, 22 insertions(+)
 create mode 100644 meta/conf/distro/include/init-manager-mdev-busybox.inc
 create mode 100644 meta/conf/distro/include/init-manager-systemd.inc
 create mode 100644 meta/conf/distro/include/init-manager-sysvinit.inc

diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf
index 20e61232e9..057e2f761f 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
 INHERIT_BLACKLIST = "blacklist"
 INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
 INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
+
+INIT_MANAGER ??= "sysvinit"
+require conf/distro/include/init-manager-${INIT_MANAGER}.inc
diff --git a/meta/conf/distro/include/init-manager-mdev-busybox.inc b/meta/conf/distro/include/init-manager-mdev-busybox.inc
new file mode 100644
index 0000000000..b07d9de5b4
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-mdev-busybox.inc
@@ -0,0 +1,7 @@
+# enable mdev/busybox for init
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd sysvinit"
+VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
+VIRTUAL-RUNTIME_init_manager = "busybox"
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_keymaps = "keymaps"
+VIRTUAL-RUNTIME_login_manager = "busybox"
diff --git a/meta/conf/distro/include/init-manager-systemd.inc b/meta/conf/distro/include/init-manager-systemd.inc
new file mode 100644
index 0000000000..6542e29cfd
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-systemd.inc
@@ -0,0 +1,6 @@
+# Use systemd for system initialization
+DISTRO_FEATURES_append = " systemd"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
+VIRTUAL-RUNTIME_login_manager = "shadow-base"
diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc b/meta/conf/distro/include/init-manager-sysvinit.inc
new file mode 100644
index 0000000000..7725b30e1e
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-sysvinit.inc
@@ -0,0 +1,6 @@
+# Use sysvinit for system initialization
+DISTRO_FEATURES_append = " sysvinit"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
+VIRTUAL-RUNTIME_init_manager = "sysvinit"
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_login_manager = "busybox"
-- 
2.18.0



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

* [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-04 13:45   ` kai.kang
  0 siblings, 0 replies; 32+ messages in thread
From: kai.kang @ 2019-07-04 13:45 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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

Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
files to configure init manager settings. Available values of
INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
by default for compatibility.

[YOCTO #13031]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/conf/distro/defaultsetup.conf                     | 3 +++
 meta/conf/distro/include/init-manager-mdev-busybox.inc | 7 +++++++
 meta/conf/distro/include/init-manager-systemd.inc      | 6 ++++++
 meta/conf/distro/include/init-manager-sysvinit.inc     | 6 ++++++
 4 files changed, 22 insertions(+)
 create mode 100644 meta/conf/distro/include/init-manager-mdev-busybox.inc
 create mode 100644 meta/conf/distro/include/init-manager-systemd.inc
 create mode 100644 meta/conf/distro/include/init-manager-sysvinit.inc

diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf
index 20e61232e9..057e2f761f 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
 INHERIT_BLACKLIST = "blacklist"
 INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
 INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
+
+INIT_MANAGER ??= "sysvinit"
+require conf/distro/include/init-manager-${INIT_MANAGER}.inc
diff --git a/meta/conf/distro/include/init-manager-mdev-busybox.inc b/meta/conf/distro/include/init-manager-mdev-busybox.inc
new file mode 100644
index 0000000000..b07d9de5b4
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-mdev-busybox.inc
@@ -0,0 +1,7 @@
+# enable mdev/busybox for init
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd sysvinit"
+VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
+VIRTUAL-RUNTIME_init_manager = "busybox"
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_keymaps = "keymaps"
+VIRTUAL-RUNTIME_login_manager = "busybox"
diff --git a/meta/conf/distro/include/init-manager-systemd.inc b/meta/conf/distro/include/init-manager-systemd.inc
new file mode 100644
index 0000000000..6542e29cfd
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-systemd.inc
@@ -0,0 +1,6 @@
+# Use systemd for system initialization
+DISTRO_FEATURES_append = " systemd"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
+VIRTUAL-RUNTIME_login_manager = "shadow-base"
diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc b/meta/conf/distro/include/init-manager-sysvinit.inc
new file mode 100644
index 0000000000..7725b30e1e
--- /dev/null
+++ b/meta/conf/distro/include/init-manager-sysvinit.inc
@@ -0,0 +1,6 @@
+# Use sysvinit for system initialization
+DISTRO_FEATURES_append = " sysvinit"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
+VIRTUAL-RUNTIME_init_manager = "sysvinit"
+VIRTUAL-RUNTIME_initscripts = "initscripts"
+VIRTUAL-RUNTIME_login_manager = "busybox"
-- 
2.18.0



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

* [meta-poky][PATCH 2/2] poky.conf: make systemd as default init manager
  2019-07-04 13:45 [PATCH v7 0/2] Make systemd as default init manager kai.kang
  2019-07-04 13:45   ` [oe-core][PATCH " kai.kang
@ 2019-07-04 13:45 ` kai.kang
  2019-07-04 22:34   ` richard.purdie
  2019-07-04 15:00 ` ✗ patchtest: failure for Make " Patchwork
  2 siblings, 1 reply; 32+ messages in thread
From: kai.kang @ 2019-07-04 13:45 UTC (permalink / raw)
  To: richard.purdie; +Cc: poky, openembedded-core

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(-)

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"
-- 
2.18.0



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

* ✗ patchtest: failure for Make systemd as default init manager
  2019-07-04 13:45 [PATCH v7 0/2] Make systemd as default init manager kai.kang
  2019-07-04 13:45   ` [oe-core][PATCH " kai.kang
  2019-07-04 13:45 ` [meta-poky][PATCH 2/2] poky.conf: make systemd as default " kai.kang
@ 2019-07-04 15:00 ` Patchwork
  2 siblings, 0 replies; 32+ messages in thread
From: Patchwork @ 2019-07-04 15:00 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

== Series Details ==

Series: Make systemd as default init manager
Revision: 1
URL   : https://patchwork.openembedded.org/series/18528/
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:



* Patch            [meta-poky,2/2] poky.conf: make systemd as default init manager
 Issue             Series sent to the wrong mailing list [test_target_mailing_list] 
  Suggested fix    Check the project's README (meta-poky,2/2) and send the patch to the indicated list

* 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 a0a96db236)



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] 32+ messages in thread

* Re: [meta-poky][PATCH 2/2] poky.conf: make systemd as default init manager
  2019-07-04 13:45 ` [meta-poky][PATCH 2/2] poky.conf: make systemd as default " kai.kang
@ 2019-07-04 22:34   ` richard.purdie
  0 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-04 22:34 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, openembedded-core

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



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-04 13:45   ` [oe-core][PATCH " kai.kang
@ 2019-07-06  9:53     ` Adrian Bunk
  -1 siblings, 0 replies; 32+ messages in thread
From: Adrian Bunk @ 2019-07-06  9:53 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, openembedded-core

On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
> files to configure init manager settings. Available values of
> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
> by default for compatibility.
>...
> --- a/meta/conf/distro/defaultsetup.conf
> +++ b/meta/conf/distro/defaultsetup.conf
> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>  INHERIT_BLACKLIST = "blacklist"
>  INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>  INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
> +
> +INIT_MANAGER ??= "sysvinit"
> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>...
> --- /dev/null
> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> @@ -0,0 +1,6 @@
> +# Use sysvinit for system initialization
> +DISTRO_FEATURES_append = " sysvinit"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> +VIRTUAL-RUNTIME_initscripts = "initscripts"
> +VIRTUAL-RUNTIME_login_manager = "busybox"

I am not sure whether this can be fixed better, but this does break 
existing configurations that use a non-default init system.

I just ran into a build issue with
  VIRTUAL-RUNTIME_init_manager = "systemd"
since this now resulted in both sysvinit and systemd being attempted to 
be installed to the image.

This was fixable in my configuration with
  -VIRTUAL-RUNTIME_init_manager = "systemd"
  +INIT_MANAGER = "systemd"

This at least needs to be properly documented as a breaking change.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-06  9:53     ` Adrian Bunk
  0 siblings, 0 replies; 32+ messages in thread
From: Adrian Bunk @ 2019-07-06  9:53 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, openembedded-core

On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
> files to configure init manager settings. Available values of
> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
> by default for compatibility.
>...
> --- a/meta/conf/distro/defaultsetup.conf
> +++ b/meta/conf/distro/defaultsetup.conf
> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>  INHERIT_BLACKLIST = "blacklist"
>  INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>  INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
> +
> +INIT_MANAGER ??= "sysvinit"
> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>...
> --- /dev/null
> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> @@ -0,0 +1,6 @@
> +# Use sysvinit for system initialization
> +DISTRO_FEATURES_append = " sysvinit"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> +VIRTUAL-RUNTIME_initscripts = "initscripts"
> +VIRTUAL-RUNTIME_login_manager = "busybox"

I am not sure whether this can be fixed better, but this does break 
existing configurations that use a non-default init system.

I just ran into a build issue with
  VIRTUAL-RUNTIME_init_manager = "systemd"
since this now resulted in both sysvinit and systemd being attempted to 
be installed to the image.

This was fixable in my configuration with
  -VIRTUAL-RUNTIME_init_manager = "systemd"
  +INIT_MANAGER = "systemd"

This at least needs to be properly documented as a breaking change.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-06  9:53     ` [OE-core] [oe-core][PATCH " Adrian Bunk
@ 2019-07-06 12:08       ` Adrian Bunk
  -1 siblings, 0 replies; 32+ messages in thread
From: Adrian Bunk @ 2019-07-06 12:08 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, openembedded-core

On Sat, Jul 06, 2019 at 12:53:28PM +0300, Adrian Bunk wrote:
> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
> > From: Kai Kang <kai.kang@windriver.com>
> > 
> > Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
> > files to configure init manager settings. Available values of
> > INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
> > by default for compatibility.
> >...
> > --- a/meta/conf/distro/defaultsetup.conf
> > +++ b/meta/conf/distro/defaultsetup.conf
> > @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
> >  INHERIT_BLACKLIST = "blacklist"
> >  INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
> >  INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
> > +
> > +INIT_MANAGER ??= "sysvinit"
> > +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
> >...
> > --- /dev/null
> > +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> > @@ -0,0 +1,6 @@
> > +# Use sysvinit for system initialization
> > +DISTRO_FEATURES_append = " sysvinit"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> > +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> > +VIRTUAL-RUNTIME_initscripts = "initscripts"
> > +VIRTUAL-RUNTIME_login_manager = "busybox"
> 
> I am not sure whether this can be fixed better, but this does break 
> existing configurations that use a non-default init system.
> 
> I just ran into a build issue with
>   VIRTUAL-RUNTIME_init_manager = "systemd"
> since this now resulted in both sysvinit and systemd being attempted to 
> be installed to the image.
> 
> This was fixable in my configuration with
>   -VIRTUAL-RUNTIME_init_manager = "systemd"
>   +INIT_MANAGER = "systemd"
> 
> This at least needs to be properly documented as a breaking change.

Looking at master-next, this problem is actually fixed for me with
  meta: Improve handling of VIRTUAL-RUNTIME variables

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-06 12:08       ` Adrian Bunk
  0 siblings, 0 replies; 32+ messages in thread
From: Adrian Bunk @ 2019-07-06 12:08 UTC (permalink / raw)
  To: kai.kang; +Cc: poky, openembedded-core

On Sat, Jul 06, 2019 at 12:53:28PM +0300, Adrian Bunk wrote:
> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
> > From: Kai Kang <kai.kang@windriver.com>
> > 
> > Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
> > files to configure init manager settings. Available values of
> > INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
> > by default for compatibility.
> >...
> > --- a/meta/conf/distro/defaultsetup.conf
> > +++ b/meta/conf/distro/defaultsetup.conf
> > @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
> >  INHERIT_BLACKLIST = "blacklist"
> >  INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
> >  INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
> > +
> > +INIT_MANAGER ??= "sysvinit"
> > +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
> >...
> > --- /dev/null
> > +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> > @@ -0,0 +1,6 @@
> > +# Use sysvinit for system initialization
> > +DISTRO_FEATURES_append = " sysvinit"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> > +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> > +VIRTUAL-RUNTIME_initscripts = "initscripts"
> > +VIRTUAL-RUNTIME_login_manager = "busybox"
> 
> I am not sure whether this can be fixed better, but this does break 
> existing configurations that use a non-default init system.
> 
> I just ran into a build issue with
>   VIRTUAL-RUNTIME_init_manager = "systemd"
> since this now resulted in both sysvinit and systemd being attempted to 
> be installed to the image.
> 
> This was fixable in my configuration with
>   -VIRTUAL-RUNTIME_init_manager = "systemd"
>   +INIT_MANAGER = "systemd"
> 
> This at least needs to be properly documented as a breaking change.

Looking at master-next, this problem is actually fixed for me with
  meta: Improve handling of VIRTUAL-RUNTIME variables

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-06  9:53     ` [OE-core] [oe-core][PATCH " Adrian Bunk
@ 2019-07-06 12:31       ` richard.purdie
  -1 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-06 12:31 UTC (permalink / raw)
  To: Adrian Bunk, kai.kang; +Cc: poky, openembedded-core

On Sat, 2019-07-06 at 12:53 +0300, Adrian Bunk wrote:
> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com
> wrote:
> > From: Kai Kang <kai.kang@windriver.com>
> > 
> > Introduce a new variable INIT_MANAGER and create 3 init-manager-
> > *.inc
> > files to configure init manager settings. Available values of
> > INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is
> > set
> > by default for compatibility.
> > ...
> > --- a/meta/conf/distro/defaultsetup.conf
> > +++ b/meta/conf/distro/defaultsetup.conf
> > @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
> >  INHERIT_BLACKLIST = "blacklist"
> >  INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
> >  INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}
> > ${INHERIT_BLACKLIST}"
> > +
> > +INIT_MANAGER ??= "sysvinit"
> > +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
> > ...
> > --- /dev/null
> > +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> > @@ -0,0 +1,6 @@
> > +# Use sysvinit for system initialization
> > +DISTRO_FEATURES_append = " sysvinit"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> > +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> > +VIRTUAL-RUNTIME_initscripts = "initscripts"
> > +VIRTUAL-RUNTIME_login_manager = "busybox"
> 
> I am not sure whether this can be fixed better, but this does break 
> existing configurations that use a non-default init system.
> 
> I just ran into a build issue with
>   VIRTUAL-RUNTIME_init_manager = "systemd"
> since this now resulted in both sysvinit and systemd being attempted
> to 
> be installed to the image.
> 
> This was fixable in my configuration with
>   -VIRTUAL-RUNTIME_init_manager = "systemd"
>   +INIT_MANAGER = "systemd"
> 
> This at least needs to be properly documented as a breaking change.

This change also didn't quite work out for some of our selftests. I've
a patch in master-next which tried to improve things and that fixed the
selftests.

The only other way we could do this is to default INIT_MANAGER to say
"unset" and have an empty file for that. That will of course break my
patch and need the defaults adding back into the recipe. Unless we put
those defaults into the unset version.

Not sure quite what we should do here...

Cheers,

Richard




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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-06 12:31       ` richard.purdie
  0 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-06 12:31 UTC (permalink / raw)
  To: Adrian Bunk, kai.kang; +Cc: poky, openembedded-core

On Sat, 2019-07-06 at 12:53 +0300, Adrian Bunk wrote:
> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com
> wrote:
> > From: Kai Kang <kai.kang@windriver.com>
> > 
> > Introduce a new variable INIT_MANAGER and create 3 init-manager-
> > *.inc
> > files to configure init manager settings. Available values of
> > INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is
> > set
> > by default for compatibility.
> > ...
> > --- a/meta/conf/distro/defaultsetup.conf
> > +++ b/meta/conf/distro/defaultsetup.conf
> > @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
> >  INHERIT_BLACKLIST = "blacklist"
> >  INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
> >  INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}
> > ${INHERIT_BLACKLIST}"
> > +
> > +INIT_MANAGER ??= "sysvinit"
> > +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
> > ...
> > --- /dev/null
> > +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> > @@ -0,0 +1,6 @@
> > +# Use sysvinit for system initialization
> > +DISTRO_FEATURES_append = " sysvinit"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> > +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> > +VIRTUAL-RUNTIME_initscripts = "initscripts"
> > +VIRTUAL-RUNTIME_login_manager = "busybox"
> 
> I am not sure whether this can be fixed better, but this does break 
> existing configurations that use a non-default init system.
> 
> I just ran into a build issue with
>   VIRTUAL-RUNTIME_init_manager = "systemd"
> since this now resulted in both sysvinit and systemd being attempted
> to 
> be installed to the image.
> 
> This was fixable in my configuration with
>   -VIRTUAL-RUNTIME_init_manager = "systemd"
>   +INIT_MANAGER = "systemd"
> 
> This at least needs to be properly documented as a breaking change.

This change also didn't quite work out for some of our selftests. I've
a patch in master-next which tried to improve things and that fixed the
selftests.

The only other way we could do this is to default INIT_MANAGER to say
"unset" and have an empty file for that. That will of course break my
patch and need the defaults adding back into the recipe. Unless we put
those defaults into the unset version.

Not sure quite what we should do here...

Cheers,

Richard




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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-06  9:53     ` [OE-core] [oe-core][PATCH " Adrian Bunk
@ 2019-07-08  2:01       ` Kang Kai
  -1 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-08  2:01 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: poky, openembedded-core

On 2019/7/6 下午5:53, Adrian Bunk wrote:
> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
>> files to configure init manager settings. Available values of
>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
>> by default for compatibility.
>> ...
>> --- a/meta/conf/distro/defaultsetup.conf
>> +++ b/meta/conf/distro/defaultsetup.conf
>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>   INHERIT_BLACKLIST = "blacklist"
>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
>> +
>> +INIT_MANAGER ??= "sysvinit"
>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>> ...
>> --- /dev/null
>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>> @@ -0,0 +1,6 @@
>> +# Use sysvinit for system initialization
>> +DISTRO_FEATURES_append = " sysvinit"
>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>> +VIRTUAL-RUNTIME_login_manager = "busybox"
> I am not sure whether this can be fixed better, but this does break
> existing configurations that use a non-default init system.
>
> I just ran into a build issue with
>    VIRTUAL-RUNTIME_init_manager = "systemd"
> since this now resulted in both sysvinit and systemd being attempted to
> be installed to the image.

It is a little weird. NO sysvinit in DISTRO_FEATURES. I'll check what's 
wrong with it w/o the VIRTUAL-RUNTIME patch.

Regards,
Kai


>
> This was fixable in my configuration with
>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>    +INIT_MANAGER = "systemd"
>
> This at least needs to be properly documented as a breaking change.
>
> cu
> Adrian
>

-- 
Kai Kang



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-08  2:01       ` Kang Kai
  0 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-08  2:01 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: poky, openembedded-core

On 2019/7/6 下午5:53, Adrian Bunk wrote:
> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
>> files to configure init manager settings. Available values of
>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
>> by default for compatibility.
>> ...
>> --- a/meta/conf/distro/defaultsetup.conf
>> +++ b/meta/conf/distro/defaultsetup.conf
>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>   INHERIT_BLACKLIST = "blacklist"
>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
>> +
>> +INIT_MANAGER ??= "sysvinit"
>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>> ...
>> --- /dev/null
>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>> @@ -0,0 +1,6 @@
>> +# Use sysvinit for system initialization
>> +DISTRO_FEATURES_append = " sysvinit"
>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>> +VIRTUAL-RUNTIME_login_manager = "busybox"
> I am not sure whether this can be fixed better, but this does break
> existing configurations that use a non-default init system.
>
> I just ran into a build issue with
>    VIRTUAL-RUNTIME_init_manager = "systemd"
> since this now resulted in both sysvinit and systemd being attempted to
> be installed to the image.

It is a little weird. NO sysvinit in DISTRO_FEATURES. I'll check what's 
wrong with it w/o the VIRTUAL-RUNTIME patch.

Regards,
Kai


>
> This was fixable in my configuration with
>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>    +INIT_MANAGER = "systemd"
>
> This at least needs to be properly documented as a breaking change.
>
> cu
> Adrian
>

-- 
Kai Kang



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-08  2:01       ` [OE-core] [oe-core][PATCH " Kang Kai
@ 2019-07-08  2:13         ` Kang Kai
  -1 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-08  2:13 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: poky, openembedded-core

On 2019/7/8 上午10:01, Kang Kai wrote:
> On 2019/7/6 下午5:53, Adrian Bunk wrote:
>> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
>>> files to configure init manager settings. Available values of
>>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
>>> by default for compatibility.
>>> ...
>>> --- a/meta/conf/distro/defaultsetup.conf
>>> +++ b/meta/conf/distro/defaultsetup.conf
>>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>>   INHERIT_BLACKLIST = "blacklist"
>>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} 
>>> ${INHERIT_BLACKLIST}"
>>> +
>>> +INIT_MANAGER ??= "sysvinit"
>>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>>> ...
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> I am not sure whether this can be fixed better, but this does break
>> existing configurations that use a non-default init system.
>>
>> I just ran into a build issue with
>>    VIRTUAL-RUNTIME_init_manager = "systemd"
>> since this now resulted in both sysvinit and systemd being attempted to
>> be installed to the image.
>
> It is a little weird. NO sysvinit in DISTRO_FEATURES. I'll check 
> what's wrong with it w/o the VIRTUAL-RUNTIME patch.


I misunderstood your config. It is a problem when user wants to set 
init_manager directly.  Thanks for your trying.

Regards,
Kai


>
> Regards,
> Kai
>
>
>>
>> This was fixable in my configuration with
>>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>>    +INIT_MANAGER = "systemd"
>>
>> This at least needs to be properly documented as a breaking change.
>>
>> cu
>> Adrian
>>
>

-- 
Kai Kang



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-08  2:13         ` Kang Kai
  0 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-08  2:13 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: poky, openembedded-core

On 2019/7/8 上午10:01, Kang Kai wrote:
> On 2019/7/6 下午5:53, Adrian Bunk wrote:
>> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Introduce a new variable INIT_MANAGER and create 3 init-manager-*.inc
>>> files to configure init manager settings. Available values of
>>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is set
>>> by default for compatibility.
>>> ...
>>> --- a/meta/conf/distro/defaultsetup.conf
>>> +++ b/meta/conf/distro/defaultsetup.conf
>>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>>   INHERIT_BLACKLIST = "blacklist"
>>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} 
>>> ${INHERIT_BLACKLIST}"
>>> +
>>> +INIT_MANAGER ??= "sysvinit"
>>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>>> ...
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> I am not sure whether this can be fixed better, but this does break
>> existing configurations that use a non-default init system.
>>
>> I just ran into a build issue with
>>    VIRTUAL-RUNTIME_init_manager = "systemd"
>> since this now resulted in both sysvinit and systemd being attempted to
>> be installed to the image.
>
> It is a little weird. NO sysvinit in DISTRO_FEATURES. I'll check 
> what's wrong with it w/o the VIRTUAL-RUNTIME patch.


I misunderstood your config. It is a problem when user wants to set 
init_manager directly.  Thanks for your trying.

Regards,
Kai


>
> Regards,
> Kai
>
>
>>
>> This was fixable in my configuration with
>>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>>    +INIT_MANAGER = "systemd"
>>
>> This at least needs to be properly documented as a breaking change.
>>
>> cu
>> Adrian
>>
>

-- 
Kai Kang



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-06 12:31       ` [OE-core] [oe-core][PATCH " richard.purdie
@ 2019-07-08  9:28         ` Kang Kai
  -1 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-08  9:28 UTC (permalink / raw)
  To: richard.purdie, Adrian Bunk; +Cc: poky, openembedded-core

On 2019/7/6 下午8:31, richard.purdie@linuxfoundation.org wrote:
> On Sat, 2019-07-06 at 12:53 +0300, Adrian Bunk wrote:
>> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com
>> wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Introduce a new variable INIT_MANAGER and create 3 init-manager-
>>> *.inc
>>> files to configure init manager settings. Available values of
>>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is
>>> set
>>> by default for compatibility.
>>> ...
>>> --- a/meta/conf/distro/defaultsetup.conf
>>> +++ b/meta/conf/distro/defaultsetup.conf
>>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>>   INHERIT_BLACKLIST = "blacklist"
>>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}
>>> ${INHERIT_BLACKLIST}"
>>> +
>>> +INIT_MANAGER ??= "sysvinit"
>>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>>> ...
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> I am not sure whether this can be fixed better, but this does break
>> existing configurations that use a non-default init system.
>>
>> I just ran into a build issue with
>>    VIRTUAL-RUNTIME_init_manager = "systemd"
>> since this now resulted in both sysvinit and systemd being attempted
>> to
>> be installed to the image.
>>
>> This was fixable in my configuration with
>>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>>    +INIT_MANAGER = "systemd"
>>
>> This at least needs to be properly documented as a breaking change.
> This change also didn't quite work out for some of our selftests. I've
> a patch in master-next which tried to improve things and that fixed the
> selftests.
>
> The only other way we could do this is to default INIT_MANAGER to say
> "unset" and have an empty file for that. That will of course break my
> patch and need the defaults adding back into the recipe. Unless we put
> those defaults into the unset version.

How about keep a empty INIT_MANAGER by default, and check if 
INIT_MANAGER is set, then overwrite other configs such as
VIRTUAL-RUNTIME_init_manager whether is from user config or predefined 
value from config files or recipes? It could be done
in a anonymous function.

Regards,
Kai


>
> Not sure quite what we should do here...
>
> Cheers,
>
> Richard
>
>
>

-- 
Kai Kang



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-08  9:28         ` Kang Kai
  0 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-08  9:28 UTC (permalink / raw)
  To: richard.purdie, Adrian Bunk; +Cc: poky, openembedded-core

On 2019/7/6 下午8:31, richard.purdie@linuxfoundation.org wrote:
> On Sat, 2019-07-06 at 12:53 +0300, Adrian Bunk wrote:
>> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com
>> wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Introduce a new variable INIT_MANAGER and create 3 init-manager-
>>> *.inc
>>> files to configure init manager settings. Available values of
>>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is
>>> set
>>> by default for compatibility.
>>> ...
>>> --- a/meta/conf/distro/defaultsetup.conf
>>> +++ b/meta/conf/distro/defaultsetup.conf
>>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>>   INHERIT_BLACKLIST = "blacklist"
>>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}
>>> ${INHERIT_BLACKLIST}"
>>> +
>>> +INIT_MANAGER ??= "sysvinit"
>>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>>> ...
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> I am not sure whether this can be fixed better, but this does break
>> existing configurations that use a non-default init system.
>>
>> I just ran into a build issue with
>>    VIRTUAL-RUNTIME_init_manager = "systemd"
>> since this now resulted in both sysvinit and systemd being attempted
>> to
>> be installed to the image.
>>
>> This was fixable in my configuration with
>>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>>    +INIT_MANAGER = "systemd"
>>
>> This at least needs to be properly documented as a breaking change.
> This change also didn't quite work out for some of our selftests. I've
> a patch in master-next which tried to improve things and that fixed the
> selftests.
>
> The only other way we could do this is to default INIT_MANAGER to say
> "unset" and have an empty file for that. That will of course break my
> patch and need the defaults adding back into the recipe. Unless we put
> those defaults into the unset version.

How about keep a empty INIT_MANAGER by default, and check if 
INIT_MANAGER is set, then overwrite other configs such as
VIRTUAL-RUNTIME_init_manager whether is from user config or predefined 
value from config files or recipes? It could be done
in a anonymous function.

Regards,
Kai


>
> Not sure quite what we should do here...
>
> Cheers,
>
> Richard
>
>
>

-- 
Kai Kang



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-06 12:31       ` [OE-core] [oe-core][PATCH " richard.purdie
@ 2019-07-08 10:01         ` ChenQi
  -1 siblings, 0 replies; 32+ messages in thread
From: ChenQi @ 2019-07-08 10:01 UTC (permalink / raw)
  To: richard.purdie, Adrian Bunk, kai.kang; +Cc: poky, openembedded-core

On 07/06/2019 08:31 PM, richard.purdie@linuxfoundation.org wrote:
> On Sat, 2019-07-06 at 12:53 +0300, Adrian Bunk wrote:
>> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com
>> wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Introduce a new variable INIT_MANAGER and create 3 init-manager-
>>> *.inc
>>> files to configure init manager settings. Available values of
>>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is
>>> set
>>> by default for compatibility.
>>> ...
>>> --- a/meta/conf/distro/defaultsetup.conf
>>> +++ b/meta/conf/distro/defaultsetup.conf
>>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>>   INHERIT_BLACKLIST = "blacklist"
>>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}
>>> ${INHERIT_BLACKLIST}"
>>> +
>>> +INIT_MANAGER ??= "sysvinit"
>>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>>> ...
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> I am not sure whether this can be fixed better, but this does break
>> existing configurations that use a non-default init system.
>>
>> I just ran into a build issue with
>>    VIRTUAL-RUNTIME_init_manager = "systemd"
>> since this now resulted in both sysvinit and systemd being attempted
>> to
>> be installed to the image.
>>
>> This was fixable in my configuration with
>>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>>    +INIT_MANAGER = "systemd"
>>
>> This at least needs to be properly documented as a breaking change.
> This change also didn't quite work out for some of our selftests. I've
> a patch in master-next which tried to improve things and that fixed the
> selftests.
>
> The only other way we could do this is to default INIT_MANAGER to say
> "unset" and have an empty file for that. That will of course break my
> patch and need the defaults adding back into the recipe. Unless we put
> those defaults into the unset version.
>
> Not sure quite what we should do here...
>
> Cheers,
>
> Richard
>
>
I'm also concerned about the '=' assignment. Before this patch, the 
VIRTUAL-RUNTIME_xxx are using '?='. Not sure if this would cause 
potential problem for users.
Also, if we are setting default values of VIRTUAL-RUNTIME_xxx in conf 
files, should we clean them up from recipes like packagegroup-core-boot?

Best Regards,
Chen Qi


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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-08 10:01         ` ChenQi
  0 siblings, 0 replies; 32+ messages in thread
From: ChenQi @ 2019-07-08 10:01 UTC (permalink / raw)
  To: richard.purdie, Adrian Bunk, kai.kang; +Cc: poky, openembedded-core

On 07/06/2019 08:31 PM, richard.purdie@linuxfoundation.org wrote:
> On Sat, 2019-07-06 at 12:53 +0300, Adrian Bunk wrote:
>> On Thu, Jul 04, 2019 at 09:45:19PM +0800, kai.kang@windriver.com
>> wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Introduce a new variable INIT_MANAGER and create 3 init-manager-
>>> *.inc
>>> files to configure init manager settings. Available values of
>>> INIT_MANAGER are sysvinit, systemd and mdev-busybox. 'sysvinit' is
>>> set
>>> by default for compatibility.
>>> ...
>>> --- a/meta/conf/distro/defaultsetup.conf
>>> +++ b/meta/conf/distro/defaultsetup.conf
>>> @@ -23,3 +23,6 @@ PACKAGE_CLASSES ?= "package_ipk"
>>>   INHERIT_BLACKLIST = "blacklist"
>>>   INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
>>>   INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}
>>> ${INHERIT_BLACKLIST}"
>>> +
>>> +INIT_MANAGER ??= "sysvinit"
>>> +require conf/distro/include/init-manager-${INIT_MANAGER}.inc
>>> ...
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> I am not sure whether this can be fixed better, but this does break
>> existing configurations that use a non-default init system.
>>
>> I just ran into a build issue with
>>    VIRTUAL-RUNTIME_init_manager = "systemd"
>> since this now resulted in both sysvinit and systemd being attempted
>> to
>> be installed to the image.
>>
>> This was fixable in my configuration with
>>    -VIRTUAL-RUNTIME_init_manager = "systemd"
>>    +INIT_MANAGER = "systemd"
>>
>> This at least needs to be properly documented as a breaking change.
> This change also didn't quite work out for some of our selftests. I've
> a patch in master-next which tried to improve things and that fixed the
> selftests.
>
> The only other way we could do this is to default INIT_MANAGER to say
> "unset" and have an empty file for that. That will of course break my
> patch and need the defaults adding back into the recipe. Unless we put
> those defaults into the unset version.
>
> Not sure quite what we should do here...
>
> Cheers,
>
> Richard
>
>
I'm also concerned about the '=' assignment. Before this patch, the 
VIRTUAL-RUNTIME_xxx are using '?='. Not sure if this would cause 
potential problem for users.
Also, if we are setting default values of VIRTUAL-RUNTIME_xxx in conf 
files, should we clean them up from recipes like packagegroup-core-boot?

Best Regards,
Chen Qi


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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-04 13:45   ` [oe-core][PATCH " kai.kang
@ 2019-07-19 21:35     ` Burton, Ross
  -1 siblings, 0 replies; 32+ messages in thread
From: Burton, Ross @ 2019-07-19 21:35 UTC (permalink / raw)
  To: Kang Kai; +Cc: Poky Project, OE-core

On Thu, 4 Jul 2019 at 15:40, <kai.kang@windriver.com> wrote:
> +++ b/meta/conf/distro/include/init-manager-systemd.inc
> @@ -0,0 +1,6 @@
> +# Use systemd for system initialization
> +DISTRO_FEATURES_append = " systemd"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
> +VIRTUAL-RUNTIME_init_manager = "systemd"
> +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> +VIRTUAL-RUNTIME_login_manager = "shadow-base"
> diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc b/meta/conf/distro/include/init-manager-sysvinit.inc
> new file mode 100644
> index 0000000000..7725b30e1e
> --- /dev/null
> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> @@ -0,0 +1,6 @@
> +# Use sysvinit for system initialization
> +DISTRO_FEATURES_append = " sysvinit"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> +VIRTUAL-RUNTIME_initscripts = "initscripts"
> +VIRTUAL-RUNTIME_login_manager = "busybox"

Back when I integrated systemd into oe-core one of the use cases was a
single distro that builds a main image using systemd, and a
rescue/update image using sysv/busybox.  How is this possible with
this system?

Personally, I'd prefer to see the DISTRO_FEATURE wrangling left out of
those files, and let the user ensure the right features are set.
After all, systemd will refuse to build unless the systemd feature is
enabled.

Ross


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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-19 21:35     ` Burton, Ross
  0 siblings, 0 replies; 32+ messages in thread
From: Burton, Ross @ 2019-07-19 21:35 UTC (permalink / raw)
  To: Kang Kai; +Cc: Poky Project, OE-core

On Thu, 4 Jul 2019 at 15:40, <kai.kang@windriver.com> wrote:
> +++ b/meta/conf/distro/include/init-manager-systemd.inc
> @@ -0,0 +1,6 @@
> +# Use systemd for system initialization
> +DISTRO_FEATURES_append = " systemd"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
> +VIRTUAL-RUNTIME_init_manager = "systemd"
> +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> +VIRTUAL-RUNTIME_login_manager = "shadow-base"
> diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc b/meta/conf/distro/include/init-manager-sysvinit.inc
> new file mode 100644
> index 0000000000..7725b30e1e
> --- /dev/null
> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> @@ -0,0 +1,6 @@
> +# Use sysvinit for system initialization
> +DISTRO_FEATURES_append = " sysvinit"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> +VIRTUAL-RUNTIME_initscripts = "initscripts"
> +VIRTUAL-RUNTIME_login_manager = "busybox"

Back when I integrated systemd into oe-core one of the use cases was a
single distro that builds a main image using systemd, and a
rescue/update image using sysv/busybox.  How is this possible with
this system?

Personally, I'd prefer to see the DISTRO_FEATURE wrangling left out of
those files, and let the user ensure the right features are set.
After all, systemd will refuse to build unless the systemd feature is
enabled.

Ross


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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-19 21:35     ` [OE-core] [oe-core][PATCH " Burton, Ross
@ 2019-07-19 22:28       ` richard.purdie
  -1 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-19 22:28 UTC (permalink / raw)
  To: Burton, Ross, Kang Kai; +Cc: Poky Project, OE-core

On Fri, 2019-07-19 at 22:35 +0100, Burton, Ross wrote:
> On Thu, 4 Jul 2019 at 15:40, <kai.kang@windriver.com> wrote:
> > +++ b/meta/conf/distro/include/init-manager-systemd.inc
> > @@ -0,0 +1,6 @@
> > +# Use systemd for system initialization
> > +DISTRO_FEATURES_append = " systemd"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
> > +VIRTUAL-RUNTIME_init_manager = "systemd"
> > +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> > +VIRTUAL-RUNTIME_login_manager = "shadow-base"
> > diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc
> > b/meta/conf/distro/include/init-manager-sysvinit.inc
> > new file mode 100644
> > index 0000000000..7725b30e1e
> > --- /dev/null
> > +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> > @@ -0,0 +1,6 @@
> > +# Use sysvinit for system initialization
> > +DISTRO_FEATURES_append = " sysvinit"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> > +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> > +VIRTUAL-RUNTIME_initscripts = "initscripts"
> > +VIRTUAL-RUNTIME_login_manager = "busybox"
> 
> Back when I integrated systemd into oe-core one of the use cases was
> a single distro that builds a main image using systemd, and a
> rescue/update image using sysv/busybox.  How is this possible with
> this system?

We're still missing one or two init system setup variants, I was
planning to add those and convert our autobuilder tests over to use
them rather than the fragements that are currently coded into
autobuilder-helper.

> Personally, I'd prefer to see the DISTRO_FEATURE wrangling left out
> of those files, and let the user ensure the right features are set.
> After all, systemd will refuse to build unless the systemd feature is
> enabled.

With the addition of the "none" default, users aren't being forced to
use them so that can do something custom or use a precanned default
which I think gives the best of both worlds?

Cheers,

Richard



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-19 22:28       ` richard.purdie
  0 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-19 22:28 UTC (permalink / raw)
  To: Burton, Ross, Kang Kai; +Cc: Poky Project, OE-core

On Fri, 2019-07-19 at 22:35 +0100, Burton, Ross wrote:
> On Thu, 4 Jul 2019 at 15:40, <kai.kang@windriver.com> wrote:
> > +++ b/meta/conf/distro/include/init-manager-systemd.inc
> > @@ -0,0 +1,6 @@
> > +# Use systemd for system initialization
> > +DISTRO_FEATURES_append = " systemd"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
> > +VIRTUAL-RUNTIME_init_manager = "systemd"
> > +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> > +VIRTUAL-RUNTIME_login_manager = "shadow-base"
> > diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc
> > b/meta/conf/distro/include/init-manager-sysvinit.inc
> > new file mode 100644
> > index 0000000000..7725b30e1e
> > --- /dev/null
> > +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
> > @@ -0,0 +1,6 @@
> > +# Use sysvinit for system initialization
> > +DISTRO_FEATURES_append = " sysvinit"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
> > +VIRTUAL-RUNTIME_init_manager = "sysvinit"
> > +VIRTUAL-RUNTIME_initscripts = "initscripts"
> > +VIRTUAL-RUNTIME_login_manager = "busybox"
> 
> Back when I integrated systemd into oe-core one of the use cases was
> a single distro that builds a main image using systemd, and a
> rescue/update image using sysv/busybox.  How is this possible with
> this system?

We're still missing one or two init system setup variants, I was
planning to add those and convert our autobuilder tests over to use
them rather than the fragements that are currently coded into
autobuilder-helper.

> Personally, I'd prefer to see the DISTRO_FEATURE wrangling left out
> of those files, and let the user ensure the right features are set.
> After all, systemd will refuse to build unless the systemd feature is
> enabled.

With the addition of the "none" default, users aren't being forced to
use them so that can do something custom or use a precanned default
which I think gives the best of both worlds?

Cheers,

Richard



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-19 22:28       ` [OE-core] [oe-core][PATCH " richard.purdie
@ 2019-07-22  1:37         ` Kang Kai
  -1 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-22  1:37 UTC (permalink / raw)
  To: richard.purdie, Burton, Ross; +Cc: Poky Project, OE-core

On 2019/7/20 上午6:28, richard.purdie@linuxfoundation.org wrote:
> On Fri, 2019-07-19 at 22:35 +0100, Burton, Ross wrote:
>> On Thu, 4 Jul 2019 at 15:40, <kai.kang@windriver.com> wrote:
>>> +++ b/meta/conf/distro/include/init-manager-systemd.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use systemd for system initialization
>>> +DISTRO_FEATURES_append = " systemd"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
>>> +VIRTUAL-RUNTIME_init_manager = "systemd"
>>> +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>>> +VIRTUAL-RUNTIME_login_manager = "shadow-base"
>>> diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc
>>> b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> new file mode 100644
>>> index 0000000000..7725b30e1e
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> Back when I integrated systemd into oe-core one of the use cases was
>> a single distro that builds a main image using systemd, and a
>> rescue/update image using sysv/busybox.  How is this possible with
>> this system?


Hi Richard,

> We're still missing one or two init system setup variants,

What kind of missing variants do you mean?


> I was
> planning to add those and convert our autobuilder tests over to use
> them rather than the fragements that are currently coded into
> autobuilder-helper.


I just run oe-selftest -a with this patch after you updated the patch in 
oe-core. But I met some (>15) errors

ERROR: Unable to start bitbake server (None)

But I think it should not be related with init manager changes and will 
change a build machine to test.
Do you have test it again in autobuilder and any failure found? Thanks.

Regards,
Kai


>
>> Personally, I'd prefer to see the DISTRO_FEATURE wrangling left out
>> of those files, and let the user ensure the right features are set.
>> After all, systemd will refuse to build unless the systemd feature is
>> enabled.
> With the addition of the "none" default, users aren't being forced to
> use them so that can do something custom or use a precanned default
> which I think gives the best of both worlds?
>
> Cheers,
>
> Richard
>
>

-- 
Kai Kang



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-22  1:37         ` Kang Kai
  0 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-22  1:37 UTC (permalink / raw)
  To: richard.purdie, Burton, Ross; +Cc: Poky Project, OE-core

On 2019/7/20 上午6:28, richard.purdie@linuxfoundation.org wrote:
> On Fri, 2019-07-19 at 22:35 +0100, Burton, Ross wrote:
>> On Thu, 4 Jul 2019 at 15:40, <kai.kang@windriver.com> wrote:
>>> +++ b/meta/conf/distro/include/init-manager-systemd.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use systemd for system initialization
>>> +DISTRO_FEATURES_append = " systemd"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
>>> +VIRTUAL-RUNTIME_init_manager = "systemd"
>>> +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
>>> +VIRTUAL-RUNTIME_login_manager = "shadow-base"
>>> diff --git a/meta/conf/distro/include/init-manager-sysvinit.inc
>>> b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> new file mode 100644
>>> index 0000000000..7725b30e1e
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/init-manager-sysvinit.inc
>>> @@ -0,0 +1,6 @@
>>> +# Use sysvinit for system initialization
>>> +DISTRO_FEATURES_append = " sysvinit"
>>> +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
>>> +VIRTUAL-RUNTIME_init_manager = "sysvinit"
>>> +VIRTUAL-RUNTIME_initscripts = "initscripts"
>>> +VIRTUAL-RUNTIME_login_manager = "busybox"
>> Back when I integrated systemd into oe-core one of the use cases was
>> a single distro that builds a main image using systemd, and a
>> rescue/update image using sysv/busybox.  How is this possible with
>> this system?


Hi Richard,

> We're still missing one or two init system setup variants,

What kind of missing variants do you mean?


> I was
> planning to add those and convert our autobuilder tests over to use
> them rather than the fragements that are currently coded into
> autobuilder-helper.


I just run oe-selftest -a with this patch after you updated the patch in 
oe-core. But I met some (>15) errors

ERROR: Unable to start bitbake server (None)

But I think it should not be related with init manager changes and will 
change a build machine to test.
Do you have test it again in autobuilder and any failure found? Thanks.

Regards,
Kai


>
>> Personally, I'd prefer to see the DISTRO_FEATURE wrangling left out
>> of those files, and let the user ensure the right features are set.
>> After all, systemd will refuse to build unless the systemd feature is
>> enabled.
> With the addition of the "none" default, users aren't being forced to
> use them so that can do something custom or use a precanned default
> which I think gives the best of both worlds?
>
> Cheers,
>
> Richard
>
>

-- 
Kai Kang



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-22  1:37         ` [OE-core] [oe-core][PATCH " Kang Kai
@ 2019-07-22 23:26           ` Mittal, Anuj
  -1 siblings, 0 replies; 32+ messages in thread
From: Mittal, Anuj @ 2019-07-22 23:26 UTC (permalink / raw)
  To: Kai.Kang, richard.purdie, Burton, Ross; +Cc: poky, openembedded-core

On Mon, 2019-07-22 at 09:37 +0800, Kang Kai wrote:
> I just run oe-selftest -a with this patch after you updated the patch
> in 
> oe-core. But I met some (>15) errors
> 
> ERROR: Unable to start bitbake server (None)
> 
> But I think it should not be related with init manager changes and
> will 
> change a build machine to test.
> Do you have test it again in autobuilder and any failure found?
> Thanks.

Not sure if these have been reported but there are some failures in
runtime tests which look related to this change:

https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/855/steps/8/logs/step1c

https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/852/steps/8/logs/step1c

https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/856/steps/8/logs/step2c

Thanks,

Anuj

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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-22 23:26           ` Mittal, Anuj
  0 siblings, 0 replies; 32+ messages in thread
From: Mittal, Anuj @ 2019-07-22 23:26 UTC (permalink / raw)
  To: Kai.Kang, richard.purdie, Burton, Ross; +Cc: poky, openembedded-core

On Mon, 2019-07-22 at 09:37 +0800, Kang Kai wrote:
> I just run oe-selftest -a with this patch after you updated the patch
> in 
> oe-core. But I met some (>15) errors
> 
> ERROR: Unable to start bitbake server (None)
> 
> But I think it should not be related with init manager changes and
> will 
> change a build machine to test.
> Do you have test it again in autobuilder and any failure found?
> Thanks.

Not sure if these have been reported but there are some failures in
runtime tests which look related to this change:

https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/855/steps/8/logs/step1c

https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/852/steps/8/logs/step1c

https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/856/steps/8/logs/step2c

Thanks,

Anuj

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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-22 23:26           ` [OE-core] [oe-core][PATCH " Mittal, Anuj
@ 2019-07-23 19:30             ` richard.purdie
  -1 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-23 19:30 UTC (permalink / raw)
  To: Mittal, Anuj, Kai.Kang, Burton, Ross; +Cc: poky, openembedded-core

On Mon, 2019-07-22 at 23:26 +0000, Mittal, Anuj wrote:
> On Mon, 2019-07-22 at 09:37 +0800, Kang Kai wrote:
> > I just run oe-selftest -a with this patch after you updated the
> > patch
> > in 
> > oe-core. But I met some (>15) errors
> > 
> > ERROR: Unable to start bitbake server (None)
> > 
> > But I think it should not be related with init manager changes and
> > will 
> > change a build machine to test.
> > Do you have test it again in autobuilder and any failure found?
> > Thanks.
> 
> Not sure if these have been reported but there are some failures in
> runtime tests which look related to this change:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/855/steps/8/logs/step1c
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/852/steps/8/logs/step1c
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/856/steps/8/logs/step2c

I did a back to back build comparision with and without the init system
change.

Basically every failure in:

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

seems to be due to the init system default change so we have some
issues in there to resolve before we can change the default.

Cheers,

Richard



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-23 19:30             ` richard.purdie
  0 siblings, 0 replies; 32+ messages in thread
From: richard.purdie @ 2019-07-23 19:30 UTC (permalink / raw)
  To: Mittal, Anuj, Kai.Kang, Burton, Ross; +Cc: poky, openembedded-core

On Mon, 2019-07-22 at 23:26 +0000, Mittal, Anuj wrote:
> On Mon, 2019-07-22 at 09:37 +0800, Kang Kai wrote:
> > I just run oe-selftest -a with this patch after you updated the
> > patch
> > in 
> > oe-core. But I met some (>15) errors
> > 
> > ERROR: Unable to start bitbake server (None)
> > 
> > But I think it should not be related with init manager changes and
> > will 
> > change a build machine to test.
> > Do you have test it again in autobuilder and any failure found?
> > Thanks.
> 
> Not sure if these have been reported but there are some failures in
> runtime tests which look related to this change:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/855/steps/8/logs/step1c
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/852/steps/8/logs/step1c
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/856/steps/8/logs/step2c

I did a back to back build comparision with and without the init system
change.

Basically every failure in:

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

seems to be due to the init system default change so we have some
issues in there to resolve before we can change the default.

Cheers,

Richard



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

* Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
  2019-07-23 19:30             ` [OE-core] [oe-core][PATCH " richard.purdie
@ 2019-07-25 11:10               ` Kang Kai
  -1 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-25 11:10 UTC (permalink / raw)
  To: richard.purdie, Mittal, Anuj, Burton, Ross; +Cc: poky, openembedded-core

On 2019/7/24 上午3:30, richard.purdie@linuxfoundation.org wrote:
> On Mon, 2019-07-22 at 23:26 +0000, Mittal, Anuj wrote:
>> On Mon, 2019-07-22 at 09:37 +0800, Kang Kai wrote:
>>> I just run oe-selftest -a with this patch after you updated the
>>> patch
>>> in
>>> oe-core. But I met some (>15) errors
>>>
>>> ERROR: Unable to start bitbake server (None)
>>>
>>> But I think it should not be related with init manager changes and
>>> will
>>> change a build machine to test.
>>> Do you have test it again in autobuilder and any failure found?
>>> Thanks.
>> Not sure if these have been reported but there are some failures in
>> runtime tests which look related to this change:
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/855/steps/8/logs/step1c
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/852/steps/8/logs/step1c
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/856/steps/8/logs/step2c
> I did a back to back build comparision with and without the init system
> change.
>
> Basically every failure in:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/297


It fails with

$ bitbake core-image-sato-sdk -c testimage

RESULTS - systemd.SystemdBasicTests.test_systemd_failed: FAILED (0.56s)

It checks failed systemd services and got one:

UNIT              LOAD   ACTIVE SUB DESCRIPTION
● nfs-statd.service loaded failed failed NFS status monitor for NFSv2/3 
locking.


But when boot the qemu image or only run systemd testcases( with its 
dependenies), no such failure.
I doubt it may be affected by other test cases.

Regards,
Kai

>
> seems to be due to the init system default change so we have some
> issues in there to resolve before we can change the default.
>
> Cheers,
>
> Richard
>
>

-- 
Kai Kang



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

* Re: [OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager
@ 2019-07-25 11:10               ` Kang Kai
  0 siblings, 0 replies; 32+ messages in thread
From: Kang Kai @ 2019-07-25 11:10 UTC (permalink / raw)
  To: richard.purdie, Mittal, Anuj, Burton, Ross; +Cc: poky, openembedded-core

On 2019/7/24 上午3:30, richard.purdie@linuxfoundation.org wrote:
> On Mon, 2019-07-22 at 23:26 +0000, Mittal, Anuj wrote:
>> On Mon, 2019-07-22 at 09:37 +0800, Kang Kai wrote:
>>> I just run oe-selftest -a with this patch after you updated the
>>> patch
>>> in
>>> oe-core. But I met some (>15) errors
>>>
>>> ERROR: Unable to start bitbake server (None)
>>>
>>> But I think it should not be related with init manager changes and
>>> will
>>> change a build machine to test.
>>> Do you have test it again in autobuilder and any failure found?
>>> Thanks.
>> Not sure if these have been reported but there are some failures in
>> runtime tests which look related to this change:
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/855/steps/8/logs/step1c
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/852/steps/8/logs/step1c
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/76/builds/856/steps/8/logs/step2c
> I did a back to back build comparision with and without the init system
> change.
>
> Basically every failure in:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/297


It fails with

$ bitbake core-image-sato-sdk -c testimage

RESULTS - systemd.SystemdBasicTests.test_systemd_failed: FAILED (0.56s)

It checks failed systemd services and got one:

UNIT              LOAD   ACTIVE SUB DESCRIPTION
● nfs-statd.service loaded failed failed NFS status monitor for NFSv2/3 
locking.


But when boot the qemu image or only run systemd testcases( with its 
dependenies), no such failure.
I doubt it may be affected by other test cases.

Regards,
Kai

>
> seems to be due to the init system default change so we have some
> issues in there to resolve before we can change the default.
>
> Cheers,
>
> Richard
>
>

-- 
Kai Kang



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

end of thread, other threads:[~2019-07-25 11:13 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 13:45 [PATCH v7 0/2] Make systemd as default init manager kai.kang
2019-07-04 13:45 ` [PATCH 1/2] defaultsetup.conf: enable select " kai.kang
2019-07-04 13:45   ` [oe-core][PATCH " kai.kang
2019-07-06  9:53   ` [PATCH " Adrian Bunk
2019-07-06  9:53     ` [OE-core] [oe-core][PATCH " Adrian Bunk
2019-07-06 12:08     ` [PATCH " Adrian Bunk
2019-07-06 12:08       ` [OE-core] [oe-core][PATCH " Adrian Bunk
2019-07-06 12:31     ` [PATCH " richard.purdie
2019-07-06 12:31       ` [OE-core] [oe-core][PATCH " richard.purdie
2019-07-08  9:28       ` [PATCH " Kang Kai
2019-07-08  9:28         ` [OE-core] [oe-core][PATCH " Kang Kai
2019-07-08 10:01       ` [PATCH " ChenQi
2019-07-08 10:01         ` [OE-core] [oe-core][PATCH " ChenQi
2019-07-08  2:01     ` [PATCH " Kang Kai
2019-07-08  2:01       ` [OE-core] [oe-core][PATCH " Kang Kai
2019-07-08  2:13       ` [PATCH " Kang Kai
2019-07-08  2:13         ` [OE-core] [oe-core][PATCH " Kang Kai
2019-07-19 21:35   ` [PATCH " Burton, Ross
2019-07-19 21:35     ` [OE-core] [oe-core][PATCH " Burton, Ross
2019-07-19 22:28     ` [PATCH " richard.purdie
2019-07-19 22:28       ` [OE-core] [oe-core][PATCH " richard.purdie
2019-07-22  1:37       ` [PATCH " Kang Kai
2019-07-22  1:37         ` [OE-core] [oe-core][PATCH " Kang Kai
2019-07-22 23:26         ` [PATCH " Mittal, Anuj
2019-07-22 23:26           ` [OE-core] [oe-core][PATCH " Mittal, Anuj
2019-07-23 19:30           ` [PATCH " richard.purdie
2019-07-23 19:30             ` [OE-core] [oe-core][PATCH " richard.purdie
2019-07-25 11:10             ` [PATCH " Kang Kai
2019-07-25 11:10               ` [OE-core] [oe-core][PATCH " Kang Kai
2019-07-04 13:45 ` [meta-poky][PATCH 2/2] poky.conf: make systemd as default " kai.kang
2019-07-04 22:34   ` richard.purdie
2019-07-04 15:00 ` ✗ patchtest: failure for Make " Patchwork

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.