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

Bug#911255: bandwidthd FTCBFS: multiple reasons



Source: bandwidthd
Version: 2.0.1+cvs20090917-11
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

bandwidthd fails to cross build from source, for multiple reasons. It
doesn't pass --host to ./configure. dh_auto_configure can take care of
that. It uses AC_CHECK_FILE to check for directories on the build
machine, while AC_CHECK_FILE is only to be used for host files. Finally
it strips during make install with the wrong strip. The attached patch
fixes all of that. Please consider applying it.

Helmut
diff --minimal -Nru bandwidthd-2.0.1+cvs20090917/debian/changelog bandwidthd-2.0.1+cvs20090917/debian/changelog
--- bandwidthd-2.0.1+cvs20090917/debian/changelog	2017-09-15 10:41:04.000000000 +0200
+++ bandwidthd-2.0.1+cvs20090917/debian/changelog	2018-10-17 19:50:30.000000000 +0200
@@ -1,3 +1,13 @@
+bandwidthd (2.0.1+cvs20090917-11.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure pass --host to ./configure.
+    + cross.patch: Don't use AC_CHECK_FILE for build machine files.
+    + Don't strip during make install.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Wed, 17 Oct 2018 19:50:30 +0200
+
 bandwidthd (2.0.1+cvs20090917-11) unstable; urgency=medium
 
   * Orphan package.
diff --minimal -Nru bandwidthd-2.0.1+cvs20090917/debian/patches/cross.patch bandwidthd-2.0.1+cvs20090917/debian/patches/cross.patch
--- bandwidthd-2.0.1+cvs20090917/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ bandwidthd-2.0.1+cvs20090917/debian/patches/cross.patch	2018-10-17 19:50:30.000000000 +0200
@@ -0,0 +1,19 @@
+--- bandwidthd-2.0.1+cvs20090917.orig/configure.in
++++ bandwidthd-2.0.1+cvs20090917/configure.in
+@@ -30,12 +30,12 @@
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ 
+ #Check for Darwin sw directory
+-AC_CHECK_FILE(/sw/lib, LDFLAGS="$LDFLAGS -L/sw/lib")
+-AC_CHECK_FILE(/sw/include, CPPFLAGS="$CPPFLAGS -I/sw/include")
++test -d /sw/lib && LDFLAGS="$LDFLAGS -L/sw/lib"
++test -d /sw/include && CPPFLAGS="$CPPFLAGS -I/sw/include"
+ 
+ #Check for NetBSD usr/pkg directory
+-AC_CHECK_FILE(/usr/pkg/lib, LDFLAGS="$LDFLAGS -L/usr/pkg/lib")
+-AC_CHECK_FILE(/usr/pkg/include, CPPFLAGS="$CPPFLAGS -I/usr/pkg/include")
++test -d /usr/pkg/lib LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
++test -d /usr/pkg/include CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
+ 
+ # Required for solaris
+ AC_CHECK_LIB(socket, connect)
diff --minimal -Nru bandwidthd-2.0.1+cvs20090917/debian/patches/series bandwidthd-2.0.1+cvs20090917/debian/patches/series
--- bandwidthd-2.0.1+cvs20090917/debian/patches/series	2015-07-06 07:47:40.000000000 +0200
+++ bandwidthd-2.0.1+cvs20090917/debian/patches/series	2018-10-17 19:50:30.000000000 +0200
@@ -12,3 +12,4 @@
 fix-gcc-5-ftbfs.patch
 convert_short_php_syntax_to_long.patch
 replace_depricated_HTTP_GET_VARS_by_GET.patch
+cross.patch
diff --minimal -Nru bandwidthd-2.0.1+cvs20090917/debian/rules bandwidthd-2.0.1+cvs20090917/debian/rules
--- bandwidthd-2.0.1+cvs20090917/debian/rules	2013-06-14 00:41:25.000000000 +0200
+++ bandwidthd-2.0.1+cvs20090917/debian/rules	2018-10-17 19:50:30.000000000 +0200
@@ -6,7 +6,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-configureoptions = --prefix=/usr --bindir=/usr/sbin/ --sysconfdir=/etc/bandwidthd/ --localstatedir=/var/lib/
+configureoptions = --bindir=/usr/sbin/ --sysconfdir=/etc/bandwidthd/ --localstatedir=/var/lib/
 
 p_bwdstatic = bandwidthd
 p_bwdpgsql = bandwidthd-pgsql
@@ -26,9 +26,6 @@
 else
 	CFLAGS += -O2
 endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
 
 configure:
 
@@ -41,7 +38,7 @@
 	cp -f /usr/share/misc/config.sub config.sub
 	dh_autoreconf
 	chmod +x configure
-	./configure $(configureoptions) --disable-pgsql
+	INSTALL='install --strip-program=true' dh_auto_configure -- $(configureoptions) --disable-pgsql
 	touch $@
 	
 configure-bwdpgsql: configure-bwdpgsql-stamp
@@ -52,7 +49,7 @@
 	[ ! -f /usr/share/misc/config.guess ] || cp -f /usr/share/misc/config.guess config.guess
 	[ ! -f /usr/share/misc/config.sub ] || cp -f /usr/share/misc/config.sub config.sub
 	chmod +x configure
-	./configure $(configureoptions) --enable-pgsql
+	INSTALL='install --strip-program=true' dh_auto_configure -- $(configureoptions) --enable-pgsql
 	touch $@
 
 

Reply to: