Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/coreutils/
Date: Thu, 07 Apr 2022 03:58:09
Message-Id: 1649303836.0e5cbc3642670e7741a551eb4775fcdc8694cd10.sam@gentoo
1 commit: 0e5cbc3642670e7741a551eb4775fcdc8694cd10
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 7 03:45:56 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 7 03:57:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e5cbc36
7
8 sys-apps/coreutils: add verify-sig
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-apps/coreutils/Manifest | 1 +
13 sys-apps/coreutils/coreutils-9.0-r2.ebuild | 17 ++++++++++++++---
14 2 files changed, 15 insertions(+), 3 deletions(-)
15
16 diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest
17 index b820e36cb8ba..e13c336609db 100644
18 --- a/sys-apps/coreutils/Manifest
19 +++ b/sys-apps/coreutils/Manifest
20 @@ -1,3 +1,4 @@
21 DIST coreutils-8.30-patches-01.tar.xz 5788 BLAKE2B a41511ce39ac570cb14b7f12d125eebef92217469a9490808719fa0665f5e5c0adb96fbd02c4bac4d280d1502295669575790a81dbc01afe2ca3a9d384cbefb0 SHA512 b1e1933637de4581d5f8c6ede4e80a012435d13f0cf5550a76ab5bbe9441e3c15ce19ef3f78a7ea3b8368d5e9a3bb17c1207c471d26171b59786f38adeba0454
22 DIST coreutils-8.32.tar.xz 5547836 BLAKE2B 0ad99c176c19ec214fcfd0845523e5362f0151827707c759bd46c0fe8d2501c6ad1c29c5b71266f6525857bc0d56c472db0d7fe29953b6c65e2e6c76bdf3c515 SHA512 1c8f3584efd61b4b02e7ac5db8e103b63cfb2063432caaf1e64cb2dcc56d8c657d1133bbf10bd41468d6a1f31142e6caa81d16ae68fa3e6e84075c253613a145
23 DIST coreutils-9.0.tar.xz 5612752 BLAKE2B 59617cd25fd4c70f51bfbef851bd83e73f9c9ba5c11eb539f7f75c0184d55832e004b28e9268fb8064db145cb071ead2b9c0c3346bc35a11934ffe1b15bf17ac SHA512 9be08212891dbf48e5b22e7689dc27dac50df4631ebf29313470b72b7921f0b2aa5242917d05587785358495ca56e3b21f5b3ca81043d53cab92354da6c53a03
24 +DIST coreutils-9.0.tar.xz.sig 833 BLAKE2B 1393f60361524e0a6eab5631aada50ee4124bd0e9ff3020b7593914a888f0edaec78339caee28847e85e1a1af6ea519ab9fad208db605f0c6b8a4e7ab19853a8 SHA512 1a368c92ddb57f386c188ef72f1edad7e217c983c296f9be0d27ffbaa673bf2f004c321fbaff8ae6cdebf6ffef402e3e8c69e6c8e30aca988e0ea38f2296cf30
25
26 diff --git a/sys-apps/coreutils/coreutils-9.0-r2.ebuild b/sys-apps/coreutils/coreutils-9.0-r2.ebuild
27 index c8d7eca8e649..e55e9bf82f73 100644
28 --- a/sys-apps/coreutils/coreutils-9.0-r2.ebuild
29 +++ b/sys-apps/coreutils/coreutils-9.0-r2.ebuild
30 @@ -4,8 +4,8 @@
31 EAPI=7
32
33 PYTHON_COMPAT=( python3_{8..10} )
34 -
35 -inherit flag-o-matic python-any-r1 toolchain-funcs
36 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/coreutils.asc
37 +inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig
38
39 PATCH="${PN}-8.30-patches-01"
40 DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
41 @@ -14,7 +14,8 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
42 !vanilla? (
43 mirror://gentoo/${PATCH}.tar.xz
44 https://dev.gentoo.org/~polynomial-c/dist/${PATCH}.tar.xz
45 - )"
46 + )
47 + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
48
49 LICENSE="GPL-3"
50 SLOT="0"
51 @@ -42,6 +43,7 @@ BDEPEND="
52 dev-util/strace
53 ${PYTHON_DEPS}
54 )
55 + verify-sig? ( sec-keys/openpgp-keys-coreutils )
56 "
57 RDEPEND+="
58 hostname? ( !sys-apps/net-tools[hostname] )
59 @@ -64,6 +66,15 @@ pkg_setup() {
60 fi
61 }
62
63 +src_unpack() {
64 + if use verify-sig ; then
65 + # Needed for downloaded patch (which is unsigned, which is fine)
66 + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
67 + fi
68 +
69 + default
70 +}
71 +
72 src_prepare() {
73 local PATCHES=(
74 # Upstream patches