summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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 /meta/recipes-core
parent14e809e03a1ecfb3b543197cdcfba25cc5bc6265 (diff)
downloadpoky-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>
Diffstat (limited to 'meta/recipes-core')
-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
12EXCLUDE_FROM_WORLD = "1" 12EXCLUDE_FROM_WORLD = "1"
13INHIBIT_DEFAULT_DEPS = "1" 13INHIBIT_DEFAULT_DEPS = "1"
14 14
15PACKAGES =+ "${PN}-rpm ${PN}-packagefeed" 15PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed"
16 16
17FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg" 17FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
18FILES_${PN}-ipk = "${sysconfdir}/pki/ipk-gpg"
18FILES_${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg" 19FILES_${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg"
19 20
20python do_get_public_keys () { 21python do_get_public_keys () {
@@ -26,6 +27,12 @@ python do_get_public_keys () {
26 signer.export_pubkey(os.path.join(d.expand('${B}'), 'rpm-key'), 27 signer.export_pubkey(os.path.join(d.expand('${B}'), 'rpm-key'),
27 d.getVar('RPM_GPG_NAME', True)) 28 d.getVar('RPM_GPG_NAME', True))
28 29
30 if d.getVar("IPK_SIGN_PACKAGES", True):
31 # Export public key of the ipk signing key
32 signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
33 signer.export_pubkey(os.path.join(d.expand('${B}'), 'ipk-key'),
34 d.getVar('IPK_GPG_NAME', True))
35
29 if d.getVar('PACKAGE_FEED_SIGN', True) == '1': 36 if d.getVar('PACKAGE_FEED_SIGN', True) == '1':
30 # Export public key of the feed signing key 37 # Export public key of the feed signing key
31 signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND', True)) 38 signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
@@ -39,6 +46,9 @@ do_install () {
39 if [ -f "${B}/rpm-key" ]; then 46 if [ -f "${B}/rpm-key" ]; then
40 install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO_VERSION}" 47 install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO_VERSION}"
41 fi 48 fi
49 if [ -f "${B}/ipk-key" ]; then
50 install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO_VERSION}"
51 fi
42 if [ -f "${B}/pf-key" ]; then 52 if [ -f "${B}/pf-key" ]; then
43 install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}" 53 install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
44 fi 54 fi
@@ -52,6 +62,9 @@ do_deploy () {
52 if [ -f "${B}/rpm-key" ]; then 62 if [ -f "${B}/rpm-key" ]; then
53 install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}" 63 install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
54 fi 64 fi
65 if [ -f "${B}/ipk-key" ]; then
66 install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO_VERSION}"
67 fi
55 if [ -f "${B}/pf-key" ]; then 68 if [ -f "${B}/pf-key" ]; then
56 install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}" 69 install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
57 fi 70 fi