summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDe Huo <De.Huo@windriver.com>2020-04-27 11:21:05 +0800
committerJia Zhang <zhang.jia@linux.alibaba.com>2020-04-27 18:48:43 +0800
commitfc8969af8a34ff93ede7d44a492750446154d950 (patch)
treea093e212ead79124e7fd3fe410bccbfc83fcf5a7
parent33d90d92b0df5f0d52186d267368ab146d771564 (diff)
downloadmeta-secure-core-fc8969af8a34ff93ede7d44a492750446154d950.tar.gz
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 <De.Huo@windriver.com>
-rw-r--r--meta-signing-key/classes/user-key-store.bbclass4
1 files changed, 4 insertions, 0 deletions
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):
536 status, output = oe.utils.getstatusoutput(cmd) 536 status, output = oe.utils.getstatusoutput(cmd)
537 if status: 537 if status:
538 bb.fatal('Failed to sign: %s' % (input)) 538 bb.fatal('Failed to sign: %s' % (input))
539 gpg_conf = bb.utils.which(os.getenv('PATH'), 'gpgconf')
540 cmd = 'GNUPGHOME=%s %s --kill gpg-agent' % \
541 (gpg_path, gpg_conf)
542 status, output = oe.utils.getstatusoutput(cmd)
539 543
540def uks_boot_sign(input, d): 544def uks_boot_sign(input, d):
541 boot_sign(input, d) 545 boot_sign(input, d)