RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1231229 - gpg --gen-key fails if pinentry GUI is not installed.
Summary: gpg --gen-key fails if pinentry GUI is not installed.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pinentry
Version: 7.2
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Boris Ranto
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 1203710 1289025 1295829 1313485
TreeView+ depends on / blocked
 
Reported: 2015-06-12 13:09 UTC by Martin Žember
Modified: 2019-02-15 14:04 UTC (History)
4 users (show)

Fixed In Version: pinentry-0.8.1-15.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 662770
Environment:
Last Closed: 2016-11-04 01:04:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2226 0 normal SHIPPED_LIVE pinentry bug fix and enhancement update 2016-11-03 13:26:31 UTC

Description Martin Žember 2015-06-12 13:09:07 UTC
+++ 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    
Comment:                      
You selected this USER-ID:    
    "foobar <foo>"    
                              
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 12:20:56 UTC
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 15:31:28 UTC
Aiming at 7.3 together with bz1058972 , fasttrack should be ok, here, too.

Comment 4 Ryan Sawhill 2016-01-19 21:19:55 UTC
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-04 01:04:56 UTC
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.