lib/oe/package_manager.py (rpm): Allow use of non-signed packages

When we wish to use the package feed for local development, it does
not uses GPG signed feeds by default but dnf uses package signature
check. We need to configure the GPG signature check out so it works
out of box.

With this patch, installing non-signed packages works:

$: dnf install <package>

(From OE-Core rev: bceafe23cbe12a1ab0628b70865cb8867c7d7ee1)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Otavio Salvador authored and Richard Purdie committed 2017-10-07 23:20:40 +01:00
1 parent a889d2733c
commit 48d2dc6711
1 file changed
+5 -3
+5 -3
View File
@@ -548,11 +548,13 @@ class RpmPM(PackageManager):
if feed_uris == "":
return
gpg_opts = ''
if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
gpg_opts = 'repo_gpgcheck=1\n'
gpg_opts += 'repo_gpgcheck=1\n'
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'))
else:
gpg_opts = ''
if self.d.getVar('RPM_SIGN_PACKAGES') == '0':
gpg_opts += 'gpgcheck=0\n'
bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())