madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.7k stars 2.45k forks source link

rpm-4.11.3 fails to install packages built with zlib-1.2.9 installed #191

Closed chris2553 closed 7 years ago

chris2553 commented 7 years ago

I've built and installed zlib-1.2.9 on my system (home rolled but based on Linux From Scratch). I've found that rpms created with this system cannot be installed. Nor can their contents be viewed with Midnight Commander (mc). The error produced by rpm is: [chris:~/rpm]$ sudo rpm -i x86_64/whois-5.2.14-1.x86_64.rpm error: unpacking of archive failed on file /usr/bin/whois;586aad21: cpio: read failed - No such file or directory error: whois-5.2.14-1.x86_64: install failed When trying to view an rpm with mc a dialogue box pops up containing the message "Premature end of cpio archive".

If I revert to zlib-1.2.8 and rebuild the rpms, everything is OK, although rpms built when zlib-1.2.9 was installed still cannot be installed.

This table summarises what I have found:

BUILD INSTALL RESULT 1.2.8 1.2.8 GOOD 1.2.8 1.2.9 GOOD 1.2.9 1.2.8 FAIL 1.2.9 1.2.9 FAIL

I've bisected the problem and that ended with: [chris:~/build/zlib]$ git bisect bad 4f1df003ed39280c2e4f62581888a62def3e34fe is the first bad commit commit 4f1df003ed39280c2e4f62581888a62def3e34fe Author: Mark Adler madler@alumni.caltech.edu Date: Tue Apr 5 03:09:59 2016 -0700

Loop on write() calls in gzwrite.c in case of non-blocking I/O.

:100644 100644 efff93af013c756fd22808e171ce412d18606a36 f07731a423e5d19444c563bd1340ed83be271c41 M gzwrite.c

Unfortunately, this commit does not revert because of subsequent commits, so I haven't tried that.

madler commented 7 years ago

Fixed in 1.2.10. Thank you for the report.