upstream patch to fix bug with python 2.7.6 [release 1.0.1-2mamba;Wed Feb 17 2016]

This commit is contained in:
Silvan Calarco 2024-01-06 11:11:55 +01:00
parent 0b72ce45d9
commit 465197eea4
2 changed files with 39 additions and 6 deletions

View File

@ -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

View File

@ -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 <silvan.calarco@mambasoft.it>
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 <silvan.calarco@mambasoft.it> 1.0.1-2mamba
- upstream patch to fix bug with python 2.7.6
* Wed May 21 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-1mamba
- package created by silvan using the webbuild interface