Bug 803427 - rpm --addsign returns confusing error if rpm-sign not installed
rpm --addsign returns confusing error if rpm-sign not installed
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: popt (Show other bugs)
7.0
All Linux
medium Severity high
: beta
: ---
Assigned To: Panu Matilainen
Miroslav Vadkerti
:
: 838985 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-14 13:14 EDT by Miroslav Vadkerti
Modified: 2014-06-13 07:04 EDT (History)
2 users (show)

See Also:
Fixed In Version: popt-1.13-12.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 07:04:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Vadkerti 2012-03-14 13:14:22 EDT
Description of problem:
If rpm-sign package is not installed and I try to run rpm --addsign I get a very confusing error:

# ls *.rpm
lcms-1.15-1.2.2.x86_64.rpm
# rpm --addsign lcms-1.15-1.2.2.x86_64.rpm 
rpm: lcms-1.15-1.2.2.x86_64.rpm: No such file or directory

If the rpmsign is now separately packed the rpm command should indicate the rpmsign binary is not available and not fail like this.

The error comes from execve I think:
execve("/usr/bin/rpmsign", ["/usr/bin/rpmsign", "--addsign", "lcms-1.15-1.2.2.x86_64.rpm"], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8328d87000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2512
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f8328d87000, 4096)            = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "rpm: lcms-1.15-1.2.2.x86_64.rpm:"..., 59rpm: lcms-1.15-1.2.2.x86_64.rpm: No such file or directory
) = 59
exit_group(1)                           = ?

Version-Release number of selected component (if applicable):
rpm-4.9.1.2-1.el7

How reproducible:
100%

Steps to Reproduce:
1. rpm -e rpm-sign
2. wget a RPM_FILE
3. rpm --addsign RPM_FILE
  
Actual results:
Confusing error

Expected results:
rpm prints it cannot find rpmsign binary and this may be located in other package.

Additional info:
Comment 1 Panu Matilainen 2012-03-15 05:45:28 EDT
Yup, see the Fedora equivalent: https://bugzilla.redhat.com/show_bug.cgi?id=697435#c10
Comment 3 Panu Matilainen 2012-08-07 04:37:45 EDT
*** Bug 838985 has been marked as a duplicate of this bug. ***
Comment 5 Panu Matilainen 2012-08-28 08:54:48 EDT
Fixed in popt-1.13-12.el7.
Comment 8 Ludek Smid 2014-06-13 07:04:21 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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