diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-31 21:49:19 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-31 21:49:19 +0000 |
commit | b43ae231a57eccda208f33c4343d956e7f2590f5 (patch) | |
tree | 8871b66b51dfb514ef803c4eaf3d1f2cb57c4ee1 /eclass | |
parent | 7e84f2c47ae7a0e8b76fc3080b1c7ee8487ee76b (diff) |
gentoo auto-resync : 31:10:2023 - 21:49:19
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 39121 -> 39126 bytes | |||
-rw-r--r-- | eclass/llvm.org.eclass | 2 | ||||
-rw-r--r-- | eclass/verify-sig.eclass | 39 |
3 files changed, 29 insertions, 12 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 95f747907243..fe6cf1ed7281 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index ed37d1c2f563..e12f8faa422a 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -248,7 +248,7 @@ llvm.org_set_globals() { >=sec-keys/openpgp-keys-llvm-16.0.4 ) " - VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/llvm.asc + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/llvm.asc ;; snapshot) SRC_URI+=" diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass index bb847bb80cc6..d5f71669538e 100644 --- a/eclass/verify-sig.eclass +++ b/eclass/verify-sig.eclass @@ -37,7 +37,7 @@ # BDEPEND=" # verify-sig? ( sec-keys/openpgp-keys-example )" # -# VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/example.asc +# VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/example.asc # @CODE case ${EAPI} in @@ -87,6 +87,8 @@ esac # when using default src_unpack. Alternatively, the key path can be # passed directly to the verification functions. # +# The value of BROOT will be prepended to this path automatically. +# # NB: this variable is also used for non-OpenPGP signatures. The name # contains "OPENPGP" for historical reasons. @@ -119,10 +121,15 @@ esac verify-sig_verify_detached() { local file=${1} local sig=${2} - local key=${3:-${VERIFY_SIG_OPENPGP_KEY_PATH}} + local key=${3} - [[ -n ${key} ]] || - die "${FUNCNAME}: no key passed and VERIFY_SIG_OPENPGP_KEY_PATH unset" + if [[ -z ${key} ]]; then + if [[ -z ${VERIFY_SIG_OPENPGP_KEY_PATH} ]]; then + die "${FUNCNAME}: no key passed and VERIFY_SIG_OPENPGP_KEY_PATH unset" + else + key="${BROOT}${VERIFY_SIG_OPENPGP_KEY_PATH}" + fi + fi local extra_args=() [[ ${VERIFY_SIG_OPENPGP_KEY_REFRESH} == yes ]] || extra_args+=( -R ) @@ -182,10 +189,15 @@ verify-sig_verify_detached() { verify-sig_verify_message() { local file=${1} local output_file=${2} - local key=${3:-${VERIFY_SIG_OPENPGP_KEY_PATH}} + local key=${3} - [[ -n ${key} ]] || - die "${FUNCNAME}: no key passed and VERIFY_SIG_OPENPGP_KEY_PATH unset" + if [[ -z ${key} ]]; then + if [[ -z ${VERIFY_SIG_OPENPGP_KEY_PATH} ]]; then + die "${FUNCNAME}: no key passed and VERIFY_SIG_OPENPGP_KEY_PATH unset" + else + key="${BROOT}${VERIFY_SIG_OPENPGP_KEY_PATH}" + fi + fi local extra_args=() [[ ${VERIFY_SIG_OPENPGP_KEY_REFRESH} == yes ]] || extra_args+=( -R ) @@ -313,7 +325,7 @@ _gpg_verify_signed_checksums() { local checksum_file=${1} local algo=${2} local files=${3} - local key=${4:-${VERIFY_SIG_OPENPGP_KEY_PATH}} + local key=${4} verify-sig_verify_unsigned_checksums - "${algo}" "${files}" < <( verify-sig_verify_message "${checksum_file}" - "${key}" @@ -336,10 +348,15 @@ verify-sig_verify_signed_checksums() { local algo=${2} local files=() read -r -d '' -a files <<<"${3}" - local key=${4:-${VERIFY_SIG_OPENPGP_KEY_PATH}} + local key=${4} - [[ -n ${key} ]] || - die "${FUNCNAME}: no key passed and VERIFY_SIG_OPENPGP_KEY_PATH unset" + if [[ -z ${key} ]]; then + if [[ -z ${VERIFY_SIG_OPENPGP_KEY_PATH} ]]; then + die "${FUNCNAME}: no key passed and VERIFY_SIG_OPENPGP_KEY_PATH unset" + else + key="${BROOT}${VERIFY_SIG_OPENPGP_KEY_PATH}" + fi + fi case ${VERIFY_SIG_METHOD} in openpgp) |