commit: 8c2ba489af16ee2a7222180eb89b226e53f843f6
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 09:07:13 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 09:12:40 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c2ba489
dev-lang/python: Backport verify-sig & BDEPEND to 3.8.7
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-lang/python/Manifest | 1 +
dev-lang/python/python-3.8.7-r1.ebuild | 20 +++++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index fdf4e0ebe60..dc8a69515c0 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -6,6 +6,7 @@ DIST Python-3.6.12.tar.xz 17202980 BLAKE2B
c8d22e4d57bcaffe77cd902cda3a473e73adf
DIST Python-3.7.9.tar.xz 17389636 BLAKE2B
484833aa2aa4e29051a02969294f72099ff6f1a47d944b1a0dd15f8e6c22a0406d551bcbcd1048cf89defedaccf060733211e34b38e31fd8391dd823eaa35bc0
SHA512
e4217b25529b5336e43b63d17f3758a8177a58184564cf02bd92a312f58dba9e096485c9e3cb3544f966e847ea15b3ab30ed065d28a6ca52a6d7e0faddf7d9f9
DIST Python-3.8.6.tar.xz 18233864 BLAKE2B
c8a8ef6055e344dda30eb808804cfa62016b4f840257cffd5a495e5932f5696e50579d49b8181a487c9cd4a89bdb95656e80981039783a21d20f7980aa2c9883
SHA512
22faec84f6e172e1ac7c6bd6fd37e9b6ae4afc91cf5136aa8cac8ebbed8d18793f9196e8749b8ccc43447cb6c41cb450f65ea72dd363c06dfaeb14e0455f5560
DIST Python-3.8.7.tar.xz 18261096 BLAKE2B
6ac20efef41e828cb796aabcb7808400d494b9b48759950c8c15ee90762394f6763163d8e37ab407c1c79ebb9cda09189eaa969a75f96c86a96ccee962443924
SHA512
6a27d8eab3076930df46b0cf127f9b664f8d4147349b2b98132f464deb7f69d87e0167e8ee8e6c64249125ad73760d965ecbc81c252b63a1e7aac95594c62b74
+DIST Python-3.8.7.tar.xz.asc 833 BLAKE2B
a629251732d1ea6054564b6b1a9a2b3b716e20c8fad1b6b69a9c64aff7fe7fca7dc6cdeef52d9889873f1e349c1cb1c4fba4483d8ded6ab2cdd279ea4abaeb70
SHA512
ddbad087a1d116e743e11f50d29ee0563241e4397312fa76691bad30ef62908d281ba77b89dbd8f348faa50f1c953399d79ad6c2ab77828e690f3a5a3b708bc8
DIST Python-3.9.0.tar.xz 18866140 BLAKE2B
8e12b64e187a65461473ac3b281dc489f0abac586e0755f6dbeceb236b34bdc008085eeac9ee1a19d76f5ec6a2fbda623985454c9d0164c4888a97b8cd940034
SHA512
b141039c9701a8cb0d15cd11a279153077524af4d0599e7d2c7279d4c18d05fda06b33ef82342d875de996c7117b7dc6eb154dc3669d38a1efa99801aeec6c5e
DIST Python-3.9.1.tar.xz 18897104 BLAKE2B
bcbce176510e8e7c6ba6070588bedc52121c21c5271f59b3d629dfb542c51ee62622b2ca53a6e2041f1a51b2d089368cc4de9bb749e8ebad9a2c4eb4de83538e
SHA512
b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019
DIST Python-3.9.1.tar.xz.asc 833 BLAKE2B
dc445ed9797668c5f0777259ea83330815ee516dafc752e6a0d903bae5355e76360afa5ed318ce09bbbcfb4df6269b06b6fb6b7d9c074678b612bb1ea9e3148a
SHA512
400259f499820e0499290402f095ee5454168907f539de705cad4f0e5586b1c67a0ac45b89bf099701be55146a5eed73dbc9e2cb15562fef34da2813ac82f342
diff --git a/dev-lang/python/python-3.8.7-r1.ebuild
b/dev-lang/python/python-3.8.7-r1.ebuild
index 30071b8baee..263eeb54a30 100644
--- a/dev-lang/python/python-3.8.7-r1.ebuild
+++ b/dev-lang/python/python-3.8.7-r1.ebuild
@@ -5,7 +5,7 @@ EAPI="7"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic multiprocessing pax-utils \
- python-utils-r1 toolchain-funcs
+ python-utils-r1 toolchain-funcs verify-sig
MY_P="Python-${PV}"
PYVER=$(ver_cut 1-2)
@@ -14,7 +14,10 @@ PATCHSET="python-gentoo-patches-3.8.7-r1"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="https://www.python.org/"
SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
+ verify-sig? (
+ https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
+ )"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
@@ -53,11 +56,22 @@ RDEPEND="app-arch/bzip2:=
# bluetooth requires headers from bluez
DEPEND="${RDEPEND}
bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
+ test? ( app-arch/xz-utils[extra-filters(+)] )"
+BDEPEND="
virtual/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
RDEPEND+=" !build? ( app-misc/mime-types )"
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
+ fi
+ default
+}
+
src_prepare() {
# Ensure that internal copies of expat, libffi and zlib are not used.
rm -fr Modules/expat || die