bin/121519: [patch]: gunzip(1) should also support ".tbz" suffix (used by ports' packages)

Ighighi ighighi at gmail.com
Sun Mar 9 13:20:01 UTC 2008


>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:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 09 13:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list