Bug#974959: dynare: reproducible builds: autotools generated files contain variable paths and data

2020-11-27 Thread Sébastien Villemot
Le mercredi 25 novembre 2020 à 12:55 -0800, Vagrant Cascadian a écrit :
> Thanks for the upload, it appears to have fixed *almost* all the
> reproducibility issues!
> 
> Unfortunately there is still an issue with Makefile.in, looking at the
> latest build:
> 
>   
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/dynare.html
> 
> 
> Apparently Makefile.in is generated in an non-deterministic way, which
> somehow I didn't catch in my earlier testing.
> 
> It might be good to remove Makefile.in as well, as those files can still
> be regenerated from Makefile.am...

Removing Makefile.in is a bit more complicated, because that means that
automake needs to be run again in the postinst (we’re talking about
compilation on the user machine), and a dependency on automake thus
needs to be added.

Alternatively, the problem could be fixed directly in automake. I don’t
see why it should behave non-deterministically.

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  https://sebastien.villemot.name
⠈⠳⣄  https://www.debian.org



signature.asc
Description: This is a digitally signed message part


Bug#974959: dynare: reproducible builds: autotools generated files contain variable paths and data

2020-11-25 Thread Vagrant Cascadian
Thanks for the upload, it appears to have fixed *almost* all the
reproducibility issues!

Unfortunately there is still an issue with Makefile.in, looking at the
latest build:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/dynare.html

Apparently Makefile.in is generated in an non-deterministic way, which
somehow I didn't catch in my earlier testing.

It might be good to remove Makefile.in as well, as those files can still
be regenerated from Makefile.am...


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#974959: dynare: reproducible builds: autotools generated files contain variable paths and data

2020-11-16 Thread Vagrant Cascadian
Source: dynare
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: usrmerge buildpath randomness
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

In files shipped in dynare, build paths, binary paths and data in
arbitrary order are embedded in a shipped Makefile and data
autom4te.cache/requests file:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/dynare.html

/usr/src/matlab/dynare-matlab/mex/sources/Makefile contains build paths
(e.g. /build/1st/dynare-4.6.2/ vs. /build/2/dynare-4.6.2/2nd/) and when
built on a usrmerge system vs. a non-usermerge system, binary paths that
vary (e.g. /bin/grep vs. /usr/bin/grep).

/usr/src/matlab/dynare-matlab/mex/build/matlab/autom4te.cache/requests
contains what appears to be the same information but in an undefined
order varies between builds.

I *think* these files would need to be regenerated in order to be used
by the end-user, as the build paths or binary paths embedded in them may
not match the system on which they would be used. If that is correct,
the attached patch removes these files using a debian/rules dh_install
override.


live well,
  vagrant
From 6eb2e4c4bd27441a0039eec4704f526de033045d Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian 
Date: Tue, 17 Nov 2020 03:03:57 +
Subject: [PATCH 2/2] debian/rules: Remove Makefile and autom4te.cache/requests
 in dh_install override.

These files contain build-specific information and need to be
regenerated when used anyways.
---
 debian/rules | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/debian/rules b/debian/rules
index c77220d..5d0839e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,6 +31,13 @@ override_dh_auto_test:
 execute_before_dh_auto_clean:
 	-[ -f Makefile ] && echo -e "distclean:\n\t-rm -f Makefile" > mex/build/matlab/Makefile
 
+override_dh_install:
+	dh_install
+	# Remove auto-generated files which cause reproducibility
+	# issues and need to be regenerated to use.
+	rm -f debian/dynare-matlab/usr/src/matlab/dynare-matlab/mex/sources/Makefile
+	rm -f debian/dynare-matlab/usr/src/matlab/dynare-matlab/mex/build/matlab/autom4te.cache/requests 
+
 execute_after_dh_installdocs-indep:
 	cp -dR doc/manual/build/html/ debian/dynare-doc/usr/share/doc/dynare/dynare.html
 
-- 
2.29.2



signature.asc
Description: PGP signature