From owner-freebsd-bugs Sun Apr 2 0:40: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 7058C37B8EE for ; Sun, 2 Apr 2000 00:40:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id AAA76390; Sun, 2 Apr 2000 00:40:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sun, 2 Apr 2000 00:40:03 -0800 (PST) Message-Id: <200004020840.AAA76390@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Anatoly Vorobey Subject: Re: bin/17619: pax cannot read all tar files created by tar. Reply-To: Anatoly Vorobey Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/17619; it has been noted by GNATS. From: Anatoly Vorobey To: Sheldon Hearn , marcolz@stack.nl Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/17619: pax cannot read all tar files created by tar. Date: Sun, 2 Apr 2000 10:38:22 +0000 On Sun, Apr 02, 2000 at 12:20:02AM -0800, Anatoly Vorobey wrote: > I looked into this. pax thinks tar archives should end with at least > 2 blocks of zero (i.e. 1024 zeroed bytes *after* the file ends). > In the example provided, GNU tar creates only one such block, and > pax thinks it must read another one which is not there, so it asks > for the next volume. I forgot to demonstrate this on the example given my Marc: prompt> dd if=/dev/zero of=foo bs=1759830 count=1 prompt> tar cf bar.tar foo prompt> ls -l bar.tar -rw-r--r-- 1 mellon wheel 1761280 Apr 2 07:19 bar.tar Now 1759830 is padded to the 512 bytes boundary when written out which results in 1760256 bytes; together with 512 bytes of the header and 512 bytes of one trailer block, 512 + 1760256 + 512 = 1761280. FWIW, the page at www.paranoia.com/~vax/tar_format.html , currently uavailable but cached at http://www.google.com/search?q=cache:www.paranoia.com/~vax/tar_format.html , says that there must be two trailer blocks. -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message