Package: dpkg
Version: 1.15.5.1
Severity: wishlist

Lzip is a lossless data compressor based on the LZMA algorithm, with very safe integrity checking and a user interface similar to the one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses better than bzip2, which makes it well suited for software distribution and data archiving.

The lzip file format (.lz) is an improved successor of the lzma_alone file format (.lzma), providing magic bytes and integrity checking. Software tools that (de)compress both formats or can convert lzma_alone files to lzip format are listed in the Links section of http://www.nongnu.org/lzip/lzip.html.

Lzip is stable, distributed by many GNU/Linux distributions (including Debian) and used to distribute software from ftp.gnu.org.

Best regards,
Antonio.
diff -urdN dpkg-1.15.5.1/debian/control dpkg-1.15.5.1.new/debian/control
--- dpkg-1.15.5.1/debian/control	2009-11-17 08:18:00.000000000 +0100
+++ dpkg-1.15.5.1.new/debian/control	2009-11-18 13:50:00.000000000 +0100
@@ -39,7 +39,7 @@
 Section: utils
 Priority: optional
 Architecture: all
-Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, lzma, xz-utils,
+Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, lzip, lzma, xz-utils,
  patch (>= 2.2-1), make, binutils, libtimedate-perl, base-files (>= 5.0.0)
 Recommends: gcc | c-compiler, build-essential, fakeroot, gnupg, gpgv
 Suggests: debian-keyring, debian-maintainers
diff -urdN dpkg-1.15.5.1/dpkg-deb/build.c dpkg-1.15.5.1.new/dpkg-deb/build.c
--- dpkg-1.15.5.1/dpkg-deb/build.c	2009-11-17 08:18:00.000000000 +0100
+++ dpkg-1.15.5.1.new/dpkg-deb/build.c	2009-11-18 13:50:00.000000000 +0100
@@ -542,6 +542,9 @@
     case compress_type_bzip2:
       datamember = DATAMEMBER_BZ2;
       break;
+    case compress_type_lzip:
+      datamember = DATAMEMBER_LZ;
+      break;
     case compress_type_lzma:
       datamember = DATAMEMBER_LZMA;
       break;
diff -urdN dpkg-1.15.5.1/dpkg-deb/dpkg-deb.h dpkg-1.15.5.1.new/dpkg-deb/dpkg-deb.h
--- dpkg-1.15.5.1/dpkg-deb/dpkg-deb.h	2009-11-17 08:18:00.000000000 +0100
+++ dpkg-1.15.5.1.new/dpkg-deb/dpkg-deb.h	2009-11-18 13:59:11.000000000 +0100
@@ -59,6 +59,8 @@
 #define DATAMEMBER_COMPAT_GZ	"data.tar.gz/    "
 #define DATAMEMBER_BZ2   	"data.tar.bz2    "
 #define DATAMEMBER_COMPAT_BZ2  	"data.tar.bz2/   "
+#define DATAMEMBER_LZ   	"data.tar.lz     "
+#define DATAMEMBER_COMPAT_LZ  	"data.tar.lz/    "
 #define DATAMEMBER_LZMA		"data.tar.lzma   "
 #define DATAMEMBER_COMPAT_LZMA	"data.tar.lzma/  "
 #define DATAMEMBER_CAT   	"data.tar        "
diff -urdN dpkg-1.15.5.1/dpkg-deb/extract.c dpkg-1.15.5.1.new/dpkg-deb/extract.c
--- dpkg-1.15.5.1/dpkg-deb/extract.c	2009-11-17 08:18:00.000000000 +0100
+++ dpkg-1.15.5.1.new/dpkg-deb/extract.c	2009-11-18 13:50:00.000000000 +0100
@@ -181,6 +181,10 @@
 		     !memcmp(arh.ar_name,DATAMEMBER_COMPAT_BZ2,sizeof(arh.ar_name))) {
 	    adminmember= 0;
 	    compress_type = compress_type_bzip2;
+	  } else if (!memcmp(arh.ar_name,DATAMEMBER_LZ,sizeof(arh.ar_name)) ||
+		     !memcmp(arh.ar_name,DATAMEMBER_COMPAT_LZ,sizeof(arh.ar_name))) {
+	    adminmember= 0;
+	    compress_type = compress_type_lzip;
 	  } else if (!memcmp(arh.ar_name, DATAMEMBER_LZMA, sizeof(arh.ar_name)) ||
 		     !memcmp(arh.ar_name, DATAMEMBER_COMPAT_LZMA, sizeof(arh.ar_name))) {
 	    adminmember = 0;
diff -urdN dpkg-1.15.5.1/dpkg-deb/main.c dpkg-1.15.5.1.new/dpkg-deb/main.c
--- dpkg-1.15.5.1/dpkg-deb/main.c	2009-11-17 08:18:00.000000000 +0100
+++ dpkg-1.15.5.1.new/dpkg-deb/main.c	2009-11-18 14:07:03.000000000 +0100
@@ -105,7 +105,8 @@
 "                                     packages).\n"
 "  -z#                              Set the compression level when building.\n"
 "  -Z<type>                         Set the compression type used when building.\n"
-"                                     Allowed values: gzip, bzip2, lzma, none.\n"
+"                                     Allowed values: gzip, bzip2, lzip, lzma,\n"
+"                                                     none.\n"
 "\n"));
 
   printf(_(
@@ -197,6 +198,8 @@
     compress_type = compress_type_gzip;
   else if (!strcmp(value, "bzip2"))
     compress_type = compress_type_bzip2;
+  else if (!strcmp(value, "lzip"))
+    compress_type = compress_type_lzip;
   else if (!strcmp(value, "lzma"))
     compress_type = compress_type_lzma;
   else if (!strcmp(value, "none"))
diff -urdN dpkg-1.15.5.1/lib/dpkg/compression.c dpkg-1.15.5.1.new/lib/dpkg/compression.c
--- dpkg-1.15.5.1/lib/dpkg/compression.c	2009-11-17 08:18:01.000000000 +0100
+++ dpkg-1.15.5.1.new/lib/dpkg/compression.c	2009-11-18 13:50:00.000000000 +0100
@@ -111,6 +111,8 @@
 #else
       fd_fd_filter(fd_in, fd_out, BZIP2, "bzip2", "-dc", v.buf);
 #endif
+    case compress_type_lzip:
+      fd_fd_filter(fd_in, fd_out, LZIP, "lzip", "-dc", v.buf);
     case compress_type_lzma:
       fd_fd_filter(fd_in, fd_out, LZMA, "lzma", "-dc", v.buf);
     case compress_type_cat:
@@ -208,6 +210,10 @@
       combuf[1]= *compression;
       fd_fd_filter(fd_in, fd_out, BZIP2, "bzip2", combuf, v.buf);
 #endif
+    case compress_type_lzip:
+      strncpy(combuf, "-9c", sizeof(combuf));
+      combuf[1]= *compression;
+      fd_fd_filter(fd_in, fd_out, LZIP, "lzip", combuf, v.buf);
     case compress_type_lzma:
       strncpy(combuf, "-9c", sizeof(combuf));
       combuf[1] = *compression;
diff -urdN dpkg-1.15.5.1/lib/dpkg/dpkg.h dpkg-1.15.5.1.new/lib/dpkg/dpkg.h
--- dpkg-1.15.5.1/lib/dpkg/dpkg.h	2009-11-17 08:18:01.000000000 +0100
+++ dpkg-1.15.5.1.new/lib/dpkg/dpkg.h	2009-11-18 13:50:00.000000000 +0100
@@ -108,6 +108,7 @@
 #define TAR		"tar"
 #define GZIP		"gzip"
 #define BZIP2		"bzip2"
+#define LZIP		"lzip"
 #define LZMA		"lzma"
 #define RM		"rm"
 #define FIND		"find"
@@ -218,6 +219,7 @@
   compress_type_cat,
   compress_type_gzip,
   compress_type_bzip2,
+  compress_type_lzip,
   compress_type_lzma,
 };
 
diff -urdN dpkg-1.15.5.1/man/deb.5 dpkg-1.15.5.1.new/man/deb.5
--- dpkg-1.15.5.1/man/deb.5	2009-11-17 08:18:01.000000000 +0100
+++ dpkg-1.15.5.1.new/man/deb.5	2009-11-18 14:03:39.000000000 +0100
@@ -1,4 +1,4 @@
-.TH deb 5 "2009-02-27" "Debian Project" "Debian"
+.TH deb 5 "2009-11-18" "Debian Project" "Debian"
 .SH NAME
 deb \- Debian binary package format
 .SH SYNOPSIS
@@ -56,7 +56,8 @@
 It contains the filesystem as a tar archive, either
 not compressed (supported since dpkg 1.10.24), or compressed with
 gzip (with \fB.gz\fP extension),
-bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24) or
+bzip2 (with \fB.bz2\fP extension, supported since dpkg 1.10.24),
+lzip (with \fB.lz\fP extension, supported since dpkg 1.15.6) or
 lzma (with \fB.lzma\fP extension, supported since dpkg 1.13.25).
 .PP
 These members must occur in this exact order. Current implementations
diff -urdN dpkg-1.15.5.1/man/dpkg-deb.1 dpkg-1.15.5.1.new/man/dpkg-deb.1
--- dpkg-1.15.5.1/man/dpkg-deb.1	2009-11-17 08:18:01.000000000 +0100
+++ dpkg-1.15.5.1.new/man/dpkg-deb.1	2009-11-18 13:50:00.000000000 +0100
@@ -1,4 +1,4 @@
-.TH dpkg\-deb 1 "2009-01-07" "Debian Project" "dpkg suite"
+.TH dpkg\-deb 1 "2009-11-18" "Debian Project" "dpkg suite"
 .SH NAME
 dpkg\-deb \- Debian package archive (.deb) manipulation tool
 .
@@ -194,8 +194,8 @@
 .TP
 .BI \-Z compress_type
 Specify which compression type to use when building a package. Allowed
-values are \fIgzip\fP, \fIbzip2\fP, \fIlzma\fP, and \fInone\fP (default
-is \fIgzip\fP).
+values are \fIgzip\fP, \fIbzip2\fP, \fIlzip\fP, \fIlzma\fP, and \fInone\fP
+(default is \fIgzip\fP).
 .TP
 .BR \-\-new
 Ensures that
diff -urdN dpkg-1.15.5.1/man/dpkg-source.1 dpkg-1.15.5.1.new/man/dpkg-source.1
--- dpkg-1.15.5.1/man/dpkg-source.1	2009-11-17 10:03:39.000000000 +0100
+++ dpkg-1.15.5.1.new/man/dpkg-source.1	2009-11-18 13:59:11.000000000 +0100
@@ -1,5 +1,5 @@
 .\" Authors: Ian Jackson, Raphael Hertzog
-.TH dpkg\-source 1 "2009-11-11" "Debian Project" "dpkg utilities"
+.TH dpkg\-source 1 "2009-11-18" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-source \- Debian source package (.dsc) manipulation tool
 .
@@ -120,7 +120,7 @@
 Specify the compression to use for created files (tarballs and diffs).
 Note that this option will not cause existing tarballs to be recompressed,
 it only affects new files. Supported values are:
-.IR gzip ", " bzip2 ", " lzma " and " xz .
+.IR gzip ", " bzip2 ", " lzip ", " lzma " and " xz .
 \fIgzip\fP is the default. \fIxz\fP is only supported since
 dpkg-dev 1.15.5.
 .TP
@@ -363,7 +363,7 @@
 .SS Format: 3.0 (quilt)
 A source package in this format contains at least
 an original tarball (\fB.orig.tar.\fP\fIext\fP where \fIext\fP can be
-\fBgz\fP, \fBbz2\fP, \fBlzma\fP and \fBxz\fP) and a debian tarball
+\fBgz\fP, \fBbz2\fP, \fBlz\fP, \fBlzma\fP and \fBxz\fP) and a debian tarball
 (\fB.debian.tar.\fP\fIext\fP). It can also contain additional original
 tarballs (\fB.orig-\fP\fIcomponent\fP\fB.tar.\fP\fIext\fP).
 \fIcomponent\fP can only contain alphanumeric characters and dashes ("-").
diff -urdN dpkg-1.15.5.1/scripts/Dpkg/Compression.pm dpkg-1.15.5.1.new/scripts/Dpkg/Compression.pm
--- dpkg-1.15.5.1/scripts/Dpkg/Compression.pm	2009-11-17 08:18:01.000000000 +0100
+++ dpkg-1.15.5.1.new/scripts/Dpkg/Compression.pm	2009-11-18 13:50:00.000000000 +0100
@@ -21,14 +21,15 @@
 		 %comp_prog %comp_decomp_prog
 		 get_compression_from_filename);
 
-our @comp_supported = qw(gzip bzip2 lzma xz);
+our @comp_supported = qw(gzip bzip2 lzip lzma xz);
 our %comp_supported = map { $_ => 1 } @comp_supported;
-our %comp_ext = (gzip => 'gz', bzip2 => 'bz2', lzma => 'lzma', xz => 'xz');
-our $comp_regex = '(?:gz|bz2|lzma|xz)';
-our %comp_prog = (gzip => 'gzip', bzip2 => 'bzip2', lzma => 'lzma',
-		  xz => 'xz');
-our %comp_decomp_prog = (gzip => 'gunzip', bzip2 => 'bunzip2', lzma => 'unlzma',
-			 xz => 'unxz');
+our %comp_ext = (gzip => 'gz', bzip2 => 'bz2', lzip => 'lz', lzma => 'lzma',
+                 xz => 'xz');
+our $comp_regex = '(?:gz|bz2|lz|lzma|xz)';
+our %comp_prog = (gzip => 'gzip', bzip2 => 'bzip2', lzip => 'lzip',
+		  lzma => 'lzma', xz => 'xz');
+our %comp_decomp_prog = (gzip => 'gunzip', bzip2 => 'bunzip2',
+			 lzip => 'lzip -d', lzma => 'unlzma', xz => 'unxz');
 
 sub get_compression_from_filename {
     my $filename = shift;

Reply via email to