[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-octave-devel] Unreproducible builds



Several DOG packages have unreproducible builds [1], due to the way "pkg install" works by creating a temporary build diretory, whose name is randomly chosen [2].

I found a way to get around this problem by changing the code in otave-pkg.mk from the octave-pkg-dev package, according to the patch attached to this message. It is not very elegant, but it seems to work well. Unless there are objections or someone finds a better solution, I will commit this change.

Rafael

1. https://reproducible.debian.net/issues/unstable/random_buildpath_by_octave_issue.html 2. https://sources.debian.net/src/octave/4.0.0-5/scripts/pkg/private/install.m/?hl=67,70,96#L67
diff --git a/octave-pkg.mk b/octave-pkg.mk
index 1ed2d46..31cd3d7 100644
--- a/octave-pkg.mk
+++ b/octave-pkg.mk
@@ -110,6 +110,10 @@ install-pkg:
 		 if (exist ('PKG_ADD.bak') == 2),			\
 		     movefile ('PKG_ADD.bak', 'PKG_ADD');		\
 		 endif;							\
+		 function d = tempname;					\
+		 	d = '/tmp/build';				\
+			system (['rm -rf ', d]);			\
+		 endfunction;						\
 		 pkg -verbose -nodeps install ."
 	$(shrpkg)/dh/octave-pkg-helper
 	dh_install --package=$(package)

Reply to: