Bug 496754 - When /usr/bin/gpg is missing, rpm --addsign fails with success
Summary: When /usr/bin/gpg is missing, rpm --addsign fails with success
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-20 22:42 UTC by Tim Landscheidt
Modified: 2010-01-08 19:57 UTC (History)
3 users (show)

Fixed In Version: 4.7.2-1.fc11
Clone Of:
Environment:
Last Closed: 2009-12-04 10:59:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Landscheidt 2009-04-20 22:42:37 UTC
Consider:

| [tim@lockfix /var/tmp]$ rpm --version
| RPM-Version 4.6.0
| [tim@lockfix /var/tmp]$ echo '%_gpg_name Tim Landscheidt <tim>' > ~/.rpmmacros
| [tim@lockfix /var/tmp]$ rpm --addsign mkpasswd-0.1-1.noarch.rpm
| Bitte das Passwort eingeben:
| [tim@lockfix /var/tmp]$ echo $?
| 141

The passphrase was wrong, yet there is no visible indication to the user that any error occured. The error is the missing /usr/bin/gpg (I'm using the gnupg2 package instead; rpm in its default configuration chooses /usr/bin/gpg as %__gpg). But it gets better:

| [tim@lockfix /var/tmp]$ rpm -v --addsign mkpasswd-0.1-1.noarch.rpm
| Bitte das Passwort eingeben:
| Fehler: Konnte gpg nicht ausführen: Datei oder Verzeichnis nicht gefunden
| Das Passwort ist richtig.
  ^^^^^^^^^^^^^^^^^^^^^^^^^ (-> LANG= "Pass phrase is good.")
| Fehler: Konnte gpg nicht ausführen: Datei oder Verzeichnis nicht gefunden
| Fehler: GPG fehlgeschlagen (1)
| [tim@lockfix /var/tmp]$ echo $?
| 141
| [tim@lockfix /var/tmp]$

Of course the passphrase was still wrong and /usr/bin/gpg still missing.

  IMHO the failure to locate gpg should always be displayed to the user, not just when he chooses verbose mode, and of course the passphrase good/bad thing be dealt with.

  As the exit code indicates an error, this bug should have had no impact on non-interactive setups. I have not looked at the source whether this affects similar commands as well.

Comment 1 Bug Zapper 2009-11-18 11:49:09 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Panu Matilainen 2009-11-26 09:51:04 UTC
The password check returning success on missing gpg fixed now upstream. And I agree such errors should be visible without verbose mode, will fix that too.

Comment 3 Panu Matilainen 2009-12-04 10:59:52 UTC
The password check is now fixed in rawhide too.

Comment 4 Fedora Update System 2009-12-23 09:11:33 UTC
rpm-4.7.2-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/rpm-4.7.2-1.fc11

Comment 5 Fedora Update System 2010-01-08 19:57:18 UTC
rpm-4.7.2-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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