Update to 0.7.4 for fedora
Merge branch 'el6' Conflicts: .gitignore python-httplib2.spec sources
This commit is contained in:
commit
1f71ea273a
5
.gitignore
vendored
5
.gitignore
vendored
@ -1 +1,4 @@
|
||||
httplib2-0.6.0.tar.gz
|
||||
httplib2-0.4.0.tar.gz
|
||||
/httplib2-0.7.2.tar.gz
|
||||
/httplib2-0.7.4.tar.gz
|
||||
|
||||
|
16
python-httplib2.certfile.patch
Normal file
16
python-httplib2.certfile.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -up ./python2/httplib2/__init__.py.orig ./python2/httplib2/__init__.py
|
||||
--- ./python2/httplib2/__init__.py.orig 2012-02-24 14:07:01.232200397 +1000
|
||||
+++ ./python2/httplib2/__init__.py 2012-02-24 14:13:51.290447860 +1000
|
||||
@@ -177,8 +177,10 @@ class CertificateHostnameMismatch(SSLHan
|
||||
DEFAULT_MAX_REDIRECTS = 5
|
||||
|
||||
# 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")
|
||||
+# We use fedora ca bundle file instead, to preserve backward compability.
|
||||
+CA_CERTS = "/etc/ssl/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']
|
21
python-httplib2.getCertHost.patch
Normal file
21
python-httplib2.getCertHost.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -up ./python2/httplib2/__init__.py.orig ./python2/httplib2/__init__.py
|
||||
--- ./python2/httplib2/__init__.py.orig 2012-05-03 17:09:12.836155079 +1000
|
||||
+++ ./python2/httplib2/__init__.py 2012-05-03 17:10:02.149780584 +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']
|
||||
+ for x in cert['subjectAltName']:
|
||||
+ if x[0].lower() == 'dns':
|
||||
+ return x[1]
|
||||
+
|
||||
+ 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.
|
@ -3,13 +3,16 @@
|
||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
|
||||
Name: python-httplib2
|
||||
Version: 0.6.0
|
||||
Release: 6%{?dist}
|
||||
Version: 0.7.4
|
||||
Release: 2%{?dist}
|
||||
Summary: A comprehensive HTTP client library
|
||||
Group: System Environment/Libraries
|
||||
License: MIT
|
||||
URL: http://code.google.com/p/httplib2/
|
||||
Source0: http://httplib2.googlecode.com/files/httplib2-%{version}.tar.gz
|
||||
#Patch0: httplib_py26.diff
|
||||
Patch1: %{name}.certfile.patch
|
||||
Patch2: %{name}.getCertHost.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: python-setuptools-devel
|
||||
BuildRequires: python-devel
|
||||
@ -35,6 +38,9 @@ other HTTP libraries.
|
||||
|
||||
%prep
|
||||
%setup -q -n httplib2-%{version}
|
||||
#%patch0 -p0 -b .issue39
|
||||
%patch1 -p0 -b .certfile
|
||||
%patch2 -p0 -b .getCertHost
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
@ -43,7 +49,7 @@ find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}
|
||||
%endif # with_python3
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
@ -77,9 +83,26 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Fri Jun 01 2012 Ding-Yi Chen <dchen at redhat.com> - 0.7.4-2
|
||||
- Upstream update for Fedora
|
||||
|
||||
* Thu May 03 2012 Ding-Yi Chen <dchen at redhat.com> - 0.7.4-1
|
||||
- Upstream update to 0.7.4
|
||||
- Applied patch suggested in issue 208
|
||||
|
||||
* Fri Feb 24 2012 Ding-Yi Chen <dchen at redhat.com> - 0.7.2-1
|
||||
- Upstream update to 0.7.2
|
||||
Which may fixed http://code.google.com/p/httplib2/issues/detail?id=62
|
||||
Note this version uses fedora's cert file bundle instead of httplib2
|
||||
default.
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Fri Jul 29 2011 Ding-Yi Chen <dchen at redhat.com> - 0.4.0-5.el6
|
||||
- Apply that address python-httplib2 (GoogleCode Hosted) issue 39
|
||||
http://code.google.com/p/httplib2/issues/detail?id=39
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
@ -94,8 +117,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
- minor spec cleanups
|
||||
- enable python3 support
|
||||
|
||||
* Fri Apr 02 2010 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
|
||||
- 0.6.0-1
|
||||
* Fri Apr 02 2010 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de> - 0.6.0-1
|
||||
- version upgrade (#566721)
|
||||
|
||||
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-4
|
||||
@ -107,6 +129,5 @@ rm -rf $RPM_BUILD_ROOT
|
||||
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.4.0-2
|
||||
- Rebuild for Python 2.6
|
||||
|
||||
* Thu Dec 27 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
|
||||
- 0.4.0-1
|
||||
* Thu Dec 27 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de> - 0.4.0-1
|
||||
- initial version
|
||||
|
Loading…
Reference in New Issue
Block a user