All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Make systemd as default init manager and configure wired network
@ 2019-05-23  8:25 kai.kang
  2019-05-23  8:25 ` [PATCH v3 1/2] local.conf.sample: make systemd as default init manager kai.kang
  2019-05-23  8:25 ` [PATCH v3 2/2] systemd-conf: configure wired network with dhcp kai.kang
  0 siblings, 2 replies; 10+ messages in thread
From: kai.kang @ 2019-05-23  8:25 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

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

v3:
* add the patch to make systemd as default init manager
* rename the .network with wired.network
* call to bb.utils.contains('OVERRIDES', ...) is not right. Install
  wired.network unconditionally and remove in in do_install_append_qemuall()
  BTW, bb.utils.contains('IMAGE_CLASSES', 'qemuboot', ...) from layer
  meta-yoe doesn't work for genericx86 that why I didn't use it.

Testededed on genericx86-64.

Run testimage with qemux86-64:
  MACHINE ?= "qemux86-64"
  IMAGE_CLASSES += "testimage"
  QEMU_USE_SLIRP = "1"
  TEST_SERVER_IP = "xxx"

$ bitbake  core-image-sato -c testimage
SUMMARY:
core-image-sato () - Ran 60 tests in 1042.949s
core-image-sato - OK - All required tests passed (successes=42, skipped=18, failures=0, errors=0)
NOTE: Tasks Summary: Attempted 723 tasks of which 722 didn't need to be rerun and all succeeded.


Kai Kang (2):
  local.conf.sample: make systemd as default init manager
  systemd-conf: configure wired network with dhcp

 meta-poky/conf/local.conf.sample                     | 9 +++++++++
 meta-poky/conf/local.conf.sample.extended            | 9 ---------
 meta/recipes-core/systemd/systemd-conf/wired.network | 9 +++++++++
 meta/recipes-core/systemd/systemd-conf_242.bb        | 6 ++++++
 4 files changed, 24 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd-conf/wired.network

--
2.18.0



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

* [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-23  8:25 [PATCH v3 0/2] Make systemd as default init manager and configure wired network kai.kang
@ 2019-05-23  8:25 ` kai.kang
  2019-05-23 20:40   ` Peter Kjellerstedt
  2019-05-23  8:25 ` [PATCH v3 2/2] systemd-conf: configure wired network with dhcp kai.kang
  1 sibling, 1 reply; 10+ messages in thread
From: kai.kang @ 2019-05-23  8:25 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

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

Move configurations from local.conf.sample.extended to local.conf.sample
to make systemd as default init manager for poky.

[YOCTO #13031]

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

diff --git a/meta-poky/conf/local.conf.sample b/meta-poky/conf/local.conf.sample
index 9068e567dc..3a07105e44 100644
--- a/meta-poky/conf/local.conf.sample
+++ b/meta-poky/conf/local.conf.sample
@@ -249,3 +249,12 @@ PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
 # track the version of this file when it was generated. This can safely be ignored if
 # this doesn't mean anything to you.
 CONF_VERSION = "1"
+
+#
+# Use systemd for system initialization
+#
+DISTRO_FEATURES_append = " systemd"
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+VIRTUAL-RUNTIME_login_manager = "shadow-base"
+VIRTUAL-RUNTIME_init_manager = "systemd"
+VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
diff --git a/meta-poky/conf/local.conf.sample.extended b/meta-poky/conf/local.conf.sample.extended
index 26603debe6..e20fc5dbf3 100644
--- a/meta-poky/conf/local.conf.sample.extended
+++ b/meta-poky/conf/local.conf.sample.extended
@@ -377,12 +377,3 @@ DISTRO_FEATURES_remove = "x11"
 #VIRTUAL-RUNTIME_initscripts = "initscripts"
 #VIRTUAL-RUNTIME_keymaps = "keymaps"
 #DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
-
-#
-# Use systemd for system initialization
-#
-#DISTRO_FEATURES_append = " systemd"
-#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
-#VIRTUAL-RUNTIME_login_manager = "shadow-base"
-#VIRTUAL-RUNTIME_init_manager = "systemd"
-#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
-- 
2.18.0



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

* [PATCH v3 2/2] systemd-conf: configure wired network with dhcp
  2019-05-23  8:25 [PATCH v3 0/2] Make systemd as default init manager and configure wired network kai.kang
  2019-05-23  8:25 ` [PATCH v3 1/2] local.conf.sample: make systemd as default init manager kai.kang
@ 2019-05-23  8:25 ` kai.kang
  1 sibling, 0 replies; 10+ messages in thread
From: kai.kang @ 2019-05-23  8:25 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

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

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

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

[YOCTO #13057]

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

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



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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-23  8:25 ` [PATCH v3 1/2] local.conf.sample: make systemd as default init manager kai.kang
@ 2019-05-23 20:40   ` Peter Kjellerstedt
  2019-05-23 20:59     ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Kjellerstedt @ 2019-05-23 20:40 UTC (permalink / raw)
  To: kai.kang, richard.purdie; +Cc: openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of
> kai.kang@windriver.com
> Sent: den 23 maj 2019 10:26
> To: richard.purdie@linuxfoundation.org
> Cc: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v3 1/2] local.conf.sample: make systemd as
> default init manager
> 
> From: Kai Kang <kai.kang@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 packagegroup-core-boot.bb? And then include an example in 
local.conf.sample.extended to show how to configure sysvinit as init manager?

> 
> [YOCTO #13031]
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta-poky/conf/local.conf.sample          | 9 +++++++++
>  meta-poky/conf/local.conf.sample.extended | 9 ---------
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/meta-poky/conf/local.conf.sample b/meta-
> poky/conf/local.conf.sample
> index 9068e567dc..3a07105e44 100644
> --- a/meta-poky/conf/local.conf.sample
> +++ b/meta-poky/conf/local.conf.sample
> @@ -249,3 +249,12 @@ PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
>  # track the version of this file when it was generated. This can
> safely be ignored if
>  # this doesn't mean anything to you.
>  CONF_VERSION = "1"
> +
> +#
> +# Use systemd for system initialization
> +#
> +DISTRO_FEATURES_append = " systemd"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> +VIRTUAL-RUNTIME_login_manager = "shadow-base"
> +VIRTUAL-RUNTIME_init_manager = "systemd"
> +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> diff --git a/meta-poky/conf/local.conf.sample.extended b/meta-
> poky/conf/local.conf.sample.extended
> index 26603debe6..e20fc5dbf3 100644
> --- a/meta-poky/conf/local.conf.sample.extended
> +++ b/meta-poky/conf/local.conf.sample.extended
> @@ -377,12 +377,3 @@ DISTRO_FEATURES_remove = "x11"
>  #VIRTUAL-RUNTIME_initscripts = "initscripts"
>  #VIRTUAL-RUNTIME_keymaps = "keymaps"
>  #DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> -
> -#
> -# Use systemd for system initialization
> -#
> -#DISTRO_FEATURES_append = " systemd"
> -#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> -#VIRTUAL-RUNTIME_login_manager = "shadow-base"
> -#VIRTUAL-RUNTIME_init_manager = "systemd"
> -#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> --
> 2.18.0
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-23 20:40   ` Peter Kjellerstedt
@ 2019-05-23 20:59     ` Khem Raj
  2019-05-24 19:23       ` Peter Kjellerstedt
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2019-05-23 20:59 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]

On Thu, May 23, 2019 at 1:41 PM Peter Kjellerstedt <
peter.kjellerstedt@axis.com> wrote:

> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> > core-bounces@lists.openembedded.org> On Behalf Of
> > kai.kang@windriver.com
> > Sent: den 23 maj 2019 10:26
> > To: richard.purdie@linuxfoundation.org
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v3 1/2] local.conf.sample: make systemd as
> > default init manager
> >
> > From: Kai Kang <kai.kang@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 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

>
>
> >
> > [YOCTO #13031]
> >
> > Signed-off-by: Kai Kang <kai.kang@windriver.com>
> > ---
> >  meta-poky/conf/local.conf.sample          | 9 +++++++++
> >  meta-poky/conf/local.conf.sample.extended | 9 ---------
> >  2 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/meta-poky/conf/local.conf.sample b/meta-
> > poky/conf/local.conf.sample
> > index 9068e567dc..3a07105e44 100644
> > --- a/meta-poky/conf/local.conf.sample
> > +++ b/meta-poky/conf/local.conf.sample
> > @@ -249,3 +249,12 @@ PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
> >  # track the version of this file when it was generated. This can
> > safely be ignored if
> >  # this doesn't mean anything to you.
> >  CONF_VERSION = "1"
> > +
> > +#
> > +# Use systemd for system initialization
> > +#
> > +DISTRO_FEATURES_append = " systemd"
> > +DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> > +VIRTUAL-RUNTIME_login_manager = "shadow-base"
> > +VIRTUAL-RUNTIME_init_manager = "systemd"
> > +VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> > diff --git a/meta-poky/conf/local.conf.sample.extended b/meta-
> > poky/conf/local.conf.sample.extended
> > index 26603debe6..e20fc5dbf3 100644
> > --- a/meta-poky/conf/local.conf.sample.extended
> > +++ b/meta-poky/conf/local.conf.sample.extended
> > @@ -377,12 +377,3 @@ DISTRO_FEATURES_remove = "x11"
> >  #VIRTUAL-RUNTIME_initscripts = "initscripts"
> >  #VIRTUAL-RUNTIME_keymaps = "keymaps"
> >  #DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> > -
> > -#
> > -# Use systemd for system initialization
> > -#
> > -#DISTRO_FEATURES_append = " systemd"
> > -#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
> > -#VIRTUAL-RUNTIME_login_manager = "shadow-base"
> > -#VIRTUAL-RUNTIME_init_manager = "systemd"
> > -#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
> > --
> > 2.18.0
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 5355 bytes --]

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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-23 20:59     ` Khem Raj
@ 2019-05-24 19:23       ` Peter Kjellerstedt
  2019-05-24 19:44         ` Khem Raj
  2019-05-27  1:49         ` Kang Kai
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Kjellerstedt @ 2019-05-24 19:23 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com> 
> Sent: den 23 maj 2019 22:59
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: kai.kang@windriver.com; openembedded-core@lists.openembedded.org; richard.purdie@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@axis.com> wrote:
> > -----Original Message-----
> > From: mailto:openembedded-core-bounces@lists.openembedded.org <openembedded-
> > mailto:core-bounces@lists.openembedded.org> On Behalf Of
> > mailto:kai.kang@windriver.com
> > Sent: den 23 maj 2019 10:26
> > To: mailto:richard.purdie@linuxfoundation.org
> > Cc: mailto:openembedded-core@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@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).

