[arch-commits] Commit in (8 files)
Alexander Rødseth
arodseth at nymeria.archlinux.org
Sat May 3 10:13:56 UTC 2014
Date: Saturday, May 3, 2014 @ 12:13:55
Author: arodseth
Revision: 110549
Renaming the directory and updating the package.
Added:
python-httplib2/
python-httplib2/trunk/cert.patch
python-httplib2/trunk/ssl_hostname.patch
Modified:
python-httplib2/trunk/PKGBUILD
Deleted:
python-httplib2/repos/community-any/PKGBUILD
python-httplib2/repos/community-any/ssl_hostname.diff
python-httplib2/trunk/ssl_hostname.diff
python2-httplib2/
------------------------------------------+
python-httplib2/trunk/cert.patch | 30 ++++++++++++++++
python-httplib2/trunk/ssl_hostname.patch | 21 +++++++++++
repos/community-any/PKGBUILD | 54 -----------------------------
repos/community-any/ssl_hostname.diff | 21 -----------
trunk/PKGBUILD | 51 ++++++++++++++++-----------
trunk/ssl_hostname.diff | 21 -----------
6 files changed, 81 insertions(+), 117 deletions(-)
Deleted: python-httplib2/repos/community-any/PKGBUILD
===================================================================
--- python2-httplib2/repos/community-any/PKGBUILD 2014-05-03 08:51:16 UTC (rev 110548)
+++ python-httplib2/repos/community-any/PKGBUILD 2014-05-03 10:13:55 UTC (rev 110549)
@@ -1,54 +0,0 @@
-# $Id$
-# Maintainer: Alexander Rødseth <rodseth at gmail.com>
-# Contributor: Jan de Groot <jgc at archlinux.org>
-# Contributor: Giorgio Lando <patroclo7 at gmail.com>
-# Contributor: Nicolas Quienot <niQo at aur>
-# Contributor: Jesse Young <jesse.young at gmail.com>
-
-# TODO: Change pkgbase from python2-httplib2 to python-httplib2
-pkgbase=python2-httplib2
-pkgname=(python-httplib2 python2-httplib2)
-_pkgbasename=httplib2
-pkgver=0.8
-pkgrel=3
-pkgdesc='Comprehensive HTTP client library, supporting many features'
-url='http://code.google.com/p/httplib2/'
-license=('MIT')
-arch=('any')
-makedepends=('python' 'python2')
-provides=('httplib2')
-replaces=('httplib2')
-source=("http://httplib2.googlecode.com/files/$_pkgbasename-$pkgver.tar.gz"
- 'ssl_hostname.diff')
-sha256sums=('af689bc3cb10a95721eb0d0cf806202a699e7799dacd3497f63b48b2ba429c3f'
- 'd29fa108291a24f0708f04867f0479247ecbdd1fcf1617588b6650038d95554a')
-
-prepare() {
- # patch, ref https://bugs.archlinux.org/task/36839
- cd "$_pkgbasename-$pkgver"
- patch -p1 -i "$srcdir/ssl_hostname.diff"
- tail -24 README > LICENSE
- cd ..
-
- # prepare one build directory for each package
- cp -a "$_pkgbasename-$pkgver" "${pkgname[0]}-$pkgver"
- cp -a "$_pkgbasename-$pkgver" "${pkgname[1]}-$pkgver"
-}
-
-package_python-httplib2() {
- depends=('python')
-
- cd "$srcdir/$pkgname-$pkgver"
- python setup.py install --root="$pkgdir"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_python2-httplib2() {
- depends=('python2')
-
- cd "$srcdir/$pkgname-$pkgver"
- python2 setup.py install --root="$pkgdir"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-# vim:set ts=2 sw=2 et:
Deleted: python-httplib2/repos/community-any/ssl_hostname.diff
===================================================================
--- python2-httplib2/repos/community-any/ssl_hostname.diff 2014-05-03 08:51:16 UTC (rev 110548)
+++ python-httplib2/repos/community-any/ssl_hostname.diff 2014-05-03 10:13:55 UTC (rev 110549)
@@ -1,21 +0,0 @@
-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
Modified: python-httplib2/trunk/PKGBUILD
===================================================================
--- python2-httplib2/trunk/PKGBUILD 2014-05-03 08:51:16 UTC (rev 110548)
+++ python-httplib2/trunk/PKGBUILD 2014-05-03 10:13:55 UTC (rev 110549)
@@ -4,51 +4,60 @@
# Contributor: Giorgio Lando <patroclo7 at gmail.com>
# Contributor: Nicolas Quienot <niQo at aur>
# Contributor: Jesse Young <jesse.young at gmail.com>
+# Contributor: Anton Eliasson <devel at antoneliasson.se>
-# TODO: Change pkgbase from python2-httplib2 to python-httplib2
-pkgbase=python2-httplib2
+pkgbase=python-httplib2
pkgname=(python-httplib2 python2-httplib2)
-_pkgbasename=httplib2
-pkgver=0.8
-pkgrel=3
+pkgver=0.9
+pkgrel=1
pkgdesc='Comprehensive HTTP client library, supporting many features'
url='http://code.google.com/p/httplib2/'
license=('MIT')
arch=('any')
makedepends=('python' 'python2')
+depends=('ca-certificates')
provides=('httplib2')
replaces=('httplib2')
-source=("http://httplib2.googlecode.com/files/$_pkgbasename-$pkgver.tar.gz"
- 'ssl_hostname.diff')
-sha256sums=('af689bc3cb10a95721eb0d0cf806202a699e7799dacd3497f63b48b2ba429c3f'
- 'd29fa108291a24f0708f04867f0479247ecbdd1fcf1617588b6650038d95554a')
+source=("git://github.com/jcgregorio/httplib2.git#tag=v$pkgver"
+ 'ssl_hostname.patch'
+ 'cert.patch')
+sha256sums=('SKIP'
+ 'd29fa108291a24f0708f04867f0479247ecbdd1fcf1617588b6650038d95554a'
+ 'ba05f491fd07afec6abc6bccb08369906f8e6f1a808d94a54fe4e7be7d9771d9')
prepare() {
- # patch, ref https://bugs.archlinux.org/task/36839
- cd "$_pkgbasename-$pkgver"
- patch -p1 -i "$srcdir/ssl_hostname.diff"
- tail -24 README > LICENSE
- cd ..
+ pushd "${pkgbase/python-}"
+ # Patch, ref FS#36839
+ patch -p1 -i "$srcdir/ssl_hostname.patch"
+ # Patch, ref FS#40179
+ patch -p1 -i "$srcdir/cert.patch"
+ popd
- # prepare one build directory for each package
- cp -a "$_pkgbasename-$pkgver" "${pkgname[0]}-$pkgver"
- cp -a "$_pkgbasename-$pkgver" "${pkgname[1]}-$pkgver"
+ # Prepare one build directory for each package
+ cp -a "${pkgbase/python-}" "${pkgname[0]}"
+ cp -a "${pkgbase/python-}" "${pkgname[1]}"
}
package_python-httplib2() {
depends=('python')
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$pkgname"
python setup.py install --root="$pkgdir"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # The MIT license file is missing. Opened an issue at
+ # https://github.com/jcgregorio/httplib2/issues/268
+ #install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python2-httplib2() {
depends=('python2')
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$pkgname"
python2 setup.py install --root="$pkgdir"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # The MIT license file is missing. Opened an issue at
+ # https://github.com/jcgregorio/httplib2/issues/268
+ #install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
Added: python-httplib2/trunk/cert.patch
===================================================================
--- python-httplib2/trunk/cert.patch (rev 0)
+++ python-httplib2/trunk/cert.patch 2014-05-03 10:13:55 UTC (rev 110549)
@@ -0,0 +1,30 @@
+diff -ur httplib2-0.8.orig/python2/httplib2/__init__.py httplib2-0.8/python2/httplib2/__init__.py
+--- httplib2-0.8.orig/python2/httplib2/__init__.py 2014-05-01 23:25:52.459852279 +0200
++++ httplib2-0.8/python2/httplib2/__init__.py 2014-05-01 23:28:08.822391994 +0200
+@@ -190,9 +190,8 @@
+ import ca_certs_locater
+ 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")
++ # Use system CA certificates
++ CA_CERTS = "/etc/ssl/certs/ca-certificates.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']
+diff -ur httplib2-0.8.orig/python3/httplib2/__init__.py httplib2-0.8/python3/httplib2/__init__.py
+--- httplib2-0.8.orig/python3/httplib2/__init__.py 2013-03-06 21:40:54.000000000 +0100
++++ httplib2-0.8/python3/httplib2/__init__.py 2014-05-01 23:28:36.822913468 +0200
+@@ -123,9 +123,8 @@
+ # Which headers are hop-by-hop headers by default
+ 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")
++# Use system CA certificates
++CA_CERTS = "/etc/ssl/certs/ca-certificates.crt"
+
+ def _get_end2end_headers(response):
+ hopbyhop = list(HOP_BY_HOP)
Deleted: python-httplib2/trunk/ssl_hostname.diff
===================================================================
--- python2-httplib2/trunk/ssl_hostname.diff 2014-05-03 08:51:16 UTC (rev 110548)
+++ python-httplib2/trunk/ssl_hostname.diff 2014-05-03 10:13:55 UTC (rev 110549)
@@ -1,21 +0,0 @@
-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
Added: python-httplib2/trunk/ssl_hostname.patch
===================================================================
--- python-httplib2/trunk/ssl_hostname.patch (rev 0)
+++ python-httplib2/trunk/ssl_hostname.patch 2014-05-03 10:13:55 UTC (rev 110549)
@@ -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
More information about the arch-commits
mailing list