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:
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.