From rmoen@valinux.com Wed Sep 05 13:42:11 2001
Return-path: <rmoen@valinux.com>
Envelope-to: rick@linuxmafia.com
Delivery-date: Wed, 05 Sep 2001 13:42:11 -0700
Received: from mail.valinux.com ([198.186.202.175] ident=mail)
	by uncle-enzo with esmtp (Exim 3.31 #1 (Debian))
	id 15ejUx-0006p9-00
	for <rick@linuxmafia.com>; Wed, 05 Sep 2001 13:42:11 -0700
Received: from alanine.hdqt.valinux.com ([10.5.5.10] ident=mail)
	by mail.valinux.com with esmtp (Exim 3.31-VA-mm2 #1 (Debian))
	id 15ejUH-0005Mj-00
	for <rick@linuxmafia.com>; Wed, 05 Sep 2001 13:41:29 -0700
Received: from rmoen by alanine.hdqt.valinux.com with local (Exim 3.12 #1 (Debian))
	id 15ejWc-0007Fo-00
	for <rick@linuxmafia.com>; Wed, 05 Sep 2001 13:43:54 -0700
Date: Wed, 5 Sep 2001 13:43:54 -0700
To: rick@linuxmafia.com
Subject: tar patch
Message-ID: <20010905134353.C2946@valinux.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
From: Rick Moen <rmoen@valinux.com>
Content-Length: 2080
Lines: 56


===============================================================================
patch by Hiroshi Takekawa to integrate bzip2 compression filter (option -I)

 - Clifford

--- src/tar.c.orig	Wed Jul  7 07:49:50 1999
+++ src/tar.c	Sun Jul 11 17:25:49 1999
@@ -16,6 +16,9 @@
    with this program; if not, write to the Free Software Foundation, Inc.,
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

+/* 13 Oct 97: patched by Hiroshi Takekawa to integrate bzip2 as
+              compression filter (option -I) */
+
 #include "system.h"

 #include <getopt.h>
@@ -164,6 +167,8 @@
   {"block-number", no_argument, NULL, 'R'},
   {"block-size", required_argument, NULL, OBSOLETE_BLOCKING_FACTOR},
   {"blocking-factor", required_argument, NULL, 'b'},
+  {"bzip2", required_argument, NULL, 'I'},
+  {"bunzip2", required_argument, NULL, 'I'},
   {"catenate", no_argument, NULL, 'A'},
   {"checkpoint", no_argument, &checkpoint_option, 1},
   {"compare", no_argument, NULL, 'd'},
@@ -340,6 +345,7 @@
               PATTERN                at list/extract time, a globbing
PATTERN\n\
   -o, --old-archive, --portability   write a V7 format archive\n\
       --posix                        write a POSIX conformant archive\n\
+  -I, --bzip2, --bunzip2             filter the archive through bzip2\n\
   -z, --gzip, --ungzip               filter the archive through gzip\n\
   -Z, --compress, --uncompress       filter the archive through compress\n\
       --use-compress-program=PROG    filter through PROG (must accept -d)\n"),
@@ -416,7 +422,7 @@
    Y  per-block gzip compression */

 #define OPTION_STRING \
-  "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz"
+  "-01234567ABC:F:GIK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz"

 static void
 set_subcommand_option (enum subcommand subcommand)
@@ -787,6 +793,10 @@
 	if (add_exclude_file (excluded, optarg, '\n') != 0)
 	  FATAL_ERROR ((0, errno, "%s", optarg));
 	break;
+
+      case 'I':
+	set_use_compress_program_option ("bzip2");
+  	break;

       case 'z':
 	set_use_compress_program_option ("gzip");

