Source: varnish Version: 4.1.3-2 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: randomness X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], I noticed that varnish could not be built reproducibly. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2016-08-21 22:15:40.121132734 +0100 @@ -0,0 +1,21 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2016-08-21 + +--- varnish-4.1.3.orig/lib/libvcc/vmodtool.py ++++ varnish-4.1.3/lib/libvcc/vmodtool.py +@@ -41,7 +41,7 @@ import re + import optparse + import unittest + import random +-from os import fdopen, rename, unlink ++from os import fdopen, rename, unlink, environ + from os.path import dirname, exists, join, realpath + from pprint import pprint, pformat + from tempfile import mkstemp +@@ -1002,4 +1002,5 @@ if __name__ == "__main__": + oparser.print_help() + exit(-1) + ++ random.seed(environ.get('SOURCE_DATE_EPOCH')) + runmain(i_vcc, opts.rstdir, opts.output) --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2016-08-21 22:15:38.889119096 +0100 @@ -0,0 +1 @@ +reproducible-build.patch