Source: bam Version: 0.4.0-4 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi, Whilst working on the "reproducible builds" effort [0], we noticed that bam could not be built reproducibly. Patch attached. [0] https://wiki.debian.org/ReproducibleBuilds Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.diff 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.diff 2016-08-12 16:41:37.891216078 +0100 @@ -0,0 +1,30 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2016-08-12 + +--- bam-0.4.0.orig/scripts/tinydoc.py ++++ bam-0.4.0/scripts/tinydoc.py +@@ -1,5 +1,5 @@ + +-import re, time ++import re, time, os + + class Node: + def __init__(self, name): +@@ -167,11 +167,15 @@ class HTMLOutput(Output): + %s + ''' %(img, self.docinfo.name, self.docinfo.note, self.docinfo.copyright) + def render_end(self): ++ try: ++ now = time.gmtime(int(os.environ['SOURCE_DATE_EPOCH'])) ++ except KeyError: ++ now = time.localtime() + return ''' + <hr/> + <small>Generated at %s.</small> + </body> +- ''' % (time.asctime()) ++ ''' % (time.asctime(now)) + + def index_begin(self): return '<h2>Contents</h2><ul>' + def index_end(self): return '</ul><hr/>' --- a/debian/patches/series 2016-08-12 16:35:41.058274016 +0100 --- b/debian/patches/series 2016-08-12 16:41:36.759200656 +0100 @@ -2,3 +2,4 @@ test-error-exit-code.diff fix-ftbfs-kfreebsd.diff fix-ftbfs-tests-fpic.diff +reproducible-build.diff