From 465197eea4a86481bf5ff0fffe2238421c9cdb3c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 11:11:55 +0100 Subject: [PATCH] upstream patch to fix bug with python 2.7.6 [release 1.0.1-2mamba;Wed Feb 17 2016] --- python-gevent-1.0.1-python-2.7.6.patch | 28 ++++++++++++++++++++++++++ python-gevent.spec | 17 ++++++++++------ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 python-gevent-1.0.1-python-2.7.6.patch diff --git a/python-gevent-1.0.1-python-2.7.6.patch b/python-gevent-1.0.1-python-2.7.6.patch new file mode 100644 index 0000000..6f104a6 --- /dev/null +++ b/python-gevent-1.0.1-python-2.7.6.patch @@ -0,0 +1,28 @@ +Index: b/gevent/ssl.py +=================================================================== +--- a/gevent/ssl.py ++++ b/gevent/ssl.py +@@ -81,15 +81,14 @@ class SSLSocket(socket): + self._sslobj = None + else: + # yes, create the SSL object +- if ciphers is None: +- self._sslobj = _ssl.sslwrap(self._sock, server_side, +- keyfile, certfile, +- cert_reqs, ssl_version, ca_certs) +- else: +- self._sslobj = _ssl.sslwrap(self._sock, server_side, +- keyfile, certfile, +- cert_reqs, ssl_version, ca_certs, +- ciphers) ++ ctx = SSLContext(ssl_version) ++ if keyfile or certfile: ++ ctx.load_cert_chain(certfile, keyfile) ++ if ca_certs: ++ ctx.load_verify_locations(ca_certs) ++ if ciphers: ++ ctx.set_ciphers(ciphers) ++ self._sslobj = ctx._wrap_socket(self._sock, server_side=server_side) + if do_handshake_on_connect: + self.do_handshake() + self.keyfile = keyfile diff --git a/python-gevent.spec b/python-gevent.spec index c53cb89..1452d96 100644 --- a/python-gevent.spec +++ b/python-gevent.spec @@ -1,6 +1,6 @@ Name: python-gevent Version: 1.0.1 -Release: 1mamba +Release: 2mamba Summary: Coroutine-based network library Group: System/Libraries Vendor: openmamba @@ -8,6 +8,7 @@ Distribution: openmamba Packager: Silvan Calarco URL: http://www.gevent.org/ Source: https://pypi.python.org/packages/source/g/gevent/gevent-%{version}.tar.gz +Patch0: python-gevent-1.0.1-python-2.7.6.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -22,8 +23,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root %prep %setup -q -n gevent-%{version} +#-D -T +#:<< _EOF +%patch0 -p1 %build +#:<< _EOF CFLAGS="%{optflags}" %{__python} setup.py build %install @@ -39,13 +44,13 @@ sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist %files -f %{name}.filelist %defattr(-,root,root) -## note: this list is just an example; modify as required -# %{python_sitearch}/%{name}.py* -# %{python_sitearch}/%{name}.so +%dir %{python_sitearch}/gevent-1.0.1-py2.7.egg-info/ +%{python_sitearch}/gevent-1.0.1-py2.7.egg-info/* %doc AUTHORS LICENSE -## note: eventually add the remaining documents (if any) -# %doc README.rst TODO %changelog +* Wed Feb 17 2016 Silvan Calarco 1.0.1-2mamba +- upstream patch to fix bug with python 2.7.6 + * Wed May 21 2014 Silvan Calarco 1.0.1-1mamba - package created by silvan using the webbuild interface