From 3337d490937b08fdffc0c411d1f9dff0e055c191 Mon Sep 17 00:00:00 2001 From: John McQuah Date: Wed, 1 Jun 2022 20:16:15 -0400 Subject: [PATCH] pkgmeek: fixed the cat_signature() subroutine --- scripts/pkgmeek | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pkgmeek b/scripts/pkgmeek index 12ec82f..a55e755 100755 --- a/scripts/pkgmeek +++ b/scripts/pkgmeek @@ -490,7 +490,7 @@ check_signature() { # called from $PKGMK_ROOT in the case "when"="pre-Pkgfile", } cat_signature() { - local ordered f key pub + local ordered si key pub [ -e "$PKGMK_ROOT/.footprint" ] || warning "Footprint not found, signature will be incomplete." for key in ~/.ssh/*.sec /etc/ports/*.sec; do [ -e "$key" ] || continue # workaround for brain-dead shell globbing @@ -500,8 +500,8 @@ cat_signature() { for f in "$PKGMK_ROOT/Pkgfile" "$PKGMK_ROOT/.footprint"; do [ -e $f ] && ordered+=( "$f" ) done - for f in "${source[@]}"; do ordered+=("${_local_[$f]}"); done - sha256sum --tag "${ordered[@]}" \ + for ((si=0; si < ${#source[@]}; si++)); do ordered+=("${_local_[$si]}"); done + sha256sum --tag "${ordered[@]}" \ | sed 's|^SHA256 (.*/\(.*\))\(.* = .*\)|SHA256 (\1)\2|' \ | "$PKGMK_SIGNIFY" -S -e -x - -q -s "$key" -m - \ | sed "s|${key/%.sec/.pub}|$pub|"