Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646314 - sys-apps/portage: sync-openpgp-key-path not inherited from /usr/share (and not printed in repos_conf)
Summary: sys-apps/portage: sync-openpgp-key-path not inherited from /usr/share (and no...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 646302 (view as bug list)
Depends on:
Blocks: 645194
  Show dependency tree
 
Reported: 2018-02-01 16:49 UTC by Viktor Levin
Modified: 2018-06-03 16:54 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Viktor Levin 2018-02-01 16:49:17 UTC
I have /etc/portage/repos.conf/gentoo.conf with the following content:

> [DEFAULT]
> main-repo = gentoo
>
> [gentoo]
> location = /usr/portage
> sync-type = rsync
> sync-uri = rsync://rsync.gentoo.org/gentoo-portage
> auto-sync = yes

I have /usr/share/portage/config/repos.conf with the following content:

> [DEFAULT]
> main-repo = gentoo
> 
> [gentoo]
> location = /usr/portage
> sync-type = rsync
> sync-uri = rsync://rsync.gentoo.org/gentoo-portage
> auto-sync = yes
> sync-rsync-verify-metamanifest = yes
> sync-openpgp-key-path = /var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg
> 
> # for daily squashfs snapshots
> #sync-type = squashdelta
> #sync-uri = mirror://gentoo/../snapshots/squashfs

I've got it from Wiki: https://wiki.gentoo.org/wiki//etc/portage/repos.conf
When I run eix-sync, gemato fails everytime with this output:

> ERROR:root:OpenPGP verification failed:
> ...
> gpg: Can't check signature: No public key

But if I remove /etc/portage/repos.conf/gentoo.conf, eix-sync and gemato works properly every time. Related issue:
https://github.com/mgorny/gemato/issues/4
Probably this bug is related, too: https://bugs.gentoo.org/646194
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-01 16:54:48 UTC
Could you try removing individual lines from /etc/portage/repos.conf/gentoo.conf to see which specific line is causing trouble?
Comment 2 Viktor Levin 2018-02-01 17:20:25 UTC
(In reply to Michał Górny from comment #1)
gemato starts working properly only if I remove "[gentoo]" line and all 4 strings within this config section.

By the way, I have these versions of software:

sys-apps/portage-2.3.22
app-portage/gemato-10.3
app-crypt/gentoo-keys-201607021514-r2
Comment 3 Viktor Levin 2018-02-01 17:27:52 UTC
Also when I remove /etc/portage/repos.conf/gentoo.conf and run
portageq repos_config /
I see this in [gentoo] section:

> [gentoo]
> auto-sync = yes
> location = /usr/portage
> masters = 
> priority = -1000
> strict-misc-digests = true
> sync-type = rsync
> sync-uri = rsync://rsync.gentoo.org/gentoo-portage
> sync-rsync-verify-metamanifest = yes
> sync-rsync-extra-opts = 

There is no these line:

> sync-openpgp-key-path = /var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg

But /usr/share/portage/config/repos.conf has this line.
Comment 4 Zac Medico gentoo-dev 2018-02-01 17:46:06 UTC
*** Bug 646302 has been marked as a duplicate of this bug. ***
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-01 18:33:12 UTC
Hmm... silly question. Could you try doing 'emerge --sync' with the 'broken' configuration and see if it works? Now I see that eix-sync is doing some really awfully convoluted stuff, so maybe it's it being broken.
Comment 6 Klemen Mihevc 2018-02-01 19:17:26 UTC
Same issue, if i change sync-rsync-verify-metamanifest = yes to "no" it works.
Comment 7 Viktor Levin 2018-02-01 20:26:12 UTC
(In reply to Michał Górny from comment #5)
> Hmm... silly question. Could you try doing 'emerge --sync' with the 'broken'
> configuration and see if it works? Now I see that eix-sync is doing some
> really awfully convoluted stuff, so maybe it's it being broken.

I use genup tool from sakaki-tools overlay. It uses eix-sync by default for cases where webrsync-gpg mode is not used:

https://github.com/sakaki-/genup/blob/master/genup

However, I've just retested with "emerge --sync" and faced the same issue. And when I execute
portageq repos_config /
I don't see that line there:
sync-openpgp-key-path = /var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg

Is it a portageq bug?
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-01 20:26:44 UTC
Ok, I've found the problem and submitted a pair of patches that should fix it. Will link them here as soon as ml archive catches them.
Comment 10 Larry the Git Cow gentoo-dev 2018-02-01 20:51:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=0101a29d90bb438c28c00e6994d8a6cd2e97aa82

commit 0101a29d90bb438c28c00e6994d8a6cd2e97aa82
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-02-01 20:24:10 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-02-01 20:51:04 +0000

    repository.config: Fix handling sync-openpgp-key-path
    
    Fix sync-openpgp-key-path to be correctly inherited from system
    repos.conf and preserved in repo dumps.
    
    Bug: https://bugs.gentoo.org/646314
    Reviewed-by: Zac Medico <zmedico@gentoo.org>

 pym/portage/repository/config.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)}
Comment 11 Larry the Git Cow gentoo-dev 2018-02-01 23:38:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56c3ee7d61fcda154968f549afbfcff0a962944f

commit 56c3ee7d61fcda154968f549afbfcff0a962944f
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-02-01 23:33:14 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-02-01 23:38:21 +0000

    sys-apps/portage: version bump to 2.3.23
    
      #646314 - fix "gpg: Can't check signature: No public key"
    
    Bug: https://bugs.gentoo.org/646314
    Package-Manager: Portage-2.3.23, Repoman-2.3.6
    
    # Please enter the commit message for your changes. Lines starting
    # with '#' will be kept; you may remove them yourself if you want to.
    # An empty message aborts the commit.
    #
    # Date:      Thu Feb 1 15:33:14 2018 -0800
    #
    # On branch master
    # Your branch is ahead of 'gentoo/master' by 1 commit.
    #   (use "git push" to publish your local commits)
    #
    # Changes to be committed:
    #       modified:   Manifest
    #       renamed:    portage-2.3.22.ebuild -> portage-2.3.23.ebuild
    #

 sys-apps/portage/Manifest                                         | 2 +-
 sys-apps/portage/{portage-2.3.22.ebuild => portage-2.3.23.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)}