[Reproducible-builds] Bug#834192: handbrake: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Aug 12 22:05:30 UTC 2016
Source: handbrake
Version: 0.10.5+ds1-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Hi,
Whilst working on the "reproducible builds" effort [0], we noticed
that handbrake could not be built reproducibly.
Patch attached.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/006-reproducile-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/006-reproducile-build.patch 2016-08-12 22:56:04.545879965 +0100
@@ -0,0 +1,42 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-08-12
+
+--- handbrake-0.10.5+ds1.orig/make/configure.py
++++ handbrake-0.10.5+ds1/make/configure.py
+@@ -841,7 +841,7 @@ class Project( Action ):
+
+ url_ctype = '_unstable'
+ url_ntype = 'unstable'
+- self.build = time.strftime('%Y%m%d') + '01'
++ self.build = time.strftime('%Y%m%d', now) + '01'
+ self.title = '%s %s (%s)' % (self.name,self.version,self.build)
+ else:
+ m = re.match('^([a-zA-Z]+)\.([0-9]+)$', suffix)
+@@ -860,7 +860,7 @@ class Project( Action ):
+ url_ctype = '_unstable'
+ url_ntype = 'unstable'
+
+- self.build = time.strftime('%Y%m%d') + '00'
++ self.build = time.strftime('%Y%m%d', now) + '00'
+ self.title = '%s %s (%s)' % (self.name,self.version,self.build)
+
+ self.url_appcast = 'https://handbrake.fr/appcast%s%s.xml' % (url_ctype,url_arch)
+@@ -1430,6 +1430,8 @@ try:
+ if arg == '--verbose':
+ verbose = Configure.OUT_VERBOSE
+
++ now = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
++
+ ## create main objects; actions/probes run() is delayed.
+ ## if any actions must be run earlier (eg: for configure --help purposes)
+ ## then run() must be invoked earlier. subequent run() invocations
+@@ -1743,7 +1745,7 @@ int main()
+ else:
+ doc.add( 'BUILD.cross.prefix', '' )
+
+- doc.add( 'BUILD.date', time.strftime('%c') )
++ doc.add( 'BUILD.date', time.strftime('%c', now) ),
+ doc.add( 'BUILD.arch', arch.mode.mode )
+
+ doc.addBlank()
--- a/debian/patches/series 2016-08-12 22:14:29.905943199 +0100
--- b/debian/patches/series 2016-08-12 22:55:44.093714828 +0100
@@ -2,3 +2,4 @@
002-Remove-embedded-downloaded-copies-of-various-librari.patch
003-remove-vpx.patch
005-use-libtoolize.patch
+006-reproducile-build.patch
More information about the Reproducible-builds
mailing list