Source: golang-gonum-v1-plot
Version: 0.7.0-5
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: nocheck
X-Debbugs-Cc: [email protected]

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
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- 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
 \

Reply via email to