Hello community, here is the log from the commit of package python3-httplib2 for openSUSE:Factory checked in at 2016-03-26 15:23:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-httplib2 (Old) and /work/SRC/openSUSE:Factory/.python3-httplib2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-httplib2" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-httplib2/python3-httplib2.changes 2015-11-02 12:55:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-httplib2.new/python3-httplib2.changes 2016-03-26 15:23:44.000000000 +0100 @@ -1,0 +2,8 @@ +Mon Mar 14 14:55:40 UTC 2016 - [email protected] + +- update and cleanup of httplib2-use-system-certs.patch, + so that the passthrough is clean for python2 and so that it does + the right thing in python3 +- require python3 for ssl module + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-httplib2.spec ++++++ --- /var/tmp/diff_new_pack.sjhnRf/_old 2016-03-26 15:23:45.000000000 +0100 +++ /var/tmp/diff_new_pack.sjhnRf/_new 2016-03-26 15:23:45.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-httplib2 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,14 +29,10 @@ # PATCH-FIX-UPSTREAM: [email protected] -- SSL certificate hostname mismatch is checked only once Patch1: httplib2-bnc-818100.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python3 BuildRequires: python3-devel -# Test requirements (for ssl module): -#BuildRequires: python3 -%if 0%{?sles_version} -Requires: openssl-certs -%else Requires: ca-certificates -%endif +Requires: python3 BuildArch: noarch %description @@ -54,7 +50,7 @@ %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} -#%%check +%check #python3 python3/httplib2test.py %files ++++++ httplib2-use-system-certs.patch ++++++ --- /var/tmp/diff_new_pack.sjhnRf/_old 2016-03-26 15:23:45.000000000 +0100 +++ /var/tmp/diff_new_pack.sjhnRf/_new 2016-03-26 15:23:45.000000000 +0100 @@ -1,7 +1,8 @@ -diff -ruN a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py ---- a/python2/httplib2/__init__.py 2013-03-06 21:45:31.000000000 +0100 -+++ b/python2/httplib2/__init__.py 2013-03-22 14:02:09.458410128 +0100 -@@ -184,15 +184,8 @@ +Index: httplib2-0.9.2/python2/httplib2/__init__.py +=================================================================== +--- httplib2-0.9.2.orig/python2/httplib2/__init__.py ++++ httplib2-0.9.2/python2/httplib2/__init__.py +@@ -184,15 +184,8 @@ class CertificateHostnameMismatch(SSLHan # requesting that URI again. DEFAULT_MAX_REDIRECTS = 5 @@ -15,28 +16,61 @@ - CA_CERTS = os.path.join( - os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt") +# Default CA certificates file bundled with httplib2. -+CA_CERTS = '/etc/ssl/ca-bundle.pem' ++CA_CERTS = None # Which headers are hop-by-hop headers by default HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] -diff -ruN a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py ---- a/python3/httplib2/__init__.py 2013-03-06 21:45:31.000000000 +0100 -+++ b/python3/httplib2/__init__.py 2013-03-22 14:01:51.270409717 +0100 -@@ -124,8 +124,8 @@ +@@ -944,8 +937,6 @@ class HTTPSConnectionWithTimeout(httplib + cert_file=cert_file, strict=strict) + self.timeout = timeout + self.proxy_info = proxy_info +- if ca_certs is None: +- ca_certs = CA_CERTS + self.ca_certs = ca_certs + self.disable_ssl_certificate_validation = \ + disable_ssl_certificate_validation +Index: httplib2-0.9.2/python3/httplib2/__init__.py +=================================================================== +--- httplib2-0.9.2.orig/python3/httplib2/__init__.py ++++ httplib2-0.9.2/python3/httplib2/__init__.py +@@ -124,8 +124,7 @@ DEFAULT_MAX_REDIRECTS = 5 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 = '/etc/ssl/ca-bundle.pem' -+ ++CA_CERTS = None def _get_end2end_headers(response): hopbyhop = list(HOP_BY_HOP) -diff -ruN a/setup.py b/setup.py ---- a/setup.py 2013-03-06 21:45:31.000000000 +0100 -+++ b/setup.py 2013-03-22 14:02:33.031410660 +0100 -@@ -62,7 +62,6 @@ +@@ -833,13 +832,17 @@ class HTTPSConnectionWithTimeout(http.cl + ca_certs=None, disable_ssl_certificate_validation=False): + self.proxy_info = proxy_info + context = None +- if ca_certs is None: +- ca_certs = CA_CERTS +- if (cert_file or ca_certs) and not disable_ssl_certificate_validation: ++ if not disable_ssl_certificate_validation: + if not hasattr(ssl, 'SSLContext'): + raise CertificateValidationUnsupportedInPython31() +- context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) +- context.verify_mode = ssl.CERT_REQUIRED ++ ++ cafile = ca_certs ++ capath = None ++ if cafile is not None and os.path.isdir(cafile): ++ cafile = None ++ capath = ca_certs ++ ++ context = ssl.create_default_context(cafile=cafile, capath=capath) + if cert_file: + context.load_cert_chain(cert_file, key_file) + if ca_certs: +Index: httplib2-0.9.2/setup.py +=================================================================== +--- httplib2-0.9.2.orig/setup.py ++++ httplib2-0.9.2/setup.py +@@ -61,7 +61,6 @@ A comprehensive HTTP client library, ``h """, package_dir=pkgdir, packages=['httplib2'],
