[Debian-med-packaging] Bug#1127473: raster3d: Fails to build source after successful build

Santiago Vila sanvila at debian.org
Mon Feb 9 11:40:41 GMT 2026


Package: src:raster3d
Version: 3.0-8-2
Tags: forky sid ftbfs patch

Hello Étienne.

Trying to build source after a binary build results in this error:

dpkg-source: info: local changes detected, the modified files are:
  raster3d-3.0-8/Makefile.incl
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/raster3d_3.0-8-2.diff.SBkmKl

Looks like "prevent_Makefile.incl_removal.patch" was your attempt at fixing this issue,
but it seems it did not work. I can reproduce the problem by using this simple script:

#!/bin/sh
sbuild --arch-all --arch-any --chroot-mode=unshare -d sid-unshare -v --no-run-lintian \
   --finished-build-commands="cd %SBUILD_PKGBUILD_DIR && dpkg-buildpackage --sanitize-env -us -uc -S" $1

I'm attaching a patch which works for me, the patch "prevent_etc" does not seem necessary,
and everything seems to work ok if we remove Makefile.incl in the clean target
(or debian/clean) and create it as an empty file as the very first to do when
building the package.

This is probably the spirit of the upstream code, except that they decided to ship
a non-empty Makefile.incl in the upstream tarball, which seems a little bit
inconsistent to me...

I would normally apply the patch and make a team upload, but you clearly spent
some time thinking about this, so I wanted to ask first: Do you see any
other way (maybe better) to fix the ftbfs-source-after-build issue?

Thanks.
-------------- next part --------------
commit b8239812c26225dbec30a841b6e50c1cc016c435
Author: Santiago Vila <sanvila at debian.org>
Date:   Mon Feb 9 12:20:00 2026 +0100

    Fix clean target (allow building source after binary build).

diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..848f07e
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+Makefile.incl
diff --git a/debian/patches/prevent_Makefile.incl_removal.patch b/debian/patches/prevent_Makefile.incl_removal.patch
deleted file mode 100644
index 49d7cd8..0000000
--- a/debian/patches/prevent_Makefile.incl_removal.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: workaround dpkg-buildpackage choking on missing file.
-Author: Étienne Mollier <emollier at debian.org>
-Forwarded: not-needed
-Last-Update: 2025-09-24
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- raster3d.orig/Makefile
-+++ raster3d/Makefile
-@@ -26,8 +26,6 @@
- 	$(MAKE) -C examples clean
- 
- distclean: clean
--	rm -f Makefile.incl 
--	touch Makefile.incl
- 	if [ -e aix-patch ] ; then rm -f aix-patch; fi
- 	exit 0
- 
diff --git a/debian/patches/series b/debian/patches/series
index ad08c2b..ed91d91 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,6 +17,5 @@ raster3d.man.diff
 render.man.diff
 rods.man.diff
 
-prevent_Makefile.incl_removal.patch
 sequence_normal3d_qinp.patch
 buildflags.patch
diff --git a/debian/rules b/debian/rules
index 0efd27e..89e7a9b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 	dh $@
 
 override_dh_auto_build:
+	touch Makefile.incl
 	$(MAKE) linux
 
 override_dh_auto_install:


More information about the Debian-med-packaging mailing list