Issue
Description of problem:
One of our customer found that On RHEL8, when running gzip --list on a large compressed file (multi-GB), it misinterprets the uncompressed filesize:
On RHEL8, when running gzip --list on a large compressed file (multi-GB), it misinterprets the uncompressed filesize:
~~~
$ gzip --list rhel9.tar.gz
compressed
uncompressed ratio uncompressed_name
8262683410
4279486464 -93.1% rhel9.tar
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.6 (Ootpa)
~~~
The same command on RHEL9 works fine:
~~~
gzip --list rhel9.tar.gz
compressed
uncompressed ratio uncompressed_name
8262683410
8574453760
3.6% rhel9.tar
cat /etc/redhat-release
Red Hat Enterprise Linux release 9.1 (Plow)
~~~
Customer has listed this was fixed in the upstream gzip in this commit and want this to be implemented in RHEL 8:
https://git.savannah.gnu.org/cgit/gzip.git/commit/?id=cf26200380585019e927fe3cf5c0ecb7c8b3ef14
Version-Release number of selected component (if applicable):
gzip-1.9-13.el8_5.x86_64
How reproducible:
Everytime
Steps to Reproduce:
1. REAL file
~~~
ls -la rhel8.tar
rw-rr-. 1 root root 11465134080 Feb 3 05:35 rhel8.tar
~~~
2. RHEL 8 GZIP latest version - gzip-1.9-13.el8_5.x86_64
~~~
gzip --list rhel8.tar.gz
compressed
uncompressed ratio uncompressed_name
11024697867
2875199488 -283.4% rhel8.tar
~~~
3. RHEL 9 GZIP latest version - gzip-1.12-1.el9.x86_64
~~~
gzip --list rhel8.tar.gz
compressed
uncompressed ratio uncompressed_name
11024697867
11465134080
3.8% rhel8.tar
~~~
Actual results:
The uncompressed size show is much smaller causing a negative compression ratio.
Users cannot rely on the information provided by the utility and have to develop workarounds
Expected results:
Should display correct uncompressed file size.
Additional info: