Source: cobbler
Version: 2.6.6+dfsg1-12
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 cobbler could not be built reproducibly.
Patch attached. It can probably be sent upstream.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` la...@debian.org / chris-lamb.co.uk
`-
--- a/debian/patches/80_reproducible_build.patch1970-01-01
02:00:00.0 +0200
--- b/debian/patches/80_reproducible_build.patch2016-07-14
10:05:45.489920397 +0200
@@ -0,0 +1,22 @@
+Author: Chris Lamb
+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