[OE-core] [oe-core][PATCH 1/2] defaultsetup.conf: enable select init manager

ChenQi Qi.Chen at windriver.com
Mon Jul 8 10:01:49 UTC 2019


On 07/06/2019 08:31 PM, richard.purdie at 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 at windriver.com
>> wrote:
>>> From: Kai Kang <kai.kang at 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


More information about the Openembedded-core mailing list