Bug 216111 - gzip munges directory mtime with "-r"
gzip munges directory mtime with "-r"
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gzip (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-11-17 06:01 EST by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0502
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-27 08:37:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0502 normal SHIPPED_LIVE gzip bug fix update 2007-11-15 12:35:53 EST

  None (edit)
Description Bastien Nocera 2006-11-17 06:01:04 EST
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;
           /* 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 08:37:01 EDT
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.

Comment 18 Issue Tracker 2007-07-03 18:24:25 EDT
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@ti.com 
 issue 106657

Note You need to log in before you can comment on or make changes to this bug.