From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7EABB158042 for ; Wed, 16 Oct 2024 04:54:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA4EFE07F0; Wed, 16 Oct 2024 04:54:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8DDD0E07F0 for ; Wed, 16 Oct 2024 04:54:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4FB1B343014 for ; Wed, 16 Oct 2024 04:54:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C7F0C2215 for ; Wed, 16 Oct 2024 04:54:43 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1729054469.0dbf54a0490c0270e4e743e8af8f6b51603bad3c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/verify-sig.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 0dbf54a0490c0270e4e743e8af8f6b51603bad3c X-VCS-Branch: master Date: Wed, 16 Oct 2024 04:54:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5a081f29-1d8c-4ef0-9d04-6d5179273a7f X-Archives-Hash: a4eb4e271bbc604a13dc0b4f2563d788 commit: 0dbf54a0490c0270e4e743e8af8f6b51603bad3c Author: Michał Górny gentoo org> AuthorDate: Sat Oct 12 12:08:54 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Oct 16 04:54:29 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dbf54a0 verify-sig.eclass: Refactor code to use extra_args for all types Signed-off-by: Michał Górny gentoo.org> eclass/verify-sig.eclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass index b74ed78290aa..d601c7838a00 100644 --- a/eclass/verify-sig.eclass +++ b/eclass/verify-sig.eclass @@ -132,7 +132,6 @@ verify-sig_verify_detached() { fi local extra_args=() - [[ ${VERIFY_SIG_OPENPGP_KEY_REFRESH} == yes ]] || extra_args+=( -R ) if [[ -n ${VERIFY_SIG_OPENPGP_KEYSERVER+1} ]]; then [[ ${VERIFY_SIG_METHOD} == openpgp ]] || die "${FUNCNAME}: VERIFY_SIG_OPENPGP_KEYSERVER is not supported" @@ -152,10 +151,15 @@ verify-sig_verify_detached() { einfo "Verifying ${filename} ..." case ${VERIFY_SIG_METHOD} in minisig) - minisign -V -P "$(<"${key}")" -x "${sig}" -m "${file}" || + minisign "${extra_args[@]}" \ + -V -P "$(<"${key}")" -x "${sig}" -m "${file}" || die "minisig signature verification failed" ;; openpgp) + if [[ ${VERIFY_SIG_OPENPGP_KEY_REFRESH} != yes ]]; then + extra_args+=( -R ) + fi + # gpg can't handle very long TMPDIR # https://bugs.gentoo.org/854492 local -x TMPDIR=/tmp @@ -165,7 +169,8 @@ verify-sig_verify_detached() { die "PGP signature verification failed" ;; signify) - signify -V -p "${key}" -m "${file}" -x "${sig}" || + signify "${extra_args[@]}" \ + -V -p "${key}" -m "${file}" -x "${sig}" || die "Signify signature verification failed" ;; esac