gpg 2 --list-keys output format incompatible with parsing

Bug #1755285 reported by David Britton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keychain (Ubuntu)
New
Undecided
Unassigned

Bug Description

Versions:
- keychain: 2.8.2-0.1
- gnupg 2.2.4-1ubuntu1

$ keychain --agents gpg B269215B

 * keychain 2.8.2 ~ http://www.funtoo.org
 * Starting gpg-agent...
 * Warning: can't find B269215B; skipping

If you run `gpg --list-secret-keys` on the version of gnupg in bionic you can see the problem. The output now prefers a multi-line listing for the key ids, before it was 2048R/B269215B (for example).

Inspecting the source, it's coming down to line 1088 (in ubuntu/debian version 2.8.2-0.1).

    pm_gpgsecrets="`gpg --list-secret-keys 2>/dev/null | cut -d/ -f2 | cut -d' ' -f1 | xargs`"

Which needs a:

    --keyid-format short

in the command to be compatible with the simple cut parsing of '-d/'

After this addition, the keychain program behaves as normal.

Revision history for this message
Andrey Astafiev (elnull) wrote :

GPG2 support added in keychain 2.8.4 so package must be updated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.