diff options
author | Sandy <39258624+sandy-lcq@users.noreply.github.com> | 2019-11-06 15:35:51 +0800 |
---|---|---|
committer | Jia Zhang <qianyue.zj@alibaba-inc.com> | 2019-11-06 15:35:51 +0800 |
commit | 99760f4771dfa011dce46ce853395b5d0fd09e22 (patch) | |
tree | 01a12d7606b28b10debb945b58059b611e01b99f | |
parent | 5698bb8529554eccdea898aadbe0b10e7385e661 (diff) | |
download | meta-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.bbclass | 3 |
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 | ||
11 | inherit sign_rpm user-key-store | 11 | inherit sign_rpm user-key-store |
12 | 12 | ||
13 | GPG_DEP = "${@'' if d.getVar('GPG_BIN') else 'gnupg-native pinentry-native'}" | ||
14 | DEPENDS_append_class-target += "${GPG_DEP}" | ||
15 | |||
13 | python check_rpm_public_key () { | 16 | python 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 \ |