From owner-freebsd-stable@FreeBSD.ORG Fri Jan 11 05:51:28 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADCF016A417 for ; Fri, 11 Jan 2008 05:51:28 +0000 (UTC) (envelope-from andrew-freebsd@areilly.bpc-users.org) Received: from qsrv02ps.mx.bigpond.com (qsrv02ps.mx.bigpond.com [144.140.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 47FA113C45A for ; Fri, 11 Jan 2008 05:51:28 +0000 (UTC) (envelope-from andrew-freebsd@areilly.bpc-users.org) Received: from oaamta01ps.mx.bigpond.com ([124.188.162.219]) by omta02ps.mx.bigpond.com with ESMTP id <20080111001925.FSTG28980.omta02ps.mx.bigpond.com@oaamta01ps.mx.bigpond.com> for ; Fri, 11 Jan 2008 00:19:25 +0000 Received: from areilly.bpa.nu ([124.188.162.219]) by oaamta01ps.mx.bigpond.com with ESMTP id <20080111001924.SYNE27999.oaamta01ps.mx.bigpond.com@areilly.bpa.nu> for ; Fri, 11 Jan 2008 00:19:24 +0000 Received: (qmail 5665 invoked from network); 11 Jan 2008 00:19:15 -0000 Received: from localhost (HELO duncan.reilly.home) (127.0.0.1) by localhost with SMTP; 11 Jan 2008 00:19:15 -0000 Date: Fri, 11 Jan 2008 11:19:15 +1100 From: Andrew Reilly To: Kris Kennaway Message-ID: <20080111111915.4281130f@duncan.reilly.home> In-Reply-To: <4786B39B.6020403@FreeBSD.org> References: <004901c853dc$54acf230$b6db87d4@multiplay.co.uk> <1EBB2F6E-DE1F-4EDE-885F-F8CEB60E6F6A@mac.com> <00a801c853e4$5589eb10$b6db87d4@multiplay.co.uk> <4786B39B.6020403@FreeBSD.org> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org, Steven Hartland Subject: Re: FreeBSD tar errors on valid empty tar.gz X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 05:51:28 -0000 On Fri, 11 Jan 2008 01:08:59 +0100 Kris Kennaway wrote: > Steven Hartland wrote: > > A totally empty file is not valid try the following test:- > >> touch empty > >> tar cvzf test.tar.gz --files-from empty > >> tar tvzf test.tar.gz tar: Unrecognized archive format: Inappropriate > >> file type or format > >> tar --version > >> bsdtar 1.2.53 - libarchive 1.2.53 > >> gtar tvzf test.tar.gz > >> gtar --version > >> tar (GNU tar) 1.15.1 > > > > Tested on: FreeBSD 6.2-RELEASE-p9 > > OK, so it's already fixed? Seems to work OK on my 7-STABLE system. Interestingly, if I follow Steven Hartland's recipe (using --files-from empty), I get a 45-byte .tar.gz file that gzcat's to 10240 zero bytes, but if I leave the "z" off the tar commands, I get an uncompressed file of 1024 zero bytes. Should that happen? In both cases, tar tvf{,z} doesn't whinge about unrecognized formats. Cheers, -- Andrew