The branch, master has been updated
       via  7501463cb3246aedf9f3fd5ca7aeef6e02a55029 (commit)
       via  272923321621f4b56819d7d6b3e8f540251894f6 (commit)
       via  e0bed2f58be27b3b6ac4c1ba1fa16a2d3fbb69bf (commit)
       via  8fb708682912a1acf35d42881117fa83fa06e054 (commit)
       via  ebd00d9ca3a5aaf26a3ea0849c149a12170083c1 (commit)
       via  45e67aefbea3432e5eedb4452427278684e11286 (commit)
       via  82ff1e6c9e430e12ef903b34c5dee855177bee1f (commit)
       via  25b0ed59068e957fa86d7ce83d0d2724a12f7e32 (commit)
      from  bb55e03a2d4637e7ecfb948b4b0a7e1e043b8cbb (commit)


- Shortlog ------------------------------------------------------------
7501463 Merge changelogs from my dpkg-source branch
2729233 dpkg-buildpackage.1: Document all options only passed to dpkg-source
e0bed2f dpkg-buildpackage: Add -z/-Z to passthrough opts
8fb7086 dpkg-source.1: Document -Z and -z
ebd00d9 dpkg-source: Change -C option to -Z and support -z, too
45e67ae dpkg-source: Support a subset of wig&pen on build
82ff1e6 dpkg-source: use English
25b0ed5 debian/rules: Call $(MAKE) check during build

Summary of changes:
 ChangeLog                    |   14 ++++
 debian/changelog             |    6 ++
 debian/rules                 |    1 +
 man/ChangeLog                |    8 ++
 man/dpkg-buildpackage.1      |    8 ++
 man/dpkg-source.1            |   13 ++++
 scripts/dpkg-buildpackage.pl |    8 ++-
 scripts/dpkg-source.pl       |  160 +++++++++++++++++++++++++++---------------
 8 files changed, 159 insertions(+), 59 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 7501463cb3246aedf9f3fd5ca7aeef6e02a55029
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Tue Oct 9 00:44:52 2007 +0200

    Merge changelogs from my dpkg-source branch

diff --git a/ChangeLog b/ChangeLog
index 8b9fa46..c2d87f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-10-09  Frank Lichtenheld  <[EMAIL PROTECTED]>
+
+       * scripts/dpkg-buildpackage.pl: Add -z/-Z to
+       passthrough opts (will be passed to dpkg-source).
+
+       * scripts/dpkg-source.pl: Support a subset of
+       wig&pen (aka Format: 2.0) on build:
+       Use .orig.tar.(bz2|lzma) if they are available
+       and no .gz can be found. Also let the user specify
+       via -Z(gz|bz2|lzma) how files that need to be
+       generated should be compressed. -z([1-9]|best|fast)
+       can be used to specify the compression level
+       to use.
+
 2007-10-08  Raphael Hertzog  <[EMAIL PROTECTED]>,
            Frank Lichtenheld <[EMAIL PROTECTED]>
 
@@ -55,11 +69,6 @@
        fakeroot only if it's available.
 
 2007-10-07  Frank Lichtenheld  <[EMAIL PROTECTED]>
-
-       * scripts/dpkg-buildpackage.pl: Add -z/-Z to
-       passthrough opts (will be passed to dpkg-source).
-
-2007-10-07  Frank Lichtenheld  <[EMAIL PROTECTED]>
            Marcel Toele  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-source.pl (handleformat): Include
@@ -67,17 +76,6 @@
        the filename contains spaces. Apparantly this is
        standard but undocumented diff behaviour.
 
-2007-10-06  Frank Lichtenheld  <[EMAIL PROTECTED]>
-
-       * scripts/dpkg-source.pl: Support a subset of
-       wig&pen (aka Format: 2.0) on build:
-       Use .orig.tar.(bz2|lzma) if they are available
-       and no .gz can be found. Also let the user specify
-       via -Z(gz|bz2|lzma) how files that need to be
-       generated should be compressed. -z([1-9]|best|fast)
-       can be used to specify the compression level
-       to use.
-
 2007-09-29  Frank Lichtenheld  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-buildpackage.pl: Call checkversion()
