[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#941128: xorg-server FTBFS



Control: found -1 2:1.19.1-1
Control: tags -1 bullseye sid

On 2019-09-28 19:06 +0000, Niels Thykier wrote:

> Control: reassign -1 xorg-server
> Control: retitle -1 xorg-server: build target must depend on build-*
> Control: tags -1 ftbfs
>
> Timo Aaltonen:
>> Package: debhelper
>> Severity: important
>>
>> Hi, debhelper 12.4 was fine but the current one broke xorg-server build,
>> build-indep isn't run at all. With the old version it was run right in
>> the beginning:
>>
>> dh build --with quilt,autoreconf --parallel
>>    debian/rules build-indep
>> make[1]: Entering directory '/<<PKGBUILDDIR>>'
>> mkdir -p build-source
>> tar \
>> --owner=0 --group=0 \
>>         --transform 's,^,xorg-server/,' \
>> --exclude=debian \
>> --exclude=autom4te.cache \
>>         -cf - * | xz > build-source/xorg-server.tar.xz
>> tar: build-source/xorg-server.tar.xz: file changed as we read it
>>> build-source-stamp
>> dh build-indep --with quilt,autoreconf --parallel
>>    dh_quilt_patch -i -O--parallel
>> Applying patch 001_fedora_extramodes.patch
>> patching file hw/xfree86/common/extramodes
>> ...
>>
>> but now it's skipped:
>>
>> dh build --with quilt,autoreconf --parallel
>>    dh_quilt_patch -O--parallel
>> Applying patch 001_fedora_extramodes.patch
>> patching file hw/xfree86/common/extramodes
>> ...
>>
> This problem is fundamentally caused by xorg-server's "build" target not
> invoking build-arch and build-indep (eventually).  The xorg-server
> package is assumed to invoke all relevant build steps as a part of the
> build target itself but it fails to do the build-arch and build-indep
> steps as a part of its build target.

It seem this has been present since xorg-server's rules file was
switched to dh, but it only has become serious recently.

I had a look how to fix that, here is what I tried.

Naive approach 1:

--8<---------------cut here---------------start------------->8---
diff --git a/debian/rules b/debian/rules
index 7365fed6c..c5d5e5e03 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,8 +34,8 @@ override_dh_auto_build:
 override_dh_auto_test:
 	dh_auto_test -- -j1 VERBOSE=1

-build: abibumpcheck
-build-indep: build-source-stamp
+build build-arch: abibumpcheck
+build build-indep: build-source-stamp

 override_dh_auto_install:
 	dh_auto_install --builddirectory=debian/build/main \
--8<---------------cut here---------------end--------------->8---

Result was that make processed the build-source-stamp target first
before running dh_quilt_patch and dh_autoreonf.  This is bad, because
xorg-server-source is supposed to contain the patched and autoreconfed
source.

Naive approach 2:

--8<---------------cut here---------------start------------->8---
diff --git a/debian/rules b/debian/rules
index 7365fed6c..cbdd15c31 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,8 +34,9 @@ override_dh_auto_build:
 override_dh_auto_test:
 	dh_auto_test -- -j1 VERBOSE=1

-build: abibumpcheck
+build-arch: abibumpcheck
 build-indep: build-source-stamp
+build: build-arch build-indep

 override_dh_auto_install:
 	dh_auto_install --builddirectory=debian/build/main \
--8<---------------cut here---------------end--------------->8---

This seems to work, but now a full (arch+indep) build configures and
builds the source tree twice, which wastes quite a bit of time.

In the end I decided to remove the build and build-indep targets
altogether[1], which does the trick for me (tested full, arch-only and
indep-only builds).

Cheers,
       Sven


1. https://salsa.debian.org/xorg-team/xserver/xorg-server/commit/c119638422dbb051d6f575e12df353b2cc3a0f44


Reply to: