From f51aee1ec555ed7c41642ca862f3c088c5052a42 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 29 Aug 2026 14:28:59 +0200 Subject: [PATCH] test: keep the replacement libsystemd out of the sysroot dbus-broker fails, the bus never comes up: Service dbus[19] died (exit status: 127), restarting The sysroot stages dbus-daemon from the host, which links the real libsystemd, and since v5.0 builds ours by default the install puts a second libsystemd.so.0 in the sysroot. It wins the ld.so cache, and dbus-daemon finds neither sd_journal_stream_fd nor the LIBSYSTEMD_209 symbol versions in it. Uninstall the library from the sysroot after the install. The test serv compiles sd-daemon.c in, so nothing there needs it. Signed-off-by: Joachim Wiberg --- test/setup-sysroot.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/setup-sysroot.sh b/test/setup-sysroot.sh index 59af2272..8d175c75 100755 --- a/test/setup-sysroot.sh +++ b/test/setup-sysroot.sh @@ -5,6 +5,13 @@ set -eu # shellcheck disable=SC2154 make -C "$top_builddir" DESTDIR="$SYSROOT" install +# The dbus-daemon staged from the host links the real libsystemd, ours +# installs under the same soname and wins the sysroot ld.so cache. The +# test serv links sd-daemon.c directly, so drop the library here. +if [ -d "$top_builddir/libsystemd" ]; then + make -C "$top_builddir/libsystemd" DESTDIR="$SYSROOT" uninstall +fi + mkdir -p "$SYSROOT/sbin/" cp "$top_builddir/test/src/serv" "$SYSROOT/sbin/" if [ -x "$top_builddir/test/src/dbus-auth-client" ]; then