Source: metacam
Version: 1.2-14
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

metacam fails to cross build from source. Why it fails is a bit
surprising as it fails in the dh_auto_clean step. To understand why, one
has to look at the Makefile and recognize that it includes dependencies
(which are supposed to be deleted while cleaning) and thus the first
step that cleaning does is recomputing dependencies. Since dh_auto_clean
normally does not pass cross tools, and since PAC/BTI introduced
architecture-specific build flags, this recomputation fails and as a
consequence dh_auto_clean fails.

I've tried banging my head on this Makefile to make it just clean
without generating the files to be deleted first, but I failed to make
it do that. No matter how many --assume-new I passed to make, it would
always fail. As such, I suggest ignoring the realclean target and just
get rid of all the files via debian/clean in an quick way. I'm attaching
a patch doing that. Do you think this is reasonable?

Helmut
diff --minimal -Nru metacam-1.2/debian/changelog metacam-1.2/debian/changelog
--- metacam-1.2/debian/changelog        2022-02-23 01:25:42.000000000 +0100
+++ metacam-1.2/debian/changelog        2023-12-15 09:33:05.000000000 +0100
@@ -1,3 +1,10 @@
+metacam (1.2-14.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Clean manually. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 15 Dec 2023 09:33:05 +0100
+
 metacam (1.2-14) unstable; urgency=medium
 
   [ Joao Eriberto Mota Filho ]
diff --minimal -Nru metacam-1.2/debian/clean metacam-1.2/debian/clean
--- metacam-1.2/debian/clean    2022-02-23 01:25:37.000000000 +0100
+++ metacam-1.2/debian/clean    2023-12-15 09:33:05.000000000 +0100
@@ -1 +1,6 @@
 libmetacam.a
+metacam
+*.o *~ *-
+*.dep
+dependencies
+TAGS
diff --minimal -Nru metacam-1.2/debian/rules metacam-1.2/debian/rules
--- metacam-1.2/debian/rules    2022-02-23 01:25:37.000000000 +0100
+++ metacam-1.2/debian/rules    2023-12-15 09:33:05.000000000 +0100
@@ -5,5 +5,10 @@
 %:
        dh $@
 
+# The upstream clean target doesn't work, because it insists in rebuilding
+# dependencies before deleting it and fails doing so. Cleaning now happens
+# via debian/clean.
+override_dh_auto_clean:
+
 override_dh_installchangelogs:
        dh_installchangelogs debian/upstream.changelog

Reply via email to