Make systemd as default init manager
v7 cover Make systemd as default init manager
From: Kai Kang <[email protected]>
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
PATCH v7 1/2 defaultsetup.conf: enable select init manager
From: Kai Kang <[email protected]>
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]
--- 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
meta/conf/distro/defaultsetup.conf +3 -0
@@ -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
meta/conf/distro/include/init-manager-mdev-busybox.inc new file +7 -0
@@ -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"
meta/conf/distro/include/init-manager-systemd.inc new file +6 -0
@@ -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"
meta/conf/distro/include/init-manager-sysvinit.inc new file +6 -0
@@ -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"
Signature · 1 line
2.18.0
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 20 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager-*.inc files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set by default for compatibility.
...meta/conf/distro/defaultsetup.conf +3
-0@@ -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
meta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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
Signature · 4 lines
"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 SeedRe: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 36 lines · Adrian Bunk
Quoted 20 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager-*.inc files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set by default for compatibility.
...meta/conf/distro/defaultsetup.conf +3
-0@@ -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}.incmeta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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.
Quoted 5 lines
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
Signature · 4 lines
"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 SeedRe: [PATCH 1/2] defaultsetup.conf: enable select init manager
In reply to Adrian BunkQuoted 41 lines · Adrian Bunk
Quoted 23 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager- *.inc
files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set
by default for compatibility.
...meta/conf/distro/defaultsetup.conf +0
-0@@ -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}"
meta/conf/distro/defaultsetup.conf +3
-0+ +INIT_MANAGER ??= "sysvinit" +require conf/distro/include/init-manager-${INIT_MANAGER}.incmeta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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.
Quoted 5 lines
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
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 46 lines · On 2019/7/6 下午8:31, [email protected] wrote:
Quoted 40 lines · Adrian Bunk
Quoted 23 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager- *.inc
files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set
by default for compatibility.
...meta/conf/distro/defaultsetup.conf +0
-0@@ -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}"
meta/conf/distro/defaultsetup.conf +3
-0+ +INIT_MANAGER ??= "sysvinit" +require conf/distro/include/init-manager-${INIT_MANAGER}.incmeta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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.Quoted 5 lines
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.
Quoted 8 lines
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_MANAGERto 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
Quoted 9 lines
Not sure quite what we should do here...
Cheers,
Richard
Signature · 1 line
Kai Kang
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
In reply to [email protected]Quoted 55 lines · On 07/06/2019 08:31 PM, [email protected] wrote:
Quoted 40 lines · Adrian Bunk
Quoted 23 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager- *.inc
files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set
by default for compatibility.
...meta/conf/distro/defaultsetup.conf +0
-0@@ -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}"
meta/conf/distro/defaultsetup.conf +3
-0+ +INIT_MANAGER ??= "sysvinit" +require conf/distro/include/init-manager-${INIT_MANAGER}.incmeta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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.Quoted 5 lines
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_MANAGERto 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.
Quoted 7 lines
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
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
In reply to Adrian BunkQuoted 30 lines · Adrian Bunk
Quoted 20 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager-*.inc files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set by default for compatibility.
...meta/conf/distro/defaultsetup.conf +3
-0@@ -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}.incmeta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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.
Quoted 4 lines
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
Quoted 10 lines
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
Signature · 1 line
Kai Kang
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 31 lines · Kang Kai
Quoted 30 lines · Adrian Bunk
Quoted 20 lines · On Thu, Jul 04, 2019 at 09:45:19PM +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
Introduce a new variable
INIT_MANAGERand create 3 init-manager-*.inc files to configure init manager settings. Available values ofINIT_MANAGERare sysvinit, systemd and mdev-busybox. 'sysvinit' is set by default for compatibility.
...meta/conf/distro/defaultsetup.conf +0
-0@@ -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}"meta/conf/distro/defaultsetup.conf +3
-0+ +INIT_MANAGER ??= "sysvinit" +require conf/distro/include/init-manager-${INIT_MANAGER}.incmeta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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.
Quoted 6 lines
Quoted 4 lines
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
Quoted 16 lines
Regards,
KaiQuoted 10 lines
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
Signature · 1 line
Kai Kang
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
In reply to [email protected]Quoted 14 lines · On Thu, 4 Jul 2019 at 15:40, <[email protected]> wrote:
+++ b/meta/conf/distro/include/init-manager-systemd.inc
meta/conf/distro/include/init-manager-systemd.inc new file +6
-0@@ -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"meta/conf/distro/include/init-manager-sysvinit.inc new file +0
-0
meta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 6 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +6
-0@@ -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
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 19 lines · Ross
Quoted 18 lines · On Thu, 4 Jul 2019 at 15:40, <[email protected]> wrote:
+++ b/meta/conf/distro/include/init-manager-systemd.inc
meta/conf/distro/include/init-manager-systemd.inc new file +6
-0@@ -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"meta/conf/distro/include/init-manager-sysvinit.inc new file +3
-0@@ -0,0 +1,6 @@ +# Use sysvinit for system initialization +DISTRO_FEATURES_append = " sysvinit" +DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
Quoted 8 lines
meta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 3 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +3
-0+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.
Quoted 4 lines
Personally, I'd prefer to see the
DISTRO_FEATUREwrangling 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
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 19 lines · On 2019/7/20 上午6:28, [email protected] wrote:
Quoted 18 lines · Ross
Quoted 17 lines · On Thu, 4 Jul 2019 at 15:40, <[email protected]> wrote:
+++ b/meta/conf/distro/include/init-manager-systemd.inc
meta/conf/distro/include/init-manager-systemd.inc new file +6
-0@@ -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"meta/conf/distro/include/init-manager-sysvinit.inc new file +2
-0@@ -0,0 +1,6 @@ +# Use sysvinit for system initialization +DISTRO_FEATURES_append = " sysvinit"
Quoted 8 lines
Quoted 8 lines
meta/conf/distro/include/init-manager-sysvinit.inc line 6
Quoted 4 lines
meta/conf/distro/include/init-manager-sysvinit.inc new file +4
-0+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,
Quoted 1 line
We're still missing one or two init system setup variants,
What kind of missing variants do you mean?
Quoted 4 lines
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
Quoted 14 lines
Quoted 5 lines
Personally, I'd prefer to see the
DISTRO_FEATUREwrangling 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
Signature · 1 line
Kai Kang
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 11 lines · Kang Kai
I just run oe-selftest -a with this patch after you updated the patch in
oe-core. But I met some (>15) errorsERROR: 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
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 14 lines · Anuj
Quoted 5 lines · Kang Kai
I just run oe-selftest -a with this patch after you updated the patch
in
oe-core. But I met some (>15) errorsQuoted 7 lines
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.
Quoted 8 lines
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
Re: [PATCH 1/2] defaultsetup.conf: enable select init manager
Quoted 21 lines · On 2019/7/24 上午3:30, [email protected] wrote:
Quoted 20 lines · Anuj
Quoted 5 lines · Kang Kai
I just run oe-selftest -a with this patch after you updated the patch
in
oe-core. But I met some (>15) errorsQuoted 7 lines
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
Quoted 7 lines
Quoted 1 line
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
Quoted 9 lines
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
Signature · 1 line
Kai Kang
PATCH v7 2/2 poky.conf: make systemd as default init manager
In reply to [email protected]From: Kai Kang <[email protected]>
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]
--- meta-poky/conf/distro/poky-tiny.conf | 8 ++------ meta-poky/conf/distro/poky.conf | 5 +++++ 2 files changed, 7 insertions(+), 6 deletions(-)
meta-poky/conf/distro/poky-tiny.conf +2 -6
@@ -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
meta-poky/conf/distro/poky.conf +5 -0
@@ -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"
Signature · 1 line
2.18.0
Re: [meta-poky][PATCH 2/2] poky.conf: make systemd as default init manager
Quoted 8 lines · On Thu, 2019-07-04 at 21:45 +0800, [email protected] wrote:
From: Kai Kang <[email protected]>
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.
Quoted 7 lines
[YOCTO #13031]
Signed-off-by Kai Kang <[email protected]>--- 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
✗ patchtest: failure for Make systemd as default init manager
In reply to [email protected]== 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 ([email protected]) 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