commit:     d859c906462b56fab05deb6170d4ed639d41549c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 10 13:01:52 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 13:02:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d859c906

dev-lang/rust-common: wire up USE=verify-sig

The USE was there but it wasn't doing anything. Note that we don't
use verify-sig_src_unpack to avoid unpacking everything, see also
2d190c9e5b1db3292ea5d36f77a314eee019f99d.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/rust-common/rust-common-1.81.0.ebuild | 12 +++++++++---
 dev-lang/rust-common/rust-common-1.82.0.ebuild | 11 ++++++++---
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/dev-lang/rust-common/rust-common-1.81.0.ebuild 
b/dev-lang/rust-common/rust-common-1.81.0.ebuild
index b977c5aa1b92..83fbbf485e6c 100644
--- a/dev-lang/rust-common/rust-common-1.81.0.ebuild
+++ b/dev-lang/rust-common/rust-common-1.81.0.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=8
 
-inherit bash-completion-r1
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+inherit bash-completion-r1 verify-sig
 
 DESCRIPTION="Common files shared between multiple slots of Rust"
 HOMEPAGE="https://www.rust-lang.org/";
@@ -25,16 +26,21 @@ SRC_URI="
 S="${WORKDIR}/${MY_P}-src"
 
 LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
-SLOT=0
+SLOT="0"
 KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
-IUSE="verify-sig"
 
+# Legacy non-slotted versions bash completions will collide.
 RDEPEND="
        !dev-lang/rust:stable
        !dev-lang/rust-bin:stable
 "
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )"
 
 src_unpack() {
+       if use verify-sig ; then
+               verify-sig_verify_detached "${DISTDIR}"/${SRC} 
"${DISTDIR}"/${SRC}.asc
+       fi
+
        # Avoid unpacking the whole tarball which would need check-reqs
        tar -xf "${DISTDIR}"/${SRC} 
${SRC%%.tar.xz}/src/tools/cargo/src/etc/cargo.bashcomp.sh || die
 }

diff --git a/dev-lang/rust-common/rust-common-1.82.0.ebuild 
b/dev-lang/rust-common/rust-common-1.82.0.ebuild
index 0d4b5aa7b8ae..285a9a5b8e5f 100644
--- a/dev-lang/rust-common/rust-common-1.82.0.ebuild
+++ b/dev-lang/rust-common/rust-common-1.82.0.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=8
 
-inherit bash-completion-r1
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+inherit bash-completion-r1 verify-sig
 
 DESCRIPTION="Common files shared between multiple slots of Rust"
 HOMEPAGE="https://www.rust-lang.org/";
@@ -25,17 +26,21 @@ SRC_URI="
 S="${WORKDIR}/${MY_P}-src"
 
 LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
-SLOT=0
+SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-IUSE="verify-sig"
 
 # Legacy non-slotted versions bash completions will collide.
 RDEPEND="
        !dev-lang/rust:stable
        !dev-lang/rust-bin:stable
 "
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )"
 
 src_unpack() {
+       if use verify-sig ; then
+               verify-sig_verify_detached "${DISTDIR}"/${SRC} 
"${DISTDIR}"/${SRC}.asc
+       fi
+
        # Avoid unpacking the whole tarball which would need check-reqs
        tar -xf "${DISTDIR}"/${SRC} 
${SRC%%.tar.xz}/src/tools/cargo/src/etc/cargo.bashcomp.sh || die
 }

Reply via email to