Bug 114580 - cpio -oH ustar (or tar) saves bad mtime date after Jan 10 2004
Summary: cpio -oH ustar (or tar) saves bad mtime date after Jan 10 2004
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cpio
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-29 18:43 UTC by Need Real Name
Modified: 2007-04-18 17:02 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-11-08 15:53:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2004-01-29 18:43:15 UTC
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 16:30:59 UTC
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.