Bug 10763

Summary: rpm-3.0.4-5x breaks all rebuilt RPM's.
Product: [Retired] Red Hat Linux Reporter: Pekka Savola <pekkas>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.2CC: bugzilla, herrold, petr.novotny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-07-17 12:52:39 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 Pekka Savola 2000-04-12 20:40:32 UTC
I'm using a heavily upgraded Redhat 5.1 system, and decided to try
upgrading RPM so that a few other RPM's could be built due to new specfile
features.

I installed rpm-3.0.4-5x.i386.rpm.  After that, every srpm I built, got
broken in a mysterious way.  There were no error messages at compile time,
but when I tried installing these packages I got always the same error
message:

e2fsprogs
###########################################unpacking of archive failed on
file /usr/doc/e2fsprogs-1.18/RELEASE-NOTES: cpio: read failed - No such
file or directory

always 'cpio: read failed'.

After backtracking to rpm-3.0.2 binary and rebuilding these srpm's, they
installed fine.

Seems like a very serious problem.

PS, Only afterwards I noticed that there are packages rpm-devel and
rpm-build on ftp.rpm.org.  Especially rpm-build's contents looked
interesting.  I don't know if installing this too would have helped, but it
wasn't Required by the main rpm package.

Comment 1 Pekka Savola 2000-04-16 02:15:59 UTC
Installing either rpm-devel or rpm-build didn't help.  One other user wrote
about the same thing on the RPM mailing-list on 2000/03/30.

Also, rebuilding rpm from rpm-3.0.4-5x.src.rpm and installing it from there
before this won't help.

Comment 2 Ole Tange 2000-05-20 23:11:59 UTC
On a heavily upgraded RH5.2 I have tried:

rpm -i PKG.src.rpm
rpm -ba SPECS/PKG.spec
rpm --rebuild SRPMS/PKG.src.rpm

(PKG = rsync-2.2.1-1.src.rpm, rpm-3.0.4-[56]x.src.rpm)

With rpm-3.0.2-4.x everything works.
With rpm(-build)-3.0.4-[56]x the rebuild fails with:
 unpacking of archive failed ... : cpio: read failed

One major thing that is _not_ upgraded is libc (still glibc-2.0.7-29).

Comment 3 Ole Tange 2000-05-20 23:29:59 UTC
Forgot to mention:

When -ba'ing with rpm-3.0.4 the resulting .src.rpm is significantly smaller than
the original src.rpm.

Original SRPM and the smaller SRPM can be found here:
http://ole.tange.dk/rpm/

If you try rebuilding the smaller SRPM with rpm-3.0.2 it fails with the same
error (cpio: read failed). From this I reason that the error is in the generated
.src.rpm file, and since rpm-3.0.4 generated the .src.rpm file the error is
probably in the SRPM generation routines in rpm-3.0.4.


/Ole

Comment 4 R P Herrold 2000-07-03 01:26:32 UTC
I confirm, and can re-create this fault at will.  

Parts of the unpack are occuring -- that is some binaries are being installed 
--- but celarly post-install scripts are not happening.  Some updating of 
RPM database is ocurring.




Comment 5 Need Real Name 2000-07-17 12:52:39 UTC
The same symptoms (RedHat 5.1 plus way-too-many-updates). It should be also 
noted that cpio archive extracted from the rebuilt rpm with rpm2cpio is 
invalid - at least according to my cpio-2.4.2-7.

This explains all the symptoms above: The cpio archive created by rpm 3.0.4-5.x 
seems corrupt!

Comment 6 Jeff Johnson 2000-07-20 18:11:00 UTC
This is now fixed in (soon to be released) rpm-3.0.5-7.5x.. Turns out that
fclose on
libio FILE pointers doesn't do the right thing at all in older glibc versions.

Meanwhile, adding --nolibio when invoking rpm-3.0.4 should also provide a
solution.