diff options
author | Jia Zhang <lans.zhang2008@gmail.com> | 2017-08-19 21:52:51 +0800 |
---|---|---|
committer | Jia Zhang <lans.zhang2008@gmail.com> | 2017-08-19 21:52:51 +0800 |
commit | 820376c2b5d0100c9cac8f82bf405ed3aff08028 (patch) | |
tree | 8e56f07c51c7abc91c995c4a3f41c4fbd2901d17 | |
parent | 050cc889bb5b46d21ede7598907bfc046ce5b000 (diff) | |
download | meta-secure-core-820376c2b5d0100c9cac8f82bf405ed3aff08028.tar.gz |
sign_rpm_ext.bbclass: clean up
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
-rw-r--r-- | meta-integrity/classes/sign_rpm_ext.bbclass | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/meta-integrity/classes/sign_rpm_ext.bbclass b/meta-integrity/classes/sign_rpm_ext.bbclass index ebdf2b0..a8504ac 100644 --- a/meta-integrity/classes/sign_rpm_ext.bbclass +++ b/meta-integrity/classes/sign_rpm_ext.bbclass | |||
@@ -2,10 +2,6 @@ | |||
2 | # environment. By default, the values for the sample keys are configured | 2 | # environment. By default, the values for the sample keys are configured |
3 | # in meta-signing-key. | 3 | # in meta-signing-key. |
4 | 4 | ||
5 | RPM_GPG_BACKEND ?= "local" | ||
6 | # SHA-256 is used for the file checksum digest. | ||
7 | RPM_FILE_CHECKSUM_DIGEST ?= "8" | ||
8 | |||
9 | RPM_SIGN_FILES = "${@bb.utils.contains('DISTRO_FEATURES', 'ima', '1', '0', d)}" | 5 | RPM_SIGN_FILES = "${@bb.utils.contains('DISTRO_FEATURES', 'ima', '1', '0', d)}" |
10 | # By default, the values below are applicable for the sample keys provided | 6 | # By default, the values below are applicable for the sample keys provided |
11 | # by meta-signing-key. | 7 | # by meta-signing-key. |
@@ -15,17 +11,13 @@ RPM_FSK_PASSWORD ?= "password" | |||
15 | inherit sign_rpm user-key-store | 11 | inherit sign_rpm user-key-store |
16 | 12 | ||
17 | python () { | 13 | python () { |
18 | if d.getVar('RPM_SIGN_FILES', True) != '1': | ||
19 | return | ||
20 | |||
21 | gpg_path = d.getVar('GPG_PATH', True) | 14 | gpg_path = d.getVar('GPG_PATH', True) |
22 | if not gpg_path: | 15 | if not gpg_path: |
23 | gpg_path = d.getVar('DEPLOY_DIR_IMAGE', True) + '/.gnupg' | 16 | gpg_path = d.getVar('DEPLOY_DIR_IMAGE', True) + '/.gnupg' |
24 | d.setVar('GPG_PATH', gpg_path) | 17 | d.setVar('GPG_PATH', gpg_path) |
25 | 18 | ||
26 | if not os.path.exists(gpg_path): | 19 | if not os.path.exists(gpg_path): |
27 | cmd = ' '.join(('mkdir -p', gpg_path)) | 20 | status, output = oe.utils.getstatusoutput('mkdir -p %s' % gpg_path) |
28 | status, output = oe.utils.getstatusoutput(cmd) | ||
29 | if status: | 21 | if status: |
30 | raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' % | 22 | raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' % |
31 | (gpg_path, output)) | 23 | (gpg_path, output)) |