Source: winregfs
Version: 0.7-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

winregfs fails to cross build from source, because it uses the build
architecture strip via install -s from make install. Doing so is a bad
idea even for native compilation, because it breaks generation of a
-dbgsym package. The attached patch fixes that by substituting an
install that does not strip. Please consider applying it.

Helmut
diff --minimal -Nru winregfs-0.7/debian/changelog winregfs-0.7/debian/changelog
--- winregfs-0.7/debian/changelog       2017-06-24 20:44:36.000000000 +0200
+++ winregfs-0.7/debian/changelog       2018-06-03 21:17:36.000000000 +0200
@@ -1,3 +1,12 @@
+winregfs (0.7-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: Allow substituting pkg-config and install.
+    + Pass an install that never strips.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 03 Jun 2018 21:17:36 +0200
+
 winregfs (0.7-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru winregfs-0.7/debian/patches/cross.patch 
winregfs-0.7/debian/patches/cross.patch
--- winregfs-0.7/debian/patches/cross.patch     1970-01-01 01:00:00.000000000 
+0100
+++ winregfs-0.7/debian/patches/cross.patch     2018-06-03 21:17:34.000000000 
+0200
@@ -0,0 +1,35 @@
+--- winregfs-0.7.orig/Makefile
++++ winregfs-0.7/Makefile
+@@ -1,4 +1,6 @@
+ CC=gcc
++INSTALL?=install
++PKG_CONFIG?=pkg-config
+ CFLAGS+=-O2 -g -fPIE
+ #CFLAGS=-O2 -flto -ffunction-sections -fdata-sections -fno-unwind-tables 
-fno-asynchronous-unwind-tables
+ #CFLAGS=-Og -g3
+@@ -9,8 +11,8 @@
+ LDFLAGS+=-s -pie
+ #LDFLAGS=-flto -s -Wl,--gc-sections
+ #LDFLAGS=
+-FUSE_CFLAGS=$(shell pkg-config fuse --cflags)
+-FUSE_LDFLAGS=$(shell pkg-config fuse --libs)
++FUSE_CFLAGS=$(shell $(PKG_CONFIG) fuse --cflags)
++FUSE_LDFLAGS=$(shell $(PKG_CONFIG) fuse --libs)
+ FUSE_LIBS=-lfuse
+ 
+ prefix=/usr
+@@ -49,10 +51,10 @@
+       rm -f *.o *~ mount.winregfs fsck.winregfs debug.log *.?.gz 
winregfs*.pkg.tar.*
+ 
+ install: all
+-      install -D -o root -g root -m 0644 mount.winregfs.8.gz 
$(DESTDIR)/$(mandir)/man8/mount.winregfs.8.gz
+-      install -D -o root -g root -m 0644 fsck.winregfs.8.gz 
$(DESTDIR)/$(mandir)/man8/fsck.winregfs.8.gz
+-      install -D -o root -g root -m 0755 -s mount.winregfs 
$(DESTDIR)/$(bindir)/mount.winregfs
+-      install -D -o root -g root -m 0755 -s fsck.winregfs 
$(DESTDIR)/$(bindir)/fsck.winregfs
++      $(INSTALL) -D -o root -g root -m 0644 mount.winregfs.8.gz 
$(DESTDIR)/$(mandir)/man8/mount.winregfs.8.gz
++      $(INSTALL) -D -o root -g root -m 0644 fsck.winregfs.8.gz 
$(DESTDIR)/$(mandir)/man8/fsck.winregfs.8.gz
++      $(INSTALL) -D -o root -g root -m 0755 -s mount.winregfs 
$(DESTDIR)/$(bindir)/mount.winregfs
++      $(INSTALL) -D -o root -g root -m 0755 -s fsck.winregfs 
$(DESTDIR)/$(bindir)/fsck.winregfs
+ 
+ package:
+       +./chroot_build.sh
diff --minimal -Nru winregfs-0.7/debian/patches/series 
winregfs-0.7/debian/patches/series
--- winregfs-0.7/debian/patches/series  2017-06-24 20:44:36.000000000 +0200
+++ winregfs-0.7/debian/patches/series  2018-06-03 21:16:11.000000000 +0200
@@ -1 +1,2 @@
 fix-install.patch
+cross.patch
diff --minimal -Nru winregfs-0.7/debian/rules winregfs-0.7/debian/rules
--- winregfs-0.7/debian/rules   2017-06-24 20:44:36.000000000 +0200
+++ winregfs-0.7/debian/rules   2018-06-03 21:17:13.000000000 +0200
@@ -5,3 +5,6 @@
 
 %:
        dh $@
+
+override_dh_auto_install:
+       dh_auto_install -- INSTALL='install --strip-program=true'

Reply via email to