Bug#853243: bibutils FTCBFS: uses the build architecture compiler, runs tests despite DEB_BUILD_OPTIONS=nocheck

Helmut Grohne helmut at subdivi.de
Mon Jan 30 19:28:40 UTC 2017


Source: bibutils
Version: 4.12-5
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

bibutils fails to cross build from source, because it uses the build
architecture compiler and runs the test suite even when
DEB_BUILD_OPTIONS contains nocheck. Since dh_auto_build knows how to
pass cross compilers for the makefile buildsystem, the easiest solution
for the former problem is to indirect the $(MAKE) invocations through
dh_auto_build. The other is fixed by the addition of a conditional.
Please consider applying the attached patch after stretch is released.

Helmut
-------------- next part --------------
diff --minimal -Nru bibutils-4.12/debian/changelog bibutils-4.12/debian/changelog
--- bibutils-4.12/debian/changelog	2011-10-09 14:11:09.000000000 +0200
+++ bibutils-4.12/debian/changelog	2017-01-30 20:24:12.000000000 +0100
@@ -1,3 +1,12 @@
+bibutils (4.12-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross compilers to $(MAKE)
+    + Honour DEB_BUILD_OPTIONS=nocheck
+
+ -- Helmut Grohne <helmut at subdivi.de>  Mon, 30 Jan 2017 20:24:12 +0100
+
 bibutils (4.12-5) unstable; urgency=low
 
   * Remove extraneous backslashes from libbibutils.pc. 
diff --minimal -Nru bibutils-4.12/debian/rules bibutils-4.12/debian/rules
--- bibutils-4.12/debian/rules	2011-10-09 14:11:09.000000000 +0200
+++ bibutils-4.12/debian/rules	2017-01-30 20:24:08.000000000 +0100
@@ -19,24 +19,26 @@
 LIBINSTALLDIR=${DESTDIR}/usr/lib
 
 %:
-	dh $@
+	dh $@ --buildsystem=makefile
 
 override_dh_auto_configure:
 	@echo Skipping auto_configure
 	@echo building bibutils $(VERSION), upstream date $(DATE)
 
 override_dh_auto_build:
-	$(MAKE) -C lib -f Makefile.dynamic SONAME=$(SONAME) SOMINOR=$(SOMINOR) all
-	$(MAKE) -C bin -f Makefile.dynamic VERSION=$(VERSION) DATE=$(DATE) all
+	dh_auto_build -Dlib -- -f Makefile.dynamic SONAME=$(SONAME) SOMINOR=$(SOMINOR) all
+	dh_auto_build -Dbin -- -f Makefile.dynamic VERSION=$(VERSION) DATE=$(DATE) all
 	# this relies on target clean not removing the shared libs
-	$(MAKE) -C lib -f Makefile.static clean
-	$(MAKE) -C lib -f Makefile.static libbibutils.a libbibcore.a
+	dh_auto_build -Dlib -- -f Makefile.static clean
+	dh_auto_build -Dlib -- -f Makefile.static libbibutils.a libbibcore.a
 	$(XP) -o bibutils.1 $(DB2MAN) bibutils.dbk
 	sed 's/VERSION/${VERSION}/g' packageconfig_start > lib/bibutils.pc
 
 override_dh_auto_install:
 	@echo Skipping auto_install
 
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 override_dh_auto_test:
 	make -C test all
 	make -C test test
+endif


More information about the debian-science-maintainers mailing list