NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/46786: tar can not archive "old" files



>Number:         46786
>Category:       bin
>Synopsis:       tar can not archive "old" files
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 09 03:55:00 +0000 2012
>Originator:     Simon Burge
>Release:        NetBSD 6.0_BETA2 from July 16
>Environment:
System: NetBSD silmech.thistledown.com.au 6.0_BETA2 NetBSD 6.0_BETA2 (GENERIC) 
#0: Mon Jul 16 23:29:03 EST 2012  
simonb%silmech.thistledown.com.au@localhost:/home/simonb/netbsd/build6/amd64/obj/home/simonb/netbsd/src6/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        tar give a "Ustar MTIME header field is too small for <file>"
        message when trying to archive a "old" file (in my case a file
        with a timestamp from 1937), then appears to create an invalid
        archive that doesn't include the file.

        A tar binary from an NetBSD 4.0 system will successfully archive
        and an extract the same old file.

        I've marked this PR as serious/high as it is both a regression
        and also because a standard way of backing up files doesn't
        work.

>How-To-Repeat:

        silmech 1035> echo hi > foo
        silmech 1036> tar cvf foo.tar foo
        foo
        tar: ustar vol 1, 1 files, 0 bytes read, 10240 bytes written in 1 secs 
(10240 bytes/sec)
        silmech 1037> tar tvf foo.tar
        -rw-r--r--  1 simonb   wheel          3 Aug  9 13:34 foo
        tar: ustar vol 1, 1 files, 10240 bytes read, 0 bytes written in 1 secs 
(10240 bytes/sec)
        silmech 1038> touch -t 193712070238.22 foo
        silmech 1039> rm foo.tar
        silmech 1040> tar cvf foo.tar foo

        tar: Ustar MTIME header field is too small for foo
        tar: ustar vol 1, 1 files, 0 bytes read, 10240 bytes written in 1 secs 
(10240 bytes/sec)
        fooExit 1
        silmech 1041> tar tvf foo.tar
        tar: Cannot identify format. Searching...
        tar: End of archive volume 1 reached
        tar: Sorry, unable to determine archive format.
        Exit 1
        silmech 1042> ls -l foo.tar
        -rw-r--r--  1 simonb  wheel  10240 Aug  9 13:35 foo.tar
        silmech 1043> od -x foo.tar
        0000000     0000    0000    0000    0000    0000    0000    0000    0000
        *
        0024000

>Fix:
        Non given.  Or grab a tar binary from an older NetBSD release.



Home | Main Index | Thread Index | Old Index