Date: Wed, 9 Apr 2008 17:37:32 +0200 (CEST) From: Romain Tartiere <romain@blogreen.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/122600: [patch] Document tar -o option in c mode Message-ID: <20080409153732.07EDB5C04C@marvin.blogreen.org> Resent-Message-ID: <200804091540.m39Fe2Yd049154@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 122600 >Category: bin >Synopsis: [patch] Document tar -o option in c mode >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 09 15:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Romain Tartiere >Release: FreeBSD 7.0-STABLE i386 >Organization: >Environment: System: FreeBSD marvin.blogreen.org 7.0-STABLE FreeBSD 7.0-STABLE #12: Tue Mar 4 14:26:24 CET 2008 root@marvin.blogreen.org:/usr/obj/usr/src/sys/MARVIN i386 >Description: Although bsdtar man page tells ... | -o (x mode only) [SNIP] ... using -o in create mode is possible and has an impact on the generated tarball. >How-To-Repeat: > mkdir A > tar cvf 1.tar A a A > tar covf 2.tar A a A > md5 1.tar 2.tar MD5 (1.tar) = 7d829a3e65d463140258b1873641a5e1 MD5 (2.tar) = e6b7f9435cfb97ed0c93fac0893d9adc > >Fix: According to src/usr.bin/tar/bsdtar.c:599, bsdtar attempt to behave like GNU tar: 599 case 'c': 600 /* 601 * In GNU tar, -o means "old format." The 602 * "ustar" format is the closest thing 603 * supported by libarchive. 604 */ 605 bsdtar->create_format = "ustar"; 606 /* TODO: bsdtar->create_format = "v7"; */ 607 break; The following patch completes the documentation: --- patch-bsdtar.1 begins here --- --- /usr/src/usr.bin/tar/bsdtar.1 2008-02-11 00:24:16.000000000 +0100 +++ bsdtar.1 2008-04-09 17:27:14.000000000 +0200 @@ -282,8 +282,11 @@ In list (-t) mode, the file listing will be written to stderr rather than the usual stdout. .It Fl o -(x mode only) -Use the user and group of the user running the program rather +In c mode, attempt to be behave like GNU tar and create an old format +archive using the +.Dq ustar +format. +In x mode, use the user and group of the user running the program rather than those specified in the archive. Note that this has no significance unless .Fl p --- patch-bsdtar.1 ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080409153732.07EDB5C04C>