Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 9E8C9781A72 for <~alpine/aports@lists.alpinelinux.org>; Mon, 21 Sep 2020 22:48:58 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id f142so17076455qke.13 for <~alpine/aports@lists.alpinelinux.org>; Mon, 21 Sep 2020 15:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=p6XUgTdadMb8VlG6jxU+Cm0Dwb/6EFmhsOy/2X1W1PU=; b=nXoT19nohWhNiv1x/EYv34Pofs5tdKalRgryN6Erj0Rbp2m1fjVohSCsO8GWCVQp9q PWzxhLB/WfWKrnrA+2RX6CyLzMqdLMhdl71cGgRuMYNp7CSpDYoLDz0yTJc/KnZdsWWJ pMhtsPjTYCvXFoWw9nkbDx6SI85MPAP/jWLvYPqE2kK/pfyCJ7GIfUp+EL4EcY931+ai cvNU4js//JSDrWYjtXhZMjU1WQriEfQDeKrr36J5vseE7/su8aoTcqxeigpERE38gmT7 tmWTaqChCjcPwtVwfvZaNNt51XmFopxpvwnHK0278vKPr7ghuSVDBvwLDEBrZRGmiv66 lIxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p6XUgTdadMb8VlG6jxU+Cm0Dwb/6EFmhsOy/2X1W1PU=; b=fhKFxM5BusmwmvRkZlx5QRBT8FTD8UhgWSAdTbTeuN/lZ15BdEmC86OhtGVTcvHJeG G0T3Giv7fwTsrIceWSJtZ2SjhnlCt33sqUiaHT2vNzlN7sdq8hp2y/EWRERAz9tVJ8FX FIkwkjBPZTe4Qkgv7yuKft77rBzUuRmL6SzITNQCZlgW/YWEXtbe15bldv6EuHvujkW/ 2uYuemFk4A/+JpLKtSxLwhnpiUGJCWrulKaRpVcOutnFABHbJGkQfE3zZG6jx8nD9Y4e 9f61+vF47iWT7JfePzPPAjllSbBVku7Xh9/b7q2VRLCaXWzu8Ne85CKf92BxyTG0FFMP o2PQ== X-Gm-Message-State: AOAM531lqquunG65QabkQnpt+KZwCcZ102uTXAI41MQlAiPNUjQrEg1P EnN/Omm4b2ZqHgN7Fv/uSEywvt+yPwo= X-Google-Smtp-Source: ABdhPJz2u8HLOBtK/PbiwKaRI5KOQCpO6xODnOIONttqtmMdVrksyoy0OCi2aH+VyNbRqoxZcGWJvg== X-Received: by 2002:a37:9f57:: with SMTP id i84mr2170226qke.101.1600728537203; Mon, 21 Sep 2020 15:48:57 -0700 (PDT) Received: from enterprise ([2804:431:cfcc:6751:46c2:7840:da47:8fd5]) by smtp.gmail.com with ESMTPSA id 145sm10479497qkf.18.2020.09.21.15.48.55 for <~alpine/aports@lists.alpinelinux.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 15:48:57 -0700 (PDT) Date: Mon, 21 Sep 2020 19:48:51 -0300 From: Leo To: ~alpine/aports@lists.alpinelinux.org Subject: Re: [PATCH] py3-requests: drop py3-certffi dependency Message-ID: <20200921194851.281c731a@enterprise> In-Reply-To: <20200921223932.6692-1-sir@cmpwn.com> References: <20200921223932.6692-1-sir@cmpwn.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 21 Sep 2020 16:39:32 -0600 Drew DeVault wrote: > --- > main/py3-requests/APKBUILD | 15 +++++++++++---- > main/py3-requests/certs.patch | 14 ++++++++++++++ > 2 files changed, 25 insertions(+), 4 deletions(-) > create mode 100644 main/py3-requests/certs.patch > > diff --git a/main/py3-requests/APKBUILD b/main/py3-requests/APKBUILD > index 88ee28c160..364f4d774d 100644 > --- a/main/py3-requests/APKBUILD > +++ b/main/py3-requests/APKBUILD > @@ -3,16 +3,22 @@ > pkgname=py3-requests > _pkgname=requests > pkgver=2.24.0 > -pkgrel=0 > +pkgrel=1 > pkgdesc="A HTTP request library for Python3" > url="http://www.python-requests.org/" > arch="noarch" > license="Apache-2.0" > # Requirements for tests are not available in main > options="!check" > -depends="python3 py3-chardet py3-idna py3-certifi py3-urllib3" > +depends="python3 py3-chardet py3-idna py3-urllib3" > makedepends="py3-setuptools" > -source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" > +# certs.patch forces requests to use the system certificate store by > default, +# and eliminates the certffi dependency. Thanks to Eli > Schwartz of Arch Linux +# for the recommendation. > +source=" > + > https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz > + certs.patch > +" > builddir="$srcdir/$_pkgname-$pkgver" > > replaces="py-requests" # Backwards compatibility > @@ -26,4 +32,5 @@ package() { > python3 setup.py install --prefix=/usr --root="$pkgdir" > } > > -sha512sums="46ca8ab70eb39be8398c242404b9b3ffb6baddd5c78eaad125b55c719154eb8c7b6a737a8dc587b0cb51b3b9a074abaa8b2ff347a64d38f4f90cdba4db16a119 > requests-2.24.0.tar.gz" > +sha512sums="46ca8ab70eb39be8398c242404b9b3ffb6baddd5c78eaad125b55c719154eb8c7b6a737a8dc587b0cb51b3b9a074abaa8b2ff347a64d38f4f90cdba4db16a119 > requests-2.24.0.tar.gz > +424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3 > certs.patch" diff --git a/main/py3-requests/certs.patch > b/main/py3-requests/certs.patch new file mode 100644 index > 0000000000..47a32f3802 --- /dev/null +++ > b/main/py3-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()) Looks fine, I'll open a MR in GitLab to check with CI