Browse Source

Dpkg::Compression: add support for xz compression method

Update the dpkg-source manual page accordingly.
Raphaël Hertzog 16 years ago
parent
commit
f8270519a6
4 changed files with 14 additions and 9 deletions
  1. 2 0
      debian/changelog
  2. 1 1
      debian/control
  3. 4 3
      man/dpkg-source.1
  4. 7 5
      scripts/Dpkg/Compression.pm

+ 2 - 0
debian/changelog

@@ -53,6 +53,8 @@ dpkg (1.15.5) UNRELEASED; urgency=low
   * Integrate dpkg-multicd into dselect. Add the required Replaces and
     Conflicts. The dpkg-scanpackages fork is dropped. Closes: #516631
   * Fix bashisms in dselect multicd access method. Closes: #530070
+  * Add support of "xz" compression method for source packages. Add dependency
+    dpkg-dev → xz-utils to ensure xz and unxz are available.
 
   [ Updated dpkg translations ]
   * Czech (Miroslav Kure).

+ 1 - 1
debian/control

@@ -40,7 +40,7 @@ Package: dpkg-dev
 Section: utils
 Priority: optional
 Architecture: all
-Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, lzma,
+Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, 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

+ 4 - 3
man/dpkg-source.1

@@ -114,8 +114,9 @@ Remove an output control file field.
 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 ", and " lzma .
-\fIgzip\fP is the default.
+.IR gzip ", " bzip2 ", " lzma " and " xz .
+\fIgzip\fP is the default. \fIxz\fP is only supported since
+dpkg-dev 1.15.5.
 .TP
 .BR \-z \fIlevel\fP
 Compression level to use. As with \fB\-Z\fP it only affects newly created
@@ -351,7 +352,7 @@ as well as many temporary files (see default value associated to
 .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 and \fBlzma\fP) and a debian tarball
+\fBgz\fP, \fBbz2\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 ("-").

+ 7 - 5
scripts/Dpkg/Compression.pm

@@ -8,12 +8,14 @@ our @EXPORT = qw(@comp_supported %comp_supported %comp_ext $comp_regex
 		 %comp_prog %comp_decomp_prog
 		 get_compression_from_filename);
 
-our @comp_supported = qw(gzip bzip2 lzma);
+our @comp_supported = qw(gzip bzip2 lzma xz);
 our %comp_supported = map { $_ => 1 } @comp_supported;
-our %comp_ext = (gzip => 'gz', bzip2 => 'bz2', lzma => 'lzma');
-our $comp_regex = '(?:gz|bz2|lzma)';
-our %comp_prog = (gzip => 'gzip', bzip2 => 'bzip2', lzma => 'lzma');
-our %comp_decomp_prog = (gzip => 'gunzip', bzip2 => 'bunzip2', lzma => 'unlzma');
+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');
 
 sub get_compression_from_filename {
     my $filename = shift;