Source: openssl Version: 1.0.1k-1 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps
Hi, I noticed that the package openssl[1] could not be build reproducibly. The attached patch modifies the crypto/Makefile and util/mkbuildinf.pl so that the first can pass a fixed date to the later, avoiding inserting the localtime into the build. debian/rules has also been modified to export a variable containing the date of the last changelog, to be used as a timestamp. [1] https://reproducible.debian.net/rb-pkg/unstable/amd64/openssl.html
diff --git a/crypto/Makefile b/crypto/Makefile index 2b6397a..7396d47 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -55,7 +55,8 @@ top: all: shared buildinf.h: ../Makefile - $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" >buildinf.h + $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" "$(DATE)" \ + > buildinf.h x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ diff --git a/debian/rules b/debian/rules index 615ce02..cf84660 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,9 @@ package=openssl # For generating the manpages export VERSION=$(shell dpkg-parsechangelog | grep '^Version:' | sed -e 's/^.*://' -e 's/-.*//') +export DATE := $(strip $(shell LC_ALL=C dpkg-parsechangelog --show-field Date | \ + LC_ALL=C date -u --file=- +%c )) + # The binary architeture DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) diff --git a/util/mkbuildinf.pl b/util/mkbuildinf.pl index 9d7b81c..7a14958 100755 --- a/util/mkbuildinf.pl +++ b/util/mkbuildinf.pl @@ -1,9 +1,11 @@ #!/usr/local/bin/perl -my ($cflags, $platform) = @ARGV; +my ($cflags, $platform, $date) = @ARGV; $cflags = "compiler: $cflags"; -$date = localtime(); +if (!$date) { + $date = localtime(); +} print <<"END_OUTPUT"; #ifndef MK1MF_BUILD /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds