I started using lzop, and it has been icnredibly nice for massive
source compilations, the decompression time is fast, speeding up
installation time.

However, there is extra work I had to do that tar+bzip2 and tar+gzip
have spoiled me.
So, I added tar+lzo support (via the lzop program)

below and attatched is the patch to make this happen, against
tar-1.16.1, but should work with some olderones

Submitted By:            Kevin Day <kevin AT kevux DOT org>
Date:                    2006-12-30
Initial Package Version: 1.16.1
Upstream Status:         Submitted upstream
Origin:                  Wanted to do tar -xf on lzo files (.tar.lzo)
Description:             Add support for lzo/lzop decompression
http://www.oberhumer.com/opensource/lzo/
http://www.lzop.org/

--- tar-1.16.1/src/buffer.c.orig        2006-12-30 10:40:59.000000000 -0600
+++ tar-1.16.1/src/buffer.c     2006-12-30 11:54:33.000000000 -0600
@@ -196,7 +196,8 @@
  ct_none,
  ct_compress,
  ct_gzip,
-  ct_bzip2
+  ct_bzip2,
+  ct_lzop
};

struct zip_magic
@@ -213,6 +214,7 @@
  { ct_compress, 2, "\037\235", "compress", "-Z" },
  { ct_gzip,     2, "\037\213", "gzip", "-z"  },
  { ct_bzip2,    3, "BZh",      "bzip2", "-j" },
+  { ct_lzop,     4, "\211LZO",  "lzop", "-q" },
};

#define NMAGIC (sizeof(magic)/sizeof(magic[0]))
--- tar-1.16.1/src/tar.c.orig   2006-12-30 10:41:04.000000000 -0600
+++ tar-1.16.1/src/tar.c        2006-12-30 12:06:10.000000000 -0600
@@ -572,6 +572,8 @@
   N_("create archive with volume name TEXT; at list/extract time,
use TEXT as a globbing pattern for volume name"), GRID+8 },
  {"bzip2", 'j', 0, 0,
   N_("filter the archive through bzip2"), GRID+8 },
+  {"lzop", 'q', 0, 0,
+   N_("filter the archive through lzop"), GRID+8 },
  {"gzip", 'z', 0, 0,
   N_("filter the archive through gzip"), GRID+8 },
  {"gunzip", 0, 0, OPTION_ALIAS, NULL, GRID+8 },
@@ -1340,6 +1342,10 @@
      absolute_names_option = true;
      break;

+    case 'q':
+      set_use_compress_program_option ("lzop");
+      break;
+
    case 'r':
      set_subcommand_option (APPEND_SUBCOMMAND);
      break;


--
Kevin Day

Attachment: tar-1.16.1-lzop_support-1.patch
Description: Binary data

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to