summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-08-29 14:45:26 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-30 11:14:26 +0100
commitf9c451b71ad0093b4c2abedf7f3d714c5a3af5a5 (patch)
tree59ec8b6562645a93e11f8039f7fa9a03c82bbc5e
parentbac4e58992cd122263270cfbf0c577ad6bf8f907 (diff)
downloadpoky-f9c451b71ad0093b4c2abedf7f3d714c5a3af5a5.tar.gz
signing-keys: do not use DISTRO_VERSION in key names
DISTRO_VERSION may contain the current date, and so is prone to mismatches particularly when keys are created on one date, and dnf is configured to use the keys on another date. [YOCTO #11983] (From OE-Core rev: b8f33f3f0a1e24f89151743d5c0b82efe45a9df1) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py2
-rw-r--r--meta/recipes-core/meta/signing-keys.bb12
2 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index d43d729203..ef06881311 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -561,7 +561,7 @@ class RpmPM(PackageManager):
561 561
562 if self.d.getVar('PACKAGE_FEED_SIGN') == '1': 562 if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
563 gpg_opts = 'repo_gpgcheck=1\n' 563 gpg_opts = 'repo_gpgcheck=1\n'
564 gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO_VERSION')) 564 gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
565 else: 565 else:
566 gpg_opts = '' 566 gpg_opts = ''
567 567
diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb
index ebfb08c433..2c1cc3845e 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -44,25 +44,25 @@ addtask get_public_keys before do_install
44 44
45do_install () { 45do_install () {
46 if [ -f "${B}/rpm-key" ]; then 46 if [ -f "${B}/rpm-key" ]; then
47 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}-${DISTRO_CODENAME}"
48 fi 48 fi
49 if [ -f "${B}/ipk-key" ]; then 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}" 50 install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
51 fi 51 fi
52 if [ -f "${B}/pf-key" ]; then 52 if [ -f "${B}/pf-key" ]; then
53 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}-${DISTRO_CODENAME}"
54 fi 54 fi
55} 55}
56 56
57do_deploy () { 57do_deploy () {
58 if [ -f "${B}/rpm-key" ]; then 58 if [ -f "${B}/rpm-key" ]; then
59 install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}" 59 install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
60 fi 60 fi
61 if [ -f "${B}/ipk-key" ]; then 61 if [ -f "${B}/ipk-key" ]; then
62 install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO_VERSION}" 62 install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
63 fi 63 fi
64 if [ -f "${B}/pf-key" ]; then 64 if [ -f "${B}/pf-key" ]; then
65 install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}" 65 install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}"
66 fi 66 fi
67} 67}
68do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}" 68do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"