Source: blktrace
Version: 1.1.0-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

blktrace fails to cross build from source, because it uses the build
architecture compiler. The simplest way to fix this is using
dh_auto_build. After doing so, blktrace cross builds successfully. The
attached patch also fixes a build/host confusion. Please consider
applying it.

Helmut
diff --minimal -Nru blktrace-1.1.0/debian/changelog 
blktrace-1.1.0/debian/changelog
--- blktrace-1.1.0/debian/changelog     2015-05-17 14:35:07.000000000 +0200
+++ blktrace-1.1.0/debian/changelog     2018-04-04 19:51:58.000000000 +0200
@@ -1,3 +1,12 @@
+blktrace (1.1.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + Fix build/host confusion.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 04 Apr 2018 19:51:58 +0200
+
 blktrace (1.1.0-2) unstable; urgency=low
 
   * Upload to unstable.
diff --minimal -Nru blktrace-1.1.0/debian/rules blktrace-1.1.0/debian/rules
--- blktrace-1.1.0/debian/rules 2015-03-25 08:18:15.000000000 +0100
+++ blktrace-1.1.0/debian/rules 2018-04-04 19:51:56.000000000 +0200
@@ -2,7 +2,7 @@
 
 #export DH_VERBOSE=1
 
-#DEB_BUILD_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS  )
+include /usr/share/dpkg/architecture.mk
 
 CFLAGS += -Wall -Wextra -Wno-shadow -g
 
@@ -16,7 +16,7 @@
        dh $@
 
 override_dh_auto_build:
-ifeq ($(DEB_BUILD_ARCH_OS),linux)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
        # Building for a Linux-type OS, everything's fine
        #
        # variables are:
@@ -26,13 +26,13 @@
 else
        ####################################################
        ## Oops, it seems you are trying to build blkutils
-       ## for a non-Linux OS `$(DEB_BUILD_ARCH_OS)'.
+       ## for a non-Linux OS `$(DEB_HOST_ARCH_OS)'.
        ## This is not supported.
        ## Please file a bug if you think this is wrong.
        ####################################################
        false
 endif
-       $(MAKE) CFLAGS="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" all docs
+       dh_auto_build -- CFLAGS="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" all docs
 
 override_dh_auto_install:
        $(MAKE) install \

Reply via email to