From: Chris Lamb Date: Thu, 8 Sep 2016 19:43:40 +0000 (+0100) Subject: build: Use UTC datetime for build info. X-Git-Tag: 1.0.0~233 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc267da0fef873feab42075fe8649fe6812ec9f4;p=handbrake build: Use UTC datetime for build info. Makes build reproducible per https://wiki.debian.org/ReproducibleBuilds Signed-off-by: Chris Lamb --- diff --git a/make/configure.py b/make/configure.py index d4a0dff5a..c7a5fedc9 100644 --- a/make/configure.py +++ b/make/configure.py @@ -848,7 +848,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) @@ -867,7 +867,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) @@ -1484,6 +1484,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 @@ -1824,7 +1826,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()