Bug#888037: scsitools FTCBFS: does not use cross tools
Source: scsitools
Version: 0.12-3
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
scsitools fails to cross build from source, because it generally uses
build architecture tools. In most cases deferring to dh_auto_* fixes.
The explicit gcc invocations can be fixed with buildtools.mk. After
doing so, scsitools cross builds successfully. Please consider applying
the attached patch.
Helmut
diff --minimal -Nru scsitools-0.12/debian/changelog scsitools-0.12/debian/changelog
--- scsitools-0.12/debian/changelog 2018-01-17 15:11:13.000000000 +0100
+++ scsitools-0.12/debian/changelog 2018-01-22 21:12:24.000000000 +0100
@@ -1,3 +1,12 @@
+scsitools (0.12-3.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Let dh_auto_* pass cross flags along.
+ + Use host CC from buildtools.mk.
+
+ -- Helmut Grohne <helmut@subdivi.de> Mon, 22 Jan 2018 21:12:24 +0100
+
scsitools (0.12-3) unstable; urgency=medium
* QA upload.
diff --minimal -Nru scsitools-0.12/debian/rules scsitools-0.12/debian/rules
--- scsitools-0.12/debian/rules 2018-01-17 14:54:00.000000000 +0100
+++ scsitools-0.12/debian/rules 2018-01-22 21:12:22.000000000 +0100
@@ -2,6 +2,7 @@
# Derived from debhelper/dh_make example, and Cristoph Lameter's file. -joy
#export DH_VERBOSE=1
+-include /usr/share/dpkg/buildtools.mk
CFLAGS = -g -O2 -Wall -fsigned-char
#architecture := $(shell dpkg-architecture -qDEB_HOST_ARCH)
@@ -15,12 +16,12 @@
svn export svn+ssh://delaunay@svn.debian.org/svn/collab-maint/deb-maint/scsitools/branches/upstream/current/ .
override_dh_auto_build:
- cd scsiinfo && $(MAKE) KERNEL_INCLUDES="-fsigned-char" LDFLAGS=
- cd scsidev && CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
- --mandir='${prefix}'/share/man && $(MAKE)
- cd sraw && gcc $(CFLAGS) -o sraw srawread.c
- gcc $(CFLAGS) -o scsi-spin debian/scsi-spin.c
- #dh_auto_build
+ dh_auto_build --buildsystem=makefile --builddirectory=scsiinfo -- \
+ KERNEL_INCLUDES="-fsigned-char" LDFLAGS=
+ dh_auto_configure --sourcedirectory=scsidev
+ dh_auto_build --sourcedirectory=scsidev
+ cd sraw && $(CC) $(CFLAGS) -o sraw srawread.c
+ $(CC) $(CFLAGS) -o scsi-spin debian/scsi-spin.c
override_dh_auto_clean:
for i in scsiinfo scsidev ; do $(MAKE) -C $$i clean || true ; done
Reply to: