summaryrefslogtreecommitdiff
path: root/dev-python/httplib2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/httplib2
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/httplib2')
-rw-r--r--dev-python/httplib2/Manifest10
-rw-r--r--dev-python/httplib2/files/httplib2-use-system-cacerts.patch59
-rw-r--r--dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch21
-rw-r--r--dev-python/httplib2/httplib2-0.10.3-r1.ebuild40
-rw-r--r--dev-python/httplib2/httplib2-0.10.3.ebuild37
-rw-r--r--dev-python/httplib2/httplib2-0.9.2-r2.ebuild41
-rw-r--r--dev-python/httplib2/metadata.xml13
7 files changed, 221 insertions, 0 deletions
diff --git a/dev-python/httplib2/Manifest b/dev-python/httplib2/Manifest
new file mode 100644
index 000000000000..592223429e86
--- /dev/null
+++ b/dev-python/httplib2/Manifest
@@ -0,0 +1,10 @@
+AUX httplib2-use-system-cacerts.patch 2357 SHA256 e903d680c389b6a588b2ee890e2bef7bfb31c91b9d16f4a020a08c3c6235bc9a SHA512 08022280948e530890664f8af9fa5d3776b14526bbe2c55151b3631473b100b96c3c353ffd8df5a4d03d553ce24f962dec53307f7e23c257404920247940ff8f WHIRLPOOL f980cfc828c2375c8844a4dce70fc96c61ffe7d871febd14e5172b7f6b149c0f40b96073a58c325c404943cf2eee4902735be9fa847d31174dd477a74e56e345
+AUX python-httplib2-0.9-cve-2013-2037.patch 1166 SHA256 25676fcd307ba6bd81afba1037a97f6326b8bb538c34c53c2e31ae08bf64bd2e SHA512 10a3ac8ae9be7796c3f933694081c36c7412016fabd80e366703ed4622cad47463a523e8b7c30548112f885243887eb6d389218ddfaad99de8181ea5ffa9b5b3 WHIRLPOOL 679ed573e7a9b78f855afcbd689c75790164213040728997644f8c05012905b08cadc6842aa36b6beea616fdf9b53cb6fe01896e0f04e31f6b243e3929e1a73f
+DIST httplib2-0.10.3.tar.gz 204500 SHA256 e404d3b7bd86c1bc931906098e7c1305d6a3a6dcef141b8bb1059903abb3ceeb SHA512 d024986ffd577858017d7a8cfcae98a6cd04b8c89634ea302df4c1443eb2381cecca6ffbb631c9d4260335a3462df6d5604ec485aa591a05cb0231a3f6745aaa WHIRLPOOL da205bc1bb5ed6d253c857381300eb0eefe9e409abf87799f5706809eb2d06ac76322f03cf6480f1105c5d0c5820c8842268c0bd2af3496828c201c6d01a4689
+DIST httplib2-0.9.2.tar.gz 205165 SHA256 c3aba1c9539711551f4d83e857b316b5134a1c4ddce98a875b7027be7dd6d988 SHA512 cf1684f2d072588bc676c02491667480bdd2be0b3494703129d9cfa339d1233e14c0b4895b174d4c2ec5e2f5ae265d165b4e001b180f39f81db2178f91a032f8 WHIRLPOOL d795a016202821870e890531011e7c1c51dbc52f78f79ccf078e85fb3c1155dcf996b2e629b450ba79e34ccdda41e3df3d80293e102c39a76a57d174e51a884e
+EBUILD httplib2-0.10.3-r1.ebuild 946 SHA256 587f136625e4b892e86bbf187274e311e4f64d8afd224f23589734b77f1579c8 SHA512 08725c9058a1bdd64874fea180ce98bdbe3676421d1a180c66b88dcd66f41ae923da3ffef917496c9d9934437a698bd2b7cdcdee136f1493cfb84920fede7e2a WHIRLPOOL f0a1ad7bb424cb36aa36a201ab676c78d4edbd12d48ce00f086d7cbcec29b972e077f262434bb7565dc5994dc55a3617f9142009fdf98627a46f432914d1276a
+EBUILD httplib2-0.10.3.ebuild 858 SHA256 90e88a8011f26c2d2c5ee0f1c10c8305c109f975cdbfa7eb926cfafc6d7211f5 SHA512 fdd5cba5008f9141881d5607f25787b73bebcfb1d0166018dd064addd636524f637d8d60a58970c10fdf8cc43281c10f3f8a9e3aa2d8f1d83d24f9c1adde941b WHIRLPOOL ac29cafcef363c5494615e5999425b358c72e40d30dcf5171b0549fa1baa38c2d48e36074bb690f82bd5e2cbd94f0cd535b2890c83c06f18fa6b1df13493913a
+EBUILD httplib2-0.9.2-r2.ebuild 918 SHA256 83a1846fef462e25a90160cf17cb5929521ecb8d2c2314dba574f61500c02c0d SHA512 8d225e3737f880defc870b78ce0cdf116dcab5880622bb5794af03b4f1a4006b0d768edde84304595c4f2af5aadde9f91043040c5d4dd248482f87402e14d7da WHIRLPOOL 810160739c4e37ba1a6d0f5a2b4be473b12fb29b20e5cc7fc91dd8a41ad4f6425f1f13448b3b055394edc5f8ece31ec3e06eaf8c98501874430a15ecf4196db8
+MISC ChangeLog 5663 SHA256 d3b1d7d55fd36051e43e7b66500343cdb2e9f49464d9748d8da03b7817ee3d3c SHA512 7558febb614bf93e3e599736dbea21820198153b4522f61599d27a71b2b8e15ecff1540b2ce0982095b2805f3fe72634e3f44e66e0641c2e11ca8752c7707333 WHIRLPOOL 00804ad2fbdf5b03cf22aa3e21e2a66f2779595ba80fcafde1e33d49c249d7191519c9f913186f7feb891d56e08b6b71c005cd4d2dd0d81fed5bb3925025430d
+MISC ChangeLog-2015 7127 SHA256 0f2cdbbcb3cd26ade636b72757ccf852ae8577785c0491c93e706e82847ea31f SHA512 b17b347b03ee36d3eda828782b5a95fa0db7e33c277dc19873954c655d1d2ba3ed0ff773a3c80813e0fb87bbde96e06259eca39cd29235b51dd9ed9e876979a0 WHIRLPOOL 94b148b20f77703e41ac252c6f15bca9b68c1b26a8293321683dabfeb7f71d4965c85349dc1c2c9fff077388966df6bdb1e3555be3cc81703d184dc4ae864cfd
+MISC metadata.xml 437 SHA256 efd660831d7d58767d07210a2195e9e21f95f53ecebf3fa1fbb15a07f7bf5ea5 SHA512 fae017eb657512165f1d931910349a683417f98de8d70248d6b898a1e038212b9c2b1baebeae818126badbb57efb3b3ba1d647b25b759376ba5c3a719ed900a9 WHIRLPOOL 22935c38c8113969c1b99f542758052d470c2522092035d2830b2f5a8a4041bb7d83e4b59b2e15e7431b8daa1fb158feb8948249d94374a2b60cb110cf2877c9
diff --git a/dev-python/httplib2/files/httplib2-use-system-cacerts.patch b/dev-python/httplib2/files/httplib2-use-system-cacerts.patch
new file mode 100644
index 000000000000..cff65bb75ea5
--- /dev/null
+++ b/dev-python/httplib2/files/httplib2-use-system-cacerts.patch
@@ -0,0 +1,59 @@
+From 437b5bba5dac2e43815a900dbc6ee093c675bb4c Mon Sep 17 00:00:00 2001
+From: Marc Deslauriers <marc.deslauriers@canonical.com>
+Date: Thu, 8 Oct 2015 12:15:44 -0700
+Subject: Use system ca certificates, not the bundled ones
+
+Forwarded: not-needed
+Bug-Ubuntu: https://launchpad.net/bugs/882027
+
+Patch-Name: use_system_cacerts.patch
+---
+ python2/httplib2/__init__.py | 5 ++---
+ python3/httplib2/__init__.py | 5 ++---
+ setup.py | 1 -
+ 3 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py
+index 6fa3cc6..e996d01 100644
+--- a/python2/httplib2/__init__.py
++++ b/python2/httplib2/__init__.py
+@@ -190,9 +190,8 @@ try:
+ 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 --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py
+index 3ce019e..8383cc4 100644
+--- a/python3/httplib2/__init__.py
++++ b/python3/httplib2/__init__.py
+@@ -123,9 +123,8 @@ DEFAULT_MAX_REDIRECTS = 5
+ # 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)
+diff --git a/setup.py b/setup.py
+index fb00ed2..2c31f44 100755
+--- a/setup.py
++++ b/setup.py
+@@ -61,7 +61,6 @@ A comprehensive HTTP client library, ``httplib2`` supports many features left ou
+ """,
+ package_dir=pkgdir,
+ packages=['httplib2'],
+- package_data={'httplib2': ['*.txt']},
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
diff --git a/dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch b/dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch
new file mode 100644
index 000000000000..6a09337b1993
--- /dev/null
+++ b/dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch
@@ -0,0 +1,21 @@
+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 2015-04-03 13:10:43.401035131 -0600
++++ httplib2-0.9/python2/httplib2/__init__.py 2015-04-03 13:10:08.470685647 -0600
+@@ -1042,7 +1042,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:
+@@ -1052,7 +1052,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
diff --git a/dev-python/httplib2/httplib2-0.10.3-r1.ebuild b/dev-python/httplib2/httplib2-0.10.3-r1.ebuild
new file mode 100644
index 000000000000..58351dcaf406
--- /dev/null
+++ b/dev-python/httplib2/httplib2-0.10.3-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A comprehensive HTTP client library"
+HOMEPAGE="https://pypi.python.org/pypi/httplib2 https://github.com/jcgregorio/httplib2"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="app-misc/ca-certificates"
+
+# tests connect to random remote sites
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}"/${PN}-use-system-cacerts.patch )
+
+python_prepare_all() {
+ chmod o+r */*egg*/* || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ if [[ ${EPYTHON} == python2.7 ]] ; then
+ cd python2 || die
+ else
+ cd python3 || die
+ fi
+
+ "${PYTHON}" httplib2test.py || die
+}
diff --git a/dev-python/httplib2/httplib2-0.10.3.ebuild b/dev-python/httplib2/httplib2-0.10.3.ebuild
new file mode 100644
index 000000000000..a12c08521b0b
--- /dev/null
+++ b/dev-python/httplib2/httplib2-0.10.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A comprehensive HTTP client library"
+HOMEPAGE="https://pypi.python.org/pypi/httplib2 https://github.com/jcgregorio/httplib2"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+# tests connect to random remote sites
+RESTRICT="test"
+
+python_prepare_all() {
+ chmod o+r */*egg*/* || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ if [[ ${EPYTHON} == python2.7 ]] ; then
+ cd python2 || die
+ else
+ cd python3 || die
+ fi
+
+ "${PYTHON}" httplib2test.py || die
+}
diff --git a/dev-python/httplib2/httplib2-0.9.2-r2.ebuild b/dev-python/httplib2/httplib2-0.9.2-r2.ebuild
new file mode 100644
index 000000000000..063a7624efe8
--- /dev/null
+++ b/dev-python/httplib2/httplib2-0.9.2-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A comprehensive HTTP client library"
+HOMEPAGE="https://pypi.python.org/pypi/httplib2 https://github.com/jcgregorio/httplib2"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+# tests connect to random remote sites
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/python-httplib2-0.9-cve-2013-2037.patch"
+)
+
+python_prepare_all() {
+ chmod o+r */*egg*/* || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ if [[ ${EPYTHON} == python2.7 ]] ; then
+ cd python2 || die
+ else
+ cd python3 || die
+ fi
+
+ "${PYTHON}" httplib2test.py || die
+}
diff --git a/dev-python/httplib2/metadata.xml b/dev-python/httplib2/metadata.xml
new file mode 100644
index 000000000000..a3e1442dc0b5
--- /dev/null
+++ b/dev-python/httplib2/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">httplib2</remote-id>
+ <remote-id type="pypi">httplib2</remote-id>
+ <remote-id type="github">jcgregorio/httplib2</remote-id>
+ </upstream>
+</pkgmetadata>