Subject: Re: do we really have to "break" 'tar -o' *again*?!?!
To: NetBSD-current Discussion List <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 02/07/1999 17:56:30
[ On Saturday, February 6, 1999 at 19:39:18 (-0500), Todd Vierling wrote: ]
> Subject: Re: do we really have to "break" 'tar -o' *again*?!?!
> I'm going to make -o do the following:
> - write V7 format archives (which, though part of GNU tar, actually
> goes along with the following point--after all, old pax-as-tar created
> V7 archives by default);
> - write archives with "write_opt=nodir", as pax already did, and as
> specified by 4.2BSD;
> - extract archives with owner/group set to invoking user, as specified
> by SUS.
> This should make everyone happy.
It looks OK, i.e. it looks as though it will work as expected, though
I'm not sure it's best to change the way "frmt' is set. I think the
original setting of "frmt" conditional only on whether or not the action
was to create an archive or not is more correct. I.e. the original code
almost did the correct thing and did not need to be changed in this
Note also that the setting of "write_opt=nodir" doesn't need to be
protected by "if (act == ARCHIVE)", and isn't quite correct either since
it should be "if (act == ARCHIVE || act == APPND)" -- best to centralize
this test in tar_opt() as it is already there. [I'm not sure what to do
about the setting of "frmt" if "act" is APPND though -- maybe that
should be done too.]
BTW, your comments w.r.t. 4.xBSD and V7 formats are backwards as I
understand the history of the tar format. In 4.4BSD pax the F_TAR
format is actually 4.xBSD tar compatible, and the omission of directory
entries from the archive is what's necessary to create V7 compatible
archives. See John Gilmore's original PDTAR release for more info.
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>