Commit 60ec7824 authored by Will Thompson's avatar Will Thompson Committed by Iain Lane

debian/rules: pass --auto-servernum to xvfb-run

I've noticed a few builds of this package fail on Endless's OBS package
builders:

       debian/rules override_dh_auto_test
    make[1]: Entering directory '/usr/src/packages/BUILD'
    mkdir -p -m0700 /usr/src/packages/BUILD/debian/tmp-home/run
    touch /usr/src/packages/BUILD/debian/tmp-home/.gtk-bookmarks
    env \
       HOME=/usr/src/packages/BUILD/debian/tmp-home \
       XDG_RUNTIME_DIR=/usr/src/packages/BUILD/debian/tmp-home/run \
       dbus-run-session -- xvfb-run dh_auto_test
    xvfb-run: error: Xvfb failed to start
    make[1]: *** [debian/rules:33: override_dh_auto_test] Error 1
    make[1]: Leaving directory '/usr/src/packages/BUILD'
    make: *** [debian/rules:13: binary] Error 2
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

The failures went away when I triggered a rebuild.  I believe this is
because xvfb-run, by default, tries to use X server number 99, and fails
if it is not available:

    $ xvfb-run  bash -c 'echo first: $DISPLAY && sleep 30' & \
      sleep 5; xvfb-run  bash -c 'echo second: $DISPLAY'
    [1] 7499
    first: :99
    xvfb-run: error: Xvfb failed to start

Passing --auto-servernum causes xvfb-run to find the first usable X
server number, starting from 99.


(cherry picked from commit 308998cc)
parent 62079229
......@@ -33,7 +33,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
env \
HOME=$(CURDIR)/debian/tmp-home \
XDG_RUNTIME_DIR=$(CURDIR)/debian/tmp-home/run \
dbus-run-session -- xvfb-run dh_auto_test
dbus-run-session -- xvfb-run --auto-servernum dh_auto_test
rm -fr debian/tmp-home
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment