From b56321e80de05ac6a89fcc38687ce5746785db39 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 26 2017 09:56:59 +0000 Subject: import python27-python-setuptools-0.9.8-6.el7 --- diff --git a/SOURCES/easy_install-fips-mode.patch b/SOURCES/easy_install-fips-mode.patch new file mode 100644 index 0000000..82a64bc --- /dev/null +++ b/SOURCES/easy_install-fips-mode.patch @@ -0,0 +1,16 @@ +diff --git a/setuptools/package_index.py b/setuptools/package_index.py +index 9c9d76a..b641d21 100644 +--- a/setuptools/package_index.py ++++ b/setuptools/package_index.py +@@ -232,7 +232,10 @@ class HashChecker(ContentChecker): + + def __init__(self, hash_name, expected): + self.hash_name = hash_name +- self.hash = hashlib.new(hash_name) ++ if hash_name == 'md5': ++ self.hash = hashlib.new(hash_name, usedforsecurity=False) ++ else: ++ self.hash = hashlib.new(hash_name) + self.expected = expected + + @classmethod diff --git a/SPECS/python-setuptools.spec b/SPECS/python-setuptools.spec index 646acbc..aa4ab54 100644 --- a/SPECS/python-setuptools.spec +++ b/SPECS/python-setuptools.spec @@ -5,7 +5,7 @@ Name: %{?scl_prefix}python-setuptools Version: 0.9.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Easily build and distribute Python packages Group: Applications/System @@ -23,6 +23,9 @@ Patch1: setuptools-ssl-match_hostname-wildcard.patch # Fixes easy_install throwing SSL error when behind HTTPS proxy # https://bugzilla.redhat.com/show_bug.cgi?id=1085459 Patch2: restore-proxy-support-SSL-connection.patch +# Fix easy_install in FIPS mode +# https://bugzilla.redhat.com/show_bug.cgi?id=1425141 +Patch3: easy_install-fips-mode.patch BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -53,6 +56,7 @@ This package contains the distribute fork of setuptools. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 find -name '*.txt' -exec chmod -x \{\} \; find . -name '*.orig' -exec rm \{\} \; @@ -96,6 +100,10 @@ rm -rf %{buildroot} %{_bindir}/easy_install-2.* %changelog +* Mon Feb 20 2017 Tomas Orsava - 0.9.8-6 +- Fix easy_install in fips mode +Resolves: rhbz#1425141 + * Mon May 18 2015 Matej Stuchlik - 0.9.8-5 - Enhance patch restoring proxy support in SSL connections Resolves: rhbz#1222507