mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-16 12:47:00 +00:00
sign_rpm_ext.bbclass: clean up
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
# environment. By default, the values for the sample keys are configured
|
||||
# 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)}"
|
||||
# By default, the values below are applicable for the sample keys provided
|
||||
# by meta-signing-key.
|
||||
@@ -15,17 +11,13 @@ RPM_FSK_PASSWORD ?= "password"
|
||||
inherit sign_rpm user-key-store
|
||||
|
||||
python () {
|
||||
if d.getVar('RPM_SIGN_FILES', True) != '1':
|
||||
return
|
||||
|
||||
gpg_path = d.getVar('GPG_PATH', True)
|
||||
if not gpg_path:
|
||||
gpg_path = d.getVar('DEPLOY_DIR_IMAGE', True) + '/.gnupg'
|
||||
d.setVar('GPG_PATH', gpg_path)
|
||||
|
||||
if not os.path.exists(gpg_path):
|
||||
cmd = ' '.join(('mkdir -p', gpg_path))
|
||||
status, output = oe.utils.getstatusoutput(cmd)
|
||||
status, output = oe.utils.getstatusoutput('mkdir -p %s' % gpg_path)
|
||||
if status:
|
||||
raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' %
|
||||
(gpg_path, output))
|
||||
|
||||
Reference in New Issue
Block a user