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

Bug#853957: mpage FTCBFS: make install strips with the build architecture strip



Source: mpage
Version: 2.5.6+dfsg-1
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

mpage fails to cross build from source, because make install uses
"install -s", which uses the build architecture strip and thus fails
operating on host architecture objects. Stripping before dh_strip also
prevents generation of a -dbgsym package. Not stripping makes both cross
compilation an generation of a -dbgsym succeed. Please consider applying
the attached patch after stretch is released.

Helmut
diff --minimal -Nru mpage-2.5.6+dfsg/debian/changelog mpage-2.5.6+dfsg/debian/changelog
--- mpage-2.5.6+dfsg/debian/changelog	2015-10-19 03:36:01.000000000 +0200
+++ mpage-2.5.6+dfsg/debian/changelog	2017-02-02 10:11:49.000000000 +0100
@@ -1,3 +1,10 @@
+mpage (2.5.6+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Do not strip during make install. (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de>  Thu, 02 Feb 2017 10:11:49 +0100
+
 mpage (2.5.6+dfsg-1) unstable; urgency=medium
 
   * QA upload.
diff --minimal -Nru mpage-2.5.6+dfsg/debian/patches/50_no_strip.patch mpage-2.5.6+dfsg/debian/patches/50_no_strip.patch
--- mpage-2.5.6+dfsg/debian/patches/50_no_strip.patch	1970-01-01 01:00:00.000000000 +0100
+++ mpage-2.5.6+dfsg/debian/patches/50_no_strip.patch	2017-02-02 10:11:49.000000000 +0100
@@ -0,0 +1,25 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: allow substituting install
+
+This can be used to make stripping work with cross tools or to disable
+stripping.
+
+Index: mpage-2.5.6+dfsg/Makefile
+===================================================================
+--- mpage-2.5.6+dfsg.orig/Makefile
++++ mpage-2.5.6+dfsg/Makefile
+@@ -25,6 +25,7 @@
+ # See also system specific settings below
+ #CC=cc
+ CC=gcc
++INSTALL ?= install
+ 
+ ############################################################################
+ #
+@@ -182,5 +183,5 @@
+ 	if [ ! -d $(DESTDIR)/$(LIBDIR)/mpage ] ; then mkdir -p $(DESTDIR)/$(LIBDIR)/mpage ; fi
+ 	if [ ! -d $(DESTDIR)/$(BINDIR) ] ; then mkdir -p $(DESTDIR)/$(BINDIR) ; fi
+ 	if [ ! -d $(DESTDIR)/$(MANDIR) ] ; then mkdir -p $(DESTDIR)/$(MANDIR) ; fi
+-	install -s -m 755 -o root -g root mpage$(E) $(DESTDIR)/usr/bin
++	$(INSTALL) -s -m 755 -o root -g root mpage$(E) $(DESTDIR)/usr/bin
+ 	-cp Encodings/* $(DESTDIR)/usr/lib/mpage
diff --minimal -Nru mpage-2.5.6+dfsg/debian/patches/series mpage-2.5.6+dfsg/debian/patches/series
--- mpage-2.5.6+dfsg/debian/patches/series	2015-10-17 20:38:29.000000000 +0200
+++ mpage-2.5.6+dfsg/debian/patches/series	2017-02-02 10:09:46.000000000 +0100
@@ -3,3 +3,4 @@
 20_bts416573_manpage_fixes.patch
 30_bts443280_libdir_manpage.patch
 40_add_GCC_hardening.patch
+50_no_strip.patch
diff --minimal -Nru mpage-2.5.6+dfsg/debian/rules mpage-2.5.6+dfsg/debian/rules
--- mpage-2.5.6+dfsg/debian/rules	2015-10-17 23:41:59.000000000 +0200
+++ mpage-2.5.6+dfsg/debian/rules	2017-02-02 10:11:49.000000000 +0100
@@ -6,6 +6,10 @@
 %:
 	dh $@
 
+override_dh_auto_install:
+	# #844077
+	dh_auto_install -- INSTALL='install --strip-program=true'
+
 override_dh_install:
 	dh_install
 	chmod 0755 $(CURDIR)/debian/mpage/usr/share/doc/mpage/Contrib/mp \

Reply to: