Source: python-gflags Version: 1.5.1-2 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], I noticed that python-gflags 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-29 23:26:39.050457866 +0100 @@ -0,0 +1,24 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2016-08-29 + +--- python-gflags-1.5.1.orig/gflags2man.py ++++ python-gflags-1.5.1/gflags2man.py +@@ -174,6 +174,8 @@ class ProgramInfo(object): + self.modules = {} # { section_name(string), [ flags ] } + self.module_list = [] # list of module names in their original order + self.date = time.localtime(time.time()) # default date info ++ if 'SOURCE_DATE_EPOCH' in os.environ: ++ self.date = time.gmtime(int(os.environ['SOURCE_DATE_EPOCH'])) + + def Run(self): + """Run it and collect output. +@@ -188,6 +190,8 @@ class ProgramInfo(object): + + finfo = os.stat(self.executable) + self.date = time.localtime(finfo[stat.ST_MTIME]) ++ if 'SOURCE_DATE_EPOCH' in os.environ: ++ self.date = time.gmtime(finfo[stat.ST_MTIME]) + + logging.info('Running: %s %s </dev/null 2>&1' + % (self.executable, FLAGS.help_flag)) --- a/debian/patches/series 2016-08-29 23:21:57.615594011 +0100 --- b/debian/patches/series 2016-08-29 23:26:38.086448077 +0100 @@ -1,2 +1,3 @@ python2.7-testsuite.patch python3-fixes.patch +reproducible-build.patch
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds