From 2ca1bff7b7db3a2fa359edabccb90b71b8e65d02 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 2 Feb 2026 07:29:29 +0000 Subject: [PATCH] eclass/verify-sig: Sync with Gentoo It's from Gentoo commit 2cb33d9f2ef99beb596b5d56d58346ee1b8c2204. Signed-off-by: Flatcar Buildbot --- .../portage-stable/eclass/verify-sig.eclass | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass b/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass index ba1086d664..d9aa60152a 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass @@ -1,10 +1,10 @@ -# Copyright 2020-2025 Gentoo Authors +# Copyright 2020-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: verify-sig.eclass # @MAINTAINER: # Michał Górny -# @SUPPORTED_EAPIS: 7 8 +# @SUPPORTED_EAPIS: 7 8 9 # @BLURB: Eclass to verify upstream signatures on distfiles # @DESCRIPTION: # verify-sig eclass provides a streamlined approach to verifying @@ -40,15 +40,14 @@ # VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/example.asc # @CODE -case ${EAPI} in - 7|8) ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -esac - if [[ -z ${_VERIFY_SIG_ECLASS} ]]; then _VERIFY_SIG_ECLASS=1 -inherit eapi9-pipestatus +case ${EAPI} in + 7|8) inherit eapi9-pipestatus ;; + 9) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac IUSE="verify-sig" @@ -345,11 +344,10 @@ verify-sig_verify_unsigned_checksums() { [[ -n ${junk} ]] && continue ;; openssl-dgst) - [[ ${line} != *"("*")="* ]] && continue - checksum=${line##*)=} - algo=${line%%(*} - filename=${line#*(} - filename=${filename%)=*} + [[ ${line} =~ ^([[:alnum:]]+)[[:space:]]*[(](.*)[)][[:space:]]*=[[:space:]]*([0-9a-fA-F]+)$ ]] || continue + algo=${BASH_REMATCH[1]} + filename=${BASH_REMATCH[2]} + checksum=${BASH_REMATCH[3]} ;; esac