Bug 115397 - rpmbuild does not properly check zip files
rpmbuild does not properly check zip files
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-11 16:53 EST by Peter McGregor
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-11 17:32:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Bad zip file (7.48 KB, application/zip)
2004-02-11 16:55 EST, Peter McGregor
no flags Details
Good zip file (8.61 KB, application/zip)
2004-02-11 16:56 EST, Peter McGregor
no flags Details

  None (edit)
Description Peter McGregor 2004-02-11 16:53:55 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.4) Gecko/20030624

Description of problem:
Hi,
When rpmbuild encounters an invalid zip file it assumes it must be a tar
and tries to untar it. The resulting error is misleading.
rpmbuild should display zip file errors if the zip file is invalid.

An example of an invalid zip file is jta-1_0_1B-classes.zip
downloaded by mozilla 1.4 from java.sun.com(search for jta)
Mozilla 1.4 7660 bytes
safari      8812 bytes

Error occurred when trying to build a jta rpm under the jpackage
system(www.jpackage.org)



Version-Release number of selected component (if applicable):
RPM version 4.2.1

How reproducible:
Always

Steps to Reproduce:
1.Try to build jta rpm file from www.jpackage.org
2.
3.
    

Actual Results:  A tar error was reported

Expected Results:  Zip file error should have been reported

Additional info:

Im using fredora core

The error is
rpmbuild --without javadoc -ba rpm/SPECS/jta.spec
Executing(%prep): /bin/sh -e /home/advso/rpm/tmp/rpm-tmp.6078
+ umask 022
+ cd /home/advso/rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/advso/rpm/BUILD
+ rm -rf jta-1.0.1
+ /bin/mkdir -p jta-1.0.1
+ cd jta-1.0.1
+ tar -xf /home/advso/rpm/SOURCES/jta-1_0_1B-classes.zip
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors
error: Bad exit status from /home/advso/rpm/tmp/rpm-tmp.6078 (%prep)
Comment 1 Peter McGregor 2004-02-11 16:55:18 EST
Created attachment 97595 [details]
Bad zip file
Comment 2 Peter McGregor 2004-02-11 16:56:23 EST
Created attachment 97596 [details]
Good zip file
Comment 3 Jeff Johnson 2004-02-11 17:32:31 EST
Try doing the same thing manually in %prep, as byte 1 (where the magic
lives that is used to identify which uncompressor is to be used)
isdifferent between the 2 zip files you have attached.

The %prep runs with /bin/sh -e, so any non-zero return should
exit. Assuming zip returns valid exit code.

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