Verified Commit b8ade5ac authored by boklm's avatar boklm
Browse files

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.
parent 8f76d71e
#!/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 -%]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment