From 91cddd9fb0a738d7da089e9f5e2b6a8a5a4d497b Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Fri, 19 Jan 2024 18:27:35 +0100 Subject: [PATCH] #4247 Fix Fatpack / git-verify with expired keys (#4378) * modify git verify * force outputs to English --------- Co-authored-by: openoms --- home.admin/config.scripts/blitz.git-verify.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/home.admin/config.scripts/blitz.git-verify.sh b/home.admin/config.scripts/blitz.git-verify.sh index eb0706d96..373c8edc9 100644 --- a/home.admin/config.scripts/blitz.git-verify.sh +++ b/home.admin/config.scripts/blitz.git-verify.sh @@ -30,6 +30,10 @@ PGPsigner="$1" PGPpubkeyLink="$2" PGPpubkeyFingerprint="$3" +# force outputs to English +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 + wget -O /var/cache/raspiblitz/pgp_keys_${PGPsigner}.asc "${PGPpubkeyLink}" # in the case the wget above fails, try to use curl instead @@ -68,15 +72,13 @@ elif [ $# -eq 4 ]; then commitOrTag="$4 tag" fi echo "# running: ${gitCommand}" -if ${gitCommand} 2>&1 >&"$_temp"; then - goodSignature=1 -else - goodSignature=0 -fi +${gitCommand} 2>&1 >&"$_temp" echo cat "$_temp" -echo "# goodSignature(${goodSignature})" +echo +goodSignature=$(grep "Good signature from" -c <"$_temp") +echo "# goodSignature(${goodSignature})" correctKey=$(tr -d " \t\n\r" <"$_temp" | grep "${PGPpubkeyFingerprint}" -c) echo "# correctKey(${correctKey})"