Просмотр исходного кода

dpkg-source: Change default source package compressor for new formats to xz

This does not affect V1.0, which only supports gzip compression.
Guillem Jover лет назад: 12
Родитель
Сommit
62019c2756
4 измененных файлов с 5 добавлено и 4 удалено
  1. 1 0
      debian/changelog
  2. 2 2
      man/dpkg-source.1
  3. 1 1
      scripts/Dpkg/Compression.pm
  4. 1 1
      scripts/Dpkg/Source/Package.pm

+ 1 - 0
debian/changelog

@@ -37,6 +37,7 @@ dpkg (1.17.6) UNRELEASED; urgency=low
   * Set default compression options in source format specific modules instead
     of dpkg-source. This makes sure the correct compression level is set, even
     for “3.0 (native)” packages with non-default compressors. Closes: #733326
+  * Change default source package compressor for new formats (>= 2.0) to xz.
 
   [ Updated dpkg translations ]
   * Swedish (Peter Krefting).

+ 2 - 2
man/dpkg-source.1

@@ -167,8 +167,8 @@ 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 .
-\fIgzip\fP is the default. \fIxz\fP is only supported since
-dpkg 1.15.5.
+The default is \fIxz\fP for formats 2.0 and newer, and \fIgzip\fP for
+format 1.0. \fIxz\fP is only supported since dpkg 1.15.5.
 .TP
 .BR \-z "\fIlevel\fP, " \-\-compression\-level =\fIlevel\fP
 Compression level to use. As with \fB\-Z\fP it only affects newly created

+ 1 - 1
scripts/Dpkg/Compression.pm

@@ -76,7 +76,7 @@ my $COMP = {
 
 # XXX: Backwards compatibility, stop exporting on VERSION 2.00.
 ## no critic (Variables::ProhibitPackageVars)
-our $default_compression = 'gzip';
+our $default_compression = 'xz';
 our $default_compression_level = undef;
 
 my $regex = join '|', map { $_->{file_ext} } values %$COMP;

+ 1 - 1
scripts/Dpkg/Source/Package.pm

@@ -227,7 +227,7 @@ sub init_options {
     $self->{options}{skip_debianization} ||= 0;
 
     # Set default compressor for new formats.
-    $self->{options}{compression} //= 'gzip';
+    $self->{options}{compression} //= 'xz';
     $self->{options}{comp_level} //= compression_get_property($self->{options}{compression},
                                                               'default_level');
     $self->{options}{comp_ext} //= compression_get_property($self->{options}{compression},