Re: (bsd)tar is broken on 6.1
Hi, all! On Fri, May 26, 2006 at 08:58:01PM +1000, Peter Jeremy wrote: On Fri, 2006-May-26 11:34:43 +0200, Patrick M. Hausen wrote: -rw-r--r-- 1 jmz jmz4312 Apr 16 1947 supclkrd.prg Since there cannot be a date before January 1st 1970, 0:00 on any Unix system, i guess there's something seriously broken here. Why do you say that? time_t is signed so it can represent a date prior to 1970. In theory, a file prepared on an earlier computer could have been transferred onto a Unix system whilst retaining its original modification time. If I'm not mistaken, the signedness of time_t is merely historical. time_t predates explicitely unsigned integer data types in C. The historical definition seems to have been long. Dates before the Epoch are undefined. I mean, which part of seconds since the Epoch implies time values _before_ the Epoch? You are not supposed to do calculations subtractions with time_t but use difftime(), for example. POSIX.1-1990. Section 2.2.2.77: seconds since the Epoch If the year 1970 or the value [of seconds since the Epoch] is negative, the relationship is undefined. If the year = 1970 and the value is non-negative, the value is related to a Coordinated Universal Time name ... Regards, Patrick -- punkt.de GmbH Internet - Dienstleistungen - Beratung Vorholzstr. 25Tel. 0721 9109 -0 Fax: -100 76137 Karlsruhe http://punkt.de ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (bsd)tar is broken on 6.1
On Sat, 27 May 2006, Patrick M. Hausen wrote: If I'm not mistaken, the signedness of time_t is merely historical. time_t predates explicitely unsigned integer data types in C. The historical definition seems to have been long. Actually it was int[2] - see line 0213 of the Lions Book. Or I could get really keen and dig out my old Edition 5 manual... The C compiler didn't grok long in those days. -- Dave ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (bsd)tar is broken on 6.1
Jonathan Noack writes: Jean-Marc Zucconi wrote: # tar cf /dev/null X11R6.old # archive_write_pax_header: 'x' header failed?! This can't happen. This seems to work fine here: [EMAIL PROTECTED]:/usr] $ uname -rm 6.1-RELEASE i386 [EMAIL PROTECTED]:/usr] $ tar --version bsdtar 1.02.023, libarchive 1.02.026 Copyright (C) 2003-2005 Tim Kientzle [EMAIL PROTECTED]:/usr] $ tar cf /dev/null X11R6 [EMAIL PROTECTED]:/usr] $ Sure, but the directories are not the same. I have narrowed the problem to a specific subdirectory and I think I have the explanation: -rw-r--r-- 1 jmz jmz4312 Apr 16 1947 supclkrd.prg Don't ask me why the date is wrong, this is really old stuff :-) On the other hand tar has no problem extracting it. If someone wants to debug it, the archive is available as http://people.freebsd.org/~jmz/a.tar Jean-Marc -- Jean-Marc Zucconi -- PGP Key: finger [EMAIL PROTECTED] [KeyID: 400B38E9] ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (bsd)tar is broken on 6.1
On 05/26/06 04:37, Jean-Marc Zucconi wrote: Jonathan Noack writes: Jean-Marc Zucconi wrote: # tar cf /dev/null X11R6.old # archive_write_pax_header: 'x' header failed?! This can't happen. This seems to work fine here: [EMAIL PROTECTED]:/usr] $ uname -rm 6.1-RELEASE i386 [EMAIL PROTECTED]:/usr] $ tar --version bsdtar 1.02.023, libarchive 1.02.026 Copyright (C) 2003-2005 Tim Kientzle [EMAIL PROTECTED]:/usr] $ tar cf /dev/null X11R6 [EMAIL PROTECTED]:/usr] $ Sure, but the directories are not the same. As you provided no details in your original email, I was forced to assume that the problem was in the use of /dev/null (I used the X11R6 directory for fun). I was mistaken, but remember that not *all* of us can read your mind... :) I have narrowed the problem to a specific subdirectory and I think I have the explanation: -rw-r--r-- 1 jmz jmz4312 Apr 16 1947 supclkrd.prg Don't ask me why the date is wrong, this is really old stuff :-) On the other hand tar has no problem extracting it. If someone wants to debug it, the archive is available as http://people.freebsd.org/~jmz/a.tar I see the same thing here. Touching supclkrd.prg to bring the date current makes the problem go away. Tim, any thoughts? -Jonathan -- Jonathan Noack | [EMAIL PROTECTED] | OpenPGP: 0x991D8195 signature.asc Description: OpenPGP digital signature
Re: (bsd)tar is broken on 6.1
Hello! I have narrowed the problem to a specific subdirectory and I think I have the explanation: -rw-r--r-- 1 jmz jmz4312 Apr 16 1947 supclkrd.prg Don't ask me why the date is wrong, this is really old stuff :-) Since there cannot be a date before January 1st 1970, 0:00 on any Unix system, i guess there's something seriously broken here. Signed/unsigned overflow for the time_t value in question? Regards, Patrick M. Hausen -- punkt.de GmbH Internet - Dienstleistungen - Beratung Vorholzstr. 25Tel. 0721 9109 -0 Fax: -100 76137 Karlsruhe http://punkt.de ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (bsd)tar is broken on 6.1
On Fri, 2006-May-26 11:34:43 +0200, Patrick M. Hausen wrote: -rw-r--r-- 1 jmz jmz4312 Apr 16 1947 supclkrd.prg Since there cannot be a date before January 1st 1970, 0:00 on any Unix system, i guess there's something seriously broken here. Why do you say that? time_t is signed so it can represent a date prior to 1970. In theory, a file prepared on an earlier computer could have been transferred onto a Unix system whilst retaining its original modification time. In this particular case, the date seems unlikely. That said, it is a perfectly valid date and it would be nice if tar could support it - though tar(5) states dates before the epoch are not handled consistently. -- Peter Jeremy ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (bsd)tar is broken on 6.1
Patrick M. Hausen wrote: I have narrowed the problem to a specific subdirectory and I think I have the explanation: -rw-r--r-- 1 jmz jmz4312 Apr 16 1947 supclkrd.prg Yes, libarchive in 6.1 has a broken assertion in the tar-writing code that causes it to (erroneously) reject files with very old dates. This is fixed in -CURRENT; I plan to MFC a bunch of fixes like this to 6-STABLE very soon. In the meantime, you can fix this by installing the most current libarchive from: http://people.freebsd.org/~kientzle/libarchive Or you can temporarily patch it by looking in src/lib/libarchive/archive_write_format_pax.c and changing the second call to __archive_write_format_header_ustar() so that the last argument is 0, not 1. (The 1 here enables the above-mentioned assertion checks.) Tim ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
(bsd)tar is broken on 6.1
# tar cf /dev/null X11R6.old # archive_write_pax_header: 'x' header failed?! This can't happen. Jean-Marc -- Jean-Marc Zucconi -- PGP Key: finger [EMAIL PROTECTED] [KeyID: 400B38E9] ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (bsd)tar is broken on 6.1
Jean-Marc Zucconi wrote: # tar cf /dev/null X11R6.old # archive_write_pax_header: 'x' header failed?! This can't happen. This seems to work fine here: [EMAIL PROTECTED]:/usr] $ uname -rm 6.1-RELEASE i386 [EMAIL PROTECTED]:/usr] $ tar --version bsdtar 1.02.023, libarchive 1.02.026 Copyright (C) 2003-2005 Tim Kientzle [EMAIL PROTECTED]:/usr] $ tar cf /dev/null X11R6 [EMAIL PROTECTED]:/usr] $ -Jonathan ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to [EMAIL PROTECTED]