summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandy <39258624+sandy-lcq@users.noreply.github.com>2019-11-06 15:35:51 +0800
committerJia Zhang <qianyue.zj@alibaba-inc.com>2019-11-06 15:35:51 +0800
commit99760f4771dfa011dce46ce853395b5d0fd09e22 (patch)
tree01a12d7606b28b10debb945b58059b611e01b99f
parent5698bb8529554eccdea898aadbe0b10e7385e661 (diff)
downloadmeta-secure-core-99760f4771dfa011dce46ce853395b5d0fd09e22.tar.gz
sign_rpm_ext.bbclass: fix compile fail since missing gpg (#123)
there is a scenario that this bbclass is enabled globally, all targets will inherit sign_rpm_ext. but this bbclass need gpg to work, on some new distro like ubuntun 19.04, gpg is not installed, so compile will failed. fail cmd: cmd = '%s --batch --homedir %s --passphrase %s --import %s' % \ (gpg_bin, gpg_path, d.getVar('RPM_GPG_PASSPHRASE', True), gpg_key) error: base-files-3.0.14-r89 do_package_write_rpm: Failed to import gpg key (): /bin/sh: 1: --batch: not found Signed-off-by: Changqing Li <changqing.li@windriver.com>
-rw-r--r--meta-integrity/classes/sign_rpm_ext.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta-integrity/classes/sign_rpm_ext.bbclass b/meta-integrity/classes/sign_rpm_ext.bbclass
index 25aa998..a8362ef 100644
--- a/meta-integrity/classes/sign_rpm_ext.bbclass
+++ b/meta-integrity/classes/sign_rpm_ext.bbclass
@@ -10,6 +10,9 @@ RPM_FSK_PASSWORD ?= "password"
10 10
11inherit sign_rpm user-key-store 11inherit sign_rpm user-key-store
12 12
13GPG_DEP = "${@'' if d.getVar('GPG_BIN') else 'gnupg-native pinentry-native'}"
14DEPENDS_append_class-target += "${GPG_DEP}"
15
13python check_rpm_public_key () { 16python check_rpm_public_key () {
14 gpg_path = d.getVar('GPG_PATH', True) 17 gpg_path = d.getVar('GPG_PATH', True)
15 gpg_bin = d.getVar('GPG_BIN', True) or \ 18 gpg_bin = d.getVar('GPG_BIN', True) or \