https://github.com/grafana/grafana
Raw File
Tip revision: 09ae0893e0e37cdbd7730c19bfeb18da545dc4a9 authored by Gilles De Mey on 01 August 2024, 12:49:51 UTC
add code comment
Tip revision: 09ae089
verify_signed_packages.sh
#!/bin/bash

_files=$*

if [ -z "$_files" ]; then
    echo "_files (arg 1) has to be set"
    exit 1
fi

mkdir -p ~/.rpmdb/pubkeys
curl -s https://packages.grafana.com/gpg.key > ~/.rpmdb/pubkeys/grafana.key

ALL_SIGNED=0

for file in $_files; do
  if rpm -K "$file" | grep "digests signatures OK" -q ; then
    echo "$file" OK
  else
    ALL_SIGNED=1
    echo "$file" NOT SIGNED
  fi
done

exit $ALL_SIGNED
back to top