diff mbox series

[1/2] systemd: drop deprecated rootlibdir, rootprefix and split-usr options

Message ID 20241129033654.1275825-1-ricardo.salveti@oss.qualcomm.com
State New
Headers show
Series [1/2] systemd: drop deprecated rootlibdir, rootprefix and split-usr options | expand

Commit Message

Ricardo de Araujo (Salveti) Nov. 29, 2024, 3:36 a.m. UTC
Support for split-usr and unmerged-usr were both removed as part of the
systemd 255 release, so remove the current deprecated rootlibdir,
rootprefix and split-usr options from the recipe.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
---
 meta/recipes-core/systemd/systemd_256.8.bb | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

Comments

Mathieu Dubois-Briand Dec. 2, 2024, 8:40 a.m. UTC | #1
On Fri, Nov 29, 2024 at 12:36:53AM -0300, Ricardo Salveti via lists.openembedded.org wrote:
> Support for split-usr and unmerged-usr were both removed as part of the
> systemd 255 release, so remove the current deprecated rootlibdir,
> rootprefix and split-usr options from the recipe.
> 
> Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
> ---

Hi,

I believe these patches are breaking some builds on the autobuilder:

ERROR: systemd-1_256.8-r0 do_package: QA Issue: systemd: Files/directories were installed but not shipped in any package:
  /usr/lib64/libnss_resolve.so.2
  /usr/lib64/libudev.so.1.7.9
  /usr/lib64/libnss_systemd.so.2
  /usr/lib64/libsystemd.so.0.39.0
  /usr/lib64/libsystemd.so.0
  /usr/lib64/libnss_myhostname.so.2
  /usr/lib64/libnss_mymachines.so.2
  /usr/lib64/libudev.so.1
  /usr/lib64/systemd/libsystemd-core-256.so
  /usr/lib64/systemd/libsystemd-shared-256.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
systemd: 10 installed and not shipped files. [installed-vs-shipped]

https://valkyrie.yoctoproject.org/#/builders/17/builds/491/steps/12/logs/stdio

Can you have a look at this failure, please ?
Peter Kjellerstedt Dec. 2, 2024, 7:49 p.m. UTC | #2
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Ricardo Salveti via lists.openembedded.org
> Sent: den 29 november 2024 04:37
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/2] systemd: drop deprecated rootlibdir, rootprefix and split-usr options
> 
> Support for split-usr and unmerged-usr were both removed as part of the
> systemd 255 release, so remove the current deprecated rootlibdir,
> rootprefix and split-usr options from the recipe.
> 
> Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
> ---
>  meta/recipes-core/systemd/systemd_256.8.bb | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd_256.8.bb b/meta/recipes-core/systemd/systemd_256.8.bb
> index c17100a636a..26d2237ce3a 100644
> --- a/meta/recipes-core/systemd/systemd_256.8.bb
> +++ b/meta/recipes-core/systemd/systemd_256.8.bb
> @@ -69,7 +69,7 @@ PAM_PLUGINS = " \
>  "
> 
>  PACKAGECONFIG ??= " \
> -    ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack usrmerge polkit seccomp', d)} \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack polkit seccomp', d)} \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
>      ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
> @@ -218,7 +218,6 @@ def build_epoch(d):
>  PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
>  PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
>  PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
> -PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
>  PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
>  PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
>  PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
> @@ -240,14 +239,10 @@ CFLAGS:append = " --sysroot=${STAGING_DIR_TARGET}"
> 
>  # Helper variables to clarify locations.  This mirrors the logic in systemd's
>  # build system.
> -rootprefix ?= "${root_prefix}"
> -rootlibdir ?= "${base_libdir}"
> -rootlibexecdir = "${rootprefix}/lib"
> +rootlibexecdir = "${nonarch_base_libdir}"

Why use ${nonarch_base_libdir} here? ${nonarch_libdir} should be 
more appropriate now that usrmerge is removed.

> 
>  EXTRA_OEMESON += "-Dnobody-user=nobody \
>                    -Dnobody-group=nogroup \
> -                  -Drootlibdir=${rootlibdir} \
> -                  -Drootprefix=${rootprefix} \
>                    -Ddefault-locale=C \
>                    -Dmode=release \
>                    -Dsystem-alloc-uid-min=101 \
> @@ -403,7 +398,7 @@ do_install() {
>  }
> 
>  python populate_packages:prepend (){
> -    systemdlibdir = d.getVar("rootlibdir")
> +    systemdlibdir = d.getVar("nonarch_base_libdir")

This should be using base_libdir (or libdir as suggested above).

>      do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
>  }
>  PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
> @@ -678,7 +673,7 @@ FILES:${PN} = " ${base_bindir}/* \
>                  ${sysconfdir}/ssh/ssh_config.d/20-systemd-ssh-proxy.conf \
>                  ${sysconfdir}/ssh/sshd_config.d/20-systemd-userdb.conf \
>                  ${rootlibexecdir}/systemd/* \
> -                ${rootlibdir}/systemd/libsystemd-core* \
> +                ${nonarch_base_libdir}/systemd/libsystemd-core* \

This should be using ${base_libdir} (or ${libdir} as suggested above).

>                  ${libdir}/pam.d \
>                  ${nonarch_libdir}/pam.d \
>                  ${systemd_unitdir}/* \
> @@ -739,7 +734,7 @@ INSANE_SKIP:${PN}-dbg += "libdir"
>  INSANE_SKIP:${PN}-doc += " libdir"
>  INSANE_SKIP:libsystemd-shared += "libdir"
> 
> -FILES:libsystemd-shared = "${rootlibdir}/systemd/libsystemd-shared*.so"
> +FILES:libsystemd-shared = "${nonarch_base_libdir}/systemd/libsystemd-shared*.so"

This should be using ${base_libdir} (or ${libdir} as suggested above).

> 
>  RPROVIDES:udev = "hotplug"
> 
> --
> 2.34.1

//Peter
Ricardo de Araujo (Salveti) Dec. 3, 2024, 2:41 a.m. UTC | #3
On Mon, Dec 2, 2024 at 4:50 PM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Ricardo Salveti via lists.openembedded.org
> > Sent: den 29 november 2024 04:37
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 1/2] systemd: drop deprecated rootlibdir, rootprefix and split-usr options
> >
> > Support for split-usr and unmerged-usr were both removed as part of the
> > systemd 255 release, so remove the current deprecated rootlibdir,
> > rootprefix and split-usr options from the recipe.
> >
> > Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
> > ---
> >  meta/recipes-core/systemd/systemd_256.8.bb | 15 +++++----------
> >  1 file changed, 5 insertions(+), 10 deletions(-)
> >
> > diff --git a/meta/recipes-core/systemd/systemd_256.8.bb b/meta/recipes-core/systemd/systemd_256.8.bb
> > index c17100a636a..26d2237ce3a 100644
> > --- a/meta/recipes-core/systemd/systemd_256.8.bb
> > +++ b/meta/recipes-core/systemd/systemd_256.8.bb
> > @@ -69,7 +69,7 @@ PAM_PLUGINS = " \
> >  "
> >
> >  PACKAGECONFIG ??= " \
> > -    ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack usrmerge polkit seccomp', d)} \
> > +    ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack polkit seccomp', d)} \
> >      ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \
> >      ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
> >      ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
> > @@ -218,7 +218,6 @@ def build_epoch(d):
> >  PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
> >  PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
> >  PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
> > -PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
> >  PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
> >  PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
> >  PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
> > @@ -240,14 +239,10 @@ CFLAGS:append = " --sysroot=${STAGING_DIR_TARGET}"
> >
> >  # Helper variables to clarify locations.  This mirrors the logic in systemd's
> >  # build system.
> > -rootprefix ?= "${root_prefix}"
> > -rootlibdir ?= "${base_libdir}"
> > -rootlibexecdir = "${rootprefix}/lib"
> > +rootlibexecdir = "${nonarch_base_libdir}"
>
> Why use ${nonarch_base_libdir} here? ${nonarch_libdir} should be
> more appropriate now that usrmerge is removed.

Agree, will change on v2.

> >  EXTRA_OEMESON += "-Dnobody-user=nobody \
> >                    -Dnobody-group=nogroup \
> > -                  -Drootlibdir=${rootlibdir} \
> > -                  -Drootprefix=${rootprefix} \
> >                    -Ddefault-locale=C \
> >                    -Dmode=release \
> >                    -Dsystem-alloc-uid-min=101 \
> > @@ -403,7 +398,7 @@ do_install() {
> >  }
> >
> >  python populate_packages:prepend (){
> > -    systemdlibdir = d.getVar("rootlibdir")
> > +    systemdlibdir = d.getVar("nonarch_base_libdir")
>
> This should be using base_libdir (or libdir as suggested above).

Yeah, nonarch will fail on cases where it is different than
base_libdir/libdir, as noticed by Mathieu. Will fix on v2.

Same for the other suggestions.

Thanks for the review.

Cheers,

Ricardo
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd_256.8.bb b/meta/recipes-core/systemd/systemd_256.8.bb
index c17100a636a..26d2237ce3a 100644
--- a/meta/recipes-core/systemd/systemd_256.8.bb
+++ b/meta/recipes-core/systemd/systemd_256.8.bb
@@ -69,7 +69,7 @@  PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack usrmerge polkit seccomp', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack polkit seccomp', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
@@ -218,7 +218,6 @@  def build_epoch(d):
 PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
 PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
 PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
-PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
 PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
 PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
 PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
@@ -240,14 +239,10 @@  CFLAGS:append = " --sysroot=${STAGING_DIR_TARGET}"
 
 # Helper variables to clarify locations.  This mirrors the logic in systemd's
 # build system.
-rootprefix ?= "${root_prefix}"
-rootlibdir ?= "${base_libdir}"
-rootlibexecdir = "${rootprefix}/lib"
+rootlibexecdir = "${nonarch_base_libdir}"
 
 EXTRA_OEMESON += "-Dnobody-user=nobody \
                   -Dnobody-group=nogroup \
-                  -Drootlibdir=${rootlibdir} \
-                  -Drootprefix=${rootprefix} \
                   -Ddefault-locale=C \
                   -Dmode=release \
                   -Dsystem-alloc-uid-min=101 \
@@ -403,7 +398,7 @@  do_install() {
 }
 
 python populate_packages:prepend (){
-    systemdlibdir = d.getVar("rootlibdir")
+    systemdlibdir = d.getVar("nonarch_base_libdir")
     do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
 }
 PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
@@ -678,7 +673,7 @@  FILES:${PN} = " ${base_bindir}/* \
                 ${sysconfdir}/ssh/ssh_config.d/20-systemd-ssh-proxy.conf \
                 ${sysconfdir}/ssh/sshd_config.d/20-systemd-userdb.conf \
                 ${rootlibexecdir}/systemd/* \
-                ${rootlibdir}/systemd/libsystemd-core* \
+                ${nonarch_base_libdir}/systemd/libsystemd-core* \
                 ${libdir}/pam.d \
                 ${nonarch_libdir}/pam.d \
                 ${systemd_unitdir}/* \
@@ -739,7 +734,7 @@  INSANE_SKIP:${PN}-dbg += "libdir"
 INSANE_SKIP:${PN}-doc += " libdir"
 INSANE_SKIP:libsystemd-shared += "libdir"
 
-FILES:libsystemd-shared = "${rootlibdir}/systemd/libsystemd-shared*.so"
+FILES:libsystemd-shared = "${nonarch_base_libdir}/systemd/libsystemd-shared*.so"
 
 RPROVIDES:udev = "hotplug"