sign_rpm.bbclass: introduce GPG_PATH variable

This bitbake configuration variable can be used to define the gpg home
directory.

(From OE-Core rev: 7ea2f8aca832433f448a79d103c945a63ac6474b)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Markus Lehtonen 2015-10-14 16:46:39 +03:00 committed by Richard Purdie
parent 8ccbc26e60
commit b682fca7be
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,8 @@
# GPG_BIN
# Optional variable for specifying the gpg binary/wrapper to use for
# signing.
# GPG_PATH
# Optional variable for specifying the gnupg "home" directory:
#
inherit sanity
@ -41,6 +43,8 @@ def rpmsign_wrapper(d, files, passphrase, gpg_name=None):
"(e.g. in ~/.oerpmmacros", d)
if d.getVar('GPG_BIN', True):
cmd += "--define '%%__gpg %s' " % d.getVar('GPG_BIN', True)
if d.getVar('GPG_PATH', True):
cmd += "--define '_gpg_path %s' " % d.getVar('GPG_PATH', True)
cmd += ' '.join(files)
# Need to use pexpect for feeding the passphrase