mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-16 12:47:00 +00:00
sign_rpm_ext.bbclass: fix check_rpm_public_key failed while host not install gpg (#124)
Due to the following reasons, need to add the dependency to task who needs to run check_rpm_public_key: * packagegroup recipe don't have task prepare_recipe_sysroot * varflags depends don't work for prefuncs Signed-off-by: Changqing Li <changqing.li@windriver.com>
This commit is contained in:
@@ -10,8 +10,7 @@ RPM_FSK_PASSWORD ?= "password"
|
|||||||
|
|
||||||
inherit sign_rpm user-key-store
|
inherit sign_rpm user-key-store
|
||||||
|
|
||||||
GPG_DEP = "${@'' if d.getVar('GPG_BIN') else 'gnupg-native pinentry-native'}"
|
GPG_DEP = "${@'' if d.getVar('GPG_BIN') else 'gnupg-native:do_populate_sysroot pinentry-native:do_populate_sysroot'}"
|
||||||
DEPENDS_append_class-target += "${GPG_DEP}"
|
|
||||||
|
|
||||||
python check_rpm_public_key () {
|
python check_rpm_public_key () {
|
||||||
gpg_path = d.getVar('GPG_PATH', True)
|
gpg_path = d.getVar('GPG_PATH', True)
|
||||||
@@ -35,9 +34,17 @@ python check_rpm_public_key () {
|
|||||||
bb.fatal('Failed to import gpg key (%s): %s' % (gpg_key, output))
|
bb.fatal('Failed to import gpg key (%s): %s' % (gpg_key, output))
|
||||||
}
|
}
|
||||||
check_rpm_public_key[lockfiles] = "${TMPDIR}/check_rpm_public_key.lock"
|
check_rpm_public_key[lockfiles] = "${TMPDIR}/check_rpm_public_key.lock"
|
||||||
do_package_write_rpm[prefuncs] += "check_rpm_public_key"
|
|
||||||
do_rootfs[prefuncs] += "check_rpm_public_key"
|
|
||||||
check_rpm_public_key[prefuncs] += "check_deploy_keys"
|
check_rpm_public_key[prefuncs] += "check_deploy_keys"
|
||||||
|
do_package_write_rpm[depends] += "${GPG_DEP}"
|
||||||
|
do_rootfs[depends] += "${GPG_DEP}"
|
||||||
|
|
||||||
|
python do_package_write_rpm_prepend() {
|
||||||
|
bb.build.exec_func("check_rpm_public_key", d)
|
||||||
|
}
|
||||||
|
|
||||||
|
python do_rootfs_prepend() {
|
||||||
|
bb.build.exec_func("check_rpm_public_key", d)
|
||||||
|
}
|
||||||
|
|
||||||
python () {
|
python () {
|
||||||
gpg_path = d.getVar('GPG_PATH', True)
|
gpg_path = d.getVar('GPG_PATH', True)
|
||||||
|
|||||||
Reference in New Issue
Block a user