Hi Adrian,

I've been doing some Bug of the Day triage and picked up this one. I've
prepared a debdiff fixing the FTCBFS issue.

The root cause is that the four explicit ../configure invocations in
debian/rules do not pass --host or --build. Since architecture.mk is
already included at the top of debian/rules, the DEB_HOST_GNU_TYPE and
DEB_BUILD_GNU_TYPE variables are already available — they just aren't
being forwarded to configure.

Helmut's 2016 suggestion was to switch to dh_auto_configure, but that
isn't straightforward given the multi-build-dir layout (obj-db,
obj-sqlite, obj-tokyocabinet, obj-doc each run separate configure
invocations). The fix is to add --host and --build explicitly to each
call.

I've verified the fix at the configure level: without --host, autoconf
determines cross_compiling=no and locks in the native toolchain. With
--host=$(DEB_HOST_GNU_TYPE), it correctly sets cross_compiling=yes and
targets the declared host architecture. The package builds cleanly with
the patch applied (lintian: one pre-existing warning, national-encoding
in the French FAQ — not introduced by this change).

The debdiff (1.2.5-1 → 1.2.5-1.1) is inlined below.

If you'd prefer to apply the fix yourself and upload, that's great —
please feel free to use this debdiff. If not, I'd like to arrange an
NMU to DELAYED/10 via a sponsor (I'm a new contributor and don't have
upload rights yet). Either way, this bug has been open for nearly a
decade and CrossQA still shows failures — would be good to get it
closed.

I'm also noting a separate issue for a follow-up: debian/watch is broken
(the http://sf.net/bogofilter/ URL pattern no longer matches — upstream
files are now at sourceforge.net/projects/bogofilter/files/bogofilter-stable/
in .tar.xz format). Happy to file a separate bug for that if useful.

Regards,
James Montgomery

--- debdiff bogofilter 1.2.5-1 → 1.2.5-1.1 ---

diff -Nru bogofilter-1.2.5/debian/changelog bogofilter-1.2.5/debian/changelog
--- bogofilter-1.2.5/debian/changelog   2021-02-10 10:00:56.000000000 +0000
+++ bogofilter-1.2.5/debian/changelog   2026-05-04 23:24:55.000000000 +0000
@@ -1,3 +1,11 @@
+bogofilter (1.2.5-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: add --host and --build flags to all configure invocations.
+    (Closes: #837877)
+
+ -- James Montgomery <[email protected]>  Mon, 04 May 2026 23:24:55 
+0000
+
 bogofilter (1.2.5-1) unstable; urgency=high
 
   * New upstream release. (Closes: #980328)
diff -Nru bogofilter-1.2.5/debian/rules bogofilter-1.2.5/debian/rules
--- bogofilter-1.2.5/debian/rules       2018-03-09 19:30:06.000000000 +0000
+++ bogofilter-1.2.5/debian/rules       2026-05-04 23:24:55.000000000 +0000
@@ -19,12 +19,15 @@
 
 override_dh_auto_configure:
        mkdir -p $(CURDIR)/obj-doc
-       cd $(CURDIR)/obj-doc && ../configure
+       cd $(CURDIR)/obj-doc && ../configure \
+               --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
        mkdir $(CURDIR)/obj-db $(CURDIR)/obj-sqlite
        cd $(CURDIR)/obj-db && ../configure --with-database=db \
+               --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \
                AWK=awk $(shell dpkg-buildflags --export=configure)
        cd $(CURDIR)/obj-sqlite && ../configure --with-database=sqlite \
+               --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
                --program-suffix=-sqlite --prefix=/usr 
--mandir=\$${prefix}/share/man \
                --sysconfdir=/etc AWK=awk $(shell dpkg-buildflags 
--export=configure) && \
                sed -i 's/^INTEGRITY_TESTS.*/INTEGRITY_TESTS=t.lock1/' 
src/tests/Makefile
@@ -32,6 +35,7 @@
                mkdir $(CURDIR)/obj-tokyocabinet; \
                cd $(CURDIR)/obj-tokyocabinet && ../configure \
                        --with-database=tokyocabinet 
--program-suffix=-tokyocabinet \
+                       --host=$(DEB_HOST_GNU_TYPE) 
--build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr --mandir=\$${prefix}/share/man 
--sysconfdir=/etc AWK=awk \
                        $(shell dpkg-buildflags --export=configure); \
        fi

Reply via email to