From ab4a9ee6fd43e99d34907d7dbc3bcd35d90ab25e Mon Sep 17 00:00:00 2001 From: John McQuah Date: Sun, 20 Aug 2023 19:52:16 -0400 Subject: [PATCH] pkgmeek: accommodate verbose output from signify --- scripts/pkgmeek | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pkgmeek b/scripts/pkgmeek index d5394bc..c078442 100755 --- a/scripts/pkgmeek +++ b/scripts/pkgmeek @@ -446,7 +446,7 @@ parse_signify_output() { # chomps the output of check_signature() *"Pkgfile verification failed") signerr=-1; error "Signature missing! Unable to authenticate the Pkgfile." ;; - *"verification failed") + *"verification failed"*) signerr=1; error "Signature file corrupted or unreadable." ;; *"FAIL") @@ -464,6 +464,7 @@ check_signature() { # called from $PKGMK_ROOT in the case "when"="pre-Pkgfile", local reqfiles=(Pkgfile); local s=0; local when="$1"; local SIGNIFY_ARGS=(-C -x "$PKGMK_ROOT/.signature") + [ "$PKGMK_PUBLICKEY" ] || PKGMK_PUBLICKEY="$(get_repo_key public)" if [ -f "$PKGMK_ROOT/.signature" ]; then [ "$when" = "pre-Pkgfile" ] || reqfiles=(.footprint) while [ "$when" = "pre-build" ] && (( s < ${#_local_[@]} )); do @@ -473,8 +474,7 @@ check_signature() { # called from $PKGMK_ROOT in the case "when"="pre-Pkgfile", for FILE in "${reqfiles[@]}"; do [ -e "$FILE" ] || ln -sf "$PKGMK_ROOT/$FILE" . done - [ "$PKGMK_PUBLICKEY" ] && [ -r "$PKGMK_PUBLICKEY" ] && \ - SIGNIFY_ARGS+=(-p "$PKGMK_PUBLICKEY") + [ -r "$PKGMK_PUBLICKEY" ] && SIGNIFY_ARGS+=(-p "$PKGMK_PUBLICKEY") /usr/bin/signify "${SIGNIFY_ARGS[@]}" "${reqfiles[@]}" 2>&1 else [ "$when" = "pre-Pkgfile" ] && echo "Pkgfile verification failed"