From 7c76c1dfee41c6cbc1e83319907484ff05e87045ee81fb11f1e86550be139d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 25 May 2018 14:45:59 +0000 Subject: [PATCH] Accepting request 612228 from home:bmwiedemann:branches:devel:languages:python Add reproducible.patch to make build reproducible (boo#1041090) OBS-URL: https://build.opensuse.org/request/show/612228 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-datrie?expand=0&rev=8 --- python-datrie.changes | 5 +++++ python-datrie.spec | 2 ++ reproducible.patch | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 reproducible.patch diff --git a/python-datrie.changes b/python-datrie.changes index c5a38e6..3303387 100644 --- a/python-datrie.changes +++ b/python-datrie.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 25 12:12:43 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to make build reproducible (boo#1041090) + ------------------------------------------------------------------- Thu Mar 15 18:10:19 CET 2018 - ro@suse.de diff --git a/python-datrie.spec b/python-datrie.spec index 8de291b..8dceff5 100644 --- a/python-datrie.spec +++ b/python-datrie.spec @@ -26,6 +26,7 @@ Group: Development/Languages/Python Url: https://github.com/kmike/datrie Source: https://files.pythonhosted.org/packages/source/d/datrie/datrie-%{version}.tar.gz Patch0: datrie-bigendian.patch +Patch1: reproducible.patch BuildRequires: %{python_module Cython >= 0.26.1} BuildRequires: %{python_module devel} BuildRequires: %{python_module hypothesis} @@ -43,6 +44,7 @@ A trie data structure for Python (2.x and 3.x). Uses libdatrie. %prep %setup -q -n datrie-%{version} %patch0 -p1 +%patch1 -p1 pushd src cython datrie.pyx popd diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..5349b02 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,23 @@ +commit 561af3d93c5d7e0cb1e389797943dc3e229cfed7 +Author: Bernhard M. Wiedemann +Date: Fri Mar 9 11:09:08 2018 +0100 + + Sort input file list + + so that datrie builds in a reproducible way + in spite of indeterministic filesystem readdir order + and http://bugs.python.org/issue30461 + +diff --git a/setup.py b/setup.py +index c861f8a..54c7adb 100755 +--- a/setup.py ++++ b/setup.py +@@ -7,7 +7,7 @@ import os + from setuptools import setup, Extension + + LIBDATRIE_DIR = 'libdatrie' +-LIBDATRIE_FILES = glob.glob(os.path.join(LIBDATRIE_DIR, "datrie", "*.c")) ++LIBDATRIE_FILES = sorted(glob.glob(os.path.join(LIBDATRIE_DIR, "datrie", "*.c"))) + + DESCRIPTION = __doc__ + LONG_DESCRIPTION = open('README.rst').read() + open('CHANGES.rst').read()