]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: add missing dependency on libkmod to udev
authorRoss Burton <ross.burton@arm.com>
Thu, 12 Sep 2024 10:46:09 +0000 (11:46 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Sep 2024 06:15:17 +0000 (07:15 +0100)
As of systemd 256, libsystemd-shared.so doesn't directly link to a number
of libraries but instead dlopen()'s them as needed to reduce the size of
the attack surface.

Instead the .so has a .note.dlopen segment that lists the libraries that
may be opened, with the intention that these are transformed into package
recommendation fields.

We don't yet have support for these (see #15595) so explicit dependencies
have been added to the systemd package itself. However, in an initramfs
with udev but without systemd and no recommendations you end up without
libkmod, so module loading is impossible.

Add an explicit hard dependency on libkmod to udev, because modules are
critical functionality.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_256.5.bb

index 85c7fc743dad5a7ec99294681c48c725fae2a969..68f15ab065dd5985e4e5cefc2cd005dba5ac9c7f 100644 (file)
@@ -742,6 +742,8 @@ INSANE_SKIP:libsystemd-shared += "libdir"
 FILES:libsystemd-shared = "${rootlibdir}/systemd/libsystemd-shared*.so"
 
 RPROVIDES:udev = "hotplug"
+# This can be removed when we parse .note.dlopen in the ELF
+RDEPENDS:udev += "libkmod"
 
 RDEPENDS:udev-bash-completion += "bash-completion"
 RDEPENDS:udev-hwdb += "udev"