Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-22 Thread Alexandre Belloni via lists.openembedded.org
On 22/01/2024 16:15:41+0800, ChenQi wrote:
> On 1/22/24 16:04, Alexandre Belloni wrote:
> > On 22/01/2024 12:38:15+0800, ChenQi wrote:
> > > On 1/20/24 02:14, Alexandre Belloni wrote:
> > > > On 19/01/2024 19:13:25+0100, Alexandre Belloni wrote:
> > > > > On 19/01/2024 11:09:20+0800, Chen Qi via lists.openembedded.org wrote:
> > > > > > What's the status of this patch series?
> > > > > > Is there any issue or concern that I missed?
> > > > > I'm glad you asked, I got this today:
> > > > > 
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466/steps/26/logs/warnings
> > > > and I know you sent a patch for this but it didn't make it yet.
> > > I just double checked with the following settings from the "Sysvinit with
> > > systemd" entry in config.json, there's no warning.
> > > 
> > > DISTRO_FEATURES:append = ' systemd usrmerge'
> > > ROOT_HOME = '/root'
> > > VIRTUAL-RUNTIME_init_manager = 'sysvinit'
> > > 
> > > So I further checked the build's settings.
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466
> > > 
> > > In the second step, "Fetch yocto-autobuilder-helper", I can see the
> > > following logs:
> > > 
> > > HEAD is now at ebb7e65 config.json: Fix syntax errors
> > > 
> > > So the build is not using the latest repo. The latest commit is:
> > This is not correct, it was using the latest commit at the time, the
> > patch was applied after my email.
> > 
> > 
> OK... Do you mean that the warning appeared in autobuilder, and then you
> applied the patch to yocto-autobuilder-helper to make the warning disappear?
> I thought you meant that the warning continued to exist even with the patch.
> 
> To clarify, we can now wait for autobuiler's results and I don't need to do
> anything more, right?

I confirm, no action is needed on your side.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194122): 
https://lists.openembedded.org/g/openembedded-core/message/194122
Mute This Topic: https://lists.openembedded.org/mt/103380516/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-22 Thread Chen Qi via lists.openembedded.org

On 1/22/24 16:04, Alexandre Belloni wrote:

On 22/01/2024 12:38:15+0800, ChenQi wrote:

On 1/20/24 02:14, Alexandre Belloni wrote:

On 19/01/2024 19:13:25+0100, Alexandre Belloni wrote:

On 19/01/2024 11:09:20+0800, Chen Qi via lists.openembedded.org wrote:

What's the status of this patch series?
Is there any issue or concern that I missed?

I'm glad you asked, I got this today:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466/steps/26/logs/warnings

and I know you sent a patch for this but it didn't make it yet.

I just double checked with the following settings from the "Sysvinit with
systemd" entry in config.json, there's no warning.

DISTRO_FEATURES:append = ' systemd usrmerge'
ROOT_HOME = '/root'
VIRTUAL-RUNTIME_init_manager = 'sysvinit'

So I further checked the build's settings.
https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466

In the second step, "Fetch yocto-autobuilder-helper", I can see the
following logs:

HEAD is now at ebb7e65 config.json: Fix syntax errors

So the build is not using the latest repo. The latest commit is:

This is not correct, it was using the latest commit at the time, the
patch was applied after my email.


OK... Do you mean that the warning appeared in autobuilder, and then you 
applied the patch to yocto-autobuilder-helper to make the warning 
disappear? I thought you meant that the warning continued to exist even 
with the patch.


To clarify, we can now wait for autobuiler's results and I don't need to 
do anything more, right?


Regards,

Qi


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194121): 
https://lists.openembedded.org/g/openembedded-core/message/194121
Mute This Topic: https://lists.openembedded.org/mt/103380516/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-22 Thread Alexandre Belloni via lists.openembedded.org
On 22/01/2024 12:38:15+0800, ChenQi wrote:
> On 1/20/24 02:14, Alexandre Belloni wrote:
> > On 19/01/2024 19:13:25+0100, Alexandre Belloni wrote:
> > > On 19/01/2024 11:09:20+0800, Chen Qi via lists.openembedded.org wrote:
> > > > What's the status of this patch series?
> > > > Is there any issue or concern that I missed?
> > > I'm glad you asked, I got this today:
> > > 
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466/steps/26/logs/warnings
> > and I know you sent a patch for this but it didn't make it yet.
> 
> I just double checked with the following settings from the "Sysvinit with
> systemd" entry in config.json, there's no warning.
> 
> DISTRO_FEATURES:append = ' systemd usrmerge'
> ROOT_HOME = '/root'
> VIRTUAL-RUNTIME_init_manager = 'sysvinit'
> 
> So I further checked the build's settings.
> https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466
> 
> In the second step, "Fetch yocto-autobuilder-helper", I can see the
> following logs:
> 
> HEAD is now at ebb7e65 config.json: Fix syntax errors
> 
> So the build is not using the latest repo. The latest commit is:

This is not correct, it was using the latest commit at the time, the
patch was applied after my email.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194120): 
https://lists.openembedded.org/g/openembedded-core/message/194120
Mute This Topic: https://lists.openembedded.org/mt/103380516/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-21 Thread Chen Qi via lists.openembedded.org

On 1/20/24 02:14, Alexandre Belloni wrote:

On 19/01/2024 19:13:25+0100, Alexandre Belloni wrote:

On 19/01/2024 11:09:20+0800, Chen Qi via lists.openembedded.org wrote:

What's the status of this patch series?
Is there any issue or concern that I missed?

I'm glad you asked, I got this today:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466/steps/26/logs/warnings

and I know you sent a patch for this but it didn't make it yet.


I just double checked with the following settings from the "Sysvinit 
with systemd" entry in config.json, there's no warning.


DISTRO_FEATURES:append = ' systemd usrmerge'
ROOT_HOME = '/root'
VIRTUAL-RUNTIME_init_manager = 'sysvinit'

So I further checked the build's settings. 
https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466


In the second step, "Fetch yocto-autobuilder-helper", I can see the 
following logs:


HEAD is now at ebb7e65 config.json: Fix syntax errors

So the build is not using the latest repo. The latest commit is:

97bb07f (HEAD -> master, origin/master, origin/HEAD) config.json: set 
ROOT_HOME to /root for sysvinit with systemd


Regards,

Qi





Regards,
Qi

On 12/27/23 12:20, Chen Qi via lists.openembedded.org wrote:

From: Chen Qi

1. Patch changes:

0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
is removed because it has no real effect now. The /lib is now
/usr/lib because 'usrmerge' is a required distro feature for systemd.

0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
refreshed for the new version to avoid patch-fuzz issue.

2. root user's home directory now defaults to "/root":

The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
value, so if users set ROOT_HOME to "/home/root", the behavior is the
same as before. However, this is only for backward compatibility. With
this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
This is because systemd's source codes are hardcoding "/root", and other
values are not officially supported. See the list below.
$ grep -rl '"/root"' src/ | grep -v 'src/test'
src/core/namespace.c
src/basic/user-util.c
src/nss-systemd/nss-systemd.c
src/nspawn/nspawn.c
src/firstboot/firstboot.c
src/shared/userdb.c
src/shared/user-record.c
$ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ tmpfiles.d/ 
units/ xorg/ tools/
sysusers.d/basic.conf.in
tmpfiles.d/provision.conf
units/emergency.service.in
units/rescue.service.in
tools/list-discoverable-partitions.py
Previously, the recipe was just substituting sysusers.d/basic.conf.in,
which is not enough to be treated as 'fully support'. I deliberately put
a warning message in do_install to warn users about non "/root" ROOT_HOME
value. Don't remove it until all above places are handled.

3. cgroupv2 is now the default.
cgroupv2 is the default for systemd for many years and it's the default
for distros such as ubuntu and fedora. Let's also use it as the default.

Signed-off-by: Chen Qi
---
   .../distro/include/init-manager-systemd.inc   |  2 +
   meta/recipes-core/systemd/systemd.inc |  4 +-
   ...tall-dependency-links-at-install-tim.patch | 22 +++---
   ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
   .../systemd/systemd/basic.conf.in | 40 --
   .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
   6 files changed, 25 insertions(+), 132 deletions(-)
   delete mode 100644 
meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
   delete mode 100644 meta/recipes-core/systemd/systemd/basic.conf.in
   rename meta/recipes-core/systemd/{systemd_254.4.bb => systemd_255.1.bb} (98%)

diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
b/meta/conf/distro/include/init-manager-systemd.inc
index 595d1f2644..0a76647459 100644
--- a/meta/conf/distro/include/init-manager-systemd.inc
+++ b/meta/conf/distro/include/init-manager-systemd.inc
@@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
   VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
   VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
   VIRTUAL-RUNTIME_dev_manager ??= "systemd"
+# systemd hardcodes /root in its source codes, other values are not offically 
supported
+ROOT_HOME ?= "/root"
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index ccc3236457..1417e0150f 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
   LIC_FILES_CHKSUM ="file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"

-SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51"
-SRCBRANCH = "v254-stable"
+SRCREV = "2018ccef6645ce00c784369a22dc4e98f6d7061d"
+SRCBRANCH = "v255-stable"
   SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
   S = "${WORKDIR}/git"
diff --git 
a/meta/

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-19 Thread Alexandre Belloni via lists.openembedded.org
On 19/01/2024 19:13:25+0100, Alexandre Belloni wrote:
> On 19/01/2024 11:09:20+0800, Chen Qi via lists.openembedded.org wrote:
> > What's the status of this patch series?
> > Is there any issue or concern that I missed?
> 
> I'm glad you asked, I got this today:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466/steps/26/logs/warnings

and I know you sent a patch for this but it didn't make it yet.

> 
> > 
> > Regards,
> > Qi
> > 
> > On 12/27/23 12:20, Chen Qi via lists.openembedded.org wrote:
> > > From: Chen Qi 
> > > 
> > > 1. Patch changes:
> > > 
> > > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > > is removed because it has no real effect now. The /lib is now
> > > /usr/lib because 'usrmerge' is a required distro feature for systemd.
> > > 
> > > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
> > > refreshed for the new version to avoid patch-fuzz issue.
> > > 
> > > 2. root user's home directory now defaults to "/root":
> > > 
> > > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
> > > value, so if users set ROOT_HOME to "/home/root", the behavior is the
> > > same as before. However, this is only for backward compatibility. With
> > > this patch, The ROOT_HOME value is set to "/root" in 
> > > init-manager-systemd.inc.
> > > This is because systemd's source codes are hardcoding "/root", and other
> > > values are not officially supported. See the list below.
> > > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > > src/core/namespace.c
> > > src/basic/user-util.c
> > > src/nss-systemd/nss-systemd.c
> > > src/nspawn/nspawn.c
> > > src/firstboot/firstboot.c
> > > src/shared/userdb.c
> > > src/shared/user-record.c
> > > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> > > tmpfiles.d/ units/ xorg/ tools/
> > > sysusers.d/basic.conf.in
> > > tmpfiles.d/provision.conf
> > > units/emergency.service.in
> > > units/rescue.service.in
> > > tools/list-discoverable-partitions.py
> > > Previously, the recipe was just substituting sysusers.d/basic.conf.in,
> > > which is not enough to be treated as 'fully support'. I deliberately put
> > > a warning message in do_install to warn users about non "/root" ROOT_HOME
> > > value. Don't remove it until all above places are handled.
> > > 
> > > 3. cgroupv2 is now the default.
> > > cgroupv2 is the default for systemd for many years and it's the default
> > > for distros such as ubuntu and fedora. Let's also use it as the default.
> > > 
> > > Signed-off-by: Chen Qi 
> > > ---
> > >   .../distro/include/init-manager-systemd.inc   |  2 +
> > >   meta/recipes-core/systemd/systemd.inc |  4 +-
> > >   ...tall-dependency-links-at-install-tim.patch | 22 +++---
> > >   ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
> > >   .../systemd/systemd/basic.conf.in | 40 --
> > >   .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
> > >   6 files changed, 25 insertions(+), 132 deletions(-)
> > >   delete mode 100644 
> > > meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > >   delete mode 100644 meta/recipes-core/systemd/systemd/basic.conf.in
> > >   rename meta/recipes-core/systemd/{systemd_254.4.bb => systemd_255.1.bb} 
> > > (98%)
> > > 
> > > diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
> > > b/meta/conf/distro/include/init-manager-systemd.inc
> > > index 595d1f2644..0a76647459 100644
> > > --- a/meta/conf/distro/include/init-manager-systemd.inc
> > > +++ b/meta/conf/distro/include/init-manager-systemd.inc
> > > @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
> > >   VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
> > >   VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
> > >   VIRTUAL-RUNTIME_dev_manager ??= "systemd"
> > > +# systemd hardcodes /root in its source codes, other values are not 
> > > offically supported
> > > +ROOT_HOME ?= "/root"
> > > diff --git a/meta/recipes-core/systemd/systemd.inc 
> > > b/meta/recipes-core/systemd/systemd.inc
> > > index ccc3236457..1417e0150f 100644
> > > --- a/meta/recipes-core/systemd/systemd.inc
> > > +++ b/meta/recipes-core/systemd/systemd.inc
> > > @@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
> > >   LIC_FILES_CHKSUM = 
> > > "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
> > >   
> > > file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
> > > -SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51"
> > > -SRCBRANCH = "v254-stable"
> > > +SRCREV = "2018ccef6645ce00c784369a22dc4e98f6d7061d"
> > > +SRCBRANCH = "v255-stable"
> > >   SRC_URI = 
> > > "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
> > >   S = "${WORKDIR}/git"
> > > diff --git 
> > > a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > >  
> > > b/meta/recipes-core/systemd/systemd/0002-binfm

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-19 Thread Alexandre Belloni via lists.openembedded.org
On 19/01/2024 11:09:20+0800, Chen Qi via lists.openembedded.org wrote:
> What's the status of this patch series?
> Is there any issue or concern that I missed?

I'm glad you asked, I got this today:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8466/steps/26/logs/warnings

> 
> Regards,
> Qi
> 
> On 12/27/23 12:20, Chen Qi via lists.openembedded.org wrote:
> > From: Chen Qi 
> > 
> > 1. Patch changes:
> > 
> > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > is removed because it has no real effect now. The /lib is now
> > /usr/lib because 'usrmerge' is a required distro feature for systemd.
> > 
> > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
> > refreshed for the new version to avoid patch-fuzz issue.
> > 
> > 2. root user's home directory now defaults to "/root":
> > 
> > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
> > value, so if users set ROOT_HOME to "/home/root", the behavior is the
> > same as before. However, this is only for backward compatibility. With
> > this patch, The ROOT_HOME value is set to "/root" in 
> > init-manager-systemd.inc.
> > This is because systemd's source codes are hardcoding "/root", and other
> > values are not officially supported. See the list below.
> > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > src/core/namespace.c
> > src/basic/user-util.c
> > src/nss-systemd/nss-systemd.c
> > src/nspawn/nspawn.c
> > src/firstboot/firstboot.c
> > src/shared/userdb.c
> > src/shared/user-record.c
> > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> > tmpfiles.d/ units/ xorg/ tools/
> > sysusers.d/basic.conf.in
> > tmpfiles.d/provision.conf
> > units/emergency.service.in
> > units/rescue.service.in
> > tools/list-discoverable-partitions.py
> > Previously, the recipe was just substituting sysusers.d/basic.conf.in,
> > which is not enough to be treated as 'fully support'. I deliberately put
> > a warning message in do_install to warn users about non "/root" ROOT_HOME
> > value. Don't remove it until all above places are handled.
> > 
> > 3. cgroupv2 is now the default.
> > cgroupv2 is the default for systemd for many years and it's the default
> > for distros such as ubuntu and fedora. Let's also use it as the default.
> > 
> > Signed-off-by: Chen Qi 
> > ---
> >   .../distro/include/init-manager-systemd.inc   |  2 +
> >   meta/recipes-core/systemd/systemd.inc |  4 +-
> >   ...tall-dependency-links-at-install-tim.patch | 22 +++---
> >   ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
> >   .../systemd/systemd/basic.conf.in | 40 --
> >   .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
> >   6 files changed, 25 insertions(+), 132 deletions(-)
> >   delete mode 100644 
> > meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> >   delete mode 100644 meta/recipes-core/systemd/systemd/basic.conf.in
> >   rename meta/recipes-core/systemd/{systemd_254.4.bb => systemd_255.1.bb} 
> > (98%)
> > 
> > diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
> > b/meta/conf/distro/include/init-manager-systemd.inc
> > index 595d1f2644..0a76647459 100644
> > --- a/meta/conf/distro/include/init-manager-systemd.inc
> > +++ b/meta/conf/distro/include/init-manager-systemd.inc
> > @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
> >   VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
> >   VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
> >   VIRTUAL-RUNTIME_dev_manager ??= "systemd"
> > +# systemd hardcodes /root in its source codes, other values are not 
> > offically supported
> > +ROOT_HOME ?= "/root"
> > diff --git a/meta/recipes-core/systemd/systemd.inc 
> > b/meta/recipes-core/systemd/systemd.inc
> > index ccc3236457..1417e0150f 100644
> > --- a/meta/recipes-core/systemd/systemd.inc
> > +++ b/meta/recipes-core/systemd/systemd.inc
> > @@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
> >   LIC_FILES_CHKSUM = 
> > "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
> >   
> > file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
> > -SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51"
> > -SRCBRANCH = "v254-stable"
> > +SRCREV = "2018ccef6645ce00c784369a22dc4e98f6d7061d"
> > +SRCBRANCH = "v255-stable"
> >   SRC_URI = 
> > "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
> >   S = "${WORKDIR}/git"
> > diff --git 
> > a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> >  
> > b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > index 085f1e9052..be231cf6b2 100644
> > --- 
> > a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > +++ 
> > b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > @@ -1,

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-18 Thread Chen Qi via lists.openembedded.org

What's the status of this patch series?
Is there any issue or concern that I missed?

Regards,
Qi

On 12/27/23 12:20, Chen Qi via lists.openembedded.org wrote:

From: Chen Qi 

1. Patch changes:

0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
is removed because it has no real effect now. The /lib is now
/usr/lib because 'usrmerge' is a required distro feature for systemd.

0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
refreshed for the new version to avoid patch-fuzz issue.

2. root user's home directory now defaults to "/root":

The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
value, so if users set ROOT_HOME to "/home/root", the behavior is the
same as before. However, this is only for backward compatibility. With
this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
This is because systemd's source codes are hardcoding "/root", and other
values are not officially supported. See the list below.
$ grep -rl '"/root"' src/ | grep -v 'src/test'
src/core/namespace.c
src/basic/user-util.c
src/nss-systemd/nss-systemd.c
src/nspawn/nspawn.c
src/firstboot/firstboot.c
src/shared/userdb.c
src/shared/user-record.c
$ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ tmpfiles.d/ 
units/ xorg/ tools/
sysusers.d/basic.conf.in
tmpfiles.d/provision.conf
units/emergency.service.in
units/rescue.service.in
tools/list-discoverable-partitions.py
Previously, the recipe was just substituting sysusers.d/basic.conf.in,
which is not enough to be treated as 'fully support'. I deliberately put
a warning message in do_install to warn users about non "/root" ROOT_HOME
value. Don't remove it until all above places are handled.

3. cgroupv2 is now the default.
cgroupv2 is the default for systemd for many years and it's the default
for distros such as ubuntu and fedora. Let's also use it as the default.

Signed-off-by: Chen Qi 
---
  .../distro/include/init-manager-systemd.inc   |  2 +
  meta/recipes-core/systemd/systemd.inc |  4 +-
  ...tall-dependency-links-at-install-tim.patch | 22 +++---
  ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
  .../systemd/systemd/basic.conf.in | 40 --
  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
  6 files changed, 25 insertions(+), 132 deletions(-)
  delete mode 100644 
meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
  delete mode 100644 meta/recipes-core/systemd/systemd/basic.conf.in
  rename meta/recipes-core/systemd/{systemd_254.4.bb => systemd_255.1.bb} (98%)

diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
b/meta/conf/distro/include/init-manager-systemd.inc
index 595d1f2644..0a76647459 100644
--- a/meta/conf/distro/include/init-manager-systemd.inc
+++ b/meta/conf/distro/include/init-manager-systemd.inc
@@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
  VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
  VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
  VIRTUAL-RUNTIME_dev_manager ??= "systemd"
+# systemd hardcodes /root in its source codes, other values are not offically 
supported
+ROOT_HOME ?= "/root"
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index ccc3236457..1417e0150f 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
  LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
  
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
  
-SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51"

-SRCBRANCH = "v254-stable"
+SRCREV = "2018ccef6645ce00c784369a22dc4e98f6d7061d"
+SRCBRANCH = "v255-stable"
  SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
  
  S = "${WORKDIR}/git"

diff --git 
a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
 
b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 085f1e9052..be231cf6b2 100644
--- 
a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ 
b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -1,8 +1,8 @@
-From ca7d9a8d9c81702af9c599bb79706f12b1a465cf Mon Sep 17 00:00:00 2001
+From 29a58009a172e369ad7166e16dab2f4945c6b0d2 Mon Sep 17 00:00:00 2001
  From: Chen Qi 
  Date: Thu, 21 Feb 2019 16:23:24 +0800
-Subject: [PATCH] binfmt: Don't install dependency links at install time for
- the binfmt services
+Subject: [PATCH 1/2] binfmt: Don't install dependency links at install time
+ for the binfmt services
  
  use [Install] blocks so that they get created when the service is enabled

  like a traditional service.
@@ -25,10 +25,10 @@ Signed-off-by: Scott Murray 
   3 files changed, 7 insertions(

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-09 Thread Chen Qi via lists.openembedded.org
I just sent out a patch for the yocto-autobuilder-helper repo to use '/root' as 
the ROOT_HOME's value in case of 'sysvinit with systemd'.

Regards,
Qi

-Original Message-
From: Alexandre Belloni  
Sent: Tuesday, January 9, 2024 3:47 PM
To: Chen, Qi 
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

I got this today:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8420/steps/25/logs/stdio

WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
directory is not fully supported by systemd

On 07/01/2024 14:05:35+, Chen Qi via lists.openembedded.org wrote:
> Another patch in this series fixes the warning:
> rootfs-postcommands.bbclass: ignore comment mismatch in 
> systemd_user_check
> 
> Is that patch also staged?
> 
> Regards,
> Qi
> 
> -Original Message-
> From: Alexandre Belloni 
> Sent: Saturday, January 6, 2024 12:02 AM
> To: Chen, Qi 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1
> 
> Hello,
> 
> This fails with:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/106/builds/736
> 1/steps/12/logs/warnings
> 
> WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User root has been 
> defined as (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects 
> it as (root, 0, 0, Super User, /root, -)
> WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User nobody has 
> been defined as (nobody, 65534, 65534, nobody, /nonexistent, 
> /usr/sbin/nologin) but sysusers.d expects it as (nobody, 65534, 65534, 
> Kernel Overflow User, -, -)
> WARNING: core-image-sato-1.0-r0 do_rootfs: User root has been defined 
> as (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as 
> (root, 0, 0, Super User, /root, -)
> WARNING: core-image-sato-1.0-r0 do_rootfs: User nobody has been 
> defined as (nobody, 65534, 65534, nobody, /nonexistent, 
> /usr/sbin/nologin) but sysusers.d expects it as (nobody, 65534, 65534, 
> Kernel Overflow User, -, -)
> WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User root has been 
> defined as (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects 
> it as (root, 0, 0, Super User, /root, -)
> WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User nobody has been 
> defined as (nobody, 65534, 65534, nobody, /nonexistent, 
> /usr/sbin/nologin) but sysusers.d expects it as (nobody, 65534, 65534, 
> Kernel Overflow User, -, -)
> 
> On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> > From: Chen Qi 
> > 
> > 1. Patch changes:
> > 
> > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > is removed because it has no real effect now. The /lib is now 
> > /usr/lib because 'usrmerge' is a required distro feature for systemd.
> > 
> > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is 
> > refreshed for the new version to avoid patch-fuzz issue.
> > 
> > 2. root user's home directory now defaults to "/root":
> > 
> > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME 
> > value, so if users set ROOT_HOME to "/home/root", the behavior is 
> > the same as before. However, this is only for backward 
> > compatibility. With this patch, The ROOT_HOME value is set to "/root" in 
> > init-manager-systemd.inc.
> > This is because systemd's source codes are hardcoding "/root", and 
> > other values are not officially supported. See the list below.
> > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > src/core/namespace.c
> > src/basic/user-util.c
> > src/nss-systemd/nss-systemd.c
> > src/nspawn/nspawn.c
> > src/firstboot/firstboot.c
> > src/shared/userdb.c
> > src/shared/user-record.c
> > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> > tmpfiles.d/ units/ xorg/ tools/ sysusers.d/basic.conf.in 
> > tmpfiles.d/provision.conf units/emergency.service.in 
> > units/rescue.service.in tools/list-discoverable-partitions.py
> > Previously, the recipe was just substituting 
> > sysusers.d/basic.conf.in, which is not enough to be treated as 
> > 'fully support'. I deliberately put a warning message in do_install to warn 
> > users about non "/root"
> > ROOT_HOME value. Don't remove it until all above places are handled.
> > 
> > 3. cgroupv2 is now the default.
> > cgroupv2 is the default for systemd for many years and it's the 
> > default for distros such as ubuntu and fedora. Let's also use it as the 
&

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-08 Thread Alexandre Belloni via lists.openembedded.org
I got this today:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/8420/steps/25/logs/stdio

WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
directory is not fully supported by systemd

On 07/01/2024 14:05:35+, Chen Qi via lists.openembedded.org wrote:
> Another patch in this series fixes the warning:
> rootfs-postcommands.bbclass: ignore comment mismatch in systemd_user_check
> 
> Is that patch also staged?
> 
> Regards,
> Qi
> 
> -Original Message-
> From: Alexandre Belloni  
> Sent: Saturday, January 6, 2024 12:02 AM
> To: Chen, Qi 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1
> 
> Hello,
> 
> This fails with:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/106/builds/7361/steps/12/logs/warnings
> 
> WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User root has been defined 
> as (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 
> 0, Super User, /root, -)
> WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User nobody has been 
> defined as (nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) 
> but sysusers.d expects it as (nobody, 65534, 65534, Kernel Overflow User, -, 
> -)
> WARNING: core-image-sato-1.0-r0 do_rootfs: User root has been defined as 
> (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, 
> Super User, /root, -)
> WARNING: core-image-sato-1.0-r0 do_rootfs: User nobody has been defined as 
> (nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but 
> sysusers.d expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)
> WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User root has been defined as 
> (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, 
> Super User, /root, -)
> WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User nobody has been defined 
> as (nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but 
> sysusers.d expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)
> 
> On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> > From: Chen Qi 
> > 
> > 1. Patch changes:
> > 
> > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > is removed because it has no real effect now. The /lib is now /usr/lib 
> > because 'usrmerge' is a required distro feature for systemd.
> > 
> > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is 
> > refreshed for the new version to avoid patch-fuzz issue.
> > 
> > 2. root user's home directory now defaults to "/root":
> > 
> > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME 
> > value, so if users set ROOT_HOME to "/home/root", the behavior is the 
> > same as before. However, this is only for backward compatibility. With 
> > this patch, The ROOT_HOME value is set to "/root" in 
> > init-manager-systemd.inc.
> > This is because systemd's source codes are hardcoding "/root", and 
> > other values are not officially supported. See the list below.
> > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > src/core/namespace.c
> > src/basic/user-util.c
> > src/nss-systemd/nss-systemd.c
> > src/nspawn/nspawn.c
> > src/firstboot/firstboot.c
> > src/shared/userdb.c
> > src/shared/user-record.c
> > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> > tmpfiles.d/ units/ xorg/ tools/ sysusers.d/basic.conf.in 
> > tmpfiles.d/provision.conf units/emergency.service.in 
> > units/rescue.service.in tools/list-discoverable-partitions.py
> > Previously, the recipe was just substituting sysusers.d/basic.conf.in, 
> > which is not enough to be treated as 'fully support'. I deliberately 
> > put a warning message in do_install to warn users about non "/root" 
> > ROOT_HOME value. Don't remove it until all above places are handled.
> > 
> > 3. cgroupv2 is now the default.
> > cgroupv2 is the default for systemd for many years and it's the 
> > default for distros such as ubuntu and fedora. Let's also use it as the 
> > default.
> > 
> > Signed-off-by: Chen Qi 
> > ---
> >  .../distro/include/init-manager-systemd.inc   |  2 +
> >  meta/recipes-core/systemd/systemd.inc |  4 +-
> >  ...tall-dependency-links-at-install-tim.patch | 22 +++---  
> > ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
> >  .../systemd/systemd/basic.conf.in | 40 -

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-07 Thread Chen Qi via lists.openembedded.org
Another patch in this series fixes the warning:
rootfs-postcommands.bbclass: ignore comment mismatch in systemd_user_check

Is that patch also staged?

Regards,
Qi

-Original Message-
From: Alexandre Belloni  
Sent: Saturday, January 6, 2024 12:02 AM
To: Chen, Qi 
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

Hello,

This fails with:

https://autobuilder.yoctoproject.org/typhoon/#/builders/106/builds/7361/steps/12/logs/warnings

WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User root has been defined 
as (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, 
Super User, /root, -)
WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User nobody has been defined 
as (nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but 
sysusers.d expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)
WARNING: core-image-sato-1.0-r0 do_rootfs: User root has been defined as (root, 
0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, Super 
User, /root, -)
WARNING: core-image-sato-1.0-r0 do_rootfs: User nobody has been defined as 
(nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but sysusers.d 
expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)
WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User root has been defined as 
(root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, 
Super User, /root, -)
WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User nobody has been defined as 
(nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but sysusers.d 
expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)

On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> From: Chen Qi 
> 
> 1. Patch changes:
> 
> 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> is removed because it has no real effect now. The /lib is now /usr/lib 
> because 'usrmerge' is a required distro feature for systemd.
> 
> 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is 
> refreshed for the new version to avoid patch-fuzz issue.
> 
> 2. root user's home directory now defaults to "/root":
> 
> The sysuers.d/basic.conf is still modified to respect the ROOT_HOME 
> value, so if users set ROOT_HOME to "/home/root", the behavior is the 
> same as before. However, this is only for backward compatibility. With 
> this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
> This is because systemd's source codes are hardcoding "/root", and 
> other values are not officially supported. See the list below.
> $ grep -rl '"/root"' src/ | grep -v 'src/test'
> src/core/namespace.c
> src/basic/user-util.c
> src/nss-systemd/nss-systemd.c
> src/nspawn/nspawn.c
> src/firstboot/firstboot.c
> src/shared/userdb.c
> src/shared/user-record.c
> $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> tmpfiles.d/ units/ xorg/ tools/ sysusers.d/basic.conf.in 
> tmpfiles.d/provision.conf units/emergency.service.in 
> units/rescue.service.in tools/list-discoverable-partitions.py
> Previously, the recipe was just substituting sysusers.d/basic.conf.in, 
> which is not enough to be treated as 'fully support'. I deliberately 
> put a warning message in do_install to warn users about non "/root" 
> ROOT_HOME value. Don't remove it until all above places are handled.
> 
> 3. cgroupv2 is now the default.
> cgroupv2 is the default for systemd for many years and it's the 
> default for distros such as ubuntu and fedora. Let's also use it as the 
> default.
> 
> Signed-off-by: Chen Qi 
> ---
>  .../distro/include/init-manager-systemd.inc   |  2 +
>  meta/recipes-core/systemd/systemd.inc |  4 +-
>  ...tall-dependency-links-at-install-tim.patch | 22 +++---  
> ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
>  .../systemd/systemd/basic.conf.in | 40 --
>  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
>  6 files changed, 25 insertions(+), 132 deletions(-)  delete mode 
> 100644 
> meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt
> .d-modules-load.d-to-.patch  delete mode 100644 
> meta/recipes-core/systemd/systemd/basic.conf.in
>  rename meta/recipes-core/systemd/{systemd_254.4.bb => 
> systemd_255.1.bb} (98%)
> 
> diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
> b/meta/conf/distro/include/init-manager-systemd.inc
> index 595d1f2644..0a76647459 100644
> --- a/meta/conf/distro/include/init-manager-systemd.inc
> +++ b/meta/conf/distro/include/init-manager-systemd.inc
> @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_mana

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2024-01-05 Thread Alexandre Belloni via lists.openembedded.org
Hello,

This fails with:

https://autobuilder.yoctoproject.org/typhoon/#/builders/106/builds/7361/steps/12/logs/warnings

WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User root has been defined 
as (root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, 
Super User, /root, -)
WARNING: core-image-full-cmdline-1.0-r0 do_rootfs: User nobody has been defined 
as (nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but 
sysusers.d expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)
WARNING: core-image-sato-1.0-r0 do_rootfs: User root has been defined as (root, 
0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, Super 
User, /root, -)
WARNING: core-image-sato-1.0-r0 do_rootfs: User nobody has been defined as 
(nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but sysusers.d 
expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)
WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User root has been defined as 
(root, 0, 0, root, /root, /bin/sh) but sysusers.d expects it as (root, 0, 0, 
Super User, /root, -)
WARNING: core-image-sato-sdk-1.0-r0 do_rootfs: User nobody has been defined as 
(nobody, 65534, 65534, nobody, /nonexistent, /usr/sbin/nologin) but sysusers.d 
expects it as (nobody, 65534, 65534, Kernel Overflow User, -, -)

On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> From: Chen Qi 
> 
> 1. Patch changes:
> 
> 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> is removed because it has no real effect now. The /lib is now
> /usr/lib because 'usrmerge' is a required distro feature for systemd.
> 
> 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
> refreshed for the new version to avoid patch-fuzz issue.
> 
> 2. root user's home directory now defaults to "/root":
> 
> The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
> value, so if users set ROOT_HOME to "/home/root", the behavior is the
> same as before. However, this is only for backward compatibility. With
> this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
> This is because systemd's source codes are hardcoding "/root", and other
> values are not officially supported. See the list below.
> $ grep -rl '"/root"' src/ | grep -v 'src/test'
> src/core/namespace.c
> src/basic/user-util.c
> src/nss-systemd/nss-systemd.c
> src/nspawn/nspawn.c
> src/firstboot/firstboot.c
> src/shared/userdb.c
> src/shared/user-record.c
> $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ tmpfiles.d/ 
> units/ xorg/ tools/
> sysusers.d/basic.conf.in
> tmpfiles.d/provision.conf
> units/emergency.service.in
> units/rescue.service.in
> tools/list-discoverable-partitions.py
> Previously, the recipe was just substituting sysusers.d/basic.conf.in,
> which is not enough to be treated as 'fully support'. I deliberately put
> a warning message in do_install to warn users about non "/root" ROOT_HOME
> value. Don't remove it until all above places are handled.
> 
> 3. cgroupv2 is now the default.
> cgroupv2 is the default for systemd for many years and it's the default
> for distros such as ubuntu and fedora. Let's also use it as the default.
> 
> Signed-off-by: Chen Qi 
> ---
>  .../distro/include/init-manager-systemd.inc   |  2 +
>  meta/recipes-core/systemd/systemd.inc |  4 +-
>  ...tall-dependency-links-at-install-tim.patch | 22 +++---
>  ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
>  .../systemd/systemd/basic.conf.in | 40 --
>  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
>  6 files changed, 25 insertions(+), 132 deletions(-)
>  delete mode 100644 
> meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
>  delete mode 100644 meta/recipes-core/systemd/systemd/basic.conf.in
>  rename meta/recipes-core/systemd/{systemd_254.4.bb => systemd_255.1.bb} (98%)
> 
> diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
> b/meta/conf/distro/include/init-manager-systemd.inc
> index 595d1f2644..0a76647459 100644
> --- a/meta/conf/distro/include/init-manager-systemd.inc
> +++ b/meta/conf/distro/include/init-manager-systemd.inc
> @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
>  VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
>  VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
>  VIRTUAL-RUNTIME_dev_manager ??= "systemd"
> +# systemd hardcodes /root in its source codes, other values are not 
> offically supported
> +ROOT_HOME ?= "/root"
> diff --git a/meta/recipes-core/systemd/systemd.inc 
> b/meta/recipes-core/systemd/systemd.inc
> index ccc3236457..1417e0150f 100644
> --- a/meta/recipes-core/systemd/systemd.inc
> +++ b/meta/recipes-core/systemd/systemd.inc
> @@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
>  LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe 
> \
>  
> file://LICENSE.LGPL2.1;md5=4fbd6

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-29 Thread Chen Qi via lists.openembedded.org
OK, I'll do it after New Year's Day.

Regards,
Qi


-Original Message-
From: Alexander Kanavin  
Sent: Friday, December 29, 2023 4:04 PM
To: Chen, Qi 
Cc: Alexandre Belloni ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

On Fri, 29 Dec 2023 at 03:38, Chen Qi via lists.openembedded.org 
 wrote:
> > TEST_SUITES:append = ' systemd'
> > DISTRO_FEATURES:append = ' pam systemd usrmerge'
> > VIRTUAL-RUNTIME_init_manager = 'systemd'
> > DISTRO_FEATURES_BACKFILL_CONSIDERED = 'sysvinit'
>
> OK, I see.
>
> I'd suggest replacing the above 4 lines with a single line:
>
> INIT_MANAGER = "systemd"
>
> The INIT_MANAGER mechanism was added to make switching init managers easier.

I agree. The 4 lines are defined in two places here:
https://git.yoctoproject.org/yocto-autobuilder-helper/tree/config.json

Can you send a patch to replace them with INIT_MANAGER?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193002): 
https://lists.openembedded.org/g/openembedded-core/message/193002
Mute This Topic: https://lists.openembedded.org/mt/103380516/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-29 Thread Alexander Kanavin
On Fri, 29 Dec 2023 at 03:38, Chen Qi via lists.openembedded.org
 wrote:
> > TEST_SUITES:append = ' systemd'
> > DISTRO_FEATURES:append = ' pam systemd usrmerge'
> > VIRTUAL-RUNTIME_init_manager = 'systemd'
> > DISTRO_FEATURES_BACKFILL_CONSIDERED = 'sysvinit'
>
> OK, I see.
>
> I'd suggest replacing the above 4 lines with a single line:
>
> INIT_MANAGER = "systemd"
>
> The INIT_MANAGER mechanism was added to make switching init managers easier.

I agree. The 4 lines are defined in two places here:
https://git.yoctoproject.org/yocto-autobuilder-helper/tree/config.json

Can you send a patch to replace them with INIT_MANAGER?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192999): 
https://lists.openembedded.org/g/openembedded-core/message/192999
Mute This Topic: https://lists.openembedded.org/mt/103380516/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-28 Thread Chen Qi via lists.openembedded.org

On 12/29/23 05:14, Alexandre Belloni wrote:

On 28/12/2023 03:00:08+, Chen, Qi wrote:

I double checked it in my environment, setting INIT_MANAGER to "systemd" and then 
'bitbake systemd' will not generate this warning. In this case ROOT_HOME's value is 
"/root".
I checked 
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354, but I 
couldn't find the configuration items that set the init manager to systemd.
Does the build use the variable 'INIT_MANAGER'? Does it set ROOT_HOME to 
"/home/root" somewhere?


This is the config that is used:

MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
DL_DIR = '/srv/autobuilder/autobuilder.yocto.io/current_sources'
SSTATE_DIR ?= '/srv/autobuilder/autobuilder.yocto.io/pub/sstate'



TEST_SUITES:append = ' systemd'
DISTRO_FEATURES:append = ' pam systemd usrmerge'
VIRTUAL-RUNTIME_init_manager = 'systemd'
DISTRO_FEATURES_BACKFILL_CONSIDERED = 'sysvinit'


OK, I see.

I'd suggest replacing the above 4 lines with a single line:

INIT_MANAGER = "systemd"

The INIT_MANAGER mechanism was added to make switching init managers easier.

Another choice is adding the following line to sync with the 
meta/conf/distro/include/init-manager-systemd.inc settings.


ROOT_HOME ?= "/root"

Regards,

Qi



DISTRO_FEATURES:remove = 'x11'
QEMU_USE_KVM = 'True'
INHERIT += 'report-error'
PREMIRRORS = ''
BB_GENERATE_MIRROR_TARBALLS = '1'
BB_NUMBER_THREADS = '16'
BB_NUMBER_PARSE_THREADS = '16'
PARALLEL_MAKE = '-j 16 -l 52'
BB_PRESSURE_MAX_CPU = '1'
BB_PRESSURE_MAX_IO = '1'
XZ_MEMLIMIT = '5%'
XZ_THREADS = '8'
ZSTD_THREADS = '8'
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'
IMAGE_CLASSES += 'testimage'
TEST_QEMUBOOT_TIMEOUT = '1500'
SANITY_TESTED_DISTROS = ''
SDK_EXT_TYPE = 'minimal'
SDK_INCLUDE_TOOLCHAIN = '1'
ESDK_LOCAL_CONF_REMOVE:append = 'BB_HASHSERVE'
BB_DISKMON_DIRS = 'STOPTASKS,${TMPDIR},1G,100K STOPTASKS,${DL_DIR},1G 
STOPTASKS,${SSTATE_DIR},1G STOPTASKS,/tmp,100M,30K HALT,${TMPDIR},100M,1K 
HALT,${DL_DIR},100M HALT,${SSTATE_DIR},100M HALT,/tmp,10M,1K'
BB_HASHSERVE = 'hashserv.yocto.io:8686'
RUNQEMU_TMPFS_DIR = '/home/pokybuild/tmp'
BB_HEARTBEAT_EVENT = '60'
BB_LOG_HOST_STAT_ON_INTERVAL = '1'
BB_LOG_HOST_STAT_CMDS_INTERVAL = 'oe-time-dd-test.sh -c 100 -t 3'
BB_LOG_HOST_STAT_ON_FAILURE = '1'
BB_LOG_HOST_STAT_CMDS_FAILURE = 'oe-time-dd-test.sh -l'
SDK_TOOLCHAIN_LANGS += 'rust'
BB_SERVER_TIMEOUT = '60'

It is in auto.conf and it is displayed in the first lines of
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/stdio


Regards,
Qi

-Original Message-
From: Alexandre Belloni 
Sent: Wednesday, December 27, 2023 7:59 PM
To: Chen, Qi 
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

We hit the added warning on the autobuilders:

WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
directory is not fully supported by systemd

https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/warnings

On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:

From: Chen Qi 

1. Patch changes:

0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
is removed because it has no real effect now. The /lib is now /usr/lib
because 'usrmerge' is a required distro feature for systemd.

0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
refreshed for the new version to avoid patch-fuzz issue.

2. root user's home directory now defaults to "/root":

The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
value, so if users set ROOT_HOME to "/home/root", the behavior is the
same as before. However, this is only for backward compatibility. With
this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
This is because systemd's source codes are hardcoding "/root", and
other values are not officially supported. See the list below.
$ grep -rl '"/root"' src/ | grep -v 'src/test'
src/core/namespace.c
src/basic/user-util.c
src/nss-systemd/nss-systemd.c
src/nspawn/nspawn.c
src/firstboot/firstboot.c
src/shared/userdb.c
src/shared/user-record.c
$ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/
tmpfile

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-28 Thread Alexandre Belloni via lists.openembedded.org
On 28/12/2023 03:00:08+, Chen, Qi wrote:
> I double checked it in my environment, setting INIT_MANAGER to "systemd" and 
> then 'bitbake systemd' will not generate this warning. In this case 
> ROOT_HOME's value is "/root".
> I checked 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354, but I 
> couldn't find the configuration items that set the init manager to systemd.
> Does the build use the variable 'INIT_MANAGER'? Does it set ROOT_HOME to 
> "/home/root" somewhere?
> 

This is the config that is used:

MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm package_deb package_ipk"
DL_DIR = '/srv/autobuilder/autobuilder.yocto.io/current_sources'
SSTATE_DIR ?= '/srv/autobuilder/autobuilder.yocto.io/pub/sstate'
TEST_SUITES:append = ' systemd'
DISTRO_FEATURES:append = ' pam systemd usrmerge'
VIRTUAL-RUNTIME_init_manager = 'systemd'
DISTRO_FEATURES_BACKFILL_CONSIDERED = 'sysvinit'
DISTRO_FEATURES:remove = 'x11'
QEMU_USE_KVM = 'True'
INHERIT += 'report-error'
PREMIRRORS = ''
BB_GENERATE_MIRROR_TARBALLS = '1'
BB_NUMBER_THREADS = '16'
BB_NUMBER_PARSE_THREADS = '16'
PARALLEL_MAKE = '-j 16 -l 52'
BB_PRESSURE_MAX_CPU = '1'
BB_PRESSURE_MAX_IO = '1'
XZ_MEMLIMIT = '5%'
XZ_THREADS = '8'
ZSTD_THREADS = '8'
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'
IMAGE_CLASSES += 'testimage'
TEST_QEMUBOOT_TIMEOUT = '1500'
SANITY_TESTED_DISTROS = ''
SDK_EXT_TYPE = 'minimal'
SDK_INCLUDE_TOOLCHAIN = '1'
ESDK_LOCAL_CONF_REMOVE:append = 'BB_HASHSERVE'
BB_DISKMON_DIRS = 'STOPTASKS,${TMPDIR},1G,100K STOPTASKS,${DL_DIR},1G 
STOPTASKS,${SSTATE_DIR},1G STOPTASKS,/tmp,100M,30K HALT,${TMPDIR},100M,1K 
HALT,${DL_DIR},100M HALT,${SSTATE_DIR},100M HALT,/tmp,10M,1K'
BB_HASHSERVE = 'hashserv.yocto.io:8686'
RUNQEMU_TMPFS_DIR = '/home/pokybuild/tmp'
BB_HEARTBEAT_EVENT = '60'
BB_LOG_HOST_STAT_ON_INTERVAL = '1'
BB_LOG_HOST_STAT_CMDS_INTERVAL = 'oe-time-dd-test.sh -c 100 -t 3'
BB_LOG_HOST_STAT_ON_FAILURE = '1'
BB_LOG_HOST_STAT_CMDS_FAILURE = 'oe-time-dd-test.sh -l'
SDK_TOOLCHAIN_LANGS += 'rust'
BB_SERVER_TIMEOUT = '60'

It is in auto.conf and it is displayed in the first lines of
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/stdio

> Regards,
> Qi
> 
> -Original Message-
> From: Alexandre Belloni  
> Sent: Wednesday, December 27, 2023 7:59 PM
> To: Chen, Qi 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1
> 
> We hit the added warning on the autobuilders:
> 
> WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
> directory is not fully supported by systemd
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/warnings
> 
> On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> > From: Chen Qi 
> > 
> > 1. Patch changes:
> > 
> > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > is removed because it has no real effect now. The /lib is now /usr/lib 
> > because 'usrmerge' is a required distro feature for systemd.
> > 
> > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is 
> > refreshed for the new version to avoid patch-fuzz issue.
> > 
> > 2. root user's home directory now defaults to "/root":
> > 
> > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME 
> > value, so if users set ROOT_HOME to "/home/root", the behavior is the 
> > same as before. However, this is only for backward compatibility. With 
> > this patch, The ROOT_HOME value is set to "/root" in 
> > init-manager-systemd.inc.
> > This is because systemd's source codes are hardcoding "/root", and 
> > other values are not officially supported. See the list below.
> > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > src/core/namespace.c
> > src/basic/user-util.c
> > src/nss-systemd/nss-systemd.c
> > src/nspawn/nspawn.c
> > src/firstboot/firstboot.c
> > src/shared/userdb.c
> > src/shared/user-record.c
> > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-27 Thread Chen Qi via lists.openembedded.org
Hi Khem,

I'm working on some other issue these two days. But I think I can send out a 
follow-up patch to handle those musl patches after New Year's Day.

Regards,
Qi

-Original Message-
From: Khem Raj  
Sent: Thursday, December 28, 2023 11:20 AM
To: Chen, Qi 
Cc: Alexandre Belloni ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

Please do a musl build too. We might have some patch conflicts to address.

On Wed, Dec 27, 2023 at 7:00 PM Chen Qi via lists.openembedded.org 
 wrote:
>
> I double checked it in my environment, setting INIT_MANAGER to "systemd" and 
> then 'bitbake systemd' will not generate this warning. In this case 
> ROOT_HOME's value is "/root".
> I checked 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354, but I 
> couldn't find the configuration items that set the init manager to systemd.
> Does the build use the variable 'INIT_MANAGER'? Does it set ROOT_HOME to 
> "/home/root" somewhere?
>
> Regards,
> Qi
>
> -Original Message-
> From: Alexandre Belloni 
> Sent: Wednesday, December 27, 2023 7:59 PM
> To: Chen, Qi 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1
>
> We hit the added warning on the autobuilders:
>
> WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root 
> user's home directory is not fully supported by systemd
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354
> /steps/14/logs/warnings
>
> On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> > From: Chen Qi 
> >
> > 1. Patch changes:
> >
> > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > is removed because it has no real effect now. The /lib is now 
> > /usr/lib because 'usrmerge' is a required distro feature for systemd.
> >
> > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is 
> > refreshed for the new version to avoid patch-fuzz issue.
> >
> > 2. root user's home directory now defaults to "/root":
> >
> > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME 
> > value, so if users set ROOT_HOME to "/home/root", the behavior is 
> > the same as before. However, this is only for backward 
> > compatibility. With this patch, The ROOT_HOME value is set to "/root" in 
> > init-manager-systemd.inc.
> > This is because systemd's source codes are hardcoding "/root", and 
> > other values are not officially supported. See the list below.
> > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > src/core/namespace.c
> > src/basic/user-util.c
> > src/nss-systemd/nss-systemd.c
> > src/nspawn/nspawn.c
> > src/firstboot/firstboot.c
> > src/shared/userdb.c
> > src/shared/user-record.c
> > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> > tmpfiles.d/ units/ xorg/ tools/ sysusers.d/basic.conf.in 
> > tmpfiles.d/provision.conf units/emergency.service.in 
> > units/rescue.service.in tools/list-discoverable-partitions.py
> > Previously, the recipe was just substituting 
> > sysusers.d/basic.conf.in, which is not enough to be treated as 
> > 'fully support'. I deliberately put a warning message in do_install to warn 
> > users about non "/root"
> > ROOT_HOME value. Don't remove it until all above places are handled.
> >
> > 3. cgroupv2 is now the default.
> > cgroupv2 is the default for systemd for many years and it's the 
> > default for distros such as ubuntu and fedora. Let's also use it as the 
> > default.
> >
> > Signed-off-by: Chen Qi 
> > ---
> >  .../distro/include/init-manager-systemd.inc   |  2 +
> >  meta/recipes-core/systemd/systemd.inc |  4 +-
> >  ...tall-dependency-links-at-install-tim.patch | 22 +++--- 
> > ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
> >  .../systemd/systemd/basic.conf.in | 40 --
> >  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
> >  6 files changed, 25 insertions(+), 132 deletions(-)  delete mode
> > 100644
> > meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binf
> > mt .d-modules-load.d-to-.patch  delete mode 100644 
> > meta/recipes-core/systemd/systemd/basic.conf.in
> >  rename meta/recipes-core/systemd/{systemd_254.4.bb => 
> > systemd_255.1.bb} (98%)
> >
> > diff --git a/meta/conf/distro/include/init

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-27 Thread Khem Raj
Please do a musl build too. We might have some patch conflicts to address.

On Wed, Dec 27, 2023 at 7:00 PM Chen Qi via lists.openembedded.org
 wrote:
>
> I double checked it in my environment, setting INIT_MANAGER to "systemd" and 
> then 'bitbake systemd' will not generate this warning. In this case 
> ROOT_HOME's value is "/root".
> I checked 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354, but I 
> couldn't find the configuration items that set the init manager to systemd.
> Does the build use the variable 'INIT_MANAGER'? Does it set ROOT_HOME to 
> "/home/root" somewhere?
>
> Regards,
> Qi
>
> -Original Message-
> From: Alexandre Belloni 
> Sent: Wednesday, December 27, 2023 7:59 PM
> To: Chen, Qi 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1
>
> We hit the added warning on the autobuilders:
>
> WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
> directory is not fully supported by systemd
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/warnings
>
> On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> > From: Chen Qi 
> >
> > 1. Patch changes:
> >
> > 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> > is removed because it has no real effect now. The /lib is now /usr/lib
> > because 'usrmerge' is a required distro feature for systemd.
> >
> > 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
> > refreshed for the new version to avoid patch-fuzz issue.
> >
> > 2. root user's home directory now defaults to "/root":
> >
> > The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
> > value, so if users set ROOT_HOME to "/home/root", the behavior is the
> > same as before. However, this is only for backward compatibility. With
> > this patch, The ROOT_HOME value is set to "/root" in 
> > init-manager-systemd.inc.
> > This is because systemd's source codes are hardcoding "/root", and
> > other values are not officially supported. See the list below.
> > $ grep -rl '"/root"' src/ | grep -v 'src/test'
> > src/core/namespace.c
> > src/basic/user-util.c
> > src/nss-systemd/nss-systemd.c
> > src/nspawn/nspawn.c
> > src/firstboot/firstboot.c
> > src/shared/userdb.c
> > src/shared/user-record.c
> > $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/
> > tmpfiles.d/ units/ xorg/ tools/ sysusers.d/basic.conf.in
> > tmpfiles.d/provision.conf units/emergency.service.in
> > units/rescue.service.in tools/list-discoverable-partitions.py
> > Previously, the recipe was just substituting sysusers.d/basic.conf.in,
> > which is not enough to be treated as 'fully support'. I deliberately
> > put a warning message in do_install to warn users about non "/root"
> > ROOT_HOME value. Don't remove it until all above places are handled.
> >
> > 3. cgroupv2 is now the default.
> > cgroupv2 is the default for systemd for many years and it's the
> > default for distros such as ubuntu and fedora. Let's also use it as the 
> > default.
> >
> > Signed-off-by: Chen Qi 
> > ---
> >  .../distro/include/init-manager-systemd.inc   |  2 +
> >  meta/recipes-core/systemd/systemd.inc |  4 +-
> >  ...tall-dependency-links-at-install-tim.patch | 22 +++---
> > ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
> >  .../systemd/systemd/basic.conf.in | 40 --
> >  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
> >  6 files changed, 25 insertions(+), 132 deletions(-)  delete mode
> > 100644
> > meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt
> > .d-modules-load.d-to-.patch  delete mode 100644
> > meta/recipes-core/systemd/systemd/basic.conf.in
> >  rename meta/recipes-core/systemd/{systemd_254.4.bb =>
> > systemd_255.1.bb} (98%)
> >
> > diff --git a/meta/conf/distro/include/init-manager-systemd.inc
> > b/meta/conf/distro/include/init-manager-systemd.inc
> > index 595d1f2644..0a76647459 100644
> > --- a/meta/conf/distro/include/init-manager-systemd.inc
> > +++ b/meta/conf/distro/include/init-manager-systemd.inc
> > @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
> >  VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
> >  VIRTUAL-RUN

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-27 Thread Chen Qi via lists.openembedded.org
I double checked it in my environment, setting INIT_MANAGER to "systemd" and 
then 'bitbake systemd' will not generate this warning. In this case ROOT_HOME's 
value is "/root".
I checked 
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354, but I 
couldn't find the configuration items that set the init manager to systemd.
Does the build use the variable 'INIT_MANAGER'? Does it set ROOT_HOME to 
"/home/root" somewhere?

Regards,
Qi

-Original Message-
From: Alexandre Belloni  
Sent: Wednesday, December 27, 2023 7:59 PM
To: Chen, Qi 
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

We hit the added warning on the autobuilders:

WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
directory is not fully supported by systemd

https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/warnings

On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> From: Chen Qi 
> 
> 1. Patch changes:
> 
> 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> is removed because it has no real effect now. The /lib is now /usr/lib 
> because 'usrmerge' is a required distro feature for systemd.
> 
> 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is 
> refreshed for the new version to avoid patch-fuzz issue.
> 
> 2. root user's home directory now defaults to "/root":
> 
> The sysuers.d/basic.conf is still modified to respect the ROOT_HOME 
> value, so if users set ROOT_HOME to "/home/root", the behavior is the 
> same as before. However, this is only for backward compatibility. With 
> this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
> This is because systemd's source codes are hardcoding "/root", and 
> other values are not officially supported. See the list below.
> $ grep -rl '"/root"' src/ | grep -v 'src/test'
> src/core/namespace.c
> src/basic/user-util.c
> src/nss-systemd/nss-systemd.c
> src/nspawn/nspawn.c
> src/firstboot/firstboot.c
> src/shared/userdb.c
> src/shared/user-record.c
> $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ 
> tmpfiles.d/ units/ xorg/ tools/ sysusers.d/basic.conf.in 
> tmpfiles.d/provision.conf units/emergency.service.in 
> units/rescue.service.in tools/list-discoverable-partitions.py
> Previously, the recipe was just substituting sysusers.d/basic.conf.in, 
> which is not enough to be treated as 'fully support'. I deliberately 
> put a warning message in do_install to warn users about non "/root" 
> ROOT_HOME value. Don't remove it until all above places are handled.
> 
> 3. cgroupv2 is now the default.
> cgroupv2 is the default for systemd for many years and it's the 
> default for distros such as ubuntu and fedora. Let's also use it as the 
> default.
> 
> Signed-off-by: Chen Qi 
> ---
>  .../distro/include/init-manager-systemd.inc   |  2 +
>  meta/recipes-core/systemd/systemd.inc |  4 +-
>  ...tall-dependency-links-at-install-tim.patch | 22 +++---  
> ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
>  .../systemd/systemd/basic.conf.in | 40 --
>  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
>  6 files changed, 25 insertions(+), 132 deletions(-)  delete mode 
> 100644 
> meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt
> .d-modules-load.d-to-.patch  delete mode 100644 
> meta/recipes-core/systemd/systemd/basic.conf.in
>  rename meta/recipes-core/systemd/{systemd_254.4.bb => 
> systemd_255.1.bb} (98%)
> 
> diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
> b/meta/conf/distro/include/init-manager-systemd.inc
> index 595d1f2644..0a76647459 100644
> --- a/meta/conf/distro/include/init-manager-systemd.inc
> +++ b/meta/conf/distro/include/init-manager-systemd.inc
> @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
>  VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
>  VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
>  VIRTUAL-RUNTIME_dev_manager ??= "systemd"
> +# systemd hardcodes /root in its source codes, other values are not 
> +offically supported ROOT_HOME ?= "/root"
> diff --git a/meta/recipes-core/systemd/systemd.inc 
> b/meta/recipes-core/systemd/systemd.inc
> index ccc3236457..1417e0150f 100644
> --- a/meta/recipes-core/systemd/systemd.inc
> +++ b/meta/recipes-core/systemd/systemd.inc
> @@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
>  LIC_FILES_CHKSUM = "file://LICE

Re: [OE-core][PATCH 1/3] systemd: upgrade to 255.1

2023-12-27 Thread Alexandre Belloni via lists.openembedded.org
We hit the added warning on the autobuilders:

WARNING: systemd-1_255.1-r0 do_install: Using /home/root as root user's home 
directory is not fully supported by systemd

https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/8354/steps/14/logs/warnings

On 27/12/2023 12:20:34+0800, Chen Qi via lists.openembedded.org wrote:
> From: Chen Qi 
> 
> 1. Patch changes:
> 
> 0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
> is removed because it has no real effect now. The /lib is now
> /usr/lib because 'usrmerge' is a required distro feature for systemd.
> 
> 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch is
> refreshed for the new version to avoid patch-fuzz issue.
> 
> 2. root user's home directory now defaults to "/root":
> 
> The sysuers.d/basic.conf is still modified to respect the ROOT_HOME
> value, so if users set ROOT_HOME to "/home/root", the behavior is the
> same as before. However, this is only for backward compatibility. With
> this patch, The ROOT_HOME value is set to "/root" in init-manager-systemd.inc.
> This is because systemd's source codes are hardcoding "/root", and other
> values are not officially supported. See the list below.
> $ grep -rl '"/root"' src/ | grep -v 'src/test'
> src/core/namespace.c
> src/basic/user-util.c
> src/nss-systemd/nss-systemd.c
> src/nspawn/nspawn.c
> src/firstboot/firstboot.c
> src/shared/userdb.c
> src/shared/user-record.c
> $ grep -rl /root network/ factory/ sysctl.d/ sysusers.d/ rules.d/ tmpfiles.d/ 
> units/ xorg/ tools/
> sysusers.d/basic.conf.in
> tmpfiles.d/provision.conf
> units/emergency.service.in
> units/rescue.service.in
> tools/list-discoverable-partitions.py
> Previously, the recipe was just substituting sysusers.d/basic.conf.in,
> which is not enough to be treated as 'fully support'. I deliberately put
> a warning message in do_install to warn users about non "/root" ROOT_HOME
> value. Don't remove it until all above places are handled.
> 
> 3. cgroupv2 is now the default.
> cgroupv2 is the default for systemd for many years and it's the default
> for distros such as ubuntu and fedora. Let's also use it as the default.
> 
> Signed-off-by: Chen Qi 
> ---
>  .../distro/include/init-manager-systemd.inc   |  2 +
>  meta/recipes-core/systemd/systemd.inc |  4 +-
>  ...tall-dependency-links-at-install-tim.patch | 22 +++---
>  ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 ---
>  .../systemd/systemd/basic.conf.in | 40 --
>  .../{systemd_254.4.bb => systemd_255.1.bb}| 16 ++--
>  6 files changed, 25 insertions(+), 132 deletions(-)
>  delete mode 100644 
> meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
>  delete mode 100644 meta/recipes-core/systemd/systemd/basic.conf.in
>  rename meta/recipes-core/systemd/{systemd_254.4.bb => systemd_255.1.bb} (98%)
> 
> diff --git a/meta/conf/distro/include/init-manager-systemd.inc 
> b/meta/conf/distro/include/init-manager-systemd.inc
> index 595d1f2644..0a76647459 100644
> --- a/meta/conf/distro/include/init-manager-systemd.inc
> +++ b/meta/conf/distro/include/init-manager-systemd.inc
> @@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd"
>  VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
>  VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
>  VIRTUAL-RUNTIME_dev_manager ??= "systemd"
> +# systemd hardcodes /root in its source codes, other values are not 
> offically supported
> +ROOT_HOME ?= "/root"
> diff --git a/meta/recipes-core/systemd/systemd.inc 
> b/meta/recipes-core/systemd/systemd.inc
> index ccc3236457..1417e0150f 100644
> --- a/meta/recipes-core/systemd/systemd.inc
> +++ b/meta/recipes-core/systemd/systemd.inc
> @@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
>  LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe 
> \
>  
> file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
>  
> -SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51"
> -SRCBRANCH = "v254-stable"
> +SRCREV = "2018ccef6645ce00c784369a22dc4e98f6d7061d"
> +SRCBRANCH = "v255-stable"
>  SRC_URI = 
> "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
>  
>  S = "${WORKDIR}/git"
> diff --git 
> a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
>  
> b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> index 085f1e9052..be231cf6b2 100644
> --- 
> a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> +++ 
> b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> @@ -1,8 +1,8 @@
> -From ca7d9a8d9c81702af9c599bb79706f12b1a465cf Mon Sep 17 00:00:00 2001
> +From 29a58009a172e369ad7166e16dab2f4945c6b0d2 Mon Sep 17 00:00:00 2001
>  From: Chen Qi 
>  Date: Thu, 21 Feb 2019 16:23:24 +0800
> -Subject: [PATCH] binfmt: Don't inst