diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2015-10-16 13:25:34 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-27 07:24:25 +0000 |
commit | 835e7552158a3bb8c95846407e49c51c82a9b354 (patch) | |
tree | e3f751b016c11ebe57c87d2c109f7fea96f899f8 /meta | |
parent | 822844d0a31954ab98b54ed5a97901f6435aa615 (diff) | |
download | poky-835e7552158a3bb8c95846407e49c51c82a9b354.tar.gz |
Add new bbclass for package feed signing
After this change signed package feeds should be enabled by adding
INERIT += "sign_package_feed"
instead of definining PACKAGE_FEED_SIGN="1".
(From OE-Core rev: 2ba901da9a07350cc8975fc951ef5054b32d421b)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sign_package_feed.bbclass | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/classes/sign_package_feed.bbclass b/meta/classes/sign_package_feed.bbclass new file mode 100644 index 0000000000..8877d905f7 --- /dev/null +++ b/meta/classes/sign_package_feed.bbclass | |||
@@ -0,0 +1,24 @@ | |||
1 | # Class for signing package feeds | ||
2 | # | ||
3 | # Related configuration variables that will be used after this class is | ||
4 | # iherited: | ||
5 | # PACKAGE_FEED_PASSPHRASE_FILE | ||
6 | # Path to a file containing the passphrase of the signing key. | ||
7 | # PACKAGE_FEED_GPG_NAME | ||
8 | # Name of the key to sign with. May be key id or key name. | ||
9 | # GPG_BIN | ||
10 | # Optional variable for specifying the gpg binary/wrapper to use for | ||
11 | # signing. | ||
12 | # GPG_PATH | ||
13 | # Optional variable for specifying the gnupg "home" directory: | ||
14 | # | ||
15 | inherit sanity | ||
16 | |||
17 | PACKAGE_FEED_SIGN = '1' | ||
18 | |||
19 | python () { | ||
20 | # Check sanity of configuration | ||
21 | for var in ('PACKAGE_FEED_GPG_NAME', 'PACKAGE_FEED_GPG_PASSPHRASE_FILE'): | ||
22 | if not d.getVar(var, True): | ||
23 | raise_sanity_error("You need to define %s in the config" % var, d) | ||
24 | } | ||