Bug#1059014: stunnel4: please make the build reproducible

Chris Lamb lamby at debian.org
Tue Dec 19 10:12:01 GMT 2023


Source: stunnel4
Version: 3:5.70-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
stunnel4 could not be built reproducibly.

This is because the stunnel manpage embedded the current build date. A
patch is attached that seeds this value from SOURCE_DATE_EPOCH if it is
available.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/07-reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/07-reproducible-build.patch	2023-12-19 10:10:27.992405010 +0000
@@ -0,0 +1,19 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-12-19
+
+--- stunnel4-5.70.orig/doc/Makefile.am
++++ stunnel4-5.70/doc/Makefile.am
+@@ -14,9 +14,11 @@ DISTCLEANFILES = $(doc_DATA)
+ 
+ SUFFIXES = .pod.in .8.in .html.in
+ 
++BUILD_DATE = $(shell date --utc --date=@$(or $(SOURCE_DATE_EPOCH),$(shell date +%s)) +%Y.%m.%d)
++
+ .pod.in.8.in:
+ 	pod2man -u -n stunnel -s 8 -r $(VERSION) \
+-		-c "stunnel4 TLS Proxy" -d `date +%Y.%m.%d` $< $@
++		-c "stunnel4 TLS Proxy" -d $(BUILD_DATE) $< $@
+ 
+ .pod.in.html.in:
+ 	pod2html --index --backlink --header \
--- a/debian/patches/series	2023-12-19 09:51:42.220785283 +0000
--- b/debian/patches/series	2023-12-19 10:00:22.317767514 +0000
@@ -3,3 +3,4 @@
 03-runas-user.patch
 05-sample-sysconfdir.patch
 06-no-openssl-version-check-autopkgtest.patch
+07-reproducible-build.patch


More information about the Reproducible-bugs mailing list