Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1393586

Summary: Failure of yum with GPG keys in /var/lib/rpm/pubkeys
Product: Red Hat Enterprise Linux 7 Reporter: Zailo Leite <zleite>
Component: rpmAssignee: Florian Festi <ffesti>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: medium    
Version: 7.3CC: dmach, ffesti, pmatilai, pmoravco
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-15 07:43:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1630909    

Description Zailo Leite 2016-11-09 22:31:05 UTC
Description of problem:

When using the /var/lib/rpm/pubkeys directory to store the GPG keys, there needs to be at least one gpg key in the rpmdb database. If no keys are in and keys are deployed in /var/lib/rpm/pubkeys any operations will return:

%%%%%%%%%%%
You have enabled checking of packages via GPG keys. This is a good thing. 
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key
%%%%%%%%%%%

And any attempts to import a key will fail silently. It is necessary to remove theGPG files in /var/lib/rpm/pubkeys and then add one key with rpm --import, which then succeeds. The key files can then be added back to /var/lib/rpm/pubkeys and all works as expected.

How reproducible:


Steps to Reproduce:
1. delete all gpg-pubkey-* entries from rpmdb
2. Add GPG key files in /var/lib/rpm/pubkeys
3. Attempt yum install / Attempt to rpm --inport GPG key

Actual results:
Failure to import GPG key and requirement to use --nogpg on yum operations.

Expected results:
Nominal operation on yum and rpm.

Additional info:

Comment 9 Daniel Mach 2019-10-15 07:43:25 UTC
There is no plan to fix this bug during RHEL 7 life cycle.
If you still consider the issue important, please contact your support
representative.