[PKG-Openstack-devel] Bug#831214: cobbler: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Jul 14 08:10:30 UTC 2016


Source: cobbler
Version: 2.6.6+dfsg1-12
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 cobbler could not be built reproducibly.

Patch attached. It can probably be sent upstream.

 [0] https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/80_reproducible_build.patch	1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/80_reproducible_build.patch	2016-07-14 10:05:45.489920397 +0200
@@ -0,0 +1,22 @@
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-07-14
+
+--- cobbler-2.6.6+dfsg1.orig/setup.py
++++ cobbler-2.6.6+dfsg1/setup.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env python
+ 
+-import os, sys, time
++import os, sys, time, datetime
+ import glob as _glob
+ 
+ from distutils.core import setup, Command
+@@ -63,7 +63,7 @@ def glob(*args, **kwargs):
+ #####################################################################
+ 
+ def gen_build_version():
+-    builddate = time.asctime()
++    builddate = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).strftime('%a %b %e %H:%M:%S UTC %Y');
+     cmd = subprocess.Popen(["/usr/bin/git", "log", "--format=%h%n%ad", "-1"], stdout=subprocess.PIPE)
+     data = cmd.communicate()[0].strip()
+     if cmd.returncode == 0:
--- a/debian/patches/series	2016-07-14 09:48:54.158352639 +0200
--- b/debian/patches/series	2016-07-14 10:00:33.054364958 +0200
@@ -12,3 +12,4 @@
 fix-defaults-settings.patch
 fix-wsgi-application-definition-with-django-1.7.patch
 added-fuel-bootstrap-iso-as-source-for-pxelinux.0.patch
+80_reproducible_build.patch


More information about the Openstack-devel mailing list