All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] lib/oe/package_manager.py (rpm): Allow use of non-signed packages
@ 2017-10-02 14:52 Otavio Salvador
  2017-10-02 14:53 ` Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Otavio Salvador @ 2017-10-02 14:52 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: 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>

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v3:
- Check if package signing is disabled prior disabling it

Changes in v2:
- Improve commit log

 meta/lib/oe/package_manager.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 658c964277..4fbc293992 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -551,6 +551,8 @@ class RpmPM(PackageManager):
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
             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'))
+        elif: self.d.getVar('RPM_SIGN_PACKAGES') == '0':
+            gpg_opts = 'gpgcheck=0\n'
         else:
             gpg_opts = ''
 
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] lib/oe/package_manager.py (rpm): Allow use of non-signed packages
  2017-10-02 14:52 [PATCH v3] lib/oe/package_manager.py (rpm): Allow use of non-signed packages Otavio Salvador
@ 2017-10-02 14:53 ` Alexander Kanavin
       [not found]   ` <CAP9ODKoYZsqkWzsmuwsVKZ43cOOQTRF=hWKWJttruE7iS3fUJA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2017-10-02 14:53 UTC (permalink / raw)
  To: Otavio Salvador, OpenEmbedded Core Mailing List

On 10/02/2017 05:52 PM, Otavio Salvador wrote:

> @@ -551,6 +551,8 @@ class RpmPM(PackageManager):
>           if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
>               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'))
> +        elif: self.d.getVar('RPM_SIGN_PACKAGES') == '0':
> +            gpg_opts = 'gpgcheck=0\n'
>           else:
>               gpg_opts = ''

Still wrong! I'm kind of getting tired though. Can you figure it out for 
yourself, this time?

Alex



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] lib/oe/package_manager.py (rpm): Allow use of non-signed packages
       [not found]     ` <13841d53-4135-0f9d-0cc8-e98a45b11120@linux.intel.com>
@ 2017-10-02 16:40       ` Otavio Salvador
  0 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2017-10-02 16:40 UTC (permalink / raw)
  To: Alexander Kanavin,
	Patches and discussions about the oe-core layer, Burton, Ross,
	Richard Purdie

On Mon, Oct 2, 2017 at 12:06 PM, Alexander Kanavin
<alexander.kanavin@linux.intel.com> wrote:
> On 10/02/2017 06:02 PM, Otavio Salvador wrote:
>> Em 2 de out de 2017 11:57 AM, "Alexander Kanavin"
>> <alexander.kanavin@linux.intel.com
>> <mailto:alexander.kanavin@linux.intel.com>> escreveu:
>>
>>     On 10/02/2017 05:52 PM, Otavio Salvador wrote:
>>
>>         @@ -551,6 +551,8 @@ class RpmPM(PackageManager):
>>                    if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
>>                        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'))
>>         +        elif: self.d.getVar('RPM_SIGN_PACKAGES') == '0':
>>         +            gpg_opts = 'gpgcheck=0\n'
>>                    else:
>>                        gpg_opts = ''
>>
>>
>>     Still wrong! I'm kind of getting tired though. Can you figure it out
>>     for yourself, this time?
>>
>>
>> Even better, I'll leave it broken.
>>
>> I use I'll myself so good luck with rpm.
>
> FWIW, the wrong part in this patch is that when PACKAGE_FEED_SIGN is set to
> 1, but RPM_SIGN_PACKAGES is set to 0, you will not get gpgsign=0 added to
> configuration.

Good that you know how to fix it. I gave up as you said, I got tired.
Being not an active RPM user I took the time to check and test it and
got a non-helpful attitude from one of its maintainers so please go
ahead and fix it if you care. I got tired too.

-- 
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-02 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-02 14:52 [PATCH v3] lib/oe/package_manager.py (rpm): Allow use of non-signed packages Otavio Salvador
2017-10-02 14:53 ` Alexander Kanavin
     [not found]   ` <CAP9ODKoYZsqkWzsmuwsVKZ43cOOQTRF=hWKWJttruE7iS3fUJA@mail.gmail.com>
     [not found]     ` <13841d53-4135-0f9d-0cc8-e98a45b11120@linux.intel.com>
2017-10-02 16:40       ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.