Bug#1110487: opennds FTCBFS: uses build arch strip
Package: opennds
Version: 10.3.1+dfsg-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debian-cross@lists.debian.org
Dear Maintainer,
opendns uses `strip <binary>` in the Makefile which causes the strip of
the build arch to be invoked. It will fail during cross builds because the
binary is compiled for host arch.
It also uses STRIP as a bool var which is weird because there are buildsystems
that set it. It should conditionally set the same based on whether or not
its already defined.
In case of debian. dh_strip will take care of it already so we can simply set
this to true in d/rules.
I've attached a patch to fix this. Please consider applying.
Thanks
Nilesh
From 3e26185d56fed15a038c963317e96c3070207bb8 Mon Sep 17 00:00:00 2001
From: Nilesh Patra <nilesh@debian.org>
Date: Thu, 7 Aug 2025 02:08:02 +0530
Subject: [PATCH] Get opendns cross building
---
debian/patches/cross.patch | 22 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 3 +++
3 files changed, 26 insertions(+)
create mode 100644 debian/patches/cross.patch
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..41be105
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,22 @@
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@
+ LDFLAGS+=-pthread
+ LDLIBS=-lmicrohttpd
+
+-STRIP=yes
++STRIP?=strip
+
+ NDS_OBJS=src/auth.o src/client_list.o src/commandline.o src/conf.o \
+ src/debug.o src/fw_iptables.o src/main.o src/http_microhttpd.o src/http_microhttpd_utils.o \
+@@ -31,8 +31,8 @@
+
+ install:
+ #ifeq(yes,$(STRIP))
+- strip opennds
+- strip ndsctl
++ $(STRIP) opennds
++ $(STRIP) ndsctl
+ #endif
+ mkdir -p $(DESTDIR)/usr/bin/
+ cp ndsctl $(DESTDIR)/usr/bin/
diff --git a/debian/patches/series b/debian/patches/series
index 9096778..8c14f53 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
1004_add-documentation-key-in-service-file.patch
+cross.patch
diff --git a/debian/rules b/debian/rules
index 6f4d5e0..5b236d4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,9 @@ export LDFLAGS += -flto
%:
dh $@
+override_dh_auto_install:
+ dh_auto_install -- STRIP=true
+
override_dh_install:
rm debian/tmp/etc/config/opennds
mkdir -p debian/tmp/usr/lib
--
2.47.2
Reply to: