sign_rpm_ext.bbclass: clean up

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
This commit is contained in:
Jia Zhang
2017-08-19 21:52:51 +08:00
parent 050cc889bb
commit 820376c2b5
+1 -9
View File
@@ -2,10 +2,6 @@
# environment. By default, the values for the sample keys are configured # environment. By default, the values for the sample keys are configured
# in meta-signing-key. # in meta-signing-key.
RPM_GPG_BACKEND ?= "local"
# SHA-256 is used for the file checksum digest.
RPM_FILE_CHECKSUM_DIGEST ?= "8"
RPM_SIGN_FILES = "${@bb.utils.contains('DISTRO_FEATURES', 'ima', '1', '0', d)}" RPM_SIGN_FILES = "${@bb.utils.contains('DISTRO_FEATURES', 'ima', '1', '0', d)}"
# By default, the values below are applicable for the sample keys provided # By default, the values below are applicable for the sample keys provided
# by meta-signing-key. # by meta-signing-key.
@@ -15,17 +11,13 @@ RPM_FSK_PASSWORD ?= "password"
inherit sign_rpm user-key-store inherit sign_rpm user-key-store
python () { python () {
if d.getVar('RPM_SIGN_FILES', True) != '1':
return
gpg_path = d.getVar('GPG_PATH', True) gpg_path = d.getVar('GPG_PATH', True)
if not gpg_path: if not gpg_path:
gpg_path = d.getVar('DEPLOY_DIR_IMAGE', True) + '/.gnupg' gpg_path = d.getVar('DEPLOY_DIR_IMAGE', True) + '/.gnupg'
d.setVar('GPG_PATH', gpg_path) d.setVar('GPG_PATH', gpg_path)
if not os.path.exists(gpg_path): if not os.path.exists(gpg_path):
cmd = ' '.join(('mkdir -p', gpg_path)) status, output = oe.utils.getstatusoutput('mkdir -p %s' % gpg_path)
status, output = oe.utils.getstatusoutput(cmd)
if status: if status:
raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' % raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' %
(gpg_path, output)) (gpg_path, output))