aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2016-03-10 12:02:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-11 16:50:45 +0000
commitc637783638379f20e475715ca952d7b5620bb537 (patch)
tree2df0bc578551a509f7e616bda70bc584db2fe94f
parent14e809e03a1ecfb3b543197cdcfba25cc5bc6265 (diff)
downloadopenembedded-core-contrib-c637783638379f20e475715ca952d7b5620bb537.tar.gz
signing-keys: create ipk package
Store the ascii armored pubkey generated using gpg_sign.export_pubkey() in its own package. (From OE-Core rev: 9dab5725dace0c54f4c5ed892d18e2d41cca71b5) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/meta/signing-keys.bb15
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb
index 1d0e8344ef..e843301b2e 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -12,9 +12,10 @@ inherit allarch deploy
EXCLUDE_FROM_WORLD = "1"
INHIBIT_DEFAULT_DEPS = "1"
-PACKAGES =+ "${PN}-rpm ${PN}-packagefeed"
+PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed"
FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
+FILES_${PN}-ipk = "${sysconfdir}/pki/ipk-gpg"
FILES_${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg"
python do_get_public_keys () {
@@ -26,6 +27,12 @@ python do_get_public_keys () {
signer.export_pubkey(os.path.join(d.expand('${B}'), 'rpm-key'),
d.getVar('RPM_GPG_NAME', True))
+ if d.getVar("IPK_SIGN_PACKAGES", True):
+ # Export public key of the ipk signing key
+ signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
+ signer.export_pubkey(os.path.join(d.expand('${B}'), 'ipk-key'),
+ d.getVar('IPK_GPG_NAME', True))
+
if d.getVar('PACKAGE_FEED_SIGN', True) == '1':
# Export public key of the feed signing key
signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
@@ -39,6 +46,9 @@ do_install () {
if [ -f "${B}/rpm-key" ]; then
install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO_VERSION}"
fi
+ if [ -f "${B}/ipk-key" ]; then
+ install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO_VERSION}"
+ fi
if [ -f "${B}/pf-key" ]; then
install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
fi
@@ -52,6 +62,9 @@ do_deploy () {
if [ -f "${B}/rpm-key" ]; then
install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
fi
+ if [ -f "${B}/ipk-key" ]; then
+ install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO_VERSION}"
+ fi
if [ -f "${B}/pf-key" ]; then
install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
fi