diff --git a/SOURCES/0001-Fix-GreenSSLSocket-for-python3-3.6.8-56.el8.patch b/SOURCES/0001-Fix-GreenSSLSocket-for-python3-3.6.8-56.el8.patch new file mode 100644 index 0000000..abd1794 --- /dev/null +++ b/SOURCES/0001-Fix-GreenSSLSocket-for-python3-3.6.8-56.el8.patch @@ -0,0 +1,30 @@ +From 6010f082ee48859a0965c0289cff7434a768d855 Mon Sep 17 00:00:00 2001 +From: Alfredo Moralejo +Date: Wed, 22 Nov 2023 18:08:11 +0100 +Subject: [PATCH] Fix GreenSSLSocket for python3-3.6.8-56.el8 + +In CentOS Stream 8, python3-3.6.8-56.el8 has backported a cve fix which +changes the behavior of SSLSocket to make it similar to python3 >= 3.7 +[1]. This patch is delaring _timeout while creating the GreenSSLSocket. + +[1] https://gitlab.com/redhat/centos-stream/rpms/python3/-/commit/b1da2b26d2c7066b271a3bdd9d508e97bc38da81 +--- + eventlet/green/ssl.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/eventlet/green/ssl.py b/eventlet/green/ssl.py +index c49e872..9c20d59 100644 +--- a/eventlet/green/ssl.py ++++ b/eventlet/green/ssl.py +@@ -110,6 +110,8 @@ class GreenSSLSocket(_original_sslsocket): + self._timeout = sock.gettimeout() + + if _is_under_py_3_7: ++ # This is required for CentOS Stream 8 python 3.6 >= python3-3.6.8-56.el8 ++ self._timeout = sock.gettimeout() + # nonblocking socket handshaking on connect got disabled so let's pretend it's disabled + # even when it's on + super(GreenSSLSocket, self).__init__( +-- +2.38.1 + diff --git a/SPECS/python-eventlet.spec b/SPECS/python-eventlet.spec index 7eb8ec2..46a77f5 100644 --- a/SPECS/python-eventlet.spec +++ b/SPECS/python-eventlet.spec @@ -4,7 +4,7 @@ Name: python-%{modname} Version: 0.33.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Highly concurrent networking library %if %bundle_dns License: MIT and ISC @@ -20,6 +20,8 @@ Patch0: switch_to_python_cryptography.patch # Since Python 3.10 MutableMapping is available in collections.abc instead of collections. # This is already fixed in dnspython 2.0.0+, but eventlet still uses old 1.16.0. Patch1: 0001-import-MutableMapping-from-collections.abc.patch +# Fixes GreenSSLSocket for >= python3-3.6.8-56.el8 +Patch2: 0001-Fix-GreenSSLSocket-for-python3-3.6.8-56.el8.patch BuildArch: noarch %description @@ -71,6 +73,7 @@ BuildRequires: python3-zmq %else %setup -n %{modname}-%{version} -q %endif +%patch2 -p1 # Remove dependency on enum-compat from setup.py # enum-compat is not needed for Python 3 @@ -123,6 +126,9 @@ nosetests-%{python3_version} -v -e greendns_test -e socket_test -e test_patcher_ %doc html-3 %changelog +* Wed Nov 22 2023 Alfredo Moralejo - 0.33.0-3 +- Fixes GreenSSLSocket for >= python3-3.6.8-56.el8 + * Fri Jan 21 2022 Fedora Release Engineering - 0.33.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild