Source: libtar
Version: 1.2.20-6
Tags: patch
User: [email protected]
Usertags: rebootstrap

libtar fails to cross build from source, because it doesn't pass --host
to configure. Ultimately, dh_strip fails operating on build architecture
ELF objects. In the attached patch, I move libtar to using
dh_auto_configure, which knows the right flags. After that, the build
still fails due to stripping via install -s with the build architecture
strip. Removing the -s flag also means that a -dbgsym package will be
created. Please consider applying the patch as it makes the cross build
succeed.

Helmut
diff --minimal -Nru libtar-1.2.20/debian/changelog 
libtar-1.2.20/debian/changelog
--- libtar-1.2.20/debian/changelog      2016-08-01 22:52:52.000000000 +0200
+++ libtar-1.2.20/debian/changelog      2016-10-06 06:27:18.000000000 +0200
@@ -1,3 +1,12 @@
+libtar (1.2.20-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1).
+    + Let dh_auto_configure pass cross flags
+    + no_strip.patch: Do not let the build system strip
+
+ -- Helmut Grohne <[email protected]>  Thu, 06 Oct 2016 06:16:50 +0200
+
 libtar (1.2.20-6) unstable; urgency=low
 
   * Drop libtar/Makefile from examples, since it makes the build
diff --minimal -Nru libtar-1.2.20/debian/patches/no_strip.patch 
libtar-1.2.20/debian/patches/no_strip.patch
--- libtar-1.2.20/debian/patches/no_strip.patch 1970-01-01 01:00:00.000000000 
+0100
+++ libtar-1.2.20/debian/patches/no_strip.patch 2016-10-06 06:27:31.000000000 
+0200
@@ -0,0 +1,19 @@
+From: Helmut Grohne <[email protected]>
+Subject: Do not let make install strip
+
+ * Stripping prevents -dbgsym packages from being created.
+ * Stripping with install breaks during cross compilation.
+
+Index: libtar-1.2.20/libtar/Makefile.in
+===================================================================
+--- libtar-1.2.20.orig/libtar/Makefile.in
++++ libtar-1.2.20/libtar/Makefile.in
+@@ -20,7 +20,7 @@
+ 
+ ### Installation programs and flags
+ INSTALL               = @INSTALL@
+-INSTALL_PROGRAM       = @INSTALL_PROGRAM@ -s
++INSTALL_PROGRAM       = @INSTALL_PROGRAM@
+ INSTALL_DATA  = @INSTALL_DATA@
+ LN_S          = @LN_S@
+ MKDIR         = @MKDIR@
diff --minimal -Nru libtar-1.2.20/debian/patches/series 
libtar-1.2.20/debian/patches/series
--- libtar-1.2.20/debian/patches/series 2016-03-25 19:11:06.000000000 +0100
+++ libtar-1.2.20/debian/patches/series 2016-10-06 06:25:23.000000000 +0200
@@ -4,3 +4,4 @@
 th_get_size-unsigned-int.patch
 oldgnu_prefix.patch
 testsuite.patch
+no_strip.patch
diff --minimal -Nru libtar-1.2.20/debian/rules libtar-1.2.20/debian/rules
--- libtar-1.2.20/debian/rules  2016-03-25 19:12:00.000000000 +0100
+++ libtar-1.2.20/debian/rules  2016-10-06 06:16:48.000000000 +0200
@@ -6,10 +6,8 @@
 configure-stamp:
        dh_testdir
        [ -f debian/autoreconf.before ] || dh_autoreconf
-       ./configure \
-               --prefix=/usr \
+       dh_auto_configure --
                --without-zlib \
-               --mandir=\$${prefix}/share/man \
                $(shell dpkg-buildflags --export=configure)
        touch configure-stamp
 

Reply via email to