mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-27 22:38:40 +00:00
5c584cb628
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
25 lines
928 B
Plaintext
25 lines
928 B
Plaintext
# RPM_GPG_NAME and RPM_GPG_PASSPHRASE must be configured in your build
|
|
# environment. By default, the values for the sample keys are configured
|
|
# in meta-signing-key.
|
|
|
|
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.
|
|
RPM_FSK_PATH ?= "${@uks_ima_keys_dir(d) + 'x509_ima.key'}"
|
|
RPM_FSK_PASSWORD ?= "password"
|
|
|
|
inherit sign_rpm user-key-store
|
|
|
|
python () {
|
|
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):
|
|
status, output = oe.utils.getstatusoutput('mkdir -m 0700 -p %s' % gpg_path)
|
|
if status:
|
|
raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' %
|
|
(gpg_path, output))
|
|
}
|