Source: quota Version: 4.03-2 Tags: patch User: helm...@debian.org Usertags: rebootstrap
quota fails to cross build from source, because it configures for the build architecture by not passing --host. The attached patch switches the explicit ./configure invocation to dh_auto_configure which passes this flag as needed. Furthermore CFLAGS_DEF was set depending on the build architecture, but it really needs to depend on the host architecture. The attached patch fixes both issues and makes cross builds succeed. Please consider applying it. Helmut
diff --minimal -Nru quota-4.03/debian/changelog quota-4.03/debian/changelog --- quota-4.03/debian/changelog 2016-03-06 16:12:44.000000000 +0100 +++ quota-4.03/debian/changelog 2016-11-07 06:33:27.000000000 +0100 @@ -1,3 +1,12 @@ +quota (4.03-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_configure pass --host to ./configure. + + Determine CFLAGS_DEF based on the host rather than build arch. + + -- Helmut Grohne <hel...@subdivi.de> Mon, 07 Nov 2016 06:33:27 +0100 + quota (4.03-2) unstable; urgency=medium * With systemd only test after installation, the rest is handled by systemd. diff --minimal -Nru quota-4.03/debian/rules quota-4.03/debian/rules --- quota-4.03/debian/rules 2016-02-28 12:05:20.000000000 +0100 +++ quota-4.03/debian/rules 2016-11-07 06:33:25.000000000 +0100 @@ -5,8 +5,13 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +include /usr/share/dpkg/architecture.mk + CFLAGS_DEF = $(shell dpkg-buildflags --get CFLAGS) CFLAGS_DEF += -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +ifeq ($(DEB_HOST_ARCH),powerpc) +CFLAGS_DEF += -D__BYTEORDER_HAS_U64__ +endif CPPFLAGS_DEF = $(shell dpkg-buildflags --get CPPFLAGS) @@ -17,9 +22,8 @@ dh_testdir dh_autoreconf # Add here commands to configure the package. - ( [ "`dpkg --print-architecture`" = "powerpc" ] && CFLAGS_DEF += -D__BYTEORDER_HAS_U64__; \ - export CFLAGS="$(CFLAGS_DEF) -I/usr/include/tirpc" CPPFLAGS="$(CPPFLAGS_DEF)" LDFLAGS="$(LDFLAGS_DEF)" LIBS="-ltirpc"; \ - ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --enable-rpcsetquota=yes) + CFLAGS="$(CFLAGS_DEF) -I/usr/include/tirpc" CPPFLAGS="$(CPPFLAGS_DEF)" LDFLAGS="$(LDFLAGS_DEF)" LIBS="-ltirpc" \ + dh_auto_configure -- --enable-rpcsetquota=yes touch configure-stamp