diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-02-10 16:15:57 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-19 01:01:25 +0000 |
commit | e845b75f8fc718765158a858cfe904c575315f45 (patch) | |
tree | a456ad2949d45e46a9f886717eb02c3c822aa90c /meta/recipes-core | |
parent | d5be8666a1f429283e8200ef67f1fc3afa587c4f (diff) | |
download | poky-e845b75f8fc718765158a858cfe904c575315f45.tar.gz |
sign_rpm.bbclass: do not store key details in signer instance
Refactor the LocalSigner class. Do not store keyid or passphrase file in
the signer object as they are only needed for some of the methods. For
example, the newly added verify() method does not need any key
parameters and export_pubkey only uses keyid.
(From OE-Core rev: e2412294b6b1d3a80ee97a0706613349edc51d33)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/meta/signing-keys.bb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb index d7aa79d49f..d7763c664e 100644 --- a/meta/recipes-core/meta/signing-keys.bb +++ b/meta/recipes-core/meta/signing-keys.bb | |||
@@ -26,18 +26,14 @@ python do_export_public_keys () { | |||
26 | 26 | ||
27 | if d.getVar("RPM_SIGN_PACKAGES", True): | 27 | if d.getVar("RPM_SIGN_PACKAGES", True): |
28 | # Export public key of the rpm signing key | 28 | # Export public key of the rpm signing key |
29 | signer = get_signer(d, | 29 | signer = get_signer(d, d.getVar('RPM_GPG_BACKEND', True)) |
30 | d.getVar('RPM_GPG_BACKEND', True), | 30 | signer.export_pubkey(d.getVar('RPM_GPG_PUBKEY', True), |
31 | d.getVar('RPM_GPG_NAME', True), | 31 | d.getVar('RPM_GPG_NAME', True)) |
32 | d.getVar('RPM_GPG_PASSPHRASE_FILE', True)) | ||
33 | signer.export_pubkey(d.getVar('RPM_GPG_PUBKEY', True)) | ||
34 | 32 | ||
35 | if d.getVar('PACKAGE_FEED_SIGN', True) == '1': | 33 | if d.getVar('PACKAGE_FEED_SIGN', True) == '1': |
36 | # Export public key of the feed signing key | 34 | # Export public key of the feed signing key |
37 | signer = get_signer(d, | 35 | signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND', True)) |
38 | d.getVar('PACKAGE_FEED_GPG_BACKEND', True), | 36 | signer.export_pubkey(d.getVar('PACKAGE_FEED_GPG_PUBKEY', True), |
39 | d.getVar('PACKAGE_FEED_GPG_NAME', True), | 37 | d.getVar('PACKAGE_FEED_GPG_NAME', True)) |
40 | d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True)) | ||
41 | signer.export_pubkey(d.getVar('PACKAGE_FEED_GPG_PUBKEY', True)) | ||
42 | } | 38 | } |
43 | addtask do_export_public_keys before do_build | 39 | addtask do_export_public_keys before do_build |