Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 216111

Summary: gzip munges directory mtime with "-r"
Product: Red Hat Enterprise Linux 4 Reporter: Bastien Nocera <bnocera>
Component: gzipAssignee: Ivana Varekova <varekova>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0502 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-27 12:37:00 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 Bastien Nocera 2006-11-17 11:01:04 UTC
When using "-r" gzip will try to restore the atime and mtime of the directory
passed using utime(), thus breaking cache invalidation for NFS (which relies on
the mtime).

The code does this on purpose:
   /* If the input name is that of a directory, recurse or ignore: */
   if (S_ISDIR(istat.st_mode)) {
#if ! NO_DIR
       if (recursive) {
           struct stat st;
           st = istat;
           treat_dir(iname);
           /* Warning: ifname is now garbage */
#  ifndef NO_UTIME
           reset_times (iname, &st);
#  endif
       } else

I tried mailing Jean-Loup and the bug list (as per
http://www.math.utah.edu/docs/info/gzip_8.html#SEC11 followed from gzip.org)
without success (bounced mails).

What's the reasoning behind restoring the mtime for the directory?

Comment 17 Red Hat Bugzilla 2007-06-27 12:37:01 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0502.html


Comment 18 Issue Tracker 2007-07-03 22:24:25 UTC
The gzip errata packge does fix this bug.  Closing ticket.  Thanks!

Internal Status set to 'Resolved'
Status set to: Closed by Client

This event sent from IssueTracker by jmbastia 
 issue 106657