From c6fe1446b439b81a540710dd77541106b808f6a5ba6f389dbdf6601584935fca Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 5 Aug 2022 15:13:09 +0000 Subject: [PATCH] Accepting request 993345 from home:mcepl:branches:devel:languages:python - Add distutils-reproducible-compile.patch to make installed files ordered correctly and thus builds reproducible again (port of the fix for bpo#29708 and gh#python/cpython#8057). OBS-URL: https://build.opensuse.org/request/show/993345 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=99 --- distutils-reproducible-compile.patch | 15 +++++++++++++++ python-pip.changes | 7 +++++++ python-pip.spec | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 distutils-reproducible-compile.patch diff --git a/distutils-reproducible-compile.patch b/distutils-reproducible-compile.patch new file mode 100644 index 0000000..bca5978 --- /dev/null +++ b/distutils-reproducible-compile.patch @@ -0,0 +1,15 @@ +--- + src/pip/_vendor/distlib/wheel.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/pip/_vendor/distlib/wheel.py ++++ b/src/pip/_vendor/distlib/wheel.py +@@ -538,7 +538,7 @@ class Wheel(object): + maker.source_dir = workdir + maker.target_dir = None + try: +- for zinfo in zf.infolist(): ++ for zinfo in sorted(zf.infolist()): + arcname = zinfo.filename + if isinstance(arcname, text_type): + u_arcname = arcname diff --git a/python-pip.changes b/python-pip.changes index 9b7c9c2..a34f54b 100644 --- a/python-pip.changes +++ b/python-pip.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 23 20:08:32 UTC 2022 - Matej Cepl + +- Add distutils-reproducible-compile.patch to make installed + files ordered correctly and thus builds reproducible again + (port of the fix for bpo#29708 and gh#python/cpython#8057). + ------------------------------------------------------------------- Sat Mar 19 17:14:58 UTC 2022 - Ben Greiner diff --git a/python-pip.spec b/python-pip.spec index 4456ea7..8476f77 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -50,6 +50,9 @@ URL: http://www.pip-installer.org Source: https://github.com/pypa/pip/archive/%{version}.tar.gz#/pip-%{version}-gh.tar.gz # PATCH-FIX-OPENSUSE pip-shipped-requests-cabundle.patch -- adapted patch from python-certifi package Patch0: pip-shipped-requests-cabundle.patch +# PATCH-FIX-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com +# To get reproducible builds, byte_compile() of distutils.util now sorts filenames. +Patch1: distutils-reproducible-compile.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools >= 40.8.0} BuildRequires: fdupes