[OE-core] [PATCH v3 1/2] local.conf.sample: make systemd as default init manager

Paul Barker paul at betafive.co.uk
Tue May 28 09:28:07 UTC 2019



On 27/05/2019 02:49, Kang Kai wrote:
> On 2019/5/25 上午3:23, Peter Kjellerstedt wrote:
>>> -----Original Message-----
>>> From: Khem Raj <raj.khem at gmail.com>
>>> Sent: den 23 maj 2019 22:59
>>> To: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
>>> Cc: kai.kang at windriver.com; openembedded-core at lists.openembedded.org; 
>>> richard.purdie at linuxfoundation.org
>>> Subject: Re: [OE-core] [PATCH v3 1/2] local.conf.sample: make systemd 
>>> as default init manager
>>>
>>> On Thu, May 23, 2019 at 1:41 PM Peter Kjellerstedt 
>>> <mailto:peter.kjellerstedt at axis.com> wrote:
>>>> -----Original Message-----
>>>> From: mailto:openembedded-core-bounces at lists.openembedded.org 
>>>> <openembedded-
>>>> mailto:core-bounces at lists.openembedded.org> On Behalf Of
>>>> mailto:kai.kang at windriver.com
>>>> Sent: den 23 maj 2019 10:26
>>>> To: mailto:richard.purdie at linuxfoundation.org
>>>> Cc: mailto:openembedded-core at lists.openembedded.org
>>>> Subject: [OE-core] [PATCH v3 1/2] local.conf.sample: make systemd as
>>>> default init manager
>>>>
>>>> From: Kai Kang <mailto:kai.kang at windriver.com>
>>>>
>>>> Move configurations from local.conf.sample.extended to 
>>>> local.conf.sample
>>>> to make systemd as default init manager for poky.
>>> If we're going to change the default init manager to be systemd, 
>>> wouldn't
>>> it be more appropriate to change the real default values in bitbake.conf
>>> and http://packagegroup-core-boot.bb? And then include an example in
>>> local.conf.sample.extended to show how to configure sysvinit as init
>>> manager?
>>>
>>> That would change it for Oe-core and other distributions as well which
>>> is not the intention
>> Ok, then I'd say the change belongs in poky.conf. Doing this kind of 
>> changes
>> in local.conf.sample seems very wrong to me. Why? Because if I have an
>> existing build tree it will not be affected, but if I setup a new tree 
>> with
>> oe-init-build-env it will all of a sudden behave differently from the old
>> tree. In my mind, local.conf.sample should only be used for things the 
>> user
>> are likely to want to configure to adapt the build for his/her 
>> environment,
>> not to define the distribution (that's what poky.conf is for).
> 
> 
> If put the settings to poky.conf, it is complicated to override the 
> settings and hard for users to turn back to sysvinit when he/she wants.

If you want to make this override-able you could do something like this 
(forgive any mistakes or bad wrapping I'm just writing this in my email 
client without testing):

POKY_USE_SYSTEMD ?= "1"
DISTRO_FEATURES_append = "${@bb.utils.conditional("POKY_USE_SYSTEMD", 
"1", "systemd", "", d)}"
... etc ...

That would allow someone to set `POKY_USE_SYSTEMD = "0"` in their 
local.conf.

There may be more elegant ways to do this as well, but we the default 
can certainly be set in the distro config in a way that can be 
overridden in local.conf.

Thanks,

-- 
Paul Barker
Managing Director & Principal Engineer
Beta Five Ltd


More information about the Openembedded-core mailing list