Source: mergerfs Version: 2.29.0-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
mergerfs fails to cross build from source, because make install uses build architecture tools in the libfuse subdirectory. Due to makefile dependencies, one object is relinked during make install and since dh_auto_install doesn't pass cross tools, it uses the build architecture compilier. It also uses the build architecture strip there. Doing so also breaks generation of -dbgsym packages as well as DEB_BUILD_OPTIONS=nostrip. The attached patch fixes all of that. Please consider applying it to make mergerfs cross buildable again. Helmut
diff --minimal -Nru mergerfs-2.29.0/debian/changelog mergerfs-2.29.0/debian/changelog --- mergerfs-2.29.0/debian/changelog 2020-03-22 14:17:17.000000000 +0100 +++ mergerfs-2.29.0/debian/changelog 2020-03-28 09:24:08.000000000 +0100 @@ -1,3 +1,13 @@ +mergerfs (2.29.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + cross.patch: Make strip substitutable in libfuse/Makefile. + + Override strip for make install. + + export CC as make install rebuilds parts. + + -- Helmut Grohne <hel...@subdivi.de> Sat, 28 Mar 2020 09:24:08 +0100 + mergerfs (2.29.0-1) unstable; urgency=medium * New upstream version 2.29.0 diff --minimal -Nru mergerfs-2.29.0/debian/patches/cross.patch mergerfs-2.29.0/debian/patches/cross.patch --- mergerfs-2.29.0/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ mergerfs-2.29.0/debian/patches/cross.patch 2020-03-28 09:23:39.000000000 +0100 @@ -0,0 +1,21 @@ +--- mergerfs-2.29.0.orig/libfuse/Makefile ++++ mergerfs-2.29.0/libfuse/Makefile +@@ -15,6 +15,7 @@ + SBINDIR = $(EXEC_PREFIX)/sbin + MANDIR = $(DATAROOTDIR)/man + MAN1DIR = $(MANDIR)/man1 ++STRIP ?= strip + + INSTALLBINDIR = $(DESTDIR)$(BINDIR) + INSTALLSBINDIR = $(DESTDIR)$(SBINDIR) +@@ -90,8 +91,8 @@ + distclean: clean + + strip: +- strip --strip-all build/mount.mergerfs +- strip --strip-all build/mergerfs-fusermount ++ $(STRIP) --strip-all build/mount.mergerfs ++ $(STRIP) --strip-all build/mergerfs-fusermount + + install: mergerfs-fusermount mount.mergerfs strip + install -D build/mergerfs-fusermount "$(INSTALLBINDIR)/mergerfs-fusermount" diff --minimal -Nru mergerfs-2.29.0/debian/patches/series mergerfs-2.29.0/debian/patches/series --- mergerfs-2.29.0/debian/patches/series 2020-03-22 14:17:17.000000000 +0100 +++ mergerfs-2.29.0/debian/patches/series 2020-03-28 09:22:45.000000000 +0100 @@ -1,2 +1,3 @@ 0001-Use-the-debian-build-flags.patch 0002-Override-the-assignment-of-the-variable.patch +cross.patch diff --minimal -Nru mergerfs-2.29.0/debian/rules mergerfs-2.29.0/debian/rules --- mergerfs-2.29.0/debian/rules 2020-03-22 14:17:17.000000000 +0100 +++ mergerfs-2.29.0/debian/rules 2020-03-28 09:24:08.000000000 +0100 @@ -9,6 +9,7 @@ DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk -include /usr/share/dpkg/buildtools.mk +export CC export CXX export DEBUG = 1 @@ -22,4 +23,4 @@ # Because there's no auto* files shipped anymore override_dh_auto_install: - $(MAKE) DESTDIR=$(CURDIR)/debian/mergerfs PREFIX=/usr install + $(MAKE) DESTDIR=$(CURDIR)/debian/mergerfs PREFIX=/usr install STRIP=true