Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553434 - app-crypt/gnupg: pubring.gpg suddenly non-existing
Summary: app-crypt/gnupg: pubring.gpg suddenly non-existing
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-27 16:54 UTC by Pacho Ramos
Modified: 2015-06-30 19:13 UTC (History)
1 user (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 Pacho Ramos gentoo-dev 2015-06-27 16:54:51 UTC
I have just seen this while committing with repoman:
/var/cvsroot/gentoo-x86/www-client/epiphany/epiphany-3.16.2.ebuild,v  <--  epiphany-3.16.2.ebuild
initial revision: 1.1
/var/cvsroot/gentoo-x86/www-client/epiphany/ChangeLog,v  <--  ChangeLog
new revision: 1.318; previous revision: 1.317
/var/cvsroot/gentoo-x86/www-client/epiphany/epiphany-3.12.1.ebuild,v  <--  epiphany-3.12.1.ebuild
new revision: delete; previous revision: 1.5
>>> Creating Manifest for /home/pacho/gentoo-x86/www-client/epiphany
gpg: borrando fichero de bloqueo residual (creado por 2624) -> "Removing residual lock file (created by 2634)
gpg: almacén `/home/pacho/.gnupg//pubring.gpg' creado -> storage... created
gpg: clave A188FBD4: clave secreta sin clave pública - omitida -> secret key without public key - omitted
gpg: no default secret key: No secret key
gpg: /home/pacho/gentoo-x86/www-client/epiphany/Manifest: clearsign failed: No secret key
!!! !!! gpg exited with '2' status
!!! Disabled FEATURES='sign'
/var/cvsroot/gentoo-x86/www-client/epiphany/Manifest,v  <--  Manifest
new revision: 1.373; previous revision: 1.372

Commit complete.
RepoMan sez: "If everyone were like you, I'd be out of business!"

As you can see gpg has decided to replace the working pubring.gpg file by and empty one! :S
Comment 1 Pacho Ramos gentoo-dev 2015-06-27 19:05:03 UTC
How can I regenerate the public key from private one? Thanks for the info
Comment 2 Andrew Savchenko gentoo-dev 2015-06-27 20:40:45 UTC
(In reply to Pacho Ramos from comment #1)
> How can I regenerate the public key from private one? Thanks for the info

Yes, just import your secring:
$ gpg --import ~/.gnupg/secring.gpg

Alternatively you may --recv-key required keys from public gpg servers (if they were uploaded there before).
Comment 3 Kristian Fiskerstrand (RETIRED) gentoo-dev 2015-06-28 12:59:00 UTC
I fail to see anything in the log regarding why the pubring is removed, only that gpg is recreating it because it is missing.
Comment 4 Pacho Ramos gentoo-dev 2015-06-28 13:07:42 UTC
This is the message that makes me suspect something went wrong :/
gpg: borrando fichero de bloqueo residual (creado por 2624) -> "Removing residual lock file (created by 2634)
Comment 5 Kristian Fiskerstrand (RETIRED) gentoo-dev 2015-06-28 13:30:44 UTC
(In reply to Pacho Ramos from comment #4)
> This is the message that makes me suspect something went wrong :/
> gpg: borrando fichero de bloqueo residual (creado por 2624) -> "Removing
> residual lock file (created by 2634)

The only thing related I've seen is [0, 1], but at least nothing that indicates it is specific to 2.0.28.

References:
[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725138
[1] https://support.gpgtools.org/discussions/problems/12363-gpg-keychain-access-deletes-gnupgpubringgpg
Comment 6 Pacho Ramos gentoo-dev 2015-06-28 17:43:21 UTC
(lets drop the block as I have no idea how did it occur or how to make it happen again... :S)
Comment 7 Kristian Fiskerstrand (RETIRED) gentoo-dev 2015-06-30 19:06:20 UTC
(In reply to Pacho Ramos from comment #6)
> (lets drop the block as I have no idea how did it occur or how to make it
> happen again... :S)

Without any way to reproduce the issue or information on how it occurred in the first place I will have to close this bug due to insufficient information. Please reopen if it ever occurs again (hopefully it won't, but if it does, make sure to check if you have a pubring.gpg~ file still in the GNUPGHOME which is a backup during certain operations). 

I've been speaking with the debian maintainers and they have no idea how the situation occurred in their reported situation. This isn't necessarily linked to GnuPG itself, and if were is it is an upstream issue, not something we can solve downstream.
Comment 8 Pacho Ramos gentoo-dev 2015-06-30 19:13:30 UTC
OK, thanks