From romain@blogreen.org  Wed Apr  9 15:37:34 2008
Return-Path: <romain@blogreen.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54E68106566C
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <romain@blogreen.org>
Reply-To: Romain Tartiere <romain@blogreen.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] Document tar -o option in c mode
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         122600
>Category:       bin
>Synopsis:       [patch] bsdtar(1): Document tar -o option in c mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kientzle
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 09 15:40:01 UTC 2008
>Closed-Date:    Wed Aug 13 06:35:58 UTC 2008
>Last-Modified:  Wed Aug 13 06:35:58 UTC 2008
>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:
Responsible-Changed-From-To: freebsd-bugs->kientzle 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu May 1 06:22:32 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122600 
State-Changed-From-To: open->closed 
State-Changed-By: kientzle 
State-Changed-When: Wed Aug 13 06:35:18 UTC 2008 
State-Changed-Why:  
Fixed in -CURRENT, 7-STABLE, and 6-STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=122600 
>Unformatted:
