FS#9634 - rpmextract 0-2 breaks compatibility with SuSE RPMs

Attached to Project: Arch Linux
Opened by Paul Bredbury (brebs) - Wednesday, 20 February 2008, 21:13 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 27 February 2008, 04:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Hi, rpmextract 0-2 was broken in  FS#7491  and my request to re-open the bug was denied.

This is shown by downloading http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_10.3/i586/wine-snapshot-0.9.55.20080219-11.1.i586.rpm or whatever the latest snapshot in http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_10.3/i586/ is, then running:

$ rpmextract.sh wine-snapshot-0.9.55.20080219-11.1.i586.rpm
./usr/bin/winhelp: File not open
bsdtar: Error exit delayed from previous errors.

But with rpmextract 0-1, it *works*, regardless of the 2 little gzip & cpio warnings:

$ rpmextract.sh wine-snapshot-0.9.55.20080219-11.1.i586.rpm
gzip: stdin: not in gzip format
cpio: premature end of archive
./usr/bin/function_grep.pl
...
./usr/bin/winhelp
102402 blocks

So, either rpmextract 0-2 is broken, or SuSE aren't making valid RPMs.
This task depends upon

Closed by  Dan McGee (toofishes)
Wednesday, 27 February 2008, 04:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with libarchive 2.4.12
Comment by Paul Bredbury (brebs) - Wednesday, 20 February 2008, 21:18 GMT
Oops, I phrased the last line wrong. Should say: Even if SuSE aren't making valid RPMs, rpmextract 0-2 is broken because rpmextract 0-1 could handle them ;)

So, I recommend reverting back.
Comment by Roman Kyrylych (Romashka) - Wednesday, 20 February 2008, 21:33 GMT
rpmextract 0-2 uses bsdtar, so it's bsdtar that cannot extract some broken rpms
Comment by Tobias Powalowski (tpowa) - Wednesday, 20 February 2008, 21:34 GMT
never change a working script :D
Comment by Dan McGee (toofishes) - Thursday, 21 February 2008, 15:14 GMT
$ rpmextract.sh wine-snapshot-0.9.55.20080219-11.1.i586.rpm
gzip: stdin: not in gzip format
cpio: premature end of archive

I'm sorry, but that doesn't indicate working to me- it just indicates a different kind of failure.

Can you expand on your generalization here? You file the bug as 'SuSE RPMs' and yet only tried one.
Comment by Paul Bredbury (brebs) - Thursday, 21 February 2008, 15:48 GMT
Don't confuse success and failure. Success is extracting all the files properly with a return code of 0. That's what rpmextract 0-1 does.

I called it "SuSE RPMs" because I assume rpmextract 0-2 was actually tested on an RPM or two before it was released. I have tried rpmextract 0-1 and 0-2 on wine-0.9.55-11.1.i586.rpm also, with identical results showing that it is only rpmextract 0-2 which fails (bad return code).

There's an obvious fix here, which is to reinstate rpmextract 0-1 as rpmextract 0-3.

In rpmextract 0-1, the 2 error messages re gzip & cpio are only shown because the first half of "dd if=$pkg ibs=$o skip=1 2>/dev/null | gunzip | cpio -idmuv || dd if=$pkg ibs=$o skip=1 2>/dev/null | bzip2 -d | cpio -idmuv" fails - therefore those 2 error messages can safely be ignored.

Ideally, there would be a command which did "gunzip || bzip2 -d, as appropriate", then the line wouldn't need 2 halves ;)
Comment by Paul Bredbury (brebs) - Friday, 22 February 2008, 17:02 GMT
Aha, the problem is with bsdtar (owned by libarchive), rather than rpmextract.

Simply upgrading from libarchive 2.4.11 to libarchive 2.4.12 (not yet in Arch, hint hint) completely fixes this bug :)
Comment by Roman Kyrylych (Romashka) - Tuesday, 26 February 2008, 10:09 GMT
2.4.12 in Testing, please confirm it fixes the bug ;)
Comment by Paul Bredbury (brebs) - Wednesday, 27 February 2008, 00:50 GMT
I confirm that testing/libarchive fixes the bug. This now succeeds:

rpmextract.sh /var/abs/local/bin32-wine-suse/wine-0.9.56-14.1.i586.rpm || echo "failed"

Loading...