Bug 511101

Summary: rpm --checksig is silent when being run non-rpms
Product: [Fedora] Fedora Reporter: Ralf Corsepius <rc040203>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: ffesti, jnovy, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.7.1-1.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-05 00:41:14 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 Ralf Corsepius 2009-07-13 16:37:47 UTC
Description of problem:

rpm --checksig is silent when being run non rpms.

IMNSHO, this behavior is seriously defective.

Version-Release number of selected component (if applicable):
rpm-4.7.0-2.fc11.x86_64

How reproducible:
Always

Steps to Reproduce:
1.
echo "hello" > foo-1.1-1.fc11.x86_64.rpm
rpm --checksig foo-1.1-1.fc11.x86_64.rpm

2.
touch > foo-1.1-2.fc11.x86_64.rpm
rpm --checksig foo-1.1-1.fc11.x86_64.rpm foo-1.1-2.fc11.x86_64.rpm

  
Actual results:
No warning, no error, nothing.

Expected results:
rpm --checksig to raise an error message.

Comment 1 Ralf Corsepius 2009-07-13 17:04:15 UTC
Resetting version to Fedora 10, because FC10's rpm also exhibits this behavior, while rpm on FC9 doesn't.

On FC9:
# rpm --checksig foo-1.2-3.x86_64.rpm 
error: foo-1.2-3.x86_64.rpm: not an rpm package
# rpm -q rpm
rpm-4.4.2.3-3.fc9.x86_64

On FC10:
# rpm --checksig foo-1.2-3.x86_64.rpm
<nothing>
# rpm -q rpm
rpm-4.6.1-1.fc10.x86_64

=> A regression having been introduced between rpm-4.4 and rpm-4.6.

Comment 2 Panu Matilainen 2009-07-14 07:27:37 UTC
More precisely the bug is that rpm doesn't log an error on files shorter than the size of lead:
[pmatilai@localhost ~]$ echo "hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello" > foo-1.1-1.fc11.x86_64.rpm ; rpm --checksig foo-1.1-1.fc11.x86_64.rpm; echo $?
1
[pmatilai@localhost ~]$ echo "hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello" > foo-1.1-1.fc11.x86_64.rpm ; rpm --checksig foo-1.1-1.fc11.x86_64.rpm; echo $?
error: foo-1.1-1.fc11.x86_64.rpm: not an rpm package
1

Comment 3 Panu Matilainen 2009-07-14 11:27:55 UTC
Fixed upstream.

Comment 4 Fedora Update System 2009-07-24 05:17:05 UTC
rpm-4.7.1-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/rpm-4.7.1-1.fc11

Comment 5 Fedora Update System 2009-07-24 19:40:10 UTC
rpm-4.7.1-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpm'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7986

Comment 6 Fedora Update System 2009-08-05 00:40:47 UTC
rpm-4.7.1-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.