//Peter


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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-24 19:23       ` Peter Kjellerstedt
@ 2019-05-24 19:44         ` Khem Raj
  2019-05-27  1:49         ` Kang Kai
  1 sibling, 0 replies; 10+ messages in thread
From: Khem Raj @ 2019-05-24 19:44 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

On Fri, May 24, 2019 at 12:23 PM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> > -----Original Message-----
> > From: Khem Raj <raj.khem@gmail.com>
> > Sent: den 23 maj 2019 22:59
> > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > Cc: kai.kang@windriver.com; openembedded-core@lists.openembedded.org; richard.purdie@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@axis.com> wrote:
> > > -----Original Message-----
> > > From: mailto:openembedded-core-bounces@lists.openembedded.org <openembedded-
> > > mailto:core-bounces@lists.openembedded.org> On Behalf Of
> > > mailto:kai.kang@windriver.com
> > > Sent: den 23 maj 2019 10:26
> > > To: mailto:richard.purdie@linuxfoundation.org
> > > Cc: mailto:openembedded-core@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@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).

yes distro config is right place.

>
> //Peter
>


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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-24 19:23       ` Peter Kjellerstedt
  2019-05-24 19:44         ` Khem Raj
@ 2019-05-27  1:49         ` Kang Kai
  2019-05-28  9:28           ` Paul Barker
  1 sibling, 1 reply; 10+ messages in thread
From: Kang Kai @ 2019-05-27  1:49 UTC (permalink / raw)
  To: Peter Kjellerstedt, Khem Raj; +Cc: openembedded-core

On 2019/5/25 上午3:23, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: Khem Raj <raj.khem@gmail.com>
>> Sent: den 23 maj 2019 22:59
>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>> Cc: kai.kang@windriver.com; openembedded-core@lists.openembedded.org; richard.purdie@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@axis.com> wrote:
>>> -----Original Message-----
>>> From: mailto:openembedded-core-bounces@lists.openembedded.org <openembedded-
>>> mailto:core-bounces@lists.openembedded.org> On Behalf Of
>>> mailto:kai.kang@windriver.com
>>> Sent: den 23 maj 2019 10:26
>>> To: mailto:richard.purdie@linuxfoundation.org
>>> Cc: mailto:openembedded-core@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@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.
And every time updates local.conf.sample which is not just update 
comments, the old build and new build are differently, such as

commit 18bead102afabffcf3842ee099dcd22b8a598b8d
Author: Alexander Kanavin <alex.kanavin@gmail.com>
Date:   Wed Feb 27 18:47:33 2019 +0100

     local.conf.sample: adjust the qemu configuration to refer to 
qemu-system-native

     (From meta-yocto rev: aa16ed1b2c0f358d244a50a41be19d80935d3cc8)

     Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
     Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta-poky/conf/local.conf.sample 
b/meta-poky/conf/local.conf.sample
index 267108d685..9068e567dc 100644
--- a/meta-poky/conf/local.conf.sample
+++ b/meta-poky/conf/local.conf.sample
@@ -241,7 +241,7 @@ BB_DISKMON_DIRS ??= "\
  # seen. The two lines below enable the SDL backend too. By default 
libsdl2-native will
  # be built, if you want to use your host's libSDL instead of the 
minimal libsdl built
  # by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
-PACKAGECONFIG_append_pn-qemu-native = " sdl"
+PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
  PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
  #ASSUME_PROVIDED += "libsdl2-native"


and more earlier:

commit 63dcfa8f1394475073f6dbb5f3f6ede284d5a305
Author: Mark Hatle <mark.hatle@windriver.com>
Date:   Mon Aug 15 16:29:34 2016 -0500

     Revert "local.conf.sample: Disable prelink by default"

     This reverts commit 300f858ba07c938427ccd05a3d7220027a03d461.

     Reenable prelink

     (From meta-yocto rev: 91705d8ae9f56d1de4f0fdcd6a9654b75921aa8c)

     Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
     Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta-poky/conf/local.conf.sample 
b/meta-poky/conf/local.conf.sample
index a7b2d8065d..365b6eb20c 100644
--- a/meta-poky/conf/local.conf.sample
+++ b/meta-poky/conf/local.conf.sample
@@ -152,8 +152,7 @@ EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
  #   - 'image-swab' to perform host system intrusion detection
  # NOTE: if listing mklibs & prelink both, then make sure mklibs is 
before prelink
  # NOTE: mklibs also needs to be explicitly enabled for a given image, 
see local.conf.extended
-# image-prelink disabled for now due to issues with IFUNC symbol relocation
-USER_CLASSES ?= "buildstats image-mklibs"
+USER_CLASSES ?= "buildstats image-mklibs image-prelink"

  #
  # Runtime testing of images


Regards,
Kai

>
> //Peter
>

-- 
Kai Kang



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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-27  1:49         ` Kang Kai
@ 2019-05-28  9:28           ` Paul Barker
  2019-05-29  1:20             ` Kang Kai
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Barker @ 2019-05-28  9:28 UTC (permalink / raw)
  To: Kang Kai, Peter Kjellerstedt, Khem Raj; +Cc: openembedded-core



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@gmail.com>
>>> Sent: den 23 maj 2019 22:59
>>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>>> Cc: kai.kang@windriver.com; openembedded-core@lists.openembedded.org; 
>>> richard.purdie@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@axis.com> wrote:
>>>> -----Original Message-----
>>>> From: mailto:openembedded-core-bounces@lists.openembedded.org 
>>>> <openembedded-
>>>> mailto:core-bounces@lists.openembedded.org> On Behalf Of
>>>> mailto:kai.kang@windriver.com
>>>> Sent: den 23 maj 2019 10:26
>>>> To: mailto:richard.purdie@linuxfoundation.org
>>>> Cc: mailto:openembedded-core@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@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


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

