diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/01_use-system-ca-certificates.patch | 51 | ||||
-rw-r--r-- | debian/patches/02_populate-install_requires.patch | 31 | ||||
-rw-r--r-- | debian/patches/03_export-IncompleteRead.patch | 35 | ||||
-rw-r--r-- | debian/patches/series | 3 |
4 files changed, 120 insertions, 0 deletions
diff --git a/debian/patches/01_use-system-ca-certificates.patch b/debian/patches/01_use-system-ca-certificates.patch new file mode 100644 index 0000000..d1c811b --- /dev/null +++ b/debian/patches/01_use-system-ca-certificates.patch @@ -0,0 +1,51 @@ +From cdfced68eae64218d746e7decb6e000b1c4aae20 Mon Sep 17 00:00:00 2001 +From: Daniele Tricoli <eriol@mornie.org> +Date: Thu, 8 Oct 2015 13:41:42 -0700 +Subject: Use the bundle provided by ca-certificates instead of + + the embedded one. +Forwarded: not-needed +Last-Update: 2014-10-08 + +Patch-Name: 01_use-system-ca-certificates.patch +--- + MANIFEST.in | 2 +- + requests/certs.py | 4 ++-- + setup.py | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/MANIFEST.in b/MANIFEST.in +index 439de49..7888aee 100644 +--- a/MANIFEST.in ++++ b/MANIFEST.in +@@ -1 +1 @@ +-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem ++include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt +diff --git a/requests/certs.py b/requests/certs.py +index 07e6475..e61ee5d 100644 +--- a/requests/certs.py ++++ b/requests/certs.py +@@ -18,8 +18,8 @@ try: + except ImportError: + def where(): + """Return the preferred certificate bundle.""" +- # vendored bundle inside Requests +- return os.path.join(os.path.dirname(__file__), 'cacert.pem') ++ # On Debian systems use ca-certificates ++ return '/etc/ssl/certs/ca-certificates.crt' + + if __name__ == '__main__': + print(where()) +diff --git a/setup.py b/setup.py +index f98f528..eb444f1 100755 +--- a/setup.py ++++ b/setup.py +@@ -50,7 +50,7 @@ setup( + author_email='me@kennethreitz.com', + url='http://python-requests.org', + packages=packages, +- package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']}, ++ package_data={'': ['LICENSE', 'NOTICE'],}, + package_dir={'requests': 'requests'}, + include_package_data=True, + install_requires=requires, diff --git a/debian/patches/02_populate-install_requires.patch b/debian/patches/02_populate-install_requires.patch new file mode 100644 index 0000000..64ec706 --- /dev/null +++ b/debian/patches/02_populate-install_requires.patch @@ -0,0 +1,31 @@ +From 6c882aca203bd33c129e2b4e1e4f82886e4b1fe0 Mon Sep 17 00:00:00 2001 +From: Daniele Tricoli <eriol@mornie.org> +Date: Fri, 23 Oct 2015 16:03:52 +0200 +Subject: Populate install_requires for unbundled packages + +This will avoid breakage updating urllib3 via pip when requests/urllib3 +are already installed via the system packages. + +Forwarded: not-needed +Bug-OpenStack: https://review.openstack.org/#/c/213310/0 +Bug-Upstream: https://github.com/kennethreitz/requests/issues/2816 +Patch-Name: 02_populate-install_requires.patch +--- + setup.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index eb444f1..6f62b80 100755 +--- a/setup.py ++++ b/setup.py +@@ -26,7 +26,9 @@ packages = [ + 'requests.packages.urllib3.packages.ssl_match_hostname', + ] + +-requires = [] ++requires = [ ++ 'urllib3==1.12', ++] + + version = '' + with open('requests/__init__.py', 'r') as fd: diff --git a/debian/patches/03_export-IncompleteRead.patch b/debian/patches/03_export-IncompleteRead.patch new file mode 100644 index 0000000..e9bfc07 --- /dev/null +++ b/debian/patches/03_export-IncompleteRead.patch @@ -0,0 +1,35 @@ +From 3d3afa49b9ca0e898ecb09c7271d28e0c737016b Mon Sep 17 00:00:00 2001 +From: Daniele Tricoli <eriol@mornie.org> +Date: Thu, 8 Oct 2015 13:41:43 -0700 +Subject: Export IncompleteRead from requests.compat since it's + + imported by python-pip. +Forwarded: not-needed +Bug-Debian: https://bugs.debian.org/766419 +Last-Update: 2014-10-23 + +Patch-Name: 03_export-IncompleteRead.patch +--- + requests/compat.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/requests/compat.py b/requests/compat.py +index 70edff7..a338846 100644 +--- a/requests/compat.py ++++ b/requests/compat.py +@@ -40,6 +40,7 @@ if is_py2: + from Cookie import Morsel + from StringIO import StringIO + from .packages.urllib3.packages.ordered_dict import OrderedDict ++ from httplib import IncompleteRead + + builtin_str = str + bytes = str +@@ -54,6 +55,7 @@ elif is_py3: + from http.cookies import Morsel + from io import StringIO + from collections import OrderedDict ++ from http.client import IncompleteRead + + builtin_str = str + str = str diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..b57f725 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +01_use-system-ca-certificates.patch +03_export-IncompleteRead.patch +02_populate-install_requires.patch |