Marguerite Su 2018-02-26 02:32:57 +00:00 committed by Git OBS Bridge
parent 5f085e72ae
commit 054ea267dd

View File

@ -1,26 +0,0 @@
commit a1099983f520395a65ba16a69647f7d8ad8b942d
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Sat Jun 24 08:46:51 2017 +0200
Allow to override build date
to allow for reproducible builds of uwsgi
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Index: uwsgi-2.0.14/uwsgiconfig.py
===================================================================
--- uwsgi-2.0.14.orig/uwsgiconfig.py
+++ uwsgi-2.0.14/uwsgiconfig.py
@@ -387,7 +387,8 @@ def build_uwsgi(uc, print_only=False, gc
gcc_list.append(item)
cflags.append('-DUWSGI_CFLAGS=\\"%s\\"' % uwsgi_cflags)
- cflags.append('-DUWSGI_BUILD_DATE="\\"%s\\""' % time.strftime("%d %B %Y %H:%M:%S"))
+ build_date = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
+ cflags.append('-DUWSGI_BUILD_DATE="\\"%s\\""' % time.strftime("%d %B %Y %H:%M:%S", time.gmtime(build_date)))
post_build = []