diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..3c2c24b --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,26 @@ +commit a1099983f520395a65ba16a69647f7d8ad8b942d +Author: Bernhard M. Wiedemann +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 = [] + diff --git a/uwsgi.changes b/uwsgi.changes index c49e9b4..17dd14b 100644 --- a/uwsgi.changes +++ b/uwsgi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jun 24 06:59:57 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to override build date to make build more reproducible +- sort list of plugins + ------------------------------------------------------------------- Wed Oct 5 12:14:59 UTC 2016 - buschmann23@opensuse.org diff --git a/uwsgi.spec b/uwsgi.spec index a6e7bfd..141e7e2 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -42,6 +42,8 @@ Patch2: uwsgi-1.9.13-objc_gc-no-fobjc-gc.patch Patch3: uwsgi-1.9.11-systemd_logger-old_systemd.patch # PATCH-FIX-OPENSUSE uwsgi-1.9.13-emperor_pg-Wformat.patch - gcc complains about lack of -Wformat with -Wformat-security from pg_config Patch4: uwsgi-1.9.13-emperor_pg-Wformat.patch +# PATCH-FIX-UPSTREAM reproducible.patch https://github.com/unbit/uwsgi/pull/1561 +Patch5: reproducible.patch %define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+") %if "%{apache_branch}" == "2.4" %define apxs %{_bindir}/apxs2 @@ -448,6 +450,7 @@ This package contains support for rendering XML content using XSLT. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Generate a config that builds all plugins except for examples and stuff we # can't satisfy the requirements for or are just broken excluded_plugins="" @@ -513,7 +516,7 @@ excluded_plugins="$excluded_plugins fiber mongrel2 rack rbthreads ruby19" excluded_plugins="$excluded_plugins glusterfs" %endif -plugins=$(python -c "import sys, os; print ', '.join([p for p in os.listdir('plugins') if p not in sys.argv[1:]])" $excluded_plugins) +plugins=$(python -c "import sys, os; print ', '.join([p for p in sorted(os.listdir('plugins')) if p not in sys.argv[1:]])" $excluded_plugins) sed -e "s#@@LIBDIR@@#%{_libdir}#" -e "s#@@PLUGINS@@#$plugins#" %{SOURCE1} > buildconf/opensuse.ini # README.openSUSE