diff mbox series

systemd: add usrmerge to REQUIRED_DISTRO_FEATURES

Message ID 20230805110643.2708376-1-luca.boccassi@gmail.com
State Accepted, archived
Commit 802e853eeddf16d73db1900546cc5f045d1fb7ed
Headers show
Series systemd: add usrmerge to REQUIRED_DISTRO_FEATURES | expand

Commit Message

Luca Boccassi Aug. 5, 2023, 11:06 a.m. UTC
From: Luca Boccassi <luca.boccassi@microsoft.com>

Support for unmerged-usr is deprecated upstream, taints the system and
has been removed for v255 (next release).
Enforce building merged-usr images when using systemd. This allows one
release cycle where it can be tested for any remaining issue, and can
still be overridden, before it stops working completely.

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
Time to resurrect this. Support for unmerged-usr has been removed and
will no longer be available starting with v255. Better to get started
now with the enforcement, so that things can be worked out while it is
still possible to override it.

 meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
 meta/recipes-core/systemd/systemd-serialgetty.bb  | 2 +-
 meta/recipes-core/systemd/systemd.inc             | 5 +++++
 meta/recipes-core/systemd/systemd_254.bb          | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)

Comments

Otavio Salvador Aug. 5, 2023, 12:57 p.m. UTC | #1
Em sáb., 5 de ago. de 2023 às 08:06, Luca Bocassi
<luca.boccassi@gmail.com> escreveu:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
>
> Support for unmerged-usr is deprecated upstream, taints the system and
> has been removed for v255 (next release).
> Enforce building merged-usr images when using systemd. This allows one
> release cycle where it can be tested for any remaining issue, and can
> still be overridden, before it stops working completely.
>
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

This makes sense. I also prefer to add this sooner than later.
Richard Purdie Aug. 5, 2023, 1:09 p.m. UTC | #2
On Sat, 2023-08-05 at 12:06 +0100, Luca Bocassi wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Support for unmerged-usr is deprecated upstream, taints the system and
> has been removed for v255 (next release).
> Enforce building merged-usr images when using systemd. This allows one
> release cycle where it can be tested for any remaining issue, and can
> still be overridden, before it stops working completely.
> 
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> ---
> Time to resurrect this. Support for unmerged-usr has been removed and
> will no longer be available starting with v255. Better to get started
> now with the enforcement, so that things can be worked out while it is
> still possible to override it.
> 
>  meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
>  meta/recipes-core/systemd/systemd-serialgetty.bb  | 2 +-
>  meta/recipes-core/systemd/systemd.inc             | 5 +++++
>  meta/recipes-core/systemd/systemd_254.bb          | 2 +-
>  4 files changed, 8 insertions(+), 3 deletions(-)

Thanks for sending the patch. I did put this in for testing and because
it makes usrmerge required for the systemd-boot recipe, even sysvinit
based images fail builds with errors like:

https://autobuilder.yoctoproject.org/typhoon/#/builders/37/builds/7580/steps/12/logs/stdio

Is usrmerge needed to systemd-boot as well?

Cheers,

Richard
Luca Boccassi Aug. 5, 2023, 9:36 p.m. UTC | #3
On Sat, 5 Aug 2023 at 14:09, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sat, 2023-08-05 at 12:06 +0100, Luca Bocassi wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> >
> > Support for unmerged-usr is deprecated upstream, taints the system and
> > has been removed for v255 (next release).
> > Enforce building merged-usr images when using systemd. This allows one
> > release cycle where it can be tested for any remaining issue, and can
> > still be overridden, before it stops working completely.
> >
> > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > ---
> > Time to resurrect this. Support for unmerged-usr has been removed and
> > will no longer be available starting with v255. Better to get started
> > now with the enforcement, so that things can be worked out while it is
> > still possible to override it.
> >
> >  meta/recipes-core/systemd/systemd-compat-units.bb | 2 +-
> >  meta/recipes-core/systemd/systemd-serialgetty.bb  | 2 +-
> >  meta/recipes-core/systemd/systemd.inc             | 5 +++++
> >  meta/recipes-core/systemd/systemd_254.bb          | 2 +-
> >  4 files changed, 8 insertions(+), 3 deletions(-)
>
> Thanks for sending the patch. I did put this in for testing and because
> it makes usrmerge required for the systemd-boot recipe, even sysvinit
> based images fail builds with errors like:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/37/builds/7580/steps/12/logs/stdio
>
> Is usrmerge needed to systemd-boot as well?

I don't think so, that's a uefi binary, sent v2 to avoid it for now
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index 55ebf99117f..88315780108 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -14,7 +14,7 @@  INHIBIT_DEFAULT_DEPS = "1"
 
 ALLOW_EMPTY:${PN} = "1"
 
-REQUIRED_DISTRO_FEATURES = "systemd"
+REQUIRED_DISTRO_FEATURES += "systemd"
 
 SYSTEMD_DISABLED_SYSV_SERVICES = " \
   busybox-udhcpc \
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index fd888bb8340..0987c3f4162 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -14,7 +14,7 @@  S = "${WORKDIR}"
 
 # As this package is tied to systemd, only build it when we're also building systemd.
 inherit features_check
-REQUIRED_DISTRO_FEATURES = "systemd"
+REQUIRED_DISTRO_FEATURES += "systemd"
 
 do_install() {
 	if [ ! -z "${SERIAL_CONSOLES}" ] ; then
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index b00a49884be..f70b420e120 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -20,3 +20,8 @@  SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${S
            "
 
 S = "${WORKDIR}/git"
+
+# unmerged-usr support is deprecated upstream, taints the system and will be
+# removed in the near future. Fail the build if it is not enabled.
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "usrmerge"
diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.bb
index 7ba4233f6a2..188151a769c 100644
--- a/meta/recipes-core/systemd/systemd_254.bb
+++ b/meta/recipes-core/systemd/systemd_254.bb
@@ -12,7 +12,7 @@  inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu
 
 # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
 # that we don't build both udev and systemd in world builds.
-REQUIRED_DISTRO_FEATURES = "systemd"
+REQUIRED_DISTRO_FEATURES += "systemd"
 
 SRC_URI += " \
            file://touchscreen.rules \