Skip to contentSkip to conversation

support/testing: TestSELinuxSystemd{Ext4, Squashfs} add midding libelf kernel dependency

PATCH Applied Romain Naour 2 participants 2 messages Jul 29, 2023 – Jul 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/testing: TestSELinuxSystemd{Ext4, Squashfs} add midding libelf kernel dependency

objtool built by the kernel requires libelf

ldd TestSELinuxSystemdExt4/build/linux-6.1.26/tools/objtool/objtool
linux-vdso.so.1
libelf.so.1 => TestSELinuxSystemdExt4/host/lib/libelf.so.1

While updating the kernel used in TestSELinuxSystemd [1] we forgot to select BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF to provide Buildroot's host-libelf. Using host-libelf avoid linking with libelf installed on the host or failing to build objtool if libelf is not installed.

[1] 60b84fb7ce4612b2b14a675e28331111468e1f2b

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/4725186370 (TestSELinuxSystemdSquashfs)
https://gitlab.com/buildroot.org/buildroot/-/jobs/4725186368 (TestSELinuxSystemdExt4)

---
 support/testing/tests/init/test_systemd_selinux.py | 1 +
 1 file changed, 1 insertion(+)
support/testing/tests/init/test_systemd_selinux.py +1 -0
index 5f91243f37..fab23e3330 100644
@@ -15,6 +15,7 @@ class TestSELinuxSystemd(infra.basetest.BRTest):
         BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.26"
         BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
         BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config"
+        BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
         BR2_PACKAGE_LIBSELINUX=y
         BR2_PACKAGE_REFPOLICY=y
         """
Signature · 6 lines
2.41.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 14 lines · On Sun, 30 Jul 2023 01:14:34 +0200 Romain Naour <[email protected]> wrote:

objtool built by the kernel requires libelf

ldd TestSELinuxSystemdExt4/build/linux-6.1.26/tools/objtool/objtool
linux-vdso.so.1
libelf.so.1 => TestSELinuxSystemdExt4/host/lib/libelf.so.1

While updating the kernel used in TestSELinuxSystemd [1] we forgot to select BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF to provide Buildroot's host-libelf. Using host-libelf avoid linking with libelf installed on the host or failing to build objtool if libelf is not installed.

[1] 60b84fb7ce4612b2b14a675e28331111468e1f2b

Quoted 8 lines

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/4725186370 (TestSELinuxSystemdSquashfs)
https://gitlab.com/buildroot.org/buildroot/-/jobs/4725186368 (TestSELinuxSystemdExt4)

---
 support/testing/tests/init/test_systemd_selinux.py | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot