diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-03-21 02:25:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:14 +0000 |
commit | 3e5c5fe330b6a48c53ce9715abaae4250201e1a2 (patch) | |
tree | 7ae6839b16bc860628e75f480c5c21e60dcc9d3c /meta/classes/sign_rpm.bbclass | |
parent | 05d7e0db5d1de2643284edf7fccaf47616145bd6 (diff) | |
download | poky-3e5c5fe330b6a48c53ce9715abaae4250201e1a2.tar.gz |
gpg_sign.py: get rid of pexpect
The python-expect is not installed on the distro such as Ubuntu by
default, and we can get rid of it.
Use RPM_GPG_PASSPHRASE to replace of RPM_GPG_PASSPHRASE_FILE which is
more straightforward.
(From OE-Core rev: 4a8a74c62836a20610daf029d4cec0b3087758b2)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sign_rpm.bbclass')
-rw-r--r-- | meta/classes/sign_rpm.bbclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/sign_rpm.bbclass b/meta/classes/sign_rpm.bbclass index c21e3f09af..a8ea75faaa 100644 --- a/meta/classes/sign_rpm.bbclass +++ b/meta/classes/sign_rpm.bbclass | |||
@@ -1,8 +1,8 @@ | |||
1 | # Class for generating signed RPM packages. | 1 | # Class for generating signed RPM packages. |
2 | # | 2 | # |
3 | # Configuration variables used by this class: | 3 | # Configuration variables used by this class: |
4 | # RPM_GPG_PASSPHRASE_FILE | 4 | # RPM_GPG_PASSPHRASE |
5 | # Path to a file containing the passphrase of the signing key. | 5 | # The passphrase of the signing key. |
6 | # RPM_GPG_NAME | 6 | # RPM_GPG_NAME |
7 | # Name of the key to sign with. May be key id or key name. | 7 | # Name of the key to sign with. May be key id or key name. |
8 | # RPM_GPG_BACKEND | 8 | # RPM_GPG_BACKEND |
@@ -22,8 +22,10 @@ RPM_GPG_BACKEND ?= 'local' | |||
22 | 22 | ||
23 | 23 | ||
24 | python () { | 24 | python () { |
25 | if d.getVar('RPM_GPG_PASSPHRASE_FILE', True): | ||
26 | raise_sanity_error('RPM_GPG_PASSPHRASE_FILE is replaced by RPM_GPG_PASSPHRASE', d) | ||
25 | # Check configuration | 27 | # Check configuration |
26 | for var in ('RPM_GPG_NAME', 'RPM_GPG_PASSPHRASE_FILE'): | 28 | for var in ('RPM_GPG_NAME', 'RPM_GPG_PASSPHRASE'): |
27 | if not d.getVar(var, True): | 29 | if not d.getVar(var, True): |
28 | raise_sanity_error("You need to define %s in the config" % var, d) | 30 | raise_sanity_error("You need to define %s in the config" % var, d) |
29 | 31 | ||
@@ -44,7 +46,7 @@ python sign_rpm () { | |||
44 | 46 | ||
45 | signer.sign_rpms(rpms, | 47 | signer.sign_rpms(rpms, |
46 | d.getVar('RPM_GPG_NAME', True), | 48 | d.getVar('RPM_GPG_NAME', True), |
47 | d.getVar('RPM_GPG_PASSPHRASE_FILE', True)) | 49 | d.getVar('RPM_GPG_PASSPHRASE', True)) |
48 | } | 50 | } |
49 | 51 | ||
50 | do_package_index[depends] += "signing-keys:do_deploy" | 52 | do_package_index[depends] += "signing-keys:do_deploy" |