Bug#1121858: golang-github-notaryproject-notation-go: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Dec 3 19:48:52 GMT 2025


Source: golang-github-notaryproject-notation-go
Version: 1.3.2-1
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-github-notaryproject-notation-go could not be built reproducibly.

This is because the testsuite generated some files in a "tmp/" directory
which ended up in the binary package, but, of course, only if the tests
are not skipped.

Patch attached that removes these in execute_after_dh_auto_test.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2025-12-03 11:42:47.232121709 -0800
--- b/debian/rules	2025-12-03 11:46:15.480368905 -0800
@@ -1,10 +1,15 @@
 #!/usr/bin/make -f
 
+BUILD_DIR := _build/src/github.com/notaryproject/notation-go
+
 export DH_GOLANG_INSTALL_EXTRA := $(wildcard config/testdata/*/*.json)
 
 %:
 	dh $@ --builddirectory=_build --buildsystem=golang
 
+execute_after_dh_auto_test:
+	rm -rfv $(BUILD_DIR)/tmp/
+
 # executable-not-elf-or-script
 execute_before_dh_auto_install:
-	chmod -v -x $(CURDIR)/_build/src/github.com/notaryproject/notation-go/plugin/testdata/plugins/foo/notation-foo
+	chmod -v -x $(CURDIR)/$(BUILD_DIR)/plugin/testdata/plugins/foo/notation-foo


More information about the Reproducible-bugs mailing list