diff mbox series

[v2] systemd: add usrmerge to REQUIRED_DISTRO_FEATURES

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

Commit Message

Luca Boccassi Aug. 5, 2023, 9:35 p.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>
---
v2: rearrange so systemd-boot.bb is left as-is for now

 meta/recipes-core/systemd/systemd-compat-units.bb      | 3 ++-
 meta/recipes-core/systemd/systemd-conf_1.0.bb          | 3 +++
 meta/recipes-core/systemd/systemd-machine-units_1.0.bb | 3 ++-
 meta/recipes-core/systemd/systemd-serialgetty.bb       | 3 ++-
 meta/recipes-core/systemd/systemd_254.bb               | 6 +++++-
 5 files changed, 14 insertions(+), 4 deletions(-)

Comments

Alexandre Belloni Aug. 10, 2023, 11:50 a.m. UTC | #1
Hello,

This breaks most of the tests on the autobuilders, I guess you will have
to also update the distribution configuration.

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/3326/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/5581/steps/14/logs/stdio

ERROR: Nothing PROVIDES 'udev' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-graphics/wayland/weston_12.0.1.bb DEPENDS on or otherwise requires it)
systemd PROVIDES udev but was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
eudev PROVIDES udev but was skipped: conflicting distro feature 'systemd' (in DISTRO_FEATURES)
ERROR: Nothing PROVIDES 'systemd' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-graphics/wayland/weston_12.0.1.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/psplash/psplash_git.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/dbus/dbus_1.14.8.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/seatd/seatd_0.7.0.bb DEPENDS on or otherwise requires it)
systemd was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
ERROR: Nothing RPROVIDES 'systemd' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or otherwise requires it)
systemd was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)





On 05/08/2023 22:35:51+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>
> ---
> v2: rearrange so systemd-boot.bb is left as-is for now
> 
>  meta/recipes-core/systemd/systemd-compat-units.bb      | 3 ++-
>  meta/recipes-core/systemd/systemd-conf_1.0.bb          | 3 +++
>  meta/recipes-core/systemd/systemd-machine-units_1.0.bb | 3 ++-
>  meta/recipes-core/systemd/systemd-serialgetty.bb       | 3 ++-
>  meta/recipes-core/systemd/systemd_254.bb               | 6 +++++-
>  5 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
> index 55ebf99117f..75b1045728a 100644
> --- a/meta/recipes-core/systemd/systemd-compat-units.bb
> +++ b/meta/recipes-core/systemd/systemd-compat-units.bb
> @@ -14,7 +14,8 @@ INHIBIT_DEFAULT_DEPS = "1"
>  
>  ALLOW_EMPTY:${PN} = "1"
>  
> -REQUIRED_DISTRO_FEATURES = "systemd"
> +REQUIRED_DISTRO_FEATURES += "systemd"
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
>  
>  SYSTEMD_DISABLED_SYSV_SERVICES = " \
>    busybox-udhcpc \
> diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb
> index 61ce7939d3a..2355936631e 100644
> --- a/meta/recipes-core/systemd/systemd-conf_1.0.bb
> +++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb
> @@ -5,6 +5,9 @@ DefaultTimeoutStartSec setting."
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>  
> +inherit features_check
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
> +
>  PE = "1"
>  
>  PACKAGECONFIG ??= "dhcp-ethernet"
> diff --git a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> index 12f27d6ae30..7e59e86f9be 100644
> --- a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> +++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> @@ -7,7 +7,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
>  PR = "r19"
>  
> -inherit systemd
> +inherit systemd features_check
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
>  SYSTEMD_SERVICE:${PN} = ""
>  
>  ALLOW_EMPTY:${PN} = "1"
> diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
> index fd888bb8340..c2c67e6fe08 100644
> --- a/meta/recipes-core/systemd/systemd-serialgetty.bb
> +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
> @@ -14,7 +14,8 @@ 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"
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
>  
>  do_install() {
>  	if [ ! -z "${SERIAL_CONSOLES}" ] ; then
> diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.bb
> index 7ba4233f6a2..3fa49122cd6 100644
> --- a/meta/recipes-core/systemd/systemd_254.bb
> +++ b/meta/recipes-core/systemd/systemd_254.bb
> @@ -10,9 +10,13 @@ SECTION = "base/shell"
>  
>  inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
>  
> +# 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.
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
> +
>  # 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 \
> -- 
> 2.39.2
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#185557): https://lists.openembedded.org/g/openembedded-core/message/185557
> Mute This Topic: https://lists.openembedded.org/mt/100572063/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Ross Burton Aug. 10, 2023, 12:13 p.m. UTC | #2
On 10 Aug 2023, at 12:50, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
> 
> Hello,
> 
> This breaks most of the tests on the autobuilders, I guess you will have
> to also update the distribution configuration.
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/3326/steps/12/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/5581/steps/14/logs/stdio
> 
> ERROR: Nothing PROVIDES 'udev' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-graphics/wayland/weston_12.0.1.bb DEPENDS on or otherwise requires it)
> systemd PROVIDES udev but was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
> eudev PROVIDES udev but was skipped: conflicting distro feature 'systemd' (in DISTRO_FEATURES)
> ERROR: Nothing PROVIDES 'systemd' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-graphics/wayland/weston_12.0.1.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/psplash/psplash_git.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/dbus/dbus_1.14.8.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/seatd/seatd_0.7.0.bb DEPENDS on or otherwise requires it)
> systemd was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
> ERROR: Nothing RPROVIDES 'systemd' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or otherwise requires it)
> systemd was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)

The poky-altcfg distro uses usrmerge, so the challenge will be adapting the QA so that all of the tests that involve systemd are using poky-altcfg.

Ross
Richard Purdie Aug. 10, 2023, 12:54 p.m. UTC | #3
On Thu, 2023-08-10 at 12:13 +0000, Ross Burton wrote:
> On 10 Aug 2023, at 12:50, Alexandre Belloni via lists.openembedded.org <alexandre.belloni=bootlin.com@lists.openembedded.org> wrote:
> > 
> > Hello,
> > 
> > This breaks most of the tests on the autobuilders, I guess you will have
> > to also update the distribution configuration.
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/3326/steps/12/logs/stdio
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/5581/steps/14/logs/stdio
> > 
> > ERROR: Nothing PROVIDES 'udev' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-graphics/wayland/weston_12.0.1.bb DEPENDS on or otherwise requires it)
> > systemd PROVIDES udev but was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
> > eudev PROVIDES udev but was skipped: conflicting distro feature 'systemd' (in DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'systemd' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-graphics/wayland/weston_12.0.1.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/psplash/psplash_git.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/dbus/dbus_1.14.8.bb, /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/seatd/seatd_0.7.0.bb DEPENDS on or otherwise requires it)
> > systemd was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
> > ERROR: Nothing RPROVIDES 'systemd' (but /home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or otherwise requires it)
> > systemd was skipped: missing required distro feature 'usrmerge' (not in DISTRO_FEATURES)
> 
> The poky-altcfg distro uses usrmerge, so the challenge will be adapting the QA so that all of the tests that involve systemd are using poky-altcfg.

The challenge here is reproducibile testing specific since that is
messing with configs to try and get the best coverage.

Since we don't want usrmerge in the reproducibility testing config,
I'll suggest we drop systemd from there. There are some other bits of
config like INHIBIT_PACKAGE_STRIP being set which are also
questionable.

Cheers,

Richard
Richard Purdie Aug. 11, 2023, 12:24 p.m. UTC | #4
On Sat, 2023-08-05 at 22:35 +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>
> ---
> v2: rearrange so systemd-boot.bb is left as-is for now
> 
>  meta/recipes-core/systemd/systemd-compat-units.bb      | 3 ++-
>  meta/recipes-core/systemd/systemd-conf_1.0.bb          | 3 +++
>  meta/recipes-core/systemd/systemd-machine-units_1.0.bb | 3 ++-
>  meta/recipes-core/systemd/systemd-serialgetty.bb       | 3 ++-
>  meta/recipes-core/systemd/systemd_254.bb               | 6 +++++-
>  5 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
> index 55ebf99117f..75b1045728a 100644
> --- a/meta/recipes-core/systemd/systemd-compat-units.bb
> +++ b/meta/recipes-core/systemd/systemd-compat-units.bb
> @@ -14,7 +14,8 @@ INHIBIT_DEFAULT_DEPS = "1"
>  
>  ALLOW_EMPTY:${PN} = "1"
>  
> -REQUIRED_DISTRO_FEATURES = "systemd"
> +REQUIRED_DISTRO_FEATURES += "systemd"
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
>  
>  SYSTEMD_DISABLED_SYSV_SERVICES = " \
>    busybox-udhcpc \
> diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb
> index 61ce7939d3a..2355936631e 100644
> --- a/meta/recipes-core/systemd/systemd-conf_1.0.bb
> +++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb
> @@ -5,6 +5,9 @@ DefaultTimeoutStartSec setting."
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>  
> +inherit features_check
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
> +
>  PE = "1"
>  
>  PACKAGECONFIG ??= "dhcp-ethernet"
> diff --git a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> index 12f27d6ae30..7e59e86f9be 100644
> --- a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> +++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> @@ -7,7 +7,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
>  PR = "r19"
>  
> -inherit systemd
> +inherit systemd features_check
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
>  SYSTEMD_SERVICE:${PN} = ""
>  
>  ALLOW_EMPTY:${PN} = "1"
> diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
> index fd888bb8340..c2c67e6fe08 100644
> --- a/meta/recipes-core/systemd/systemd-serialgetty.bb
> +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
> @@ -14,7 +14,8 @@ 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"
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
>  
>  do_install() {
>  	if [ ! -z "${SERIAL_CONSOLES}" ] ; then
> diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.bb
> index 7ba4233f6a2..3fa49122cd6 100644
> --- a/meta/recipes-core/systemd/systemd_254.bb
> +++ b/meta/recipes-core/systemd/systemd_254.bb
> @@ -10,9 +10,13 @@ SECTION = "base/shell"
>  
>  inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
>  
> +# 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.
> +REQUIRED_DISTRO_FEATURES += "usrmerge"
> +
>  # 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 \

FWIW I tried multiple runs of this through the autobuilder and tracked
down all the places this needed fixing so the test work. Once those
fixes merged, I was able to merge this.

Cheers,

Richard
Luca Boccassi Aug. 11, 2023, 12:56 p.m. UTC | #5
On Fri, 11 Aug 2023 at 13:24, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sat, 2023-08-05 at 22:35 +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>
> > ---
> > v2: rearrange so systemd-boot.bb is left as-is for now
> >
> >  meta/recipes-core/systemd/systemd-compat-units.bb      | 3 ++-
> >  meta/recipes-core/systemd/systemd-conf_1.0.bb          | 3 +++
> >  meta/recipes-core/systemd/systemd-machine-units_1.0.bb | 3 ++-
> >  meta/recipes-core/systemd/systemd-serialgetty.bb       | 3 ++-
> >  meta/recipes-core/systemd/systemd_254.bb               | 6 +++++-
> >  5 files changed, 14 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
> > index 55ebf99117f..75b1045728a 100644
> > --- a/meta/recipes-core/systemd/systemd-compat-units.bb
> > +++ b/meta/recipes-core/systemd/systemd-compat-units.bb
> > @@ -14,7 +14,8 @@ INHIBIT_DEFAULT_DEPS = "1"
> >
> >  ALLOW_EMPTY:${PN} = "1"
> >
> > -REQUIRED_DISTRO_FEATURES = "systemd"
> > +REQUIRED_DISTRO_FEATURES += "systemd"
> > +REQUIRED_DISTRO_FEATURES += "usrmerge"
> >
> >  SYSTEMD_DISABLED_SYSV_SERVICES = " \
> >    busybox-udhcpc \
> > diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb
> > index 61ce7939d3a..2355936631e 100644
> > --- a/meta/recipes-core/systemd/systemd-conf_1.0.bb
> > +++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb
> > @@ -5,6 +5,9 @@ DefaultTimeoutStartSec setting."
> >  LICENSE = "MIT"
> >  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> >
> > +inherit features_check
> > +REQUIRED_DISTRO_FEATURES += "usrmerge"
> > +
> >  PE = "1"
> >
> >  PACKAGECONFIG ??= "dhcp-ethernet"
> > diff --git a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> > index 12f27d6ae30..7e59e86f9be 100644
> > --- a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> > +++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
> > @@ -7,7 +7,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
> >
> >  PR = "r19"
> >
> > -inherit systemd
> > +inherit systemd features_check
> > +REQUIRED_DISTRO_FEATURES += "usrmerge"
> >  SYSTEMD_SERVICE:${PN} = ""
> >
> >  ALLOW_EMPTY:${PN} = "1"
> > diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
> > index fd888bb8340..c2c67e6fe08 100644
> > --- a/meta/recipes-core/systemd/systemd-serialgetty.bb
> > +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
> > @@ -14,7 +14,8 @@ 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"
> > +REQUIRED_DISTRO_FEATURES += "usrmerge"
> >
> >  do_install() {
> >       if [ ! -z "${SERIAL_CONSOLES}" ] ; then
> > diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.bb
> > index 7ba4233f6a2..3fa49122cd6 100644
> > --- a/meta/recipes-core/systemd/systemd_254.bb
> > +++ b/meta/recipes-core/systemd/systemd_254.bb
> > @@ -10,9 +10,13 @@ SECTION = "base/shell"
> >
> >  inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
> >
> > +# 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.
> > +REQUIRED_DISTRO_FEATURES += "usrmerge"
> > +
> >  # 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 \
>
> FWIW I tried multiple runs of this through the autobuilder and tracked
> down all the places this needed fixing so the test work. Once those
> fixes merged, I was able to merge this.

Very nice, thank you!

Kind regards,
Luca Boccassi
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..75b1045728a 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -14,7 +14,8 @@  INHIBIT_DEFAULT_DEPS = "1"
 
 ALLOW_EMPTY:${PN} = "1"
 
-REQUIRED_DISTRO_FEATURES = "systemd"
+REQUIRED_DISTRO_FEATURES += "systemd"
+REQUIRED_DISTRO_FEATURES += "usrmerge"
 
 SYSTEMD_DISABLED_SYSV_SERVICES = " \
   busybox-udhcpc \
diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb
index 61ce7939d3a..2355936631e 100644
--- a/meta/recipes-core/systemd/systemd-conf_1.0.bb
+++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb
@@ -5,6 +5,9 @@  DefaultTimeoutStartSec setting."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
+inherit features_check
+REQUIRED_DISTRO_FEATURES += "usrmerge"
+
 PE = "1"
 
 PACKAGECONFIG ??= "dhcp-ethernet"
diff --git a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
index 12f27d6ae30..7e59e86f9be 100644
--- a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
+++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
@@ -7,7 +7,8 @@  PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PR = "r19"
 
-inherit systemd
+inherit systemd features_check
+REQUIRED_DISTRO_FEATURES += "usrmerge"
 SYSTEMD_SERVICE:${PN} = ""
 
 ALLOW_EMPTY:${PN} = "1"
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index fd888bb8340..c2c67e6fe08 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -14,7 +14,8 @@  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"
+REQUIRED_DISTRO_FEATURES += "usrmerge"
 
 do_install() {
 	if [ ! -z "${SERIAL_CONSOLES}" ] ; then
diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.bb
index 7ba4233f6a2..3fa49122cd6 100644
--- a/meta/recipes-core/systemd/systemd_254.bb
+++ b/meta/recipes-core/systemd/systemd_254.bb
@@ -10,9 +10,13 @@  SECTION = "base/shell"
 
 inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check
 
+# 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.
+REQUIRED_DISTRO_FEATURES += "usrmerge"
+
 # 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 \