commit b8ade5ac89f85dc122894a458b22f47802530a63 Author: Nicolas Vigier boklm@torproject.org Date: Mon Dec 16 21:29:34 2019 +0100
Bug 32751: Allow gpg to find its keys in hash_incrementals
var/set_default_env is changing $HOME, preventing gpg to find the keys in its default configuration directory. We avoid that by reseting $HOME to its previous value before running gpg. --- projects/release/hash_incrementals | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/projects/release/hash_incrementals b/projects/release/hash_incrementals index cf31bfd..4ab0f4d 100644 --- a/projects/release/hash_incrementals +++ b/projects/release/hash_incrementals @@ -1,4 +1,8 @@ #!/bin/bash +[% IF c("var/sign_build") -%] + # var/set_default_env will reset HOME. We need to restore it to use gpg. + old_HOME="$HOME" +[% END -%] [% c("var/set_default_env") -%] [% IF c("var/nightly") -%] cd [% shell_quote(path(dest_dir)) %]/[% c("version") %] @@ -7,5 +11,6 @@ [% END -%] sha256sum `ls -1 | grep '.incremental.mar$' | sort` > sha256sums-[% c("var/signed_status") %]-build.incrementals.txt [% IF c("var/sign_build") -%] + export HOME="$old_HOME" gpg -abs [% c("var/sign_build_gpg_opts") %] sha256sums-[% c("var/signed_status") %]-build.incrementals.txt [% END -%]