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)
Created attachment 97595 [details] Bad zip file
Created attachment 97596 [details] Good zip file
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.