diff --git a/debian/changelog b/debian/changelog
index 7918008..ab74c0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,9 @@ dpkg (1.14.8) UNRELEASED; urgency=low
 
   [ Frank Lichtenheld ]
   * Add $(MAKE) check to build target
+  * Allow to use other compressions than gzip on dpkg-source -b
+    (NOTE: this will result in a Format: 2.0 source package!).
+    Closes: #382673
 
   [ Updated dpkg translations ]
   * Polish (Robert Luberda).
@@ -102,9 +105,6 @@ dpkg (1.14.7) unstable; urgency=low
   * Fix dpkg-source to create correct diffs for files with spaces in
     their name (apparantly we don't have many of those ;).
     Based on a patch by Marcel Toele. Closes: #445380
-  * Allow to use other compressions than gzip on dpkg-source -b
-    (NOTE: this will result in a Format: 2.0 source package!).
-    Closes: #382673
 
   [ Updated dpkg translations ]
   * Basque (Piarres Beobide). Closes: #440859

commit 272923321621f4b56819d7d6b3e8f540251894f6
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Sun Oct 7 21:58:04 2007 +0200

    dpkg-buildpackage.1: Document all options only passed to dpkg-source
    
    -s[nsAkurKUR], -z, and -Z were missing.

diff --git a/man/ChangeLog b/man/ChangeLog
index 2487b67..05c4e4e 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,5 +1,9 @@
 2007-10-09  Frank Lichtenheld  <[EMAIL PROTECTED]>
        
+       * dpkg-buildpackage.1: Document all
+       options only passed to dpkg-source.
+       -s[nsAkurKUR], -z, and -Z were missing.
+
        * dpkg-source.1: Document -Z and -z.
 
 2007-10-08  Robert Luberda  <[EMAIL PROTECTED]>
diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.1
index 986718d..d53a52e 100644
--- a/man/dpkg-buildpackage.1
+++ b/man/dpkg-buildpackage.1
@@ -178,6 +178,14 @@ Passed unchanged to
 .BR dpkg\-source .
 May be repeated multiple times.
 .TP
+.BR \-s [ nsAkurKUR ]
+Passed unchanged to
+.BR dpkg\-source .
+.TP
+.BR \-z ", " \-Z
+Passed unchanged to
+.BR dpkg\-source .
+.TP
 .BI \-\-admindir= dir
 Change the location of the \fBdpkg\fR database. The default location is
 \fI/var/lib/dpkg\fP.

commit e0bed2f58be27b3b6ac4c1ba1fa16a2d3fbb69bf
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Sun Oct 7 21:50:37 2007 +0200

    dpkg-buildpackage: Add -z/-Z to passthrough opts

diff --git a/ChangeLog b/ChangeLog
index 525c266..8b9fa46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,11 @@
        fakeroot only if it's available.
 
 2007-10-07  Frank Lichtenheld  <[EMAIL PROTECTED]>
+
+       * scripts/dpkg-buildpackage.pl: Add -z/-Z to
+       passthrough opts (will be passed to dpkg-source).
+
+2007-10-07  Frank Lichtenheld  <[EMAIL PROTECTED]>
            Marcel Toele  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-source.pl (handleformat): Include
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 232fd88..f724544 100644
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -59,8 +59,10 @@ Options:
   -si (default)  src includes orig for rev. 0 or 1.    }
   -sa            uploaded src always includes orig.    }
   -sd            uploaded src is diff and .dsc only.   }
-  -sn            force Debian native source format.      } only passed
-  -s[sAkurKUR]   see dpkg-source for explanation.        } to dpkg-source
+  -sn            force Debian native source format.      }
+  -s[sAkurKUR]   see dpkg-source for explanation.        } only passed
+  -z<level>      compression level of source             } to dpkg-source
+  -Z(gz|bz2|lzma) compression to use for source          }
   -nc            do not clean source tree (implies -b).
   -tc            clean source tree when finished.
   -ap            add pause before starting signature process.
@@ -141,6 +143,8 @@ while (@ARGV) {
        $sourcestyle = $_;
     } elsif (/^-s[nsAkurKUR]$/) {
        push @passopts, $_; # passed to dpkg-source
+    } elsif (/^-[zZ]/) {
+       push @passopts, $_; # passed to dpkg-source
     } elsif (/^-i.*$/) {
        $diffignore = $_;
     } elsif (/^-I.*$/) {

commit 8fb708682912a1acf35d42881117fa83fa06e054
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Sun Oct 7 21:49:40 2007 +0200

    dpkg-source.1: Document -Z and -z

diff --git a/man/ChangeLog b/man/ChangeLog
index c064c91..2487b67 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-09  Frank Lichtenheld  <[EMAIL PROTECTED]>
+       
+       * dpkg-source.1: Document -Z and -z.
+
 2007-10-08  Robert Luberda  <[EMAIL PROTECTED]>
 
        * po/pl.po: Update to 1183t19f101u.
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index 9bf9ff3..cb6699c 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -106,6 +106,19 @@ This option turns certain errors into warnings.
 This option negates a previously set
 .BR \-W "."
 .TP
+.BR \-Z \fIcompression\fP
+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 gz ", " bz2 ", and " lzma .
+\fIgz\fP is the default.
+.TP
+.BR \-z \fIlevel\fP
+Compression level to use. As with \fB\-Z\fP it only affects newly created
+files. Supported values are:
+.IR 1 " to " 9 ", " best ", and " fast .
+\fI9\fP is the default.
+.TP
 .BR \-i [\fIregexp\fP]
 You may specify a perl regular expression to match files you want
 filtered out of the list of files for the diff. (This list is

commit ebd00d9ca3a5aaf26a3ea0849c149a12170083c1
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Sun Oct 7 21:11:03 2007 +0200

    dpkg-source: Change -C option to -Z and support -z, too
    
    dpkg-deb uses -Z for the same purpose (and -C is already
    used by dpkg-genchanges and passed through by dpkg-buildpackage),
    so use that. Also support the -z option that specifies the
    compression level.

diff --git a/ChangeLog b/ChangeLog
index 6f362e1..525c266 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,8 +68,10 @@
        wig&pen (aka Format: 2.0) on build:
        Use .orig.tar.(bz2|lzma) if they are available
        and no .gz can be found. Also let the user specify
-       via -C(gz|bz2|lzma) how files that need to be
-       generated should be compressed.
+       via -Z(gz|bz2|lzma) how files that need to be
+       generated should be compressed. -z([1-9]|best|fast)
+       can be used to specify the compression level
+       to use.
 
 2007-09-29  Frank Lichtenheld  <[EMAIL PROTECTED]>
 
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index 87d3faa..b12d5d3 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -76,6 +76,7 @@ my $def_dscformat = "1.0"; # default format for -b
 
 my $expectprefix;
 my $compression = 'gz';
+my $comp_level = '9';
 my @comp_supported = qw(gz bz2 lzma);
 my %comp_supported = map { $_ => 1 } @comp_supported;
 my $comp_regex = '(?:gz|bz2|lzma)';
@@ -175,8 +176,10 @@ Build options:
   -ss                      trust packed & unpacked orig src are same.
   -sn                      there is no diff, do main tarfile only.
   -sA,-sK,-sP,-sU,-sR      like -sa,-sk,-sp,-su,-sr but may overwrite.
-  -C<compression>          select compression to use (defaults to 'gz',
+  -Z<compression>          select compression to use (defaults to 'gz',
                              supported are: %s).
+  -z<level>                compression level to use (defaults to '9',
+                             supported are: '1'-'9', 'best', 'fast')
 
 Extract options:
   -sp (default)            leave orig source packed in current dir.
@@ -208,10 +211,14 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
         &setopmode('build');
     } elsif (m/^-x$/) {
         &setopmode('extract');
-    } elsif (m/^-C/) {
+    } elsif (m/^-Z/) {
        $compression = $POSTMATCH;
        usageerr(sprintf(_g("%s is not a supported compression"), $compression))
            unless $comp_supported{$compression};
+    } elsif (m/^-z/) {
+       $comp_level = $POSTMATCH;
+       usageerr(sprintf(_g("%s is not a compression level"), $comp_level))
+           unless $comp_level =~ /^([1-9]|fast|best)$/;
     } elsif (m/^-s([akpursnAKPUR])$/) {
        warning(sprintf(_g("-s%s option overrides earlier -s%s option"), $1, 
$sourcestyle))
            if $sourcestyle ne 'X';
@@ -821,7 +828,7 @@ if ($opmode eq 'build') {
 
        &error(sprintf(_g("Files field contains invalid filename `%s'"), $file))
            unless s/^\Q$sourcepackage\E_\Q$baseversion\E(?=[.-])// and
-                  s/\.(gz|bz2|lzma)$//;
+                  s/\.$comp_regex$//;
        s/^-\Q$revision\E(?=\.)// if length $revision;
 
        &error(sprintf(_g("repeated file type - files `%s' and `%s'"), 
$seen{$_}, $file)) if $seen{$_};
@@ -982,7 +989,7 @@ if ($opmode eq 'build') {
 
     for my $patch (@patches) {
        printf(_g("%s: applying %s")."\n", $progname, $patch);
-       if ($patch =~ /\.(gz|bz2|lzma)$/) {
+       if ($patch =~ /\.$comp_regex$/) {
            &forkgzipread($patch);
            *DIFF = *GZIP;
        } else {
@@ -1002,7 +1009,7 @@ if ($opmode eq 'build') {
         $c2 == waitpid($c2,0) || &syserr(_g("wait for patch"));
         $? && subprocerr("patch");
 
-       &reapgzip if $patch =~ /\.(gz|bz2|lzma)$/;
+       &reapgzip if $patch =~ /\.$comp_regex$/;
     }
 
     my $now = time;
@@ -1285,7 +1292,7 @@ sub checktarsane {
 sub checkdiff
 {
     my $diff = shift;
-    if ($diff =~ /\.(gz|bz2|lzma)$/) {
+    if ($diff =~ /\.$comp_regex$/) {
        &forkgzipread($diff);
        *DIFF = *GZIP;
     } else {
@@ -1361,7 +1368,7 @@ sub checkdiff
     }
     close(DIFF);
     
-    &reapgzip if $diff =~ /\.(gz|bz2|lzma)$/;
+    &reapgzip if $diff =~ /\.$comp_regex$/;
 }
 
 sub extracttar {
@@ -1482,7 +1489,7 @@ sub forkgzipwrite {
     my @prog;
 
     if ($_[0] =~ /\.gz\.new\..{6}$/) {
-       @prog = qw(gzip -9);
+       @prog = qw(gzip);
     } elsif ($_[0] =~ /\.bz2\.new\..{6}$/) {
        @prog = qw(bzip2);
     } elsif ($_[0] =~ /\.lzma\.new\..{6}$/) {
@@ -1490,6 +1497,10 @@ sub forkgzipwrite {
     } else {
        &error(sprintf(_g("unknown compression type on file %s"), $_[0]));
     }
+    my $level = "-$comp_level";
+    $level = "--$comp_level"
+       if $comp_level =~ /best|fast/;
+    push @prog, $level;
 
     open(GZIPFILE,">", $_[0]) || &syserr(sprintf(_g("create file %s"), $_[0]));
     pipe(GZIPREAD,GZIP) || &syserr(_g("pipe for gzip"));

commit 45e67aefbea3432e5eedb4452427278684e11286
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Sat Oct 6 23:01:38 2007 +0200

    dpkg-source: Support a subset of wig&pen on build
    
    Use .orig.tar.(bz2|lzma) if they are available
    and no .gz can be found. Also let the user specify
    via -C(gz|bz2|lzma) how files that need to be
    generated should be compressed.

diff --git a/ChangeLog b/ChangeLog
index 5aded80..6f362e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,15 @@
        the filename contains spaces. Apparantly this is
        standard but undocumented diff behaviour.
 
+2007-10-06  Frank Lichtenheld  <[EMAIL PROTECTED]>
+
+       * scripts/dpkg-source.pl: Support a subset of
+       wig&pen (aka Format: 2.0) on build:
+       Use .orig.tar.(bz2|lzma) if they are available
+       and no .gz can be found. Also let the user specify
+       via -C(gz|bz2|lzma) how files that need to be
+       generated should be compressed.
+
 2007-09-29  Frank Lichtenheld  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-buildpackage.pl: Call checkversion()
diff --git a/debian/changelog b/debian/changelog
index 528eb88..7918008 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -102,6 +102,9 @@ dpkg (1.14.7) unstable; urgency=low
   * Fix dpkg-source to create correct diffs for files with spaces in
     their name (apparantly we don't have many of those ;).
     Based on a patch by Marcel Toele. Closes: #445380
+  * Allow to use other compressions than gzip on dpkg-source -b
+    (NOTE: this will result in a Format: 2.0 source package!).
+    Closes: #382673
 
   [ Updated dpkg translations ]
   * Basque (Piarres Beobide). Closes: #440859
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index e3c00c9..87d3faa 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -75,6 +75,10 @@ my $max_dscformat = 2;
 my $def_dscformat = "1.0"; # default format for -b
 
 my $expectprefix;
+my $compression = 'gz';
+my @comp_supported = qw(gz bz2 lzma);
+my %comp_supported = map { $_ => 1 } @comp_supported;
+my $comp_regex = '(?:gz|bz2|lzma)';
 
 # Packages
 my %remove;
@@ -171,6 +175,8 @@ Build options:
   -ss                      trust packed & unpacked orig src are same.
   -sn                      there is no diff, do main tarfile only.
   -sA,-sK,-sP,-sU,-sR      like -sa,-sk,-sp,-su,-sr but may overwrite.
+  -C<compression>          select compression to use (defaults to 'gz',
+                             supported are: %s).
 
 Extract options:
   -sp (default)            leave orig source packed in current dir.
@@ -182,7 +188,8 @@ General options:
       --version            show the version.
 "), $progname,
     $diff_ignore_default_regexp,
-    join('', map { " -I$_" } @tar_ignore_default_pattern);
+    join('', map { " -I$_" } @tar_ignore_default_pattern),
+    "@comp_supported" ;
 }
 
 sub handleformat {
@@ -201,6 +208,10 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
         &setopmode('build');
     } elsif (m/^-x$/) {
         &setopmode('extract');
+    } elsif (m/^-C/) {
+       $compression = $POSTMATCH;
+       usageerr(sprintf(_g("%s is not a supported compression"), $compression))
+           unless $comp_supported{$compression};
     } elsif (m/^-s([akpursnAKPUR])$/) {
        warning(sprintf(_g("-s%s option overrides earlier -s%s option"), $1, 
$sourcestyle))
            if $sourcestyle ne 'X';
@@ -269,7 +280,7 @@ if ($opmode eq 'build') {
     
     parsechangelog($changelogfile, $changelogformat);
     parsecontrolfile($controlfile);
-    $f{"Format"}=$def_dscformat;
+    $f{"Format"}= $compression eq 'gz' ? $def_dscformat : '2.0';
     &init_substvars;
 
     my @sourcearch;
@@ -381,7 +392,7 @@ if ($opmode eq 'build') {
     $basedirname =~ s/_/-/;
 
     my $origdir = "$dir.orig";
-    my $origtargz = "$basename.orig.tar.gz";
+    my $origtargz;
     if (@ARGV) {
         my $origarg = shift(@ARGV);
         if (length($origarg)) {
@@ -392,7 +403,7 @@ if ($opmode eq 'build') {
                 $sourcestyle =~ y/aA/rR/;
                 $sourcestyle =~ m/[ursURS]/ ||
                     &error(sprintf(_g("orig argument is unpacked but source 
handling style".
-                           " -s%s calls for packed (.orig.tar.gz)"), 
$sourcestyle));
+                           " -s%s calls for packed (.orig.tar.<ext>)"), 
$sourcestyle));
             } elsif (-f _) {
                 $origtargz= $origarg;
                 $sourcestyle =~ y/aA/pP/;
@@ -408,22 +419,28 @@ if ($opmode eq 'build') {
                 &error(sprintf(_g("orig argument is empty (means no orig, no 
diff)".
                        " but source handling style -s%s wants something"), 
$sourcestyle));
         }
-    }
-
-    if ($sourcestyle =~ m/[aA]/) {
-        if (stat("$origtargz")) {
-            -f _ || &error(sprintf(_g("packed orig `%s' exists but is not a 
plain file"), $origtargz));
-            $sourcestyle =~ y/aA/pP/;
-        } elsif ($! != ENOENT) {
-            &syserr(sprintf(_g("unable to stat putative packed orig `%s'"), 
$origtargz));
-        } elsif (stat("$origdir")) {
-            -d _ || &error(sprintf(_g("unpacked orig `%s' exists but is not a 
directory"), $origdir));
-            $sourcestyle =~ y/aA/rR/;
-        } elsif ($! != ENOENT) {
-            &syserr(sprintf(_g("unable to stat putative unpacked orig `%s'"), 
$origdir));
-        } else {
-            $sourcestyle =~ y/aA/nn/;
-        }
+    } elsif ($sourcestyle =~ m/[aA]/) {
+       my @origtargz = map { "$basename.orig.tar.$_" } ($compression, 
@comp_supported);
+       foreach my $origtar (@origtargz) {
+           if (stat($origtar)) {
+               -f _ || &error(sprintf(_g("packed orig `%s' exists but is not a 
plain file"), $origtar));
+               $sourcestyle =~ y/aA/pP/;
+               $origtargz = $origtar;
+               last;
+           } elsif ($! != ENOENT) {
+               &syserr(sprintf(_g("unable to stat putative packed orig `%s'"), 
$origtar));
+           }
+       }
+       if (!$origtargz) {
+           if (stat($origdir)) {
+               -d _ || &error(sprintf(_g("unpacked orig `%s' exists but is not 
a directory"), $origdir));
+               $sourcestyle =~ y/aA/rR/;
+           } elsif ($! != ENOENT) {
+               &syserr(sprintf(_g("unable to stat putative unpacked orig 
`%s'"), $origdir));
+           } else {
+               $sourcestyle =~ y/aA/nn/;
+           }
+       }
     }
 
     my $dirbase = $dir;
@@ -450,13 +467,14 @@ if ($opmode eq 'build') {
                               $origdirname, "$basedirname.orig"));
         $tardirbase= $origdirbase; $tardirname= $origdirname;
 
-        $tarname= $origtargz;
-        $tarname eq "$basename.orig.tar.gz" ||
-           warning(sprintf(_g(".orig.tar.gz name %s is not 
<package>_<upstreamversion>" .
-                              ".orig.tar.gz (wanted %s)"), $tarname, 
"$basename.orig.tar.gz"));
+       $tarname= $origtargz || "$basename.orig.tar.$compression";
+       $tarname =~ /$basename.orig.tar.($comp_regex)/ ||
+           warning(sprintf(_g(".orig.tar name %s is not 
<package>_<upstreamversion>" .
+                              ".orig.tar (wanted %s)"), $tarname, 
"$basename.orig.tar.$comp_regex"));
+       if (($1 ne 'gz') && ($f{'Format'} < 2)) { $f{'Format'} = '2.0' };
     } else {
-        $tardirbase= $dirbase; $tardirname= $dirname;
-        $tarname= "$basenamerev.tar.gz";
+       $tardirbase= $dirbase; $tardirname= $dirname;
+       $tarname= "$basenamerev.tar.$compression";
     }
 
     if ($sourcestyle =~ m/[nurUR]/) {
@@ -533,11 +551,12 @@ if ($opmode eq 'build') {
     }
         
     if ($sourcestyle =~ m/[kpursKPUR]/) {
-        
+
+       my $diffname = "$basenamerev.diff.$compression";
         printf(_g("%s: building %s in %s")."\n",
-               $progname, $sourcepackage, "$basenamerev.diff.gz")
+               $progname, $sourcepackage, $diffname)
             || &syserr(_g("write building diff message"));
-       my ($ndfh, $newdiffgz) = tempfile( "$basenamerev.diff.gz.new.XXXXXX",
+       my ($ndfh, $newdiffgz) = tempfile( "$diffname.new.XXXXXX",
                                        DIR => &getcwd, UNLINK => 0 );
         &forkgzipwrite($newdiffgz);
 
@@ -617,7 +636,7 @@ if ($opmode eq 'build') {
                         s/\n$//;
                         &internerr(sprintf(_g("unknown line from diff -u on 
%s: `%s'"), $fn, $_));
                     }
-                    print(GZIP $_) || &syserr(_g("failed to write to gzip"));
+                   print(GZIP $_) || &syserr(_g("failed to write to 
compression pipe"));
                 }
                 close(DIFFGEN); $/= "\0";
                my $es;
@@ -647,12 +666,12 @@ if ($opmode eq 'build') {
             }
         }
         close(FIND); $? && subprocerr("find on $dir");
-        close(GZIP) || &syserr(_g("finish write to gzip pipe"));
+       close(GZIP) || &syserr(_g("finish write to compression pipe"));
         &reapgzip;
-        rename($newdiffgz,"$basenamerev.diff.gz") ||
-            &syserr(sprintf(_g("unable to rename `%s' (newly created) to 
`%s'"), $newdiffgz, "$basenamerev.diff.gz"));
-       chmod(0666 &~ umask(), "$basenamerev.diff.gz") ||
-           &syserr(sprintf(_g("unable to change permission of `%s'"), 
"$basenamerev.diff.gz"));
+       rename($newdiffgz, $diffname) ||
+           &syserr(sprintf(_g("unable to rename `%s' (newly created) to 
`%s'"), $newdiffgz, $diffname));
+       chmod(0666 &~ umask(), $diffname) ||
+           &syserr(sprintf(_g("unable to change permission of `%s'"), 
$diffname));
 
         defined($c2= open(FIND,"-|")) || &syserr(_g("fork for 2nd find"));
         if (!$c2) {
@@ -679,7 +698,7 @@ if ($opmode eq 'build') {
         }
         close(FIND); $? && subprocerr("find on $dirname");
 
-        &addfile("$basenamerev.diff.gz");
+       &addfile($diffname);
 
     }
 
@@ -1460,13 +1479,26 @@ my $cgz;
 my $gzipsigpipeok;
 
 sub forkgzipwrite {
-    open(GZIPFILE,"> $_[0]") || &syserr(sprintf(_g("create file %s"), $_[0]));
+    my @prog;
+
+    if ($_[0] =~ /\.gz\.new\..{6}$/) {
+       @prog = qw(gzip -9);
+    } elsif ($_[0] =~ /\.bz2\.new\..{6}$/) {
+       @prog = qw(bzip2);
+    } elsif ($_[0] =~ /\.lzma\.new\..{6}$/) {
+       @prog = qw(lzma);
+    } else {
+       &error(sprintf(_g("unknown compression type on file %s"), $_[0]));
+    }
+
+    open(GZIPFILE,">", $_[0]) || &syserr(sprintf(_g("create file %s"), $_[0]));
     pipe(GZIPREAD,GZIP) || &syserr(_g("pipe for gzip"));
     defined($cgz= fork) || &syserr(_g("fork for gzip"));
     if (!$cgz) {
-        open(STDIN,"<&GZIPREAD") || &syserr(_g("reopen gzip pipe")); 
close(GZIPREAD);
-        close(GZIP); open(STDOUT,">&GZIPFILE") || &syserr(_g("reopen tar.gz"));
-        exec('gzip','-9') or &syserr(_g("exec gzip"));
+       open(STDIN,"<&",\*GZIPREAD) || &syserr(_g("reopen gzip pipe"));
+       close(GZIPREAD); close(GZIP);
+       open(STDOUT,">&",\*GZIPFILE) || &syserr(_g("reopen tar"));
+       exec({ $prog[0] } @prog) or &syserr(_g("exec gzip"));
     }
     close(GZIPREAD);
     $gzipsigpipeok= 0;
@@ -1486,13 +1518,14 @@ sub forkgzipread {
       &error(sprintf(_g("unknown compression type on file %s"), $_[0]));
     }
 
-    open(GZIPFILE,"< $_[0]") || &syserr(sprintf(_g("read file %s"), $_[0]));
+    open(GZIPFILE,"<", $_[0]) || &syserr(sprintf(_g("read file %s"), $_[0]));
     pipe(GZIP,GZIPWRITE) || &syserr(sprintf(_g("pipe for %s"), $prog));
     defined($cgz= fork) || &syserr(sprintf(_g("fork for %s"), $prog));
     if (!$cgz) {
-        open(STDOUT,">&GZIPWRITE") || &syserr(sprintf(_g("reopen %s pipe"), 
$prog)); close(GZIPWRITE);
-        close(GZIP); open(STDIN,"<&GZIPFILE") || &syserr(_g("reopen input 
file"));
-        exec($prog) or &syserr(sprintf(_g("exec %s"), $prog));
+       open(STDOUT,">&",\*GZIPWRITE) || &syserr(sprintf(_g("reopen %s pipe"), 
$prog));
+       close(GZIPWRITE); close(GZIP);
+       open(STDIN,"<&",\*GZIPFILE) || &syserr(_g("reopen input file"));
+       exec({ $prog } $prog) or &syserr(sprintf(_g("exec %s"), $prog));
     }
     close(GZIPWRITE);
     $gzipsigpipeok= 1;

commit 82ff1e6c9e430e12ef903b34c5dee855177bee1f
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Sat Oct 6 22:42:10 2007 +0200

    dpkg-source: use English
    
    Mainly change all $' to $POSTMATCH. I personally never can
    remember that one and it breaks the syntax highlighting in
    some editors.

diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index b75f74e..e3c00c9 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -91,6 +91,7 @@ my @tar_ignore;
 
 use POSIX;
 use Fcntl qw (:mode);
+use English;
 use File::Temp qw (tempfile);
 use Cwd;
 
@@ -205,13 +206,13 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
            if $sourcestyle ne 'X';
         $sourcestyle= $1;
     } elsif (m/^-c/) {
-        $controlfile= $';
+        $controlfile= $POSTMATCH;
     } elsif (m/^-l/) {
-        $changelogfile= $';
+        $changelogfile= $POSTMATCH;
     } elsif (m/^-F([0-9a-z]+)$/) {
         $changelogformat=$1;
     } elsif (m/^-D([^\=:]+)[=:]/) {
-        $override{$1}= "$'";
+        $override{$1}= $POSTMATCH;
     } elsif (m/^-U([^\=:]+)$/) {
         $remove{$1}= 1;
     } elsif (m/^-i(.*)$/) {
@@ -226,9 +227,9 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
             $tar_ignore_default_pattern_done = 1;
         }
     } elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) {
-        $substvar{$1}= "$'";
+        $substvar{$1}= $POSTMATCH;
     } elsif (m/^-T/) {
-        $varlistfile= "$'";
+        $varlistfile= $POSTMATCH;
     } elsif (m/^-(h|-help)$/) {
         &usage; exit(0);
     } elsif (m/^--version$/) {
@@ -1529,9 +1530,10 @@ sub deoctify {
     @_= split(/\\/, $fn);
 
     foreach (@_) {
-        /^(\d{3})/ or next;
-        &failure(sprintf(_g("bogus character `\\%s' in `%s'"), $1, $fn)."\n") 
if oct($1) > 255;
-        $_= pack("c", oct($1)) . $';
+       /^(\d{3})/ or next;
+       &failure(sprintf(_g("bogus character `\\%s' in `%s'"), $1, $fn)."\n")
+           if oct($1) > 255;
+       $_= pack("c", oct($1)) . $POSTMATCH;
     }
     return join("", @_);
 } }

commit 25b0ed59068e957fa86d7ce83d0d2724a12f7e32
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Tue Oct 9 00:39:17 2007 +0200

    debian/rules: Call $(MAKE) check during build

diff --git a/debian/changelog b/debian/changelog
index 6606bb0..528eb88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,9 @@ dpkg (1.14.8) UNRELEASED; urgency=low
       shared library that is actively used, then it will fail. This can be
       disabled with the option --ignore-missing-info. Closes: #10807
 
+  [ Frank Lichtenheld ]
+  * Add $(MAKE) check to build target
+
   [ Updated dpkg translations ]
   * Polish (Robert Luberda).
 
diff --git a/debian/rules b/debian/rules
index 836d0a5..e08bf3e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,6 +59,7 @@ build: build-tree/config.status
        dh_testdir
 
        cd build-tree && $(MAKE)
+       cd build-tree && $(MAKE) check
 
 # Install the package underneath debian/tmp
 install: build

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to