Bug 394461 - rpm fails to unpack a source rpm with a cpio error
Summary: rpm fails to unpack a source rpm with a cpio error
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-21 16:13 UTC by Jerry James
Modified: 2008-04-01 11:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-01 11:51:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2007-11-21 16:13:52 UTC
Description of problem:
The rpm that ships with both F7 and F8 cannot unpack a source RPM that can be
unpacked on FC-6.  The RPM in question is this one: 
http://mirrors.dotsrc.org/jpackage/1.7/generic/free/SRPMS/jfreechart-1.0.5-1jpp.src.rpm
I have downloaded it multiple times on multiple machines (including one Windows
machine) using multiple methods (Firefox and wget) and multiple ISPs (both work
and home).  The md5sums of the various downloads I got all match with each
other, although I am waiting for confirmation from jpackage.org that it matches
with what they have.  (I get 2e785022a1af9b6e833afba54c480a40.)  I have tried an
x86_64 F8 machine, an i386 F8 machine, and an x86_64 F7 machine.  On all three,
this happens:

$ rpm -i jfreechart-1.0.5-1jpp.src.rpm
warning: jfreechart-1.0.5-1jpp.src.rpm: Header V3 DSA signature: NOKEY, key ID
c431416d
warning: user jpp does not exist - using root
warning: group jpp does not exist - using root
warning: user jpp does not exist - using root
warning: group jpp does not exist - using root
error: unpacking of archive failed on file
/home/jamesjer/rpmbuild/SOURCES/jfreechart-1.0.5.tar.gz;47445403: cpio: read

The jpackage.org people confirmed that they can successfully unpack this source
rpm on an FC-6 machine.

Version-Release number of selected component (if applicable):
rpm-4.4.2.2-3.fc8
rpm-4.4.2.2-2.fc7

How reproducible:
Always

Steps to Reproduce:
1. Download the jfreechart source rpm using the URL above
2. Attempt to unpack the source rpm
  
Actual results:
The unpacking process aborts with a cpio error.

Expected results:
The source rpm should unpack successfully.

Additional info:

Comment 1 Jerry James 2007-11-21 18:29:51 UTC
And just 2 hours later, yum-updatesd tells me that there is a new rpm.  This bug
still exists in rpm-4.4.2.2-7.fc8.


Comment 2 Paul Nasrat 2007-11-21 22:30:00 UTC
Reproduced here:

Also

 rpm2cpio jfreechart-1.0.5-1jpp.src.rpm  | cpio -tvd
-rw-rw-r--   1 root     root          936 May 18  2007
jfreechart-1.0.5-build_xml.patch
-rw-rw-r--   1 root     root      5543413 May 18  2007 jfreechart-1.0.5.tar.gz
cpio: premature end of file

Note also using

/usr/lib/rpm/rpm2cpio.sh jfreechart-1.0.5-1jpp.src.rpm | cpio -tvd
-rw-rw-r--   1 root     root          936 May 18  2007
jfreechart-1.0.5-build_xml.patch
-rw-rw-r--   1 root     root      5543413 May 18  2007 jfreechart-1.0.5.tar.gz

gzip: stdin: invalid compressed data--format violated
cpio: premature end of file

So it looks as if the rpm error is consistent with what cpio/gzip extraction of
the src.rpm say.


Comment 3 Paul Nasrat 2007-11-21 22:43:52 UTC
It really does look like a corrupt src.rpm to me:

Just tried on RHEL 4

[pauln@shitake ~]$ rpm -q rpm
rpm-4.3.3-18_nonptl
[pauln@shitake ~]$ cp /usr/lib/rpm/rpm2cpio.sh .
[pauln@shitake ~]$ vi rpm2cpio.sh 
# I just removed the | gunzip here
[pauln@shitake ~]$ sh -x rpm2cpio.sh jfreechart-1.0.5-1jpp.src.rpm > cpio.gz
+ pkg=jfreechart-1.0.5-1jpp.src.rpm
+ '[' jfreechart-1.0.5-1jpp.src.rpm = '' -o '!' -e jfreechart-1.0.5-1jpp.src.rpm ']'
+ leadsize=96
++ expr 96 + 8
+ o=104
++ od -j 104 -N 8 -t u1 jfreechart-1.0.5-1jpp.src.rpm
+ set 0000150 0 0 0 7 0 0 0 216 0000160
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 0 ')' + 7
+ il=7
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 0 ')' + 216
+ dl=216
++ expr 8 + 16 '*' 7 + 216
+ sigsize=336
++ expr 104 + 336 + '(' 8 - '(' 336 % 8 ')' ')' % 8 + 8
+ o=448
++ od -j 448 -N 8 -t u1 jfreechart-1.0.5-1jpp.src.rpm
+ set 0000700 0 0 0 50 0 0 8 5 0000710
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 0 ')' + 50
+ il=50
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 8 ')' + 5
+ dl=2053
++ expr 8 + 16 '*' 50 + 2053
+ hdrsize=2861
++ expr 448 + 2861
+ o=3309
+ dd if=jfreechart-1.0.5-1jpp.src.rpm ibs=3309 skip=1

zcat cpio.gz | cpio -tvd
-rw-rw-r--   1 root     root          936 May 18  2007
jfreechart-1.0.5-build_xml.patch
-rw-rw-r--   1 root     root      5543413 May 18  2007 jfreechart-1.0.5.tar.gz

zcat: cpio.gz: invalid compressed data--format violated
cpio: premature end of file

md5sum cpio.gz 
4cb1170d05e152c64ad3ffc32ba0c4d0  cpio.gz

The same gzip'd cpio ball on f8 is: md5sum cpio.gz 
4cb1170d05e152c64ad3ffc32ba0c4d0  cpio.gz

[pauln@shitake ~]$ rpm -ivh jfreechart-1.0.5-1jpp.src.rpm 
error: jfreechart-1.0.5-1jpp.src.rpm: V3 DSA signature: BAD, key ID c431416d
error: jfreechart-1.0.5-1jpp.src.rpm cannot be installed
[pauln@shitake ~]$ rpm  --nosignature -ivh jfreechart-1.0.5-1jpp.src.rpm 
error: jfreechart-1.0.5-1jpp.src.rpm: MD5 digest: BAD
Expected(555e85c69be72adf2bf5f222f6882221) != (396fd220073a13c88c82dfd9ed39d535)
error: jfreechart-1.0.5-1jpp.src.rpm cannot be installed
[pauln@shitake ~]$ rpm -Kvv jfreechart-1.0.5-1jpp.src.rpm 
D: Expected size:      5563034 = lead(96)+sigs(344)+pad(0)+data(5562594)
D:   Actual size:      5563034
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Pubkeys rdonly mode=0x0
jfreechart-1.0.5-1jpp.src.rpm:
    Header V3 DSA signature: NOKEY, key ID c431416d
    Header SHA1 digest: OK (4f2d240288ec255585157411cd1db400162fa508)
    MD5 digest: BAD Expected(555e85c69be72adf2bf5f222f6882221) !=
(396fd220073a13c88c82dfd9ed39d535)
    V3 DSA signature: BAD, key ID c431416d
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Packages

again on F8:

[pauln@enki ~]$ rpm -Kvv jfreechart-1.0.5-1jpp.src.rpm 
D: Expected size:      5563034 = lead(96)+sigs(344)+pad(0)+data(5562594)
D:   Actual size:      5563034
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Pubkeys rdonly mode=0x0
jfreechart-1.0.5-1jpp.src.rpm:
    Header V3 DSA signature: NOKEY, key ID c431416d
    Header SHA1 digest: OK (4f2d240288ec255585157411cd1db400162fa508)
    MD5 digest: BAD Expected(555e85c69be72adf2bf5f222f6882221) !=
(396fd220073a13c88c82dfd9ed39d535)
    V3 DSA signature: BAD, key ID c431416d
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Packages

I've still got jpackage.org account:

[pauln@enki ~]$ scp
jpackage.org:/home/projects/jpackage/dist/1.7/generic/free/SRPMS/jfreechart-1.0.5-1jpp.src.rpm
.
jfreechart-1.0.5-1jpp.src.rpm                                                  
                                                                               
             100% 5433KB 388.1KB/s   00:14    
[pauln@enki ~]$ rpm -Kvv jfreechart-1.0.5-1jpp.src.rpm 
D: Expected size:      5563034 = lead(96)+sigs(344)+pad(0)+data(5562594)
D:   Actual size:      5563034
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Pubkeys rdonly mode=0x0
jfreechart-1.0.5-1jpp.src.rpm:
    Header V3 DSA signature: NOKEY, key ID c431416d
    Header SHA1 digest: OK (4f2d240288ec255585157411cd1db400162fa508)
    MD5 digest: OK (555e85c69be72adf2bf5f222f6882221)
    V3 DSA signature: NOKEY, key ID c431416d
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Packages
md5sum jfreechart-1.0.5-1jpp.src.rpm 
a37f427c13c3e70eb6872e9885382255  jfreechart-1.0.5-1jpp.src.rpm

I'd say the master mirror is bad. however our error reporting for catching this
should be better.



Comment 4 Jerry James 2008-01-07 21:24:45 UTC
This is definitely a corrupt file, given further investigation by jpackage.org.
 I'm not sure of the correct bugzilla etiquette here.  Should I close this as
NOTABUG, or do I leave that to the person who has been assigned the bug?


Comment 5 Panu Matilainen 2008-04-01 11:51:00 UTC
Failing to unpack a corrupted file is indeed NOTABUG.


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