From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 9 15:40:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9500A1065677 for ; Wed, 9 Apr 2008 15:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5E48FC44 for ; Wed, 9 Apr 2008 15:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m39Fe2L5049155 for ; Wed, 9 Apr 2008 15:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m39Fe2Yd049154; Wed, 9 Apr 2008 15:40:02 GMT (envelope-from gnats) Resent-Date: Wed, 9 Apr 2008 15:40:02 GMT Resent-Message-Id: <200804091540.m39Fe2Yd049154@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Romain Tartiere Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54E68106566C for ; Wed, 9 Apr 2008 15:37:34 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.freebsd.org (Postfix) with ESMTP id 1B54B8FC18 for ; Wed, 9 Apr 2008 15:37:33 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 83B3817B5C5 for ; Wed, 9 Apr 2008 17:37:32 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 7151117B587 for ; Wed, 9 Apr 2008 17:37:32 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id 07EDB5C04C; Wed, 9 Apr 2008 17:37:32 +0200 (CEST) Message-Id: <20080409153732.07EDB5C04C@marvin.blogreen.org> Date: Wed, 9 Apr 2008 17:37:32 +0200 (CEST) From: Romain Tartiere To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/122600: [patch] Document tar -o option in c mode X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Romain Tartiere List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 15:40:02 -0000 >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: