On Mon, Feb 23, 2026 at 10:59:39PM +0800, Shengjing Zhu wrote: > On Mon, Feb 23, 2026 at 10:33 PM Nicolas Dumazet <[email protected]> wrote: > > > > 14 days to go until removal. > > > > Is this a problem with the latest 2.2.1-1 version? > > > > Looks like something is wrong with specific builders, but I haven't > figured it out.
I've finally managed to reproduce the build failure locally, and ran the
test process through `strace -e trace=connect` to figure out what socket
it's trying to connect to, and it turns out it was
`/tmp/dh-xdg-rundir-XXXXXX/bus`, the directory for which is what
`dh_auto_test` sets `XDG_RUNTIME_DIR` to[1], i.e. the tests need a
session bus as well (the default session bus path is
`${XDG_RUNTIME_DIR}/bus`).
Wrapping the `dh_auto_test` call inside a `dbus-run-session -- ` made it
work. Additionally, I've tweaked debian/rules to move the system bus
files out of the global `/tmp` folder, and added a small loop to wait
for the bus socket to show up before running tests just to make things
more robust.
I have uploaded the above changes as an NMU to DELAYED/2 and attached
the patch here.
[1]
https://sources.debian.org/src/debhelper/13.31/lib/Debian/Debhelper/Dh_Buildsystems.pm?hl=296#L296-L301
--
Kind regards,
Loong Jin
diff -Nru sdbus-cpp-2.2.1/debian/changelog sdbus-cpp-2.2.1/debian/changelog --- sdbus-cpp-2.2.1/debian/changelog 2026-01-23 02:43:45.000000000 +0800 +++ sdbus-cpp-2.2.1/debian/changelog 2026-03-18 15:12:47.000000000 +0800 @@ -1,3 +1,12 @@ +sdbus-cpp (2.2.1-1.1) unstable; urgency=medium + + * Non-maintainer upload + * Move test dbus-daemon into local directory and wait for dbus socket + (Closes: #1115807) + * Run tests with a dbus session bus (Closes: #1115807) + + -- Chow Loong Jin <[email protected]> Wed, 18 Mar 2026 15:12:47 +0800 + sdbus-cpp (2.2.1-1) unstable; urgency=medium * New upstream release diff -Nru sdbus-cpp-2.2.1/debian/dbus.conf.tpl sdbus-cpp-2.2.1/debian/dbus.conf.tpl --- sdbus-cpp-2.2.1/debian/dbus.conf.tpl 2026-01-23 02:43:45.000000000 +0800 +++ sdbus-cpp-2.2.1/debian/dbus.conf.tpl 2026-03-18 15:12:47.000000000 +0800 @@ -9,7 +9,7 @@ <fork/> <!-- Write a pid file --> - <pidfile>/tmp/sdbuscpp.pid</pidfile> + <pidfile>DBUSDIR/sdbuscpp.pid</pidfile> <!-- Only allow socket-credentials-based authentication --> <auth>EXTERNAL</auth> @@ -18,7 +18,7 @@ means use abstract namespace, don't really create filesystem file; only Linux supports this. Use path=/whatever on other systems.) --> - <listen>unix:path=/tmp/sdbuscpp_bus</listen> + <listen>unix:path=DBUSDIR/sdbuscpp_bus</listen> <policy context="default"> <!-- All users can connect to system bus --> diff -Nru sdbus-cpp-2.2.1/debian/rules sdbus-cpp-2.2.1/debian/rules --- sdbus-cpp-2.2.1/debian/rules 2026-01-23 02:43:45.000000000 +0800 +++ sdbus-cpp-2.2.1/debian/rules 2026-03-18 15:12:47.000000000 +0800 @@ -10,6 +10,11 @@ export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed endif +dbusdir = $(CURDIR)/tmp +dbus_conf = $(dbusdir)/dbus.conf +dbus_sock = $(dbusdir)/sdbuscpp_bus +dbus_pidfile = $(dbusdir)/sdbuscpp.pid + %: dh $@ @@ -17,16 +22,25 @@ dh_auto_configure -- -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_BUILD_DOCS=OFF -DSDBUSCPP_BUILD_TESTS=$(ENABLE_TESTS) override_dh_auto_test-arch: - -kill -9 $$(cat /tmp/sdbuscpp.pid) - -rm -v /tmp/dbus.conf /tmp/sdbuscpp_bus /tmp/sdbuscpp.pid - - sed 's|CURDIR|$(CURDIR)|g' debian/dbus.conf.tpl > /tmp/dbus.conf - dbus-daemon --config-file /tmp/dbus.conf --fork - - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/sdbuscpp_bus dh_auto_test --no-parallel - - -kill -9 $$(cat /tmp/sdbuscpp.pid) - -rm -v /tmp/dbus.conf /tmp/sdbuscpp_bus /tmp/sdbuscpp.pid + -mkdir -p $(dbusdir) + -kill -9 $$(cat $(dbusdir)/sdbuscpp.pid) + -rm -v $(dbusdir)/dbus.conf $(dbusdir)/sdbuscpp_bus $(dbusdir)/sdbuscpp.pid + + sed 's|CURDIR|$(CURDIR)|g; s|DBUSDIR|$(dbusdir)|g;' debian/dbus.conf.tpl > $(dbusdir)/dbus.conf + dbus-daemon --config-file $(dbusdir)/dbus.conf --fork + + deadline=$$(( $$(date +%s) + 60 )); \ + while [ $$(date +%s) -lt $$deadline ] && ! [ -S '$(dbus_sock)' ]; do \ + echo "Waiting for dbus socket at $(dbus_sock)"; \ + sleep 1; \ + done + test -S $(dbus_sock) + + DBUS_SYSTEM_BUS_ADDRESS=unix:path=$(dbus_sock) dbus-run-session -- dh_auto_test --no-parallel + + -kill -9 $$(cat $(dbus_pidfile)) + -rm -v $(dbus_conf) $(dbus_sock) $(dbus_pidfile) + -rmdir $(dbusdir) override_dh_auto_configure-indep: dh_auto_configure -- -DSDBUSCPP_BUILD_DOCS=ON -DSDBUSCPP_BUILD_DOXYGEN_DOCS=ON
signature.asc
Description: PGP signature

