commit b9a87db15ec65936dc5da2e06d6f7960d087a71d
Author: Arkadiusz Miśkiewicz <ar...@maven.pl>
Date:   Fri Nov 16 06:42:57 2018 +0100

    - up to 0.12.0

 python-httplib2.certfile.patch    | 57 ++++++++++++++++++---------------------
 python-httplib2.getCertHost.patch | 21 ---------------
 python-httplib2.rfc2459.patch     | 19 -------------
 python-httplib2.spec              | 12 +++------
 4 files changed, 30 insertions(+), 79 deletions(-)
---
diff --git a/python-httplib2.spec b/python-httplib2.spec
index 63e8847..9190ec0 100644
--- a/python-httplib2.spec
+++ b/python-httplib2.spec
@@ -5,16 +5,14 @@
 Summary:       A comprehensive HTTP client library
 Summary(pl.UTF-8):     Obszerna biblioteka klienta HTTP
 Name:          python-httplib2
-Version:       0.11.3
-Release:       2
+Version:       0.12.0
+Release:       1
 License:       MIT
 Group:         Development/Languages/Python
 Source0:       https://github.com/httplib2/httplib2/archive/v%{version}.tar.gz
-# Source0-md5: b5dba454b541087cc5f674fed74916b4
+# Source0-md5: 1f3071d94551bfced890c34fd3524f68
 Patch0:                %{name}.certfile.patch
-Patch1:                %{name}.getCertHost.patch
-Patch2:                %{name}.rfc2459.patch
-Patch3:                %{name}-0.9-proxy-http.patch
+Patch1:                %{name}-0.9-proxy-http.patch
 URL:           https://github.com/httplib2/httplib2
 BuildRequires: python >= 2.3
 BuildRequires: python-modules
@@ -91,8 +89,6 @@ cech pomijanych przez inne biblioteki. Obsługuje:
 %setup -q -n httplib2-%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
 %build
 %py_build
diff --git a/python-httplib2.certfile.patch b/python-httplib2.certfile.patch
index e351169..5579af3 100644
--- a/python-httplib2.certfile.patch
+++ b/python-httplib2.certfile.patch
@@ -1,31 +1,26 @@
-diff -Nur httplib2-0.9.orig/python2/httplib2/__init__.py 
httplib2-0.9/python2/httplib2/__init__.py
---- httplib2-0.9.orig/python2/httplib2/__init__.py     2014-04-14 
06:52:57.000000000 -0600
-+++ httplib2-0.9/python2/httplib2/__init__.py  2014-05-23 21:17:02.082118837 
-0600
-@@ -191,8 +191,10 @@
-     CA_CERTS = ca_certs_locater.get()
- except ImportError:
-     # Default CA certificates file bundled with httplib2.
--    CA_CERTS = os.path.join(
--        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+#    CA_CERTS = os.path.join(
-+#        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+# Use Fedora system-wide shared certificate store for security, consistency.
-+    CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
- 
- # Which headers are hop-by-hop headers by default
- HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 
'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
---- httplib2-0.9/python3/httplib2/__init__.py  2014-04-14 05:52:57.000000000 
-0700
-+++ httplib2-0.9/python3/httplib2/__init__.py.new      2015-01-12 
17:22:19.815505848 -0800
-@@ -124,8 +124,10 @@
- HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 
'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
- 
- # Default CA certificates file bundled with httplib2.
--CA_CERTS = os.path.join(
--        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+#CA_CERTS = os.path.join(
-+#        os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+# Use Fedora system-wide shared certificate store for security, consistency.
-+CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
- 
- def _get_end2end_headers(response):
-     hopbyhop = list(HOP_BY_HOP)
+--- httplib2-0.12.0/python2/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 
+0100
++++ httplib2-0.12.0/python2/httplib2/certs.py  2018-11-16 06:34:12.392370656 
+0100
+@@ -19,9 +19,7 @@ except ImportError:
+     pass
+ 
+ 
+-BUILTIN_CA_CERTS = os.path.join(
+-    os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
+-)
++BUILTIN_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
+ 
+ 
+ def where():
+--- httplib2-0.12.0/python3/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 
+0100
++++ httplib2-0.12.0/python3/httplib2/certs.py  2018-11-16 06:34:27.006133962 
+0100
+@@ -19,9 +19,7 @@ except ImportError:
+     pass
+ 
+ 
+-BUILTIN_CA_CERTS = os.path.join(
+-    os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
+-)
++BUILTIN_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
+ 
+ 
+ def where():
diff --git a/python-httplib2.getCertHost.patch 
b/python-httplib2.getCertHost.patch
deleted file mode 100644
index f9c53de..0000000
--- a/python-httplib2.getCertHost.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -up ./python2/httplib2/__init__.py.getCertHost 
./python2/httplib2/__init__.py
---- ./python2/httplib2/__init__.py.getCertHost 2012-05-03 17:16:33.834155219 
+1000
-+++ ./python2/httplib2/__init__.py     2012-06-21 18:19:33.804660257 +1000
-@@ -942,11 +942,12 @@ class HTTPSConnectionWithTimeout(httplib
-           list: A list of valid host globs.
-         """
-         if 'subjectAltName' in cert:
--            return [x[1] for x in cert['subjectAltName']
--                    if x[0].lower() == 'dns']
--        else:
--            return [x[0][1] for x in cert['subject']
--                    if x[0][0].lower() == 'commonname']
-+            # Patch from richardfe...@gmail.com
-+          return [x[1] for x in cert['subjectAltName']
-+                if x[0].lower() == "dns"]
-+
-+        return [x[0][1] for x in cert['subject']
-+            if x[0][0].lower() == 'commonname']
- 
-     def _ValidateCertificateHostname(self, cert, hostname):
-         """Validates that a given hostname is valid for an SSL certificate.
diff --git a/python-httplib2.rfc2459.patch b/python-httplib2.rfc2459.patch
deleted file mode 100644
index 523129e..0000000
--- a/python-httplib2.rfc2459.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up ./python2/httplib2/__init__.py.orig ./python2/httplib2/__init__.py
---- ./python2/httplib2/__init__.py.orig        2012-07-27 18:35:59.215300471 
+1000
-+++ ./python2/httplib2/__init__.py     2012-07-27 18:36:30.697287505 +1000
-@@ -943,8 +943,13 @@ class HTTPSConnectionWithTimeout(httplib
-         """
-         if 'subjectAltName' in cert:
-             # Patch from richardfe...@gmail.com
--          return [x[1] for x in cert['subjectAltName']
-+            # RFC 2459 states that subjectAltName may contain:
-+            # either DNS, email, IP or URI
-+            # email, URI,
-+            hosts=[x[1] for x in cert['subjectAltName']
-                 if x[0].lower() == "dns"]
-+          if hosts:
-+              return hosts
-
-         return [x[0][1] for x in cert['subject']
-             if x[0][0].lower() == 'commonname']
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-httplib2.git/commitdiff/b9a87db15ec65936dc5da2e06d6f7960d087a71d

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to