summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-01-21 10:10:41 +0100
committerMichał Górny <mgorny@gentoo.org>2021-01-21 10:12:43 +0100
commit71cdd1469831ff3c3d1b8ef2a2aff459abf63346 (patch)
tree25cbe9dc6b32f7f9eea58546fe7450edb2d21330 /dev-lang
parentdev-lang/python: Backport verify-sig & BDEPEND to 3.6.12 (diff)
downloadgentoo-71cdd1469831ff3c3d1b8ef2a2aff459abf63346.tar.gz
gentoo-71cdd1469831ff3c3d1b8ef2a2aff459abf63346.tar.bz2
gentoo-71cdd1469831ff3c3d1b8ef2a2aff459abf63346.zip
dev-lang/python: Backport verify-sig & BDEPEND to 2.7.18
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/Manifest1
-rw-r--r--dev-lang/python/python-2.7.18-r6.ebuild21
2 files changed, 19 insertions, 3 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index b3e2c60a2906..d580e5cb5ec3 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,4 +1,5 @@
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
+DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
DIST Python-3.10.0a3.tar.xz 18676916 BLAKE2B 86c8e3cd5d9658a2b1027558eda42294807173cac39010737dba6a0bf75a3a7211297cb79061085ab0cea52eaaba521140ff67c3b6edeebd677429191f4435b5 SHA512 a361c04081e9bd7e740c3311d92ec1428f12c589613ab39ed2bb1ac5aa20e4d8bc6d6e76eefc20edd459ecf8be1720f3985126be38407fcfb41f5a6efcea3998
DIST Python-3.10.0a4.tar.xz 18706760 BLAKE2B a1237b73f0890c3da042eff7b110bd8da5b58ecd8cd53e673d3f91555c602b6b5f2b771023749d01cf3adff45935a7e3fda78af55cf7e7279a451ac5f2902b68 SHA512 2bf756e581315a7f242683931bffb275edcd5d864b8242e3de42ccf07cca27208f0468ba1663ff12263c128060bab400ba2ed707e0c3bcc422a619adc3171c34
DIST Python-3.10.0a4.tar.xz.asc 833 BLAKE2B 7cbfa39f918b9bb8dcdd46f2d5a4e6e7a24060bc39e8b81dfdea3fa2c305295da3bf09bd98b36a39cf8ec7619943fb0ca66f80d704bf3618b981cc22afdbd2d5 SHA512 6b94e27982e8344f0bd343bb0e04041a82608eff537105815a90a54f48cc6fa4804af10403e9729ada469c876352693144e3922de8fb2e48dc78151fa6520973
diff --git a/dev-lang/python/python-2.7.18-r6.ebuild b/dev-lang/python/python-2.7.18-r6.ebuild
index 3ffc8e249f95..63cd55c2af6b 100644
--- a/dev-lang/python/python-2.7.18-r6.ebuild
+++ b/dev-lang/python/python-2.7.18-r6.ebuild
@@ -4,7 +4,8 @@
EAPI="7"
WANT_LIBTOOL="none"
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+inherit autotools flag-o-matic pax-utils \
+ python-utils-r1 toolchain-funcs verify-sig
MY_P="Python-${PV}"
PYVER=$(ver_cut 1-2)
@@ -13,7 +14,10 @@ PATCHSET="python-gentoo-patches-2.7.18-r6"
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"
@@ -59,13 +63,17 @@ RDEPEND="app-arch/bzip2:=
xml? ( >=dev-libs/expat-2.1:= )"
# bluetooth requires headers from bluez
DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )
+ bluetooth? ( net-wireless/bluez )"
+BDEPEND="
virtual/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
!sys-devel/gcc[libffi(-)]"
RDEPEND+="
!build? ( app-misc/mime-types )
!<=dev-lang/python-exec-2.4.6-r1"
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
+
pkg_setup() {
if use berkdb; then
ewarn "'bsddb' module is out-of-date and no longer maintained inside"
@@ -81,6 +89,13 @@ pkg_setup() {
fi
}
+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