From 461b84379a342cd2b87c80e34a45ee33186dc1eca2af713ed1b1dc09a2365517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 20 Feb 2018 13:42:29 +0000 Subject: [PATCH] Accepting request 578354 from home:bmwiedemann:reproducible Add python-sorted_tar.patch (boo#1081750) OBS-URL: https://build.opensuse.org/request/show/578354 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=225 --- python-base.changes | 5 +++++ python-base.spec | 3 +++ python-doc.spec | 3 +++ python-sorted_tar.patch | 21 +++++++++++++++++++++ python.spec | 3 +++ 5 files changed, 35 insertions(+) create mode 100644 python-sorted_tar.patch diff --git a/python-base.changes b/python-base.changes index b8fa10c..73a4f9b 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 20 13:14:27 UTC 2018 - bwiedemann@suse.com + +- Add python-sorted_tar.patch (boo#1081750) + ------------------------------------------------------------------- Mon Feb 5 16:01:59 UTC 2018 - normand@linux.vnet.ibm.com diff --git a/python-base.spec b/python-base.spec index 6f1f89c..69106f1 100644 --- a/python-base.spec +++ b/python-base.spec @@ -60,6 +60,8 @@ Patch38: reproducible.patch Patch39: python-fix-shebang.patch # bypass boo#1078485 random failing tests Patch40: python-skip_random_failing_tests.patch +# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263 +Patch41: python-sorted_tar.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -167,6 +169,7 @@ other applications. %ifarch ppc ppc64 ppc64le %patch40 -p1 %endif +%patch41 -p1 # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.ac diff --git a/python-doc.spec b/python-doc.spec index ce38710..1e0afdb 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -61,6 +61,8 @@ Patch38: reproducible.patch Patch39: python-fix-shebang.patch # bypass boo#1078485 random failing tests Patch40: python-skip_random_failing_tests.patch +# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263 +Patch41: python-sorted_tar.patch # COMMON-PATCH-END Provides: pyth_doc Provides: pyth_ps @@ -114,6 +116,7 @@ Python, and Macintosh Module Reference in PDF format. %ifarch ppc ppc64 ppc64le %patch40 -p1 %endif +%patch41 -p1 # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.ac diff --git a/python-sorted_tar.patch b/python-sorted_tar.patch new file mode 100644 index 0000000..b7a6088 --- /dev/null +++ b/python-sorted_tar.patch @@ -0,0 +1,21 @@ +commit 6936e36efcc0a75c7d5e67b949c9749d61fa5ead +Author: Bernhard M. Wiedemann +Date: Sun Jun 18 03:50:25 2017 +0200 + + tarfile: sort directory listing + + to generate tar files in a more reproducible way + +diff --git a/Lib/tarfile.py b/Lib/tarfile.py +index adf91d5382..36f6ed7167 100644 +--- a/Lib/tarfile.py ++++ b/Lib/tarfile.py +@@ -2027,7 +2027,7 @@ class TarFile(object): + elif tarinfo.isdir(): + self.addfile(tarinfo) + if recursive: +- for f in os.listdir(name): ++ for f in sorted(os.listdir(name)): + self.add(os.path.join(name, f), os.path.join(arcname, f), + recursive, exclude, filter) + diff --git a/python.spec b/python.spec index b07686b..35a2e8a 100644 --- a/python.spec +++ b/python.spec @@ -66,6 +66,8 @@ Patch38: reproducible.patch Patch39: python-fix-shebang.patch # bypass boo#1078485 random failing tests Patch40: python-skip_random_failing_tests.patch +# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263 +Patch41: python-sorted_tar.patch # COMMON-PATCH-END BuildRequires: automake BuildRequires: db-devel @@ -220,6 +222,7 @@ that rely on earlier non-verification behavior. %ifarch ppc ppc64 ppc64le %patch40 -p1 %endif +%patch41 -p1 # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.ac