From 39d21ca0bd7a2c47a82cac0e7cca37f501169fff Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 16 Aug 2026 12:36:04 +0200 Subject: [PATCH] .github: build leg without D-Bus The D-Bus support is default-enabled, so the HAVE_DBUS paths only bit-rot silently without this: the leg caught initctl failing to build with --disable-dbus on its first local run. Also asserts the binaries carry no bus references and smoke-runs one non-dbus test. Signed-off-by: Joachim Wiberg --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89387b8a..83607094 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,3 +149,42 @@ jobs: with: name: finit-test-${{ matrix.compiler }} path: test/*.log + + no-dbus: + # The D-Bus support is default-enabled, so the HAVE_DBUS paths in + # initctl and finit only bit-rot silently without this leg. + name: no-dbus + runs-on: ubuntu-latest + if: github.event_name != 'push' || github.ref == 'refs/heads/master' + steps: + - name: Install dependencies + run: | + sudo apt-get -y update + sudo apt-get -y install pkg-config tree jq libcap-dev libconfuse-dev libblkid-dev + wget https://github.com/troglobit/libuev/releases/download/v2.4.1/libuev-2.4.1.tar.xz + wget https://github.com/troglobit/libite/releases/download/v2.6.2/libite-2.6.2.tar.gz + tar xf libuev-2.4.1.tar.xz + tar xf libite-2.6.2.tar.gz + (cd libuev-2.4.1 && ./configure && make -j9 && sudo make install-strip) + (cd libite-2.6.2 && ./configure && make -j9 && sudo make install-strip) + sudo ldconfig + - uses: actions/checkout@v7 + - name: Build without D-Bus + run: | + ./autogen.sh + ./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var \ + --disable-dbus --enable-testserv-plugin --with-keventd + make -j9 V=1 + - name: Verify no bus artifacts + run: | + DESTDIR=/tmp make install-strip + ! strings /tmp/sbin/initctl | grep -q finit/bus + ! strings /tmp/sbin/finit | grep -q org.finit + - name: Enable unprivileged userns (unshare) + run: | + sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0 + - name: Smoke test + run: | + make -C test setup-chroot + make -j1 -C test check TESTS='start-stop-serv.sh' \ + || (cat test/test-suite.log; false)