Bug 803427

Summary: rpm --addsign returns confusing error if rpm-sign not installed
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Vadkerti <mvadkert>
Component: poptAssignee: Panu Matilainen <pmatilai>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Vadkerti <mvadkert>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0CC: ksrot, mmarhefk
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: popt-1.13-12.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:04:21 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 Miroslav Vadkerti 2012-03-14 17:14:22 UTC
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 09:45:28 UTC
Yup, see the Fedora equivalent: https://bugzilla.redhat.com/show_bug.cgi?id=697435#c10

Comment 3 Panu Matilainen 2012-08-07 08:37:45 UTC
*** Bug 838985 has been marked as a duplicate of this bug. ***

Comment 5 Panu Matilainen 2012-08-28 12:54:48 UTC
Fixed in popt-1.13-12.el7.

Comment 8 Ludek Smid 2014-06-13 11:04:21 UTC
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.