Date: Wednesday, March 19, 2014 @ 10:31:14
  Author: stativ
Revision: 107760

upgpkg: python2-httplib2 0.8-3

python 3.4 rebuild, add the security patch to the source dir, because it can't 
be reliably downloaded by makepkg

Added:
  python2-httplib2/trunk/ssl_hostname.diff
Modified:
  python2-httplib2/trunk/PKGBUILD

-------------------+
 PKGBUILD          |    6 +++---
 ssl_hostname.diff |   21 +++++++++++++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2014-03-19 07:00:43 UTC (rev 107759)
+++ PKGBUILD    2014-03-19 09:31:14 UTC (rev 107760)
@@ -10,7 +10,7 @@
 pkgname=(python-httplib2 python2-httplib2)
 _pkgbasename=httplib2
 pkgver=0.8
-pkgrel=2
+pkgrel=3
 pkgdesc='Comprehensive HTTP client library, supporting many features'
 url='http://code.google.com/p/httplib2/'
 license=('MIT')
@@ -19,7 +19,7 @@
 provides=('httplib2')
 replaces=('httplib2')
 source=("http://httplib2.googlecode.com/files/$_pkgbasename-$pkgver.tar.gz";
-        
'security.patch::http://httplib2.googlecode.com/issues/attachment?aid=2820000000&name=ssl_hostname.diff&token=6H5KCc5DdiALaB413U9cqHZPgMI%3A1378908484674')
+        'ssl_hostname.diff')
 sha256sums=('af689bc3cb10a95721eb0d0cf806202a699e7799dacd3497f63b48b2ba429c3f'
             'd29fa108291a24f0708f04867f0479247ecbdd1fcf1617588b6650038d95554a')
 
@@ -26,7 +26,7 @@
 prepare() {
   # patch, ref https://bugs.archlinux.org/task/36839
   cd "$_pkgbasename-$pkgver"
-  patch -p1 -i "$srcdir/security.patch"
+  patch -p1 -i "$srcdir/ssl_hostname.diff"
   tail -24 README > LICENSE
   cd ..
 

Added: ssl_hostname.diff
===================================================================
--- ssl_hostname.diff                           (rev 0)
+++ ssl_hostname.diff   2014-03-19 09:31:14 UTC (rev 107760)
@@ -0,0 +1,21 @@
+diff -r 93291649202b python2/httplib2/__init__.py
+--- a/python2/httplib2/__init__.py     Tue Mar 26 14:17:48 2013 -0400
++++ b/python2/httplib2/__init__.py     Tue Apr 23 10:32:15 2013 +0300
+@@ -1030,7 +1030,7 @@
+                         raise CertificateHostnameMismatch(
+                             'Server presented certificate that does not match 
'
+                             'host %s: %s' % (hostname, cert), hostname, cert)
+-            except ssl_SSLError, e:
++            except (ssl_SSLError, CertificateHostnameMismatch), e:
+                 if sock:
+                     sock.close()
+                 if self.sock:
+@@ -1040,7 +1040,7 @@
+                 # to get at more detailed error information, in particular
+                 # whether the error is due to certificate validation or
+                 # something else (such as SSL protocol mismatch).
+-                if e.errno == ssl.SSL_ERROR_SSL:
++                if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL:
+                     raise SSLHandshakeError(e)
+                 else:
+                     raise

Reply via email to