@@ -33,7 +33,10 @@ class Signing(OESelftestTestCase):
nsysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native")
- runCmd('gpg --agent-program=`which gpg-agent`\|--auto-expand-secmem --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
+ with open(os.path.join(self.gpg_dir, "gpg-agent.conf"), "w") as f:
+ f.write("auto-expand-secmem\n")
+
+ runCmd('gpg --batch --homedir %s --import %s %s' % (self.gpg_dir, self.pub_key_path, self.secret_key_path), native_sysroot=nsysroot)
return nsysroot
Using a `|` character with `gpg --agent-program` to specify arguments for the gpg-agent process is not officially supported. The docs describe it as "a regression test suite hack" [1]. As we are already placing the gpg homedir in a temporary directory, we can instead create a gpg-agent.conf file to specify this option. [1]: https://www.gnupg.org/documentation/manuals/gnupg24/gpg.1.html Signed-off-by: Paul Barker <paul@pbarker.dev> --- meta/lib/oeqa/selftest/cases/signing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)