Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1231229 - gpg --gen-key fails if pinentry GUI is not installed.
gpg --gen-key fails if pinentry GUI is not installed.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pinentry (Show other bugs)
7.2
All Linux
high Severity high
: rc
: ---
Assigned To: Boris Ranto
Karel Srot
: Patch
Depends On:
Blocks: 1203710 1313485 1289025 1295829
  Show dependency treegraph
 
Reported: 2015-06-12 09:09 EDT by Martin Žember
Modified: 2016-11-03 21:04 EDT (History)
4 users (show)

See Also:
Fixed In Version: pinentry-0.8.1-15.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 662770
Environment:
Last Closed: 2016-11-03 21:04:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2226 normal SHIPPED_LIVE pinentry bug fix and enhancement update 2016-11-03 09:26:31 EDT

  None (edit)
Description Martin Žember 2015-06-12 09:09:07 EDT
+++ This bug was initially created as a clone of Bug #662770 +++

This has been fixed in RHEL-6 and manifests in RHEL-7 with the version pinentry-0.8.1-14.el7.

For QE: A testcase already exists that tests this.

Description of problem:
gpg --gen-key fails if pinentry GUI is not installed.

Version-Release number of selected component (if applicable):
RHEL 6 beta 2
gnupg2-2.0.14-3.el6.i686
pinentry-0.7.6-5.el6.i686

How reproducible:
Always

Steps to Reproduce:
1. yum erase pinentry-gtk 'pinentry-qt*'
2. gpg --gen-key
  
Actual results:
[jlaughlin@rtukickstart www]$ gpg --gen-key
gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
                              
Please select what kind of key you want:
   (1) RSA and RSA (default)  
   (2) DSA and Elgamal        
   (3) DSA (sign only)        
   (4) RSA (sign only)        
Your selection?               
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0)         
Key does not expire at all    
Is this correct? (y/N) y      
                              
GnuPG needs to construct a user ID to identify your key.
                              
Real name: foobar             
Email address: foobar         
Not a valid email address     
Email address: foo@bar.com    
Comment:                      
You selected this USER-ID:    
    "foobar <foo@bar.com>"    
                              
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.
                              
can't connect to `/home/jlaughlin/.gnupg/S.gpg-agent': No such file or directory
/usr/bin/pinentry: line 22: xprop: command not found
Please install pinentry-gui   
gpg-agent[17004]: can't connect server: ec=4.16383
gpg-agent[17004]: can't connect to the PIN entry module: End of file
gpg-agent[17004]: command get_passphrase failed: No pinentry
gpg: problem with the agent: No pinentry
gpg: Key generation canceled. 
[jlaughlin@rtukickstart www]$

Expected results:
Key generation.

Additional info:
It does work if I install pinentry-gtk.
Comment 1 Boris Ranto 2015-07-01 08:20:56 EDT
Hi Martin,

this should already be partially fixed in rhel 7 but it would be nice to get the improved version of the pinentry script into rhel 7.

Please qa_ack the bz (or propose it for fasttrack + qa_ack) if you want this fully fixed in rhel 7.2 and have the capacity to test the bz and errata.

-Boris
Comment 3 Boris Ranto 2015-08-27 11:31:28 EDT
Aiming at 7.3 together with bz1058972 , fasttrack should be ok, here, too.
Comment 4 Ryan Sawhill 2016-01-19 16:19:55 EST
It's mind-boggling to me that this issue has been known about for so long and yet remains unfixed.

Note that it's not just gpg --gen-key that fails; AFAICT, any gpg command that requests a passphrase through gpg-agent (symmetric encryption, decryption, signing) also fails. That's a real bummer to run into on a minimal install.
Comment 10 errata-xmlrpc 2016-11-03 21:04:56 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2226.html

Note You need to log in before you can comment on or make changes to this bug.