From 23345c5b9c778f910df3f4b2e9c26ca9e80d406f Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Jul 15 2019 15:09:43 +0000 Subject: [PATCH 1/2] Recommend libcrypt.so.1 for manylinux1 compatibility --- diff --git a/python-pip.spec b/python-pip.spec index dfdf6a7..442f41b 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -23,7 +23,7 @@ Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! # You can use vendor_meta.sh in the dist git repo Version: 19.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tool for installing and managing Python packages # We bundle a lot of libraries with pip, which itself is under MIT license. @@ -155,6 +155,22 @@ Provides: bundled(python%{1}dist(urllib3)) = 1.24.1 Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 } +# Some manylinux1 wheels need libcrypt.so.1. +# Manylinux1, a common (as of 2019) platform tag for binary wheels, relies +# on a glibc version that included ancient crypto functions, which were +# moved to libxcrypt and then removed in: +# https://fedoraproject.org/wiki/Changes/FullyRemoveDeprecatedAndUnsafeFunctionsFromLibcrypt +# The manylinux1 standard assumed glibc would keep ABI compatibility, +# but that's only the case if libcrypt.so.1 (libxcrypt-compat) is around. +# This should be solved in the next manylinux standard (but it may be +# a long time until manylinux1 is phased out). +# See: https://github.com/pypa/manylinux/issues/305 +# Note that manylinux is only applicable to x86 (both 32 and 64 bits) +%global crypt_compat_recommends() %{expand: +Recommends: (libcrypt.so.1()(64bit) if python3(x86-64)) +Recommends: (libcrypt.so.1 if python3(x86-32)) +} + %if %{with python2} %package -n python2-%{srcname} @@ -183,6 +199,8 @@ Requires: python2-setuptools %{?python_provide:%python_provide python2-%{srcname}} +%{crypt_compat_recommends} + %description -n python2-%{srcname} pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -223,6 +241,8 @@ Requires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +%{crypt_compat_recommends} + %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index @@ -249,6 +269,8 @@ Requires: ca-certificates %{bundled 2} %{bundled 3} +%{crypt_compat_recommends} + %description wheel A Python wheel of pip to use with venv. %endif @@ -493,6 +515,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip %endif %changelog +* Mon Jul 15 2019 Petr Viktorin - 19.1.1-3 +- Recommend libcrypt.so.1 for manylinux1 compatibility + * Mon Jun 10 2019 Miro HronĨok - 19.1.1-2 - Fix root warning when pip is invoked via python -m pip - Remove a redundant second WARNING prefix form the abovementioned warning From 5813f49ff170af1fa870b3be545d47819a7f5d9c Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Jul 15 2019 16:06:26 +0000 Subject: [PATCH 2/2] Use correct Python versions --- diff --git a/python-pip.spec b/python-pip.spec index 442f41b..11f1b52 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -167,8 +167,8 @@ Provides: bundled(python%{1}dist(webencodings)) = 0.5.1 # See: https://github.com/pypa/manylinux/issues/305 # Note that manylinux is only applicable to x86 (both 32 and 64 bits) %global crypt_compat_recommends() %{expand: -Recommends: (libcrypt.so.1()(64bit) if python3(x86-64)) -Recommends: (libcrypt.so.1 if python3(x86-32)) +Recommends: (libcrypt.so.1()(64bit) if python%{1}(x86-64)) +Recommends: (libcrypt.so.1 if python%{1}(x86-32)) } @@ -199,7 +199,7 @@ Requires: python2-setuptools %{?python_provide:%python_provide python2-%{srcname}} -%{crypt_compat_recommends} +%{crypt_compat_recommends 2} %description -n python2-%{srcname} pip is a package management system used to install and manage software packages @@ -241,7 +241,7 @@ Requires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} -%{crypt_compat_recommends} +%{crypt_compat_recommends 3} %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages @@ -269,7 +269,8 @@ Requires: ca-certificates %{bundled 2} %{bundled 3} -%{crypt_compat_recommends} +%{crypt_compat_recommends 2} +%{crypt_compat_recommends 3} %description wheel A Python wheel of pip to use with venv.