* Re: [PATCH v3 1/2] local.conf.sample: make systemd as default init manager
  2019-05-28  9:28           ` Paul Barker
@ 2019-05-29  1:20             ` Kang Kai
  0 siblings, 0 replies; 10+ messages in thread
From: Kang Kai @ 2019-05-29  1:20 UTC (permalink / raw)
  To: Paul Barker, Peter Kjellerstedt, Khem Raj; +Cc: openembedded-core

On 2019/5/28 下午5:28, Paul Barker wrote:
>
>
> 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@gmail.com>
>>>> Sent: den 23 maj 2019 22:59
>>>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>>>> Cc: kai.kang@windriver.com; 
>>>> openembedded-core@lists.openembedded.org; 
>>>> richard.purdie@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@axis.com> wrote:
>>>>> -----Original Message-----
>>>>> From: mailto:openembedded-core-bounces@lists.openembedded.org 
>>>>> <openembedded-
>>>>> mailto:core-bounces@lists.openembedded.org> On Behalf Of
>>>>> mailto:kai.kang@windriver.com
>>>>> Sent: den 23 maj 2019 10:26
>>>>> To: mailto:richard.purdie@linuxfoundation.org
>>>>> Cc: mailto:openembedded-core@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@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.

OK. I'll move them to poky.conf.

Thanks.

Kai


>
> Thanks,
>

-- 
Kai Kang



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

end of thread, other threads:[~2019-05-29  1:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23  8:25 [PATCH v3 0/2] Make systemd as default init manager and configure wired network kai.kang
2019-05-23  8:25 ` [PATCH v3 1/2] local.conf.sample: make systemd as default init manager kai.kang
2019-05-23 20:40   ` Peter Kjellerstedt
2019-05-23 20:59     ` Khem Raj
2019-05-24 19:23       ` Peter Kjellerstedt
2019-05-24 19:44         ` Khem Raj
2019-05-27  1:49         ` Kang Kai
2019-05-28  9:28           ` Paul Barker
2019-05-29  1:20             ` Kang Kai
2019-05-23  8:25 ` [PATCH v3 2/2] systemd-conf: configure wired network with dhcp kai.kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.