From owner-freebsd-stable Thu Aug 8 23: 1:51 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E12137B400; Thu, 8 Aug 2002 23:01:47 -0700 (PDT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7C0C43E42; Thu, 8 Aug 2002 23:01:42 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.6/8.11.6) id g7961cN92156; Fri, 9 Aug 2002 08:01:38 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200208090601.g7961cN92156@zibbi.icomtek.csir.co.za> Subject: Re: Tar not following links now? In-Reply-To: <20020809053552.GA79890@blossom.cjclark.org> from "Crist J. Clark" at "Aug 8, 2002 10:35:52 pm" To: cjc@FreeBSD.ORG (Crist J. Clark) Date: Fri, 9 Aug 2002 08:01:38 +0200 (SAT) Cc: doconnor@gsoft.com.au (Daniel O'Connor), freebsd-stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Fri, Aug 09, 2002 at 11:12:47AM +0930, Daniel O'Connor wrote: > > I recently updated several machines to -stable (OpenSSL :) and found > > that tar nolonger seems to follow links. > > > > [cain 11:06] ~/projects/rrd >ls -lad /home > > lrwxr-xr-x 1 root wheel 9 Mar 15 12:26 /home -> /usr/home > > [cain 11:09] ~/projects/rrd >ls -lad /usr/home > > drwxr-xr-x 16 root wheel 512 Mar 28 10:05 /usr/home > > [cain 11:05] ~/projects/rrd >tar -Pcf - /home/ | tar -tvf - > > lrwxr-xr-x root/wheel 0 Mar 15 12:26 2002 /home -> /usr/home > > [cain 11:08] ~/projects/rrd >uname -a > > FreeBSD cain.gsoft.com.au 4.6-STABLE FreeBSD 4.6-STABLE #10: Tue Aug 6 11:49:28 CST 2002 doconnor@cain.gsoft.com.au:/usr/obj/usr/src/sys/CAIN i386 > > > > As opposed to my older system > > [chowder 11:10] ~ >ls -lad /home > > lrwx------ 1 root wheel 9 Aug 20 2001 /home -> /usr/home > > [chowder 11:10] ~ >ls -lad /usr/home > > drwxr-xr-x 4 root wheel 512 Jul 20 17:04 /usr/home > > [chowder 11:09] ~ >tar -Pcf - /home/ | tar -tvf - > > drwxr-xr-x root/wheel 0 Jul 20 17:04 2002 /home/ > > drwxr-xr-x radar/radar 0 Aug 9 10:35 2002 /home/radar/ > > [ .... ] > > [chowder 11:09] ~ >uname -a > > FreeBSD chowder.gsoft.com.au 4.6-PRERELEASE FreeBSD 4.6-PRERELEASE #12: Fri May 10 15:54:54 CST 2002 darius@chowder.gsoft.com.au:/usr/obj/usr/src/sys/CHOWDER i386 > > > > It seems like a bit of a POLA violation especially as the man page > > doesn't appear to mention and option to get the old behaviour back. > > The "new" behavior is the correct behavior. I'm not sure when or why > things were broken in your 4.6-PRERELEASE example. The option you want > is the '-h' option. That won't give the same behaviour. With the old tar, links inside wasn't followed by default. The problem is with the startpoint. With the old tar there was a difference between these two invocations if /home was a symlink: tar cf /dev/null /home tar cf /dev/null /home/ The first would just backup the symlink and the second would backup where /home points to. Symlinks inside of it would still not be replaced with their targets. John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message