summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-05-31 09:54:28 +0800
committerJia Zhang <zhang.jia@linux.alibaba.com>2018-05-31 11:26:13 +0800
commit38ba5938416ba488f10849080a11069242924e89 (patch)
tree8aa5f41876fdf97ebad0ce18f975064c6f8aa87c
parent6ca33b325d265afd2cab4890cd1379b2a95114f8 (diff)
downloadmeta-secure-core-38ba5938416ba488f10849080a11069242924e89.tar.gz
sign_rpm_ext.bbclass: fix check_rpm_public_key racing at recipe parsing time
All recipe will be parsed which caused lockfile of check_rpm_public_key racing issue. ... |WARNING: meta-secure-core/meta/recipes-core/images/secure-core-image-initramfs.bb: oe-core/bitbake/lib/bb/utils.py:400: ResourceWarning: unclosed file <_io.TextIOWrapper name='tmp-glibc/check_rpm_public_key.lock' mode='a+' encoding='UTF-8'> ... Refer do_package_write_rpm, add check_rpm_public_key to prefunc of do_rootfs, only the running image recipe will invoke check_rpm_public_key. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-rw-r--r--meta-integrity/classes/sign_rpm_ext.bbclass5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta-integrity/classes/sign_rpm_ext.bbclass b/meta-integrity/classes/sign_rpm_ext.bbclass
index 4a25691..8b25d74 100644
--- a/meta-integrity/classes/sign_rpm_ext.bbclass
+++ b/meta-integrity/classes/sign_rpm_ext.bbclass
@@ -34,6 +34,7 @@ python check_rpm_public_key () {
34} 34}
35check_rpm_public_key[lockfiles] = "${TMPDIR}/check_rpm_public_key.lock" 35check_rpm_public_key[lockfiles] = "${TMPDIR}/check_rpm_public_key.lock"
36do_package_write_rpm[prefuncs] += "check_rpm_public_key" 36do_package_write_rpm[prefuncs] += "check_rpm_public_key"
37do_rootfs[prefuncs] += "check_rpm_public_key"
37check_rpm_public_key[prefuncs] += "check_deploy_keys" 38check_rpm_public_key[prefuncs] += "check_deploy_keys"
38 39
39python () { 40python () {
@@ -47,8 +48,4 @@ python () {
47 if status: 48 if status:
48 raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' % 49 raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' %
49 (gpg_path, output)) 50 (gpg_path, output))
50
51 is_image = bb.data.inherits_class('image', d)
52 if is_image:
53 bb.build.exec_func("check_rpm_public_key", d)
54} 51}