Afaik this is yet another case of problems created (exposed) by kleopatra's
"Each time something changed in the GNUPGHOME in the last 5 seconds start a
keylist job" behavior. But this works on a GNU/Linux system and I think gnupg
should be robust enough to survive this.
To reproduce:
- I've exported my pubring with ~650 keys. (gpg2 --export -a > full-export.asc)
- On Windows I've removed the existing pubring.
- Start Kleopatra
- On the command line "gpg2 --import Desktop\full-export.asc"
Output:
<many import lines with no errors>
gpg: 100 keys processed so far
< 5 more keys imported >
gpg: waiting for lock C:/Users/aheinecke/AppData/Roaming/gnupg/pubring.gpg.lock...
gpg: waiting for lock C:/Users/aheinecke/AppData/Roaming/gnupg/pubring.gpg.lock...
< 15 more keys imported >
gpg: conversion from utf-8' to CP437' failed: Illegal byte sequence
gpg: key 2806AF71: public key "\xd0\xa7\xd0\xb0\xd1\x81\xd0\xbb\xd0\xb0\xd0\xb2
\xd0\x98\xd0\xbb\xd0\xb8\xd1\x9b <caslav.ilic@gmx.net>" imported
gpg: key E69A226A: public key "Bogomil "Bogo" Shopov <shopov@kolabsys.com>" imported
gpg: renaming `C:/Users/aheinecke/AppData/Roaming/gnupg/pubring.gpg' to
`C:/Users/aheinecke/AppData/Roaming/gnupg/pubring.bak' failed: Permission denied
gpg: error writing keyring
`C:/Users/aheinecke/AppData/Roaming/gnupg/pubring.gpg': Permission denied
gpg: key 96D94189: public key "[User ID not found]" imported
gpg: error reading `Desktop\\full-export.asc': Permission denied
gpg: no valid OpenPGP data found.
gpg: import from `Desktop\\full-export.asc' failed: Permission denied
gpg: Total number processed: 122
gpg: imported: 123 (RSA: 25)
The utf-8 conversion error appears to be a red herring when I run the same test
without starting Kleopatra first I get the "conversion failed" error but the
import completes. So I think the problem is triggered by Kleopatra running a
keylist during the import.
I've not tested this yet with 2.1.