Re: linux-kernel-digest V1 #1483

Timothy Murphy (tim@maths.tcd.ie)
Wed, 14 Jan 1998 16:11:03 +0000 (GMT)


>
> Does anyone out there have kernel patch that will allow for
> bzip2ed ramdisk images, specifically for 2.0.3x? I haven't seen any up
> on any of the main patch sites and just can't squeeze enough on my
> current boot/root disk :-).

I caught a very short patch to tar-1.12 recently,
allowing "y" switch for bz2 in place of "z" for gz.

Unfortunately I didn't note where I got the patch,
but it is so short I think I can give it here.
I've been using it quite a lot, and it seems to work perfectly.

=====================================
diff -cr tar-1.12/src/common.h tar-1.12-patched/src/common.h
*** tar-1.12/src/common.h Tue Apr 22 08:31:03 1997
--- tar-1.12-patched/src/common.h Mon Jan 5 23:46:35 1998
***************
*** 147,152 ****
--- 147,155 ----
/* Specified name of compression program, or "gzip" as implied by -z. */
GLOBAL const char *use_compress_program_option;

+ /* Boolean value. */
+ GLOBAL int guess_compress_program;
+
/* Boolean value. */
GLOBAL int dereference_option;

diff -cr tar-1.12/src/tar.c tar-1.12-patched/src/tar.c
*** tar-1.12/src/tar.c Fri Apr 25 22:09:49 1997
--- tar-1.12-patched/src/tar.c Tue Jan 6 00:27:39 1998
***************
*** 196,201 ****
--- 196,203 ----
{"block-number", no_argument, NULL, 'R'},
{"block-size", required_argument, NULL, OBSOLETE_BLOCKING_FACTOR},
{"blocking-factor", required_argument, NULL, 'b'},
+ {"bunzip", no_argument, NULL, 'y'},
+ {"bzip", no_argument, NULL, 'y'},
{"catenate", no_argument, NULL, 'A'},
{"checkpoint", no_argument, &checkpoint_option, 1},
{"compare", no_argument, NULL, 'd'},
***************
*** 372,377 ****
--- 374,380 ----
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\
+ -y --bzip, --bunzip filter the archive through bzip\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"),
***************
*** 448,454 ****
Y per-block gzip compression */

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

static void
set_subcommand_option (enum subcommand subcommand)
--- 451,457 ----
Y per-block gzip compression */

#define OPTION_STRING \
! "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxyz"

static void
set_subcommand_option (enum subcommand subcommand)
***************
*** 805,810 ****
--- 808,817 ----
case 'X':
exclude_option = 1;
add_exclude_file (optarg);
+ break;
+
+ case 'y':
+ set_use_compress_program_option ("bzip2");
break;

case 'z':
=====================================