Source: uronode
Version: 2.15-3
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

uronode fails to cross build from source for multiple reasons. The build
runs the build architecture compiler and that fails badly. Usually, when
there is a configure script, we expect it to pick up the host from the
--host argument, but this is not what happens here. The buildsystem is
more similar to a bare Makefile based one where one passes cross tools
to make. Due to the presence of a configure script, dh_auto_build does
not pass cross tools here, but we can ask it to revert back to makefile
and pass cross tools. Then, in the install step the upstream Makefile
passes -s to install and that happens to use the build architecture
strip on host architecture ELF binaries, which doesn't work well either.
Ideally, we defer all stripping to dh_strip. Doing otherwise (as is done
here) also breaks DEB_BUILD_OPTIONS=nostrip as well as generation of
-dbgsym packages (both of which is broken here). The common way to
suppress the -s flag is passing an install with the --strip-program=true
and debhelper does this (for the makefile buildsystem). I'm attaching a
combined patch for your convenience fixing the cross build,
DEB_BUILD_OPTIONS=nostrip as well as generation of -dbgsym packages.

Helmut
diff --minimal -Nru uronode-2.15/debian/changelog uronode-2.15/debian/changelog
--- uronode-2.15/debian/changelog       2024-02-19 00:29:12.000000000 +0100
+++ uronode-2.15/debian/changelog       2024-08-25 10:45:15.000000000 +0200
@@ -1,3 +1,14 @@
+uronode (2.15-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let the makefile buildsystem pass cross tools to make even though there
+      is a configure script involved.
+    + Let the makefile buildsystem pass a non-stripping install to make 
install.
+    + cross.patch: Honour the $(INSTALL) variable.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 25 Aug 2024 10:45:15 +0200
+
 uronode (2.15-3) unstable; urgency=medium
 
   * Update my details
diff --minimal -Nru uronode-2.15/debian/patches/nostrip.patch 
uronode-2.15/debian/patches/nostrip.patch
--- uronode-2.15/debian/patches/nostrip.patch   1970-01-01 01:00:00.000000000 
+0100
+++ uronode-2.15/debian/patches/nostrip.patch   2024-08-25 10:45:15.000000000 
+0200
@@ -0,0 +1,105 @@
+--- uronode-2.15.orig/Makefile.in
++++ uronode-2.15/Makefile.in
+@@ -2,6 +2,7 @@
+ 
+ CC = gcc
+ LD = $(CC)
++INSTALL ?= install
+ # CFLAGS = -O2 -g -s -Wno-unused-result -Wstrict-prototypes
+ # CFLAGS = -DUNIX -g3 -DDEBUG
+ CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+@@ -30,55 +31,55 @@
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS)  -c $<
+ 
+ install: installbin installman installhelp installconf
+-      install -b -m 755    -D -d      $(VAR_DIR)
+-      install -b -m 755    -D -d      $(VAR_DIR)/node
+-      install -b -m 644    -p etc/loggedin    $(VAR_DIR)/node
+-      install -b -m 644    -p etc/lastlog     $(VAR_DIR)/node
+-      install -b -m 755    -D -d      $(VAR_DIR)/flex
+-      install -b -m 644    -p etc/gateways     $(VAR_DIR)/flex
++      $(INSTALL) -b -m 755    -D -d   $(VAR_DIR)
++      $(INSTALL) -b -m 755    -D -d   $(VAR_DIR)/node
++      $(INSTALL) -b -m 644    -p etc/loggedin $(VAR_DIR)/node
++      $(INSTALL) -b -m 644    -p etc/lastlog  $(VAR_DIR)/node
++      $(INSTALL) -b -m 755    -D -d   $(VAR_DIR)/flex
++      $(INSTALL) -b -m 644    -p etc/gateways  $(VAR_DIR)/flex
+       
+ installbin: all
+-      install -b -m 755    -D -d              $(SBIN_DIR)
+-      install -m 755  -s -p   uronode         $(SBIN_DIR)
+-      install -m 755  -s -p   nodeusers       $(SBIN_DIR)
+-      install -m 755  -s -p   axdigi          $(SBIN_DIR)
+-      install -m 755  -s -p   calibrate       $(SBIN_DIR)
+-@IN@  install -m 755  -s -p   flexd           $(SBIN_DIR)
++      $(INSTALL) -b -m 755    -D -d           $(SBIN_DIR)
++      $(INSTALL) -m 755       -s -p   uronode         $(SBIN_DIR)
++      $(INSTALL) -m 755  -s -p        nodeusers       $(SBIN_DIR)
++      $(INSTALL) -m 755  -s -p        axdigi          $(SBIN_DIR)
++      $(INSTALL) -m 755       -s -p   calibrate       $(SBIN_DIR)
++@IN@  $(INSTALL) -m 755  -s -p        flexd           $(SBIN_DIR)
+ 
+ installhelp:
+-      install -b -m 755    -D -d               $(VAR_DIR)
+-      install -b -m 755    -D -d               $(VAR_DIR)/node/help
+-      install -b -m 644    -p etc/help/*.hlp $(VAR_DIR)/node/help
++      $(INSTALL) -b -m 755    -D -d            $(VAR_DIR)
++      $(INSTALL) -b -m 755    -D -d            $(VAR_DIR)/node/help
++      $(INSTALL) -b -m 644    -p etc/help/*.hlp $(VAR_DIR)/node/help
+ 
+ installconf: installhelp
+-      install -b -m 755    -D -d               $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.announce  $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.conf  $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.perms $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.info  $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.motd  $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.users $(ETC_DIR)
+-      install -b -m 600    -p etc/uronode.routes   $(ETC_DIR)
+-      install -b -m 600    -p etc/flexd.conf  $(ETC_DIR)
++      $(INSTALL) -b -m 755    -D -d            $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.announce  $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.conf  $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.perms $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.info  $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.motd  $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.users $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.routes   $(ETC_DIR)
++      $(INSTALL) -b -m 600    -p etc/flexd.conf  $(ETC_DIR)
+ 
+ installman:
+-      install -m 755    -D -d $(MAN_DIR)/man1 $(MAN_DIR)/man5 $(MAN_DIR)/man8
+-      install -m 644    -p man/nodeusers.1  $(MAN_DIR)/man1
+-      install -m 644    -p man/uronode.conf.5  $(MAN_DIR)/man5
+-      install -m 644    -p man/uronode.perms.5 $(MAN_DIR)/man5
+-      install -m 644    -p man/flexd.conf.5 $(MAN_DIR)/man5
+-      install -m 644    -p man/uronode.8       $(MAN_DIR)/man8
+-      install -m 644    -p man/calibrate.8     $(MAN_DIR)/man8
+-      install -m 644    -p man/axdigi.8        $(MAN_DIR)/man8
+-      install -m 644    -p man/flexd.8         $(MAN_DIR)/man8
++      $(INSTALL) -m 755         -D -d $(MAN_DIR)/man1 $(MAN_DIR)/man5 
$(MAN_DIR)/man8
++      $(INSTALL) -m 644    -p man/nodeusers.1  $(MAN_DIR)/man1
++      $(INSTALL) -m 644    -p man/uronode.conf.5  $(MAN_DIR)/man5
++      $(INSTALL) -m 644    -p man/uronode.perms.5 $(MAN_DIR)/man5
++      $(INSTALL) -m 644    -p man/flexd.conf.5 $(MAN_DIR)/man5
++      $(INSTALL) -m 644    -p man/uronode.8       $(MAN_DIR)/man8
++      $(INSTALL) -m 644         -p man/calibrate.8     $(MAN_DIR)/man8
++      $(INSTALL) -m 644         -p man/axdigi.8        $(MAN_DIR)/man8
++      $(INSTALL) -m 644         -p man/flexd.8         $(MAN_DIR)/man8
+ 
+ upgrade: installbin installman installhelp
+-      install -b -m 600    -p etc/uronode.announce  $(ETC_DIR)
+-      install -m 755 -p uronode       $(SBIN_DIR)
+-      install -m 755 -p nodeusers     $(SBIN_DIR)
+-      install -m 755 -p calibrate     $(SBIN_DIR)
+-@IN@  install -m 755 -p flexd         $(SBIN_DIR)
+-      install -m 755 -p axdigi        $(SBIN_DIR)
++      $(INSTALL) -b -m 600    -p etc/uronode.announce  $(ETC_DIR)
++      $(INSTALL) -m 755 -p uronode       $(SBIN_DIR)
++      $(INSTALL) -m 755 -p nodeusers     $(SBIN_DIR)
++      $(INSTALL) -m 755 -p calibrate  $(SBIN_DIR)
++@IN@  $(INSTALL) -m 755 -p flexd              $(SBIN_DIR)
++      $(INSTALL) -m 755 -p axdigi     $(SBIN_DIR)
+ 
+  
+ clean:
diff --minimal -Nru uronode-2.15/debian/patches/series 
uronode-2.15/debian/patches/series
--- uronode-2.15/debian/patches/series  2024-02-19 00:29:12.000000000 +0100
+++ uronode-2.15/debian/patches/series  2024-08-25 10:45:15.000000000 +0200
@@ -5,3 +5,4 @@
 folder-update
 install-dir-creation
 
+nostrip.patch
diff --minimal -Nru uronode-2.15/debian/rules uronode-2.15/debian/rules
--- uronode-2.15/debian/rules   2024-02-19 00:29:12.000000000 +0100
+++ uronode-2.15/debian/rules   2024-08-25 10:45:15.000000000 +0200
@@ -10,4 +10,7 @@
 
 override_dh_auto_build:
        cat CHANGES.* > changelog
-       dh_auto_build
+       dh_auto_build --buildsystem=makefile
+
+override_dh_auto_install:
+       dh_auto_install --buildsystem=makefile

Reply via email to