firefox-bin.updateScript: fix with GNUPGHOME

If GNUPGHOME is set in the environment, it takes precedence over HOME,
so to avoid using a user's actual GNUPGHOME, we should override thiscc
instead of HOME.
This commit is contained in:
Alyssa Ross 2019-06-18 19:25:13 +00:00
parent b0002f4816
commit aee879c98f
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -23,7 +23,7 @@ in writeScript "update-${name}" ''
set -eux
pushd ${basePath}
HOME=`mktemp -d`
export GNUPGHOME=`mktemp -d`
gpg --keyserver hkps://gpg.mozilla.org --recv-keys 14F26682D0916CDD81E37B6D61B7B526D98F0353
tmpfile=`mktemp`
@ -49,7 +49,7 @@ in writeScript "update-${name}" ''
curl --silent -o $HOME/shasums "$url$version/SHA512SUMS"
curl --silent -o $HOME/shasums.asc "$url$version/SHA512SUMS.asc"
gpgv --keyring=$HOME/.gnupg/pubring.kbx $HOME/shasums.asc $HOME/shasums
gpgv --keyring=$GNUPGHOME/pubring.kbx $HOME/shasums.asc $HOME/shasums
# this is a list of sha512 and tarballs for both arches
shasums=`cat $HOME/shasums`