Bug#1121073: golang-gonum-v1-plot: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Nov 20 14:56:19 GMT 2025


Source: golang-gonum-v1-plot
Version: 0.7.0-5
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: nocheck
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
golang-gonum-v1-plot could not be built reproducibly.

This was because it ships a different binary package depending
on whether the tests are run or not; the testsuite was generating
10s of files that were being installed:

  /usr/share/gocode/src/gonum.org/v1/plot/palette/testdata/reverse.png

Your override_dh_install is already removing a bunch of files
that embed timestamps for reproducibility reasons, but perhaps if
none of this test data is needed in the binary package (?) then
we can simply not ship the testdata/ directory completely and not
play whack-a-mole with new files. Please see the attached patch for
how this might look.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2025-11-19 12:49:28.368331389 -0800
--- b/debian/rules	2025-11-19 12:57:39.339044179 -0800
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export DH_GOLANG_EXCLUDES := testdata
+
 %:
 	dh $@ --builddirectory=_build --buildsystem=golang --with=golang
 
@@ -8,12 +10,3 @@
 	# Tests other than amd64 seem failing randomly, and sometimes due to rounding errors. Disable for other arches for testing migration.
 	-dh_auto_test
 endif
-
-override_dh_install:
-	dh_install
-	# Remove files that embed timestamps, breaking reproducible builds
-	rm -vf debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/vg/vgpdf/testdata/multipage.pdf \
-	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/vg/vgpdf/testdata/issue540.pdf \
-	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/vg/vgpdf/testdata/arc.pdf \
-	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/plotter/testdata/polygon_holes.pdf \
-	    debian/golang-gonum-v1-plot-dev/usr/share/gocode/src/gonum.org/v1/plot/plotter/testdata/polygon_holes.eps \


More information about the Reproducible-bugs mailing list