setup-apt-repo: Fix GPG check of groonga-apt-source-*.deb.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-04-05 11:48:54 -07:00 committed by Tim Abbott
parent c2458bfe94
commit 54b08ee30b
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
if [[ ! -e /usr/share/doc/groonga-apt-source/copyright ]]; then if [[ ! -e /usr/share/doc/groonga-apt-source/copyright ]]; then
pgroonga_apt_sign_key=$(readlink -f "$LIST_PATH/pgroonga-packages.groonga.org.asc")
remove_pgroonga_apt_tmp_dir() { remove_pgroonga_apt_tmp_dir() {
rm -rf "$pgroonga_apt_tmp_dir" rm -rf "$pgroonga_apt_tmp_dir"
} }
@ -10,7 +13,6 @@ if [[ ! -e /usr/share/doc/groonga-apt-source/copyright ]]; then
{ {
cd "$pgroonga_apt_tmp_dir" || exit 1 cd "$pgroonga_apt_tmp_dir" || exit 1
tmp_gpg_home=.gnupg tmp_gpg_home=.gnupg
pgroonga_apt_sign_key="$LIST_PATH/pgroonga-packages.groonga.org.asc"
gpg --homedir="$tmp_gpg_home" --import "$pgroonga_apt_sign_key" gpg --homedir="$tmp_gpg_home" --import "$pgroonga_apt_sign_key"
# Find fingerprint of the first key. # Find fingerprint of the first key.
pgroonga_apt_sign_key_fingerprint=$( pgroonga_apt_sign_key_fingerprint=$(