git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitaee879c98f683d5b887d3acb844d141993abeed6 authorAlyssa Ross <hi@alyssa.is> dateTue 18 Jun 2019, 19:25 (7 years ago) parentb0002f4
1 file changed+2−2
pkgs/applications/networking/browsers/firefox-bin/update.nix+2−2
pkgs/applications/networking/browsers/firefox-bin/update.nix+2−2
@@ -23,7 +23,7 @@ in writeScript "update-${name}" ''
2323 set -eux
2424 pushd ${basePath}
2525
26− HOME=`mktemp -d`
26+ export GNUPGHOME=`mktemp -d`
2727 gpg --keyserver hkps://gpg.mozilla.org --recv-keys 14F26682D0916CDD81E37B6D61B7B526D98F0353
2828
2929 tmpfile=`mktemp`
@@ -49,7 +49,7 @@ in writeScript "update-${name}" ''
4949
5050 curl --silent -o $HOME/shasums "$url$version/SHA512SUMS"
5151 curl --silent -o $HOME/shasums.asc "$url$version/SHA512SUMS.asc"
52− gpgv --keyring=$HOME/.gnupg/pubring.kbx $HOME/shasums.asc $HOME/shasums
52+ gpgv --keyring=$GNUPGHOME/pubring.kbx $HOME/shasums.asc $HOME/shasums
5353
5454 # this is a list of sha512 and tarballs for both arches
5555 shasums=`cat $HOME/shasums`