Skip to contentSkip to conversation

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

PATCH Superseded Otavio Salvador 3 participants 5 messages Oct 2, 2017

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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>

---

Changes in v2:
- Improve commit log

 meta/lib/oe/package_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/package_manager.py +1 -1
index 658c964277..260244eaa0 100644
@@ -552,7 +552,7 @@ class RpmPM(PackageManager):
             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 = ''
+            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())
Signature · 1 line
2.14.2
#1 lore raw
Quoted 8 lines · Otavio Salvador

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>

This patch is still wrong, and for exact same reasons. You didn't change it at all compared to v1! I already spelled the reasons out, so I can repeat them quickly:

The patch adds 'gpgcheck=0' when repo feed signing is disabled, which will also disable package verification at runtime, ignoring the altogether different build setting controlling that. As I've already explained to you, package signing and feed signing are two different things, with their own sets of options.

Test case:

- enable package signing, disable package feed signing, check that the resulting dnf.conf file has package verification enabled (it won't).

Alex

#2 lore raw
Quoted 22 lines · Alexander Kanavin
Quoted 9 lines · Otavio Salvador

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>

This patch is still wrong, and for exact same reasons. You didn't change it at all compared to v1! I already spelled the reasons out, so I can repeat them quickly:

The patch adds 'gpgcheck=0' when repo feed signing is disabled, which will also disable package verification at runtime, ignoring the altogether different build setting controlling that. As I've already explained to you, package signing and feed signing are two different things, with their own sets of options.

Quoted 4 lines

Test case:

- enable package signing, disable package feed signing, check that the resulting dnf.conf file has package verification enabled (it won't).

It does not work as you are explaining. Without this patch I /need/ to use:

dnf install --nogpgcheck nano

to install nano. dnf has it enabled.

root@qemux86-64:~# grep gpg /etc/dnf/dnf.conf
gpgcheck=1
Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 8 lines · Otavio Salvador

It does not work as you are explaining. Without this patch I /need/ to use:

dnf install --nogpgcheck nano

to install nano. dnf has it enabled.

root@qemux86-64:~# grep gpg /etc/dnf/dnf.conf
gpgcheck=1

Yes; your patch is solving this problem incorrectly, introducing a new, different problem. The new problem is:

- enable package signing, disable package feed signing, check that the resulting dnf.conf file has package verification enabled (it won't).

Alex

#4 lore raw

Alex,

v3 is out.

Quoted 26 lines · Alexander Kanavin
Quoted 9 lines · Otavio Salvador

It does not work as you are explaining. Without this patch I /need/ to use:

dnf install --nogpgcheck nano

to install nano. dnf has it enabled.

root@qemux86-64:~# grep gpg /etc/dnf/dnf.conf
gpgcheck=1

Yes; your patch is solving this problem incorrectly, introducing a new, different problem. The new problem is:

- enable package signing, disable package feed signing, check that the resulting dnf.conf file has package verification enabled (it won't).

Alex
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750