From fc8969af8a34ff93ede7d44a492750446154d950 Mon Sep 17 00:00:00 2001 From: De Huo Date: Mon, 27 Apr 2020 11:21:05 +0800 Subject: user-key-store.bbclass: Kill gpg agent daemon after gpg sign The gpg-agent daemon will be triggered to run in function boot_sign, This daemon will not exit even after building project. So kill the gpg-agent daemon after gpg signing process at the end of function boot_sign. Signed-off-by: De Huo --- meta-signing-key/classes/user-key-store.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-signing-key/classes/user-key-store.bbclass b/meta-signing-key/classes/user-key-store.bbclass index 55876d0..960bde6 100644 --- a/meta-signing-key/classes/user-key-store.bbclass +++ b/meta-signing-key/classes/user-key-store.bbclass @@ -536,6 +536,10 @@ def boot_sign(input, d): status, output = oe.utils.getstatusoutput(cmd) if status: bb.fatal('Failed to sign: %s' % (input)) + gpg_conf = bb.utils.which(os.getenv('PATH'), 'gpgconf') + cmd = 'GNUPGHOME=%s %s --kill gpg-agent' % \ + (gpg_path, gpg_conf) + status, output = oe.utils.getstatusoutput(cmd) def uks_boot_sign(input, d): boot_sign(input, d) -- cgit v1.2.3-54-g00ecf