From owner-cvs-all@FreeBSD.ORG Mon Jun 7 02:57:21 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EEFC16A4CE; Mon, 7 Jun 2004 02:57:21 +0000 (GMT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4D0243D55; Sun, 6 Jun 2004 19:57:20 -0700 (PDT) (envelope-from tim@kientzle.com) Received: from kientzle.com (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i572vJ90064456; Sun, 6 Jun 2004 19:57:20 -0700 (PDT) (envelope-from tim@kientzle.com) Message-ID: <40C3D977.3010900@kientzle.com> Date: Sun, 06 Jun 2004 19:56:55 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Evans References: <20040605053115.45AE416A585@hub.freebsd.org> <20040605000326.B54841@root.org> <40C22518.6060406@kientzle.com> <20040606143616.W2060@gamplex.bde.org> <40C2E401.5010400@freebsd.org> <20040606195023.M3004@gamplex.bde.org> In-Reply-To: <20040606195023.M3004@gamplex.bde.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: Tim Kientzle cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Nate Lawson Subject: Re: cvs commit: src/lib/libarchive archive_read_extract.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2004 02:57:21 -0000 Bruce Evans wrote: > On Sun, 6 Jun 2004, Tim Kientzle wrote: >>Bruce Evans wrote: >> >>>bsdtar cf z foo: >>> same, except bsdtar seems to be too smart about padding the output >>> to a block boundary for regular files, so subsequent piping of the >>> file might not work >> >>The default padding behavior for bsdtar was changed quite >>a while ago to not pad regular files; are you sure you're up-to-date? > > Yes; not padding is a bug and the above says that I have it. I've discussed padding issues with a number of people, and the following behavior seems acceptable to most. If you have reasons to disagree, please let me know: $ bsdtar cf z foo && ls -l z -rw-r--r-- 1 tim wheel 1536 Jun 6 17:16 z $ bsdtar cfb z 20 foo && ls -l z -rw-r--r-- 1 tim wheel 10240 Jun 6 17:16 z $ bsdtar cf - foo | cat > z && ls -l z -rw-r--r-- 1 tim wheel 10240 Jun 6 17:17 z That is, archives written to regular files are not padded unless you explicitly specify a block size. Archives written to pipes (or block or char devices) are padded. The same behavior applies to archives compressed via 'z', 'j', or 'y' options, as demonstrated here: $ bsdtar czf z foo && ls -l z -rw-r--r-- 1 tim wheel 126 Jun 6 17:25 z $ bsdtar czfb z 20 foo && ls -l z -rw-r--r-- 1 tim wheel 10240 Jun 6 17:25 z $ bsdtar czf - foo | cat > z && ls -l z -rw-r--r-- 1 tim wheel 10240 Jun 6 17:25 z (I just realized that padding when -b is explicitly specified is broken in -CURRENT; I'll commit the fix for that shortly.) >>>bsdtar cf z foo/: >> >>Here, bsdtar cf z foo/ does follow the symlink, which I >>presume you believe to be the correct behavior? > > Yes. foo/ is not a symlink (the slash forces folling the symlink) in the > kernel, so it should do so in utilities too. Good, then you agree that bsdtar does the right thing in this example. Tim