From 60d21982898c8be8915086385066d3ef15123bad Mon Sep 17 00:00:00 2001 From: Danny Rawlins Date: Thu, 15 Mar 2018 23:34:12 +1100 Subject: [PATCH] python3-requests: fix certificate path --- python3-requests/.md5sum | 1 + python3-requests/.signature | 5 +++-- python3-requests/Pkgfile | 9 +++++++-- python3-requests/certs.patch | 14 ++++++++++++++ 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 python3-requests/certs.patch diff --git a/python3-requests/.md5sum b/python3-requests/.md5sum index efe44095e..0c2910591 100644 --- a/python3-requests/.md5sum +++ b/python3-requests/.md5sum @@ -1 +1,2 @@ +d49ffa288cf36bfe6962e4811055816e certs.patch 081412b2ef79bdc48229891af13f4d82 requests-2.18.4.tar.gz diff --git a/python3-requests/.signature b/python3-requests/.signature index acd84744a..d71e328dc 100644 --- a/python3-requests/.signature +++ b/python3-requests/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3+bsOZ5EdPn7P364wY2lvqcj343wFLRqOT+vT+t62DbWtvUKw5cuBwKFDf+Mt+Oskh8F96uPjFnd2TdyBWzrMAA= -SHA256 (Pkgfile) = 628395440e3a48da3a01756168ad250ca3289f41208949efcf4d9f96ecf84533 +RWSagIOpLGJF31wSGMaQVCd8/gHMyNJ5tH/+3TZfAEz9JfRg+N8rtrOWdeMdm/X9Pp8ZTJuYorVV4GMl/BFDdPkbXC4oCx94NAM= +SHA256 (Pkgfile) = b21e8100242898375d597241a33911f3f9ec6615612377433b8596b8dd6d1ec0 SHA256 (.footprint) = f1b43b1cac0a3ead4c815ddee468f65da239dcc42a418a9f7dd8ad9ea858fc9a SHA256 (requests-2.18.4.tar.gz) = 9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e +SHA256 (certs.patch) = 3fa0c8ef2018ef0987d2daff79765b99abd99c539f2ec1241bcf9c31b1a4fd75 diff --git a/python3-requests/Pkgfile b/python3-requests/Pkgfile index 79c30adcd..95b5535b4 100644 --- a/python3-requests/Pkgfile +++ b/python3-requests/Pkgfile @@ -5,11 +5,16 @@ name=python3-requests version=2.18.4 -release=1 -source=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*-}/${name#*-}-$version.tar.gz) +release=2 +source=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*-}/${name#*-}-$version.tar.gz + certs.patch) build() { cd ${name#*-}-$version + + sed -e '/certifi/d' -i setup.py + patch -p1 -i $SRC/certs.patch + /usr/bin/python3 setup.py build /usr/bin/python3 setup.py install --prefix=/usr --root=$PKG } diff --git a/python3-requests/certs.patch b/python3-requests/certs.patch new file mode 100644 index 000000000..47a32f380 --- /dev/null +++ b/python3-requests/certs.patch @@ -0,0 +1,14 @@ +diff --git a/requests/certs.py b/requests/certs.py +index d1a378d7..4e0bffd4 100644 +--- a/requests/certs.py ++++ b/requests/certs.py +@@ -12,7 +12,8 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed + environment, you can change the definition of where() to return a separately + packaged CA bundle. + """ +-from certifi import where ++def where(): ++ return "/etc/ssl/certs/ca-certificates.crt" + + if __name__ == '__main__': + print(where())