Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 114580 - cpio -oH ustar (or tar) saves bad mtime date after Jan 10 2004
cpio -oH ustar (or tar) saves bad mtime date after Jan 10 2004
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: cpio (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-29 13:43 EST by Need Real Name
Modified: 2007-04-18 13:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-08 10:53:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2004-01-29 13:43:15 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET 
CLR 1.1.4322)

Description of problem:
When cpio creates a tar file via -H ustar or -H tar, files with dates 
after January 10 2004 at 13:37:03 UTC are archived with an incorrect 
mtime of January 1970 (i.e. 34 yrs and 10 days earlier than the 
correct date), and will be restored with that incorrect mtime whether 
restored by cpio or tar. The special thing about that date and time 
is that in octal the mtime value is 7777777777. After that, an 11th 
octal digit is needed, but cpio is only storing the rightmost 10 
octal digits in the tar file mtime field. The problem has also been 
found in earlier versions of Red Hat Linux (7.3, 6.1).

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

How reproducible:
Always

Steps to Reproduce:
1.echo hello >/tmp/hello
2.touch -t 200401111200 /tmp/hello
3.echo /tmp/hello | cpio -oH ustar | cpio -itv
Try the same thing with a touch -t 200401091200 or any other date 
before January 10 2004 at 13:37:04 UTC and it works.

Actual Results:  -rw-r--r--   1 root     root            6 Jan  1  
1970 /tmp/hello

Expected Results:  -rw-r--r--   1 root     root            6 Jan  11  
12:00 /tmp/hello

Additional info:
Comment 1 Need Real Name 2004-02-02 11:30:59 EST
See also suggested patch at:
http://mail.gnu.org/archive/html/bug-cpio/2004-01/msg00007.html
and next in thread:
http://mail.gnu.org/archive/html/bug-cpio/2004-01/msg00008.html

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