Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] systemd: restore libdw/libelf to elfutils PACKAGECONFIG RRECOMMENDS
@ 2026-08-06 11:17 daniel.turull
  2026-08-06 11:22 ` Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: daniel.turull @ 2026-08-06 11:17 UTC (permalink / raw)
  To: Openembedded-core; +Cc: Ross.Burton, Daniel Turull

From: Daniel Turull <daniel.turull@ericsson.com>

systemd-coredump dlopen()s libdw to symbolicate backtraces. These
libraries are marked as "suggested" in libsystemd-shared's .note.dlopen
metadata, causing them to land in RSUGGESTS rather than RRECOMMENDS.
RSUGGESTS packages are not installed into the rootfs, breaking
symbolication and causing test_systemd_coredump_minidebuginfo to fail.

Restore explicit RRECOMMENDS for libdw and libelf when elfutils
PACKAGECONFIG is enabled to ensure backtrace symbolication works.

Fixes regression from bb9c619174 ("systemd: drop redundant runtime
dependencies").

To recreate the issue in qemux86-64:

DISTRO_FEATURES:append = "minidebuginfo"
TEST_SUITES = "ping ssh systemd"

bitbake core-image-minimal
bitbake core-image-minimal -c testimage

Before:

RESULTS - systemd.SystemdServiceTests.test_systemd_coredump_minidebuginfo: FAILED (2.71s)

After:

RESULTS - systemd.SystemdServiceTests.test_systemd_coredump_minidebuginfo: PASSED (2.71s)

AI-Generated: Kiro with Claude Opus 5

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
builds on top of the systemd: update to 261.2
---
 meta/recipes-core/systemd/systemd_261.2.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_261.2.bb b/meta/recipes-core/systemd/systemd_261.2.bb
index b295a69548..56c33ef157 100644
--- a/meta/recipes-core/systemd/systemd_261.2.bb
+++ b/meta/recipes-core/systemd/systemd_261.2.bb
@@ -126,7 +126,11 @@ PACKAGECONFIG[default-compression-lz4] = "-Dlz4=true -Ddefault-compression=lz4,,
 PACKAGECONFIG[default-compression-xz] = "-Dxz=true -Ddefault-compression=xz,,xz"
 PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zstd,,zstd"
 PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=enabled,-Defi=false -Dbootloader=disabled,python3-pyelftools-native"
-PACKAGECONFIG[elfutils] = "-Delfutils=enabled,-Delfutils=disabled,elfutils"
+# libdw/libelf are dlopen()ed, but upstream marks them as "suggested" in the
+# .note.dlopen metadata so they end up in RSUGGESTS, which is not installed.
+# systemd-coredump cannot symbolicate backtraces without libdw, so promote
+# these to RRECOMMENDS explicitly.
+PACKAGECONFIG[elfutils] = "-Delfutils=enabled,-Delfutils=disabled,elfutils,,libdw libelf"
 PACKAGECONFIG[fido] = "-Dlibfido2=enabled,-Dlibfido2=disabled,libfido2-initial"
 PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
 PACKAGECONFIG[repart] = "-Drepart=enabled,-Drepart=disabled"


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

* Re: [PATCH] systemd: restore libdw/libelf to elfutils PACKAGECONFIG RRECOMMENDS
  2026-08-06 11:17 [PATCH] systemd: restore libdw/libelf to elfutils PACKAGECONFIG RRECOMMENDS daniel.turull
@ 2026-08-06 11:22 ` Ross Burton
  2026-08-06 11:32   ` Daniel Turull
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2026-08-06 11:22 UTC (permalink / raw)
  To: daniel.turull@ericsson.com; +Cc: Openembedded-core@lists.openembedded.org

On 6 Aug 2026, at 12:17, daniel.turull@ericsson.com wrote:
> 
> From: Daniel Turull <daniel.turull@ericsson.com>
> 
> systemd-coredump dlopen()s libdw to symbolicate backtraces. These
> libraries are marked as "suggested" in libsystemd-shared's .note.dlopen
> metadata, causing them to land in RSUGGESTS rather than RRECOMMENDS.
> RSUGGESTS packages are not installed into the rootfs, breaking
> symbolication and causing test_systemd_coredump_minidebuginfo to fail.

If RSUGGESTS are not respected anywhere then would it be better to just change the logic to use RRECOMMENDS?

Ross

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

* Re: [PATCH] systemd: restore libdw/libelf to elfutils PACKAGECONFIG RRECOMMENDS
  2026-08-06 11:22 ` Ross Burton
@ 2026-08-06 11:32   ` Daniel Turull
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Turull @ 2026-08-06 11:32 UTC (permalink / raw)
  To: Ross.Burton@arm.com; +Cc: Openembedded-core@lists.openembedded.org

On Thu, 2026-08-06 at 11:22 +0000, Ross Burton wrote:
> On 6 Aug 2026, at 12:17, daniel.turull@ericsson.com wrote:
> > 
> > From: Daniel Turull <daniel.turull@ericsson.com>
> > 
> > systemd-coredump dlopen()s libdw to symbolicate backtraces. These
> > libraries are marked as "suggested" in libsystemd-shared's .note.dlopen
> > metadata, causing them to land in RSUGGESTS rather than RRECOMMENDS.
> > RSUGGESTS packages are not installed into the rootfs, breaking
> > symbolication and causing test_systemd_coredump_minidebuginfo to fail.
> 
> If RSUGGESTS are not respected anywhere then would it be better to just change the logic to use
> RRECOMMENDS?

I don't know if this is the exception or they are not respected. Changing to all RRECOMMENDS will be
safer but it will increase the dependencies?

There are some recommends as well in the so file for systemd-shared-261.so

|@FDO
[{"feature":"acl","description":"Support for file Access Control Lists
(ACLs)","priority":"recommended","soname":["libacl.so.1"]}]
|@FDO
[{"feature":"blkid","description":"Support for block device
identification","priority":"recommended","soname":["libblkid.so.1"]}]
|@FDO
[{"feature":"dw","description":"Support for backtrace and ELF package metadata decoding from core
files","priority":"suggested","soname":["libdw.so.1"]}]
|@FDO
[{"feature":"elf","description":"Support for backtraces and reading ELF package metadata from core
files","priority":"suggested","soname":["libelf.so.1"]}]
|@FDO
[{"feature":"fdisk","description":"Support for reading and writing partition
tables","priority":"suggested","soname":["libfdisk.so.1"]}]
|@FDO
[{"feature":"gnutls","description":"Support for TLS via
GnuTLS","priority":"suggested","soname":["libgnutls.so.30"]}]
|@FDO
[{"feature":"archive","description":"Support for decompressing archive
files","priority":"suggested","soname":["libarchive.so.13"]}]
|@FDO
[{"feature":"crypt","description":"Support for hashing
passwords","priority":"recommended","soname":["libcrypt.so.2","libcrypt.so.1","libcrypt.so.1.1"]}]
|@FDO
[{"feature":"mount","description":"Support for mount
enumeration","priority":"recommended","soname":["libmount.so.1"]}]
|@FDO
[{"feature":"kmod","description":"Support for loading kernel
modules","priority":"recommended","soname":["libkmod.so.2"]}]
|@FDO
[{"feature":"seccomp","description":"Support for Seccomp
Sandboxes","priority":"recommended","soname":["libseccomp.so.2"]}]
|@FDO
[{"feature":"zstd","description":"Support zstd compression in journal and coredump
files","priority":"recommended","soname":["libzstd.so.1"]}]
|@FDO
[{"feature":"gcrypt","description":"Support for journald forward-
sealing","priority":"suggested","soname":["libgcrypt.so.20"]}]

I noticed it when testing systemd.

Daniel

> 
> Ross


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

end of thread, other threads:[~2026-08-06 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 11:17 [PATCH] systemd: restore libdw/libelf to elfutils PACKAGECONFIG RRECOMMENDS daniel.turull
2026-08-06 11:22 ` Ross Burton
2026-08-06 11:32   ` Daniel Turull

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox