Accepting request 210028 from home:vuntz:branches:devel:languages:python
- Add no-default-cacert-sles.patch: use this patch when building for SLES, since python in SLES and openSUSE behave differently when it comes to SSL, and no-default-cacert.patch is wrong for SLES. OBS-URL: https://build.opensuse.org/request/show/210028 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=44
This commit is contained in:
parent
221f6069f7
commit
c2a2f1bd4b
53
no-default-cacert-sles.patch
Normal file
53
no-default-cacert-sles.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
Index: requests-1.1.0/MANIFEST.in
|
||||||
|
===================================================================
|
||||||
|
--- requests-1.1.0.orig/MANIFEST.in
|
||||||
|
+++ requests-1.1.0/MANIFEST.in
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
|
||||||
|
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
|
||||||
|
Index: requests-1.1.0/requests/adapters.py
|
||||||
|
===================================================================
|
||||||
|
--- requests-1.1.0.orig/requests/adapters.py
|
||||||
|
+++ requests-1.1.0/requests/adapters.py
|
||||||
|
@@ -132,9 +132,6 @@ class HTTPAdapter(BaseAdapter):
|
||||||
|
if not cert_loc:
|
||||||
|
cert_loc = DEFAULT_CA_BUNDLE_PATH
|
||||||
|
|
||||||
|
- if not cert_loc:
|
||||||
|
- raise Exception("Could not find a suitable SSL CA certificate bundle.")
|
||||||
|
-
|
||||||
|
conn.cert_reqs = 'CERT_REQUIRED'
|
||||||
|
conn.ca_certs = cert_loc
|
||||||
|
else:
|
||||||
|
Index: requests-1.1.0/requests/certs.py
|
||||||
|
===================================================================
|
||||||
|
--- requests-1.1.0.orig/requests/certs.py
|
||||||
|
+++ requests-1.1.0/requests/certs.py
|
||||||
|
@@ -18,7 +18,7 @@ def where():
|
||||||
|
def where():
|
||||||
|
"""Return the preferred certificate bundle."""
|
||||||
|
# vendored bundle inside Requests
|
||||||
|
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
|
||||||
|
+ return None
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print(where())
|
||||||
|
Index: requests-1.1.0/requests.egg-info/SOURCES.txt
|
||||||
|
===================================================================
|
||||||
|
--- requests-1.1.0.orig/requests.egg-info/SOURCES.txt
|
||||||
|
+++ requests-1.1.0/requests.egg-info/SOURCES.txt
|
||||||
|
@@ -10,7 +10,6 @@ requests/__init__.py
|
||||||
|
requests/adapters.py
|
||||||
|
requests/api.py
|
||||||
|
requests/auth.py
|
||||||
|
-requests/cacert.pem
|
||||||
|
requests/certs.py
|
||||||
|
requests/compat.py
|
||||||
|
requests/cookies.py
|
||||||
|
@@ -82,4 +81,4 @@ requests/packages/urllib3/util.py
|
||||||
|
requests/packages/urllib3/packages/__init__.py
|
||||||
|
requests/packages/urllib3/packages/ordered_dict.py
|
||||||
|
requests/packages/urllib3/packages/six.py
|
||||||
|
-requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
|
||||||
|
\ No newline at end of file
|
||||||
|
+requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 9 15:27:58 UTC 2013 - vuntz@suse.com
|
||||||
|
|
||||||
|
- Add no-default-cacert-sles.patch: use this patch when building
|
||||||
|
for SLES, since python in SLES and openSUSE behave differently
|
||||||
|
when it comes to SSL, and no-default-cacert.patch is wrong for
|
||||||
|
SLES.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 7 10:07:58 UTC 2013 - mcihar@suse.cz
|
Thu Nov 7 10:07:58 UTC 2013 - mcihar@suse.cz
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ Group: Development/Languages/Python
|
|||||||
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE no-default-cacert.patch -- completely ignore the internal CA bundle
|
# PATCH-FIX-OPENSUSE no-default-cacert.patch -- completely ignore the internal CA bundle
|
||||||
Patch0: no-default-cacert.patch
|
Patch0: no-default-cacert.patch
|
||||||
|
# PATCH-FIX-OPENSUSE no-default-cacert-sles.patch -- completely ignore the internal CA bundle (SLES version)
|
||||||
|
Patch1: no-default-cacert-sles.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
@ -66,7 +68,11 @@ Features:
|
|||||||
%setup -q -n requests-%{version}
|
%setup -q -n requests-%{version}
|
||||||
# For rpmlint warning: remove shebang from python library:
|
# For rpmlint warning: remove shebang from python library:
|
||||||
sed -i '/^#!/d' ./requests/certs.py
|
sed -i '/^#!/d' ./requests/certs.py
|
||||||
|
%if %suse_version > 1110
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%else
|
||||||
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
rm ./requests/cacert.pem
|
rm ./requests/cacert.pem
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user