Bug#944088: x2goserver FTCBFS: builds for the build architecture
Source: x2goserver
Version: 4.1.0.3-4
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
x2goserver fails to cross build from source, because it uses the build
architecture compiler. During dh_auto_configure, the Makefile.PL is run,
but it doesn't seem to record cross tools for the build step. Thus, one
should use the makefile buildsystem for dh_auto_build to pass cross
tools there. Later during dh_auto_install, the software is rebuilt with
the build architecture compiler due to bad Makefile dependencies. The
attached patch fixes all of this. Please consider applying it.
Helmut
diff --minimal -Nru x2goserver-4.1.0.3/debian/changelog x2goserver-4.1.0.3/debian/changelog
--- x2goserver-4.1.0.3/debian/changelog 2019-03-17 23:02:58.000000000 +0100
+++ x2goserver-4.1.0.3/debian/changelog 2019-11-04 05:35:59.000000000 +0100
@@ -1,3 +1,13 @@
+x2goserver (4.1.0.3-4.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Force a makefile build system as the configure step doesn't record
+ cross compilers.
+ + cross.patch: Don't rebuild libx2go-server-db-perl during make install.
+
+ -- Helmut Grohne <helmut@subdivi.de> Mon, 04 Nov 2019 05:35:59 +0100
+
x2goserver (4.1.0.3-4) unstable; urgency=medium
* debian/po:
diff --minimal -Nru x2goserver-4.1.0.3/debian/patches/cross.patch x2goserver-4.1.0.3/debian/patches/cross.patch
--- x2goserver-4.1.0.3/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ x2goserver-4.1.0.3/debian/patches/cross.patch 2019-11-04 05:35:59.000000000 +0100
@@ -0,0 +1,14 @@
+--- x2goserver-4.1.0.3.orig/libx2go-server-db-perl/Makefile
++++ x2goserver-4.1.0.3/libx2go-server-db-perl/Makefile
+@@ -38,8 +38,9 @@
+
+ build: build-arch build-indep
+
+-build-arch:
+- $(CC) $(CFLAGS) $(LDFLAGS) -DTRUSTED_BINARY=\"$(LIBDIR)/libx2go-server-db-sqlite3-wrapper.pl\" -o lib/libx2go-server-db-sqlite3-wrapper src/libx2go-server-db-sqlite3-wrapper.c
++build-arch:lib/libx2go-server-db-sqlite3-wrapper
++lib/libx2go-server-db-sqlite3-wrapper:src/libx2go-server-db-sqlite3-wrapper.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -DTRUSTED_BINARY=\"$(LIBDIR)/libx2go-server-db-sqlite3-wrapper.pl\" -o $@ $^
+
+ build-indep:
+
diff --minimal -Nru x2goserver-4.1.0.3/debian/patches/series x2goserver-4.1.0.3/debian/patches/series
--- x2goserver-4.1.0.3/debian/patches/series 2018-12-01 11:44:40.000000000 +0100
+++ x2goserver-4.1.0.3/debian/patches/series 2019-11-04 05:35:59.000000000 +0100
@@ -1,2 +1,3 @@
1001_fix-desktopsharing-version.patch
0001-x2goversion-Fix-situations-where-compfile-contains-a.patch
+cross.patch
diff --minimal -Nru x2goserver-4.1.0.3/debian/rules x2goserver-4.1.0.3/debian/rules
--- x2goserver-4.1.0.3/debian/rules 2018-11-29 11:04:06.000000000 +0100
+++ x2goserver-4.1.0.3/debian/rules 2019-11-04 05:35:59.000000000 +0100
@@ -10,7 +10,7 @@
PREFIX=/usr NXLIBDIR=$(NXLIBDIR) dh ${@}
override_dh_auto_build:
- PREFIX=/usr NXLIBDIR=$(NXLIBDIR) PERL_INSTALLDIRS=vendor dh_auto_build
+ PREFIX=/usr NXLIBDIR=$(NXLIBDIR) PERL_INSTALLDIRS=vendor dh_auto_build --buildsystem=makefile
override_dh_auto_install:
$(MAKE) -f Makefile build-arch
Reply to: