Bug 88343

Summary: redhat-install-packages chokes, maybe due to lack of public key?
Product: [Retired] Red Hat Linux Reporter: Barry K. Nathan <barryn>
Component: redhat-config-packagesAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mitsu
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-23 01:56:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Barry K. Nathan 2003-04-09 06:02:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030313

Description of problem:
redhat-install-packages won't install packages for me. It start calculating
dependencies, maybe finishes that for all I know, and then dies. If it's done
from the GUI (from the file manager) it dies silently. If it's done from the
command line, it leaves a traceback (see below).

Version-Release number of selected component (if applicable):
redhat-config-packages-1.1.8-1

How reproducible:
Always

Steps to Reproduce:
1. Install Red Hat 9.
2. Do not set up RHN stuff when the firstboot wizard asks. (I don't know if this
step is strictly required to reproduce this bug, but it might be.)
3. Log in as a normal user and su to root.
4. Insert (for example) Red Hat CD #2 and let it automount.
5. Assuming (for example) kernel-utils is not installed, run
redhat-install-packages from the command prompt to install it. (This gives more
informative output than using the file manager.)

Actual Results:  [root@localhost root]# cd /mnt/cdrom/RedHat/RPMS/
[root@localhost RPMS]# redhat-install-packages kernel-utils-2.4-8.29.i386.rpm 
error: cannot open Packages database in /var/lib/rpm
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID db42a60e
Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 252, in ?
    main_window.run()
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 216, in run
    self.do_initial_setup ()
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 145, in
do_initial_setup
    h = ts.hdrFromFdno(fd)
rpm.error: public key not available
[root@localhost RPMS]#


Expected Results:  Installation of the selected package, or resolution of the
dependencies, or some kind of user-readable (i.e. something users can
understand) error message that shows up in the GUI.

Additional info: AFAICT there are no GPG public keys installed in the RPM database.

Comment 1 Barry K. Nathan 2003-04-09 14:07:43 UTC
It looks like there's more to this than missing keys...

[root@localhost root]# rpmdb --rebuilddb
[root@localhost root]# redhat-install-packages
/mnt/cdrom/RedHat/RPMS/kernel-utils-2.4-8.29.i386.rpm
error: cannot open Packages database in /var/lib/rpm
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID db42a60e
Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 252, in ?   
    main_window.run()
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 216, in run 
    self.do_initial_setup ()
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 145, in
do_initial_setup
    h = ts.hdrFromFdno(fd)
rpm.error: public key not available
[root@localhost root]# rpm -K !$
rpm -K /mnt/cdrom/RedHat/RPMS/kernel-utils-2.4-8.29.i386.rpm
/mnt/cdrom/RedHat/RPMS/kernel-utils-2.4-8.29.i386.rpm: (SHA1) DSA sha1 md5 (GPG)
NOT OK (MISSING KEYS: GPG#db42a60e)
[root@localhost root]# rpm -q 'gpg-pubkey-*'
package gpg-pubkey-* is not installed
[root@localhost root]# rpm --import /usr/share/rhn/RPM-GPG-KEY 
[root@localhost root]# rpm --import /usr/share/rhn/BETA-RPM-GPG-KEY 
[root@localhost root]# rpm -q 'gpg-pubkey-*'
gpg-pubkey-db42a60e-37ea5438
gpg-pubkey-897da07a-3c979a7f
[root@localhost root]# rpm -K /mnt/cdrom/RedHat/RPMS/kernel-utils-2.4-8.29.i386.rpm
/mnt/cdrom/RedHat/RPMS/kernel-utils-2.4-8.29.i386.rpm: (sha1) dsa sha1 md5 gpg OK
[root@localhost root]# redhat-install-packages
/mnt/cdrom/RedHat/RPMS/kernel-utils-2.4-8.29.i386.rpm 
error: cannot open Packages database in /var/lib/rpm
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID db42a60e
Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 252, in ?
    main_window.run()
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 216, in run
    self.do_initial_setup ()
  File "/usr/share/redhat-config-packages/SinglePackageWindow.py", line 145, in
do_initial_setup
    h = ts.hdrFromFdno(fd)
rpm.error: public key not available
[root@localhost root]# /usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages 
[root@localhost root]# 

Hmmm....

This was with "nosysinfo" as a kernel boot option (otherwise I get a message
from rpm --rebuilddb). Other possibly relevant info:

kernel 2.4.20-9
rpm 4.2-1 (test-4.2 from ftp.rpm.org)

My original discovery of this bug was done with kernel 2.4.20-8, without the
"nosysinfo" option, and with the version of rpm 4.2 that came on the Shrike ISOs.

Comment 2 Jeremy Katz 2003-04-18 20:51:54 UTC
Does 1.1.9-1 at http://people.redhat.com/~katzj/redhat-config-packages/1.1.9/
fix your problem?

Comment 3 Anders Kaseorg 2003-04-19 16:34:30 UTC
I've been having the same problem, because of a missing GPG key. The new 1.1.9-1
packages don't crash anymore, but they don't give me even a warning about the
missing key. Isn't this a security issue?

Comment 4 Jeremy Katz 2003-05-25 17:54:51 UTC
*** Bug 90152 has been marked as a duplicate of this bug. ***