Bug 1382054

Summary: /usr/bin/zforce does not work
Product: Red Hat Enterprise Linux 7 Reporter: Petr Stodulka <pstodulk>
Component: gzipAssignee: Petr Stodulka <pstodulk>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.4CC: fsumsal, jamartis, lmiksik, manuel.wolfshant, ovasik, rhack, vdanek
Target Milestone: rcKeywords: EasyFix, FastFix, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gzip-1.5-9.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 880084 Environment:
Last Closed: 2017-08-01 18:41:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1380361, 1393867    

Description Petr Stodulka 2016-10-05 15:34:28 UTC
+++ This bug was initially created as a clone of Bug #880084 +++

+++ This bug was initially created as a clone of Bug #880081 +++

Description of problem:
/usr/bin/zforce fails to identify and rename valid gzipped files

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

gzip-1.3.12-18.el6

How reproducible:
always

Steps to Reproduce:
1.	touch /tmp/test
2. gzip /tmp/test
3. mv /tmp/test.gz /tmp/test
4. zforce /tmp/test
  
Actual results:
Nothing happens

Expected results:
/tmp/test should be renamed to /tmp/test.gz

Additional info:

The /usr/bin/zforce utility is a script. Line 61

if gzip -l < "$i" 2>/dev/null | grep '^compressed' > /dev/null; then

is incorrect. The output of gzip -l /tmp/file (see above) is

         compressed uncompressed ratio uncompressed_name
                 25 0 0.0% /tmp/file

so '^compressed' fails because of the spaces printed in front of "compressed"

Comment 5 errata-xmlrpc 2017-08-01 18:41:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2003