From nobody@FreeBSD.org  Sun Mar  9 13:12:03 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A3131065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  9 Mar 2008 13:12:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 123628FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  9 Mar 2008 13:12:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m29D8rlc032307
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 9 Mar 2008 13:08:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m29D8rcs032306;
	Sun, 9 Mar 2008 13:08:53 GMT
	(envelope-from nobody)
Message-Id: <200803091308.m29D8rcs032306@www.freebsd.org>
Date: Sun, 9 Mar 2008 13:08:53 GMT
From: Ighighi <ighighi@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch]: gunzip(1) should also support ".tbz" suffix (used by ports' packages)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         121519
>Category:       bin
>Synopsis:       [patch]: gunzip(1) should also support ".tbz" suffix (used by ports' packages)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rwatson
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 09 13:20:00 UTC 2008
>Closed-Date:    Wed Mar 12 11:41:00 UTC 2008
>Last-Modified:  Wed Mar 12 11:41:00 UTC 2008
>Originator:     Ighighi
>Release:        6.3-STABLE
>Organization:
>Environment:
FreeBSD orion 6.3-STABLE FreeBSD 6.3-STABLE #0: Mon Mar  3 04:45:31 VET 2008     root@orion:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
BSD gunzip(1) should also support the ".tbz" suffix just as it does with
".tar.bz2" and ".tgz".  This is even more relevant because binary packages are
available as ".tbz" and no one expects the following error:

gunzip: bash.tbz: unknown suffix -- ignored
>How-To-Repeat:
cd /tmp
fetch -a ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/Latest/bash.tbz
gunzip bash.tbz
>Fix:
Attached patch adds support for both ".tbz" & ".tbz2"

Patch attached with submission follows:

--- src/usr.bin/gzip/gzip.c.orig	2007-08-06 18:50:26.000000000 -0400
+++ src/usr.bin/gzip/gzip.c	2007-08-07 18:21:14.138889830 -0400
@@ -133,6 +133,8 @@ static suffixes_t suffixes[] = {
 	SUFFIX(".tgz",		".tar"),
 #ifndef NO_BZIP2_SUPPORT
 	SUFFIX(BZ2_SUFFIX,	""),
+	SUFFIX(".tbz",		".tar"),
+	SUFFIX(".tbz2",		".tar"),
 #endif
 #ifndef NO_COMPRESS_SUPPORT
 	SUFFIX(Z_SUFFIX,	""),


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Sun Mar 9 13:34:21 UTC 2008 
Responsible-Changed-Why:  
Grab ownership of PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121519 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/121519: commit references a PR
Date: Sun,  9 Mar 2008 13:49:16 +0000 (UTC)

 rwatson     2008-03-09 13:49:09 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.bin/gzip         gzip.c 
   Log:
   Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
   its existing understanding that .tgz uncompresses to .tar.
   
   MFC after:      3 days
   PR:             121519
   Submitted by:   Ighighi <ighighi at gmail.com>
   
   Revision  Changes    Path
   1.6       +2 -0      src/usr.bin/gzip/gzip.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: rwatson 
State-Changed-When: Sun Mar 9 14:07:02 UTC 2008 
State-Changed-Why:  
Transition to patched until MFC'd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121519 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/121519: commit references a PR
Date: Wed, 12 Mar 2008 11:29:56 +0000 (UTC)

 rwatson     2008-03-12 11:29:47 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     usr.bin/gzip         gzip.c 
   Log:
   Merge gzip.c:1.6 from HEAD to RELENG_7:
   
     Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
     its existing understanding that .tgz uncompresses to .tar.
   
     PR:             121519
     Submitted by:   Ighighi <ighighi at gmail.com>
   
   Revision  Changes    Path
   1.4.2.1   +2 -0      src/usr.bin/gzip/gzip.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/121519: commit references a PR
Date: Wed, 12 Mar 2008 11:34:30 +0000 (UTC)

 rwatson     2008-03-12 11:34:26 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     usr.bin/gzip         gzip.c 
   Log:
   Merge gzip.c:1.6 from HEAD to RELENG_7:
   
     Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
     its existing understanding that .tgz uncompresses to .tar.
   
     PR:             121519
     Submitted by:   Ighighi <ighighi at gmail.com>
   
   Revision  Changes    Path
   1.2.2.4   +2 -0      src/usr.bin/gzip/gzip.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: rwatson 
State-Changed-When: Wed Mar 12 11:40:39 UTC 2008 
State-Changed-Why:  
Patch has now been applied to FreeBSD 7.x and FreeBSD 6.x.  Thanks for 
the submission! 

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