Control: tags -1 + patch

On Sun, 06 Oct 2024 at 23:15:55 +0100, Simon McVittie wrote:
> Until libunwind can be investigated and fixed (presumably by a porter?),
> I think it would be better to disable this optional feature on armhf,
> so that X11-related packages can rely on being able to use Xvfb to run
> their test suites on buildds.

Apparently the newer upstream release 1.8.1 resolves the crash, but I
haven't seen any movement towards packaging that on the libunwind side,
and libunwind is a sufficiently subtle low-level component that a new
upstream release seems reasonably likely to regress in some other way;
so I think it would be pragmatic to disable this optional feature on
armhf in Xvfb.

I think it would also be a good idea to have an automated smoke-test
for xvfb-run, since this regression has had an impact on quite a lot of
other packages. This will continue to be desirable even after libunwind
is fixed, and even if the commit disabling libunwind on armhf is reverted.

The attached patches are also available at
<https://salsa.debian.org/xorg-team/xserver/xorg-server/-/merge_requests/13>.

Thanks,
    smcv
>From ac34236b616972d169b81989268daad3297170e6 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Thu, 7 Nov 2024 10:08:03 +0000
Subject: [PATCH 1/3] d/tests: Add an autopkgtest to verify basic functionality
 of xvfb-run

xvfb-run is frequently used in other packages' automated tests, so any
regressions that affect it are likely to cause numerous test failures.
Having Xvfb's own test fail provides a way to narrow down the reason
for failure.

Reproduces: #1082659, #1084230, #1085704
Signed-off-by: Simon McVittie <s...@debian.org>
---
 debian/tests/control  | 9 +++++++++
 debian/tests/xvfb-run | 4 ++++
 2 files changed, 13 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100755 debian/tests/xvfb-run

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000000000..0cb6df4a0
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,9 @@
+Tests:
+ xvfb-run,
+Depends:
+ x11-utils,
+ xauth,
+ xvfb,
+Restrictions:
+ allow-stderr,
+ superficial,
diff --git a/debian/tests/xvfb-run b/debian/tests/xvfb-run
new file mode 100755
index 000000000..49c2e62da
--- /dev/null
+++ b/debian/tests/xvfb-run
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -eu
+
+xvfb-run -a -e /proc/self/fd/2 -s "-noreset" xdpyinfo
-- 
2.45.2

>From 234f3ff0797022106c5a4de581741c3b6117b96d Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Thu, 7 Nov 2024 10:27:48 +0000
Subject: [PATCH 2/3] d/rules: Check basic functionality of xvfb-run at
 build-time

Not all architectures have autopkgtest coverage, so detecting
regressions at build-time is sometimes the best we can do.

Reproduces: #1082659, #1084230, #1085704
Signed-off-by: Simon McVittie <s...@debian.org>
---
 debian/control | 2 ++
 debian/rules   | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/debian/control b/debian/control
index 826f06226..7cc0b9499 100644
--- a/debian/control
+++ b/debian/control
@@ -65,7 +65,9 @@ Build-Depends:
  libxcb-glx0-dev,
  libxcb-xf86dri0-dev (>= 1.6),
 # unit tests
+ xauth <!nocheck>,
  xkb-data,
+ x11-utils <!nocheck>,
  x11-xkb-utils,
 # arc4random_buf(), getpeereid()
  libbsd-dev,
diff --git a/debian/rules b/debian/rules
index 2f71f99f0..d39353f87 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,7 +44,11 @@ override_dh_auto_build:
 	dh_auto_build --builddirectory=debian/build/udeb
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	dh_auto_test -- -j1 VERBOSE=1
+	# Check basic functionality of Xvfb
+	PATH="debian/build/main/hw/vfb:$$PATH" sh debian/local/xvfb-run -a -e /proc/self/fd/2 -s -noreset xdpyinfo
+endif
 
 override_dh_auto_install:
 	dh_auto_install --builddirectory=debian/build/main \
-- 
2.45.2

>From aae333dae6df742b44c2176eb05e3aec91eff803 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Thu, 7 Nov 2024 10:24:27 +0000
Subject: [PATCH 3/3] d/control, d/rules.flags: Disable libunwind on armhf

libunwind 1.7.x regressed on armhf in a way that causes Xvfb to segfault
during startup, and displaying better backtraces on a crash doesn't seem
like key functionality for Xvfb.

Mitigates: #1082659
Closes: #1084230, #1085704
---
 debian/control     | 2 +-
 debian/rules.flags | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 7cc0b9499..709cfca36 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,7 @@ Build-Depends:
  libdrm-dev (>= 2.4.107-5~) [!hurd-any],
  libglvnd-dev,
  mesa-common-dev,
- libunwind-dev [amd64 arm64 armel armhf hppa i386 ia64 mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sh4],
+ libunwind-dev [amd64 arm64 armel hppa i386 ia64 mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sh4],
  libxmuu-dev (>= 1:0.99.1),
  libxext-dev (>= 1:0.99.1),
  libx11-dev (>= 2:1.6),
diff --git a/debian/rules.flags b/debian/rules.flags
index bd560e136..68cdabaf0 100644
--- a/debian/rules.flags
+++ b/debian/rules.flags
@@ -128,7 +128,7 @@ else # hurd
 endif
 
 # some archs don't have libunwind
-ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf hppa i386 ia64 mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sh4))
+ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel hppa i386 ia64 mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sh4))
 	confflags_main += --enable-libunwind
 else
 	confflags_main += --disable-libunwind
-- 
2.45.2

Reply via email to