Browse Source

Merge branch 'master' into dpkg-shlibdeps-buxy

Conflicts:

	scripts/Makefile.am
Raphael Hertzog 19 years ago
parent
commit
dca270df7b

+ 25 - 0
ChangeLog

@@ -1,3 +1,22 @@
+2007-09-23  Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/dpkg-buildpackage.pl: Add new option
+	-j[<number>] that works like the make option of
+	the same name. It will be passed to debian/rules in
+	the MAKEFLAGS environment variable. Also the
+	parallel=<n> DEB_BUILD_OPTIONS option will be honored
+	and set correctly. The finally used value is determined by the
+	following order: -j > DEB_BUILD_OPTIONS > MAKEFLAGS.
+	Based on an idea by Robert Millan <rmh@aybabtu.com>.
+	* scripts/Dpkg/BuildOptions.pm: Added. Support code
+	for DEB_BUILD_OPTIONS handling by dpkg-buildpackage.
+	* scripts/Makefile.am: Adapt.
+
+2007-09-23  Jari Aalto  <jari.aalto@cante.net>
+
+	* scripts/dpkg-source.pl ($diff_ignore_default_regexp): Add
+	_MTN for monotone.
+
 2007-09-20  Frank Lichtenheld  <djpig@debian.org>
 2007-09-20  Frank Lichtenheld  <djpig@debian.org>
 
 
 	* scripts/dpkg-sources.pl (version): Don't use
 	* scripts/dpkg-sources.pl (version): Don't use
@@ -9,6 +28,12 @@
 	* scripts/Dpkg.pm: Make the regex for determining
 	* scripts/Dpkg.pm: Make the regex for determining
 	$progname more robust.
 	$progname more robust.
 
 
+	* scripts/dpkg-buildpackage.sh: Move to...
+	* scripts/dpkg-buildpackage.pl: Convert from
+	Shell to Perl.
+	* scripts/Makefile.am: Adapt to move.
+	* scripts/po/POTFILES.in: Add dpkg-buildpackage.pl.
+
 2007-09-18  Guillem Jover  <guillem@debian.org>
 2007-09-18  Guillem Jover  <guillem@debian.org>
 
 
 	* lib/mlib.c (checksubprocerr): Warn instead of erroring out in case
 	* lib/mlib.c (checksubprocerr): Warn instead of erroring out in case

+ 12 - 1
debian/changelog

@@ -16,6 +16,14 @@ dpkg (1.14.7) UNRELEASED; urgency=low
     Thanks to Brian M. Carlson.
     Thanks to Brian M. Carlson.
   * Add Vcs-Browser and Vcs-Git fields to debian/control.
   * Add Vcs-Browser and Vcs-Git fields to debian/control.
 
 
+  [ Frank Lichtenheld ]
+  * Add _MTN to dpkg-source -i default regex. Suggested by Jari Aalto.
+  * Convert dpkg-buildpackage to a Perl script.
+  * dpkg-buildpackage accepts a -j<n> option now which will set
+    MAKEFLAGS(-j<n>) and DEB_BUILD_OPTIONS(parallel=<n>) accordingly.
+    parallel=<n> in DEB_BUILD_OPTIONS will be passed to MAKEFLAGS as
+    well. Based on an idea by Robert Millan. Closes: #440636
+
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * Basque (Piarres Beobide). Closes: #440859
   * Basque (Piarres Beobide). Closes: #440859
   * Danish (Claus Hindsgaul). Closes: #441106
   * Danish (Claus Hindsgaul). Closes: #441106
@@ -32,7 +40,10 @@ dpkg (1.14.7) UNRELEASED; urgency=low
   * Swedish (Peter Karlsson).
   * Swedish (Peter Karlsson).
   * Korean (Sunjae Park). Closes: #443191
   * Korean (Sunjae Park). Closes: #443191
 
 
- -- Guillem Jover <guillem@debian.org>  Thu, 06 Sep 2007 03:42:40 +0300
+  [ Updated scripts translations ]
+  * Correct a typo in the French translation. Closes: #443276
+
+ -- Frank Lichtenheld <djpig@debian.org>  Sun, 23 Sep 2007 02:40:20 +0200
 
 
 dpkg (1.14.6) unstable; urgency=low
 dpkg (1.14.6) unstable; urgency=low
 
 

+ 1 - 1
m4/perl.m4

@@ -5,5 +5,5 @@ AC_DEFUN([DPKG_PROG_PERL],
 [AC_ARG_VAR([PERL], [Perl interpreter])dnl
 [AC_ARG_VAR([PERL], [Perl interpreter])dnl
 AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])dnl
 AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])dnl
 AC_ARG_VAR([PERL_LIBDIR], [Perl library directory])dnl
 AC_ARG_VAR([PERL_LIBDIR], [Perl library directory])dnl
-PERL_LIBDIR=`$PERL -MConfig -e 'print $Config{vendorlib}'`dnl
+PERL_LIBDIR=`$PERL -MConfig -e 'my $r=$Config{vendorlibexp};$r=~s/$Config{vendorprefixexp}/\\$(prefix)/; print $r'`dnl
 ])# DPKG_PROG_PERL
 ])# DPKG_PROG_PERL

+ 9 - 0
man/ChangeLog

@@ -1,3 +1,12 @@
+2007-09-23  Frank Lichtenheld  <djpig@debian.org>
+
+	* dpkg-buildpackage.1: Document the new -j
+	option.
+
+2007-09-23  Peter Karlsson  <peterk@debian.org>
+
+	* po/sv.add: Fixed typo.
+
 2007-09-15  Guillem Jover  <guillem@debian.org>
 2007-09-15  Guillem Jover  <guillem@debian.org>
 
 
 	* po/dpkg-man.pot: Regenerated.
 	* po/dpkg-man.pot: Regenerated.

+ 11 - 0
man/dpkg-buildpackage.1

@@ -47,6 +47,17 @@ Specify the Debian architecture we build for. The architecture of the
 machine we build on is determined automatically, and is also the default
 machine we build on is determined automatically, and is also the default
 for the host machine.
 for the host machine.
 .TP
 .TP
+.BI \-j jobs
+Number of jobs allowed to be run simultaneously, equivalent to the
+.BR make (1)
+option of the same name. Will add itself to the MAKEFLAGS
+environment variable, which should cause all subsequent make
+invocations to inherit the option. Also adds \fBparallel=\fP\fIjobs\fP
+to the DEB_BUILD_OPTIONS environment variable which allows
+debian/rules files to use this information for their own purposes.
+If no \fB-j\fP option is given, an existing value for \fBparallel\fP will be
+honoured and added to MAKEFLAGS.
+.TP
 .BI \-v version
 .BI \-v version
 Use changelog information from all versions strictly later than
 Use changelog information from all versions strictly later than
 .IR version .
 .IR version .

+ 1 - 1
man/po/sv.add

@@ -1,3 +1,3 @@
 PO4A-HEADER:mode=after;position=^\.TH;beginboundary=FakePo4aBoundary
 PO4A-HEADER:mode=after;position=^\.TH;beginboundary=FakePo4aBoundary
 .SH "ÖVERSÄTTNING"
 .SH "ÖVERSÄTTNING"
-Peter Karlsson och Debian Nylander.
+Peter Karlsson och Daniel Nylander.

+ 38 - 0
scripts/Dpkg/BuildOptions.pm

@@ -0,0 +1,38 @@
+package Dpkg::BuildOptions;
+
+use strict;
+use warnings;
+
+sub parse {
+    my ($env) = @_;
+
+    $env ||= $ENV{DEB_BUILD_OPTIONS};
+
+    unless ($env) { return {}; }
+
+    my %opts;
+    if ($env =~ s/(noopt|nostrip),?//ig) {
+	$opts{lc $1} = '';
+    } elsif ($env =~ s/(parallel)=(-?\d+),?//ig) {
+	$opts{lc $1} = $2;
+    }
+
+    return \%opts;
+}
+
+sub set {
+    my ($opts, $overwrite) = @_;
+
+    my $env = $overwrite ? '' : $ENV{DEB_BUILD_OPTIONS}||'';
+    if ($env) { $env .= ',' }
+
+    while (my ($k, $v) = each %$opts) {
+	if ($v) {
+	    $env .= "$k=$v,";
+	} else {
+	    $env .= "$k,";
+	}
+    }
+}
+
+1;

+ 2 - 1
scripts/Makefile.am

@@ -32,7 +32,7 @@ EXTRA_DIST = \
 	README.alternatives \
 	README.alternatives \
 	822-date.pl \
 	822-date.pl \
 	dpkg-architecture.pl \
 	dpkg-architecture.pl \
-	dpkg-buildpackage.sh \
+	dpkg-buildpackage.pl \
 	dpkg-checkbuilddeps.pl \
 	dpkg-checkbuilddeps.pl \
 	dpkg-distaddfile.pl \
 	dpkg-distaddfile.pl \
 	dpkg-genchanges.pl \
 	dpkg-genchanges.pl \
@@ -61,6 +61,7 @@ nobase_dist_perllib_DATA = \
 	Dpkg/Shlibs/Objdump.pm \
 	Dpkg/Shlibs/Objdump.pm \
 	Dpkg/Shlibs/SymbolFile.pm \
 	Dpkg/Shlibs/SymbolFile.pm \
 	Dpkg/ErrorHandling.pm \
 	Dpkg/ErrorHandling.pm \
+	Dpkg/BuildOptions.pm \
 	Dpkg/Gettext.pm \
 	Dpkg/Gettext.pm \
 	Dpkg/Version.pm \
 	Dpkg/Version.pm \
 	Dpkg.pm
 	Dpkg.pm

+ 443 - 0
scripts/dpkg-buildpackage.pl

@@ -0,0 +1,443 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Cwd;
+use File::Basename;
+
+use Dpkg;
+use Dpkg::Gettext;
+use Dpkg::BuildOptions;
+
+push (@INC, $dpkglibdir);
+require 'controllib.pl';
+
+textdomain("dpkg-dev");
+
+sub showversion {
+    printf _g("Debian %s version %s.\n"), $progname, $version;
+
+    print _g("
+Copyright (C) 1996 Ian Jackson.
+Copyright (C) 2000 Wichert Akkerman
+Copyright (C) 2007 Frank Lichtenheld");
+
+    print _g("
+This is free software; see the GNU General Public Licence version 2 or
+later for copying conditions. There is NO warranty.
+");
+}
+
+sub usage {
+	printf _g("
+Usage: %s [<options> ...]
+
+Options:
+  -r<gain-root-command>
+                 command to gain root privileges (default is fakeroot if it
+                 exists).
+  -p<sign-command>
+  -d             do not check build dependencies and conflicts.
+  -D             check build dependencies and conflicts.
+  -j[<number>]   specify jobs to run simultaneously } passed to debian/rules
+  -k<keyid>      the key to use for signing.
+  -sgpg          the sign-command is called like GPG.
+  -spgp          the sign-command is called like PGP.
+  -us            unsigned source.
+  -uc            unsigned changes.
+  -a<arch>       Debian architecture we build for (implies -d).
+  -b             binary-only, do not build source. } also passed to
+  -B             binary-only, no arch-indep files. } dpkg-genchanges
+  -S             source only, no binary files.     }
+  -t<system>     set GNU system type.           } passed to dpkg-architecture
+  -v<version>    changes since version <version>.      }
+  -m<maint>      maintainer for package is <maint>.    }
+  -e<maint>      maintainer for release is <maint>.    } only passed
+  -C<descfile>   changes are described in <descfile>.  } to dpkg-genchangs
+  -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
+  -nc            do not clean source tree (implies -b).
+  -tc            clean source tree when finished.
+  -ap            add pause before starting signature process.
+  -W             turn certain errors into warnings.       } passed to
+  -E             when -W is turned on, -E turns it off.   } dpkg-source
+  -i[<regex>]    ignore diffs of files matching regex.    } only passed
+  -I<filename>   filter out files when building tarballs. } to dpkg-source
+  --admindir=<directory>
+                 change the administrative directory.
+  -h, --help     show this help message.
+      --version  show the version.
+"), $progname;
+}
+
+sub testcommand {
+    my ($cmd) = @_;
+
+    return -x "/usr/bin/$cmd";
+}
+
+my $rootcommand = '';
+if (testcommand('fakeroot')) {
+    $rootcommand = 'fakeroot';
+}
+
+my $signcommand = '';
+if ( ( ($ENV{GNUPGHOME} && -e $ENV{GNUPGHOME})
+       || ($ENV{HOME} && -e "$ENV{HOME}/.gnupg") )
+     && testcommand('gpg')) {
+	 $signcommand = 'gpg';
+} elsif (testcommand('pgp')) {
+	$signcommand = 'pgp'
+}
+
+my ($admindir, $signkey, $forcesigninterface, $usepause, $noclean,
+    $warnable_errors, $sourcestyle, $cleansource,
+    $binaryonly, $sourceonly, $since, $maint,
+    $changedby, $desc, $parallel);
+my (@checkbuilddep_args, @passopts, @tarignore);
+my $checkbuilddep = 1;
+my $signsource = 1;
+my $signchanges = 1;
+my $diffignore = '';
+my $binarytarget = 'binary';
+my $targetarch = my $targetgnusystem = '';
+
+while (@ARGV) {
+    $_ = shift @ARGV;
+
+    if (/^(--help|-h)$/) {
+	usage;
+	exit 0;
+    } elsif (/^--version$/) {
+	showversion;
+	exit 0;
+    } elsif (/^--admindir=(.*)$/) {
+	$admindir = $1;
+    } elsif (/^-j(\d*)$/) {
+	$parallel = $1 || '-1';
+    } elsif (/^-r(.*)$/) {
+	$rootcommand = $1;
+    } elsif (/^-p(.*)$/) {
+	$signcommand = $1;
+    } elsif (/^-k(.*)$/) {
+	$signkey = $1;
+    } elsif (/^-([dD])$/) {
+	$checkbuilddep = ($1 eq 'D');
+    } elsif (/^-s(gpg|pgp)$/) {
+	$forcesigninterface = $1;
+    } elsif (/^-us$/) {
+	$signsource = 0;
+    } elsif (/^-uc$/) {
+	$signchanges = 0;
+    } elsif (/^-ap$/) {
+	$usepause = 1;
+    } elsif (/^-a(.*)$/) {
+	$targetarch = $1;
+	$checkbuilddep = 0;
+    } elsif (/^-s[iad]$/) {
+	$sourcestyle = $_;
+    } elsif (/^-s[nsAkurKUR]$/) {
+	push @passopts, $_; # passed to dpkg-source
+    } elsif (/^-i.*$/) {
+	$diffignore = $_;
+    } elsif (/^-I.*$/) {
+	push @tarignore, $_;
+    } elsif (/^-tc$/) {
+	$cleansource = 1;
+    } elsif (/^-t(.*)$/) {
+	$targetgnusystem = $1; # Order DOES matter!
+    } elsif (/^-nc$/) {
+	$noclean = 1;
+	if ($sourceonly) {
+	    usageerr(sprintf(_g("cannot combine %s and %s"), '-nc', '-S'));
+	}
+	unless ($binaryonly) {
+	    $binaryonly = '-b';
+	}
+    } elsif (/^-b$/) {
+	$binaryonly = '-b';
+	@checkbuilddep_args = ();
+	$binarytarget = 'binary';
+	if ($sourceonly) {
+	    usageerr(sprintf(_g("cannot combine %s and %s"), '-b', '-S'));
+	}
+    } elsif (/^-B$/) {
+	$binaryonly = '-B';
+	@checkbuilddep_args = ('-B');
+	$binarytarget = 'binary-arch';
+	if ($sourceonly) {
+	    usageerr(sprintf(_g("cannot combine %s and %s"), '-B', '-S'));
+	}
+    } elsif (/^-S$/) {
+	$sourceonly = '-S';
+	$checkbuilddep = 0;
+	if ($binaryonly) {
+	    usageerr(sprintf(_g("cannot combine %s and %s"), $binaryonly, '-S'));
+	}
+    } elsif (/^-v(.*)$/) {
+	$since = $1;
+    } elsif (/^-m(.*)$/) {
+	$maint = $1;
+    } elsif (/^-e(.*)$/) {
+	$changedby = $1;
+    } elsif (/^-C(.*)$/) {
+	$desc = $1;
+    } elsif (/^-W$/) {
+	$warnable_errors = 1;
+	push @passopts, '-W';
+    } elsif (/^-E$/) {
+	$warnable_errors = 0;
+	push @passopts, '-E';
+    } else {
+	usageerr(sprintf(_g("unknown option or argument %s"), $_));
+    }
+}
+
+unless ($signcommand) {
+    $signsource = 0;
+    $signchanges = 0;
+}
+
+my $signinterface;
+if ($forcesigninterface) {
+    $signinterface = $forcesigninterface;
+} else {
+    $signinterface = $signcommand;
+}
+
+if ($signcommand && ($signinterface !~ /^(gpg|pgp)$/)) {
+    warning(_g("unknown sign command, assuming pgp style interface"));
+}
+
+if ($parallel || $ENV{DEB_BUILD_OPTIONS}) {
+    my $build_opts = Dpkg::BuildOptions::parse();
+
+    $parallel ||= $build_opts->{parallel};
+    if (defined $parallel) {
+	$ENV{MAKEFLAGS} ||= '';
+	if ($parallel eq '-1') {
+	    $ENV{MAKEFLAGS} .= " -j";
+	} else {
+	    $ENV{MAKEFLAGS} .= " -j$parallel";
+	}
+    }
+    $build_opts->{parallel} = $parallel;
+    Dpkg::BuildOptions::set($build_opts);
+}
+
+my $cwd = cwd();
+my $dir = basename($cwd);
+
+my %changes;
+open CHANGELOG, '-|', 'dpkg-parsechangelog' or subprocerr('dpkg-parsechangelog');
+# until we have a better parsecdata function this
+# should suffice
+while ($_ = <CHANGELOG>) {
+    chomp;
+    /^(\S+):\s*(.*)$/ && do {
+	$changes{lc $1} = $2;
+    };
+}
+close CHANGELOG or subprocerr('dpkg-parsechangelog');
+
+sub mustsetvar {
+    my ($var, $text) = @_;
+
+    error(sprintf(_g("unable to determine %s", $text)))
+	unless defined($var);
+
+    print "$progname: $text $var\n";
+    return $var;
+}
+
+my $pkg = mustsetvar($changes{source}, _g('source package'));
+my $version = mustsetvar($changes{version}, _g('source version'));
+
+my $maintainer;
+if ($changedby) {
+    $maintainer = $changedby;
+} elsif ($maint) {
+    $maintainer = $maint;
+} else {
+    $maintainer = mustsetvar($changes{maintainer}, _g('source changed by'));
+}
+
+open my $arch_env, '-|', 'dpkg-architecture', "-a$targetarch",
+    "-t$targetgnusystem", '-s', '-f' or subprocerr('dpkg-architecture');
+while ($_ = <$arch_env>) {
+    chomp;
+    my @cmds = split /\s*;\s*/;
+    foreach (@cmds) {
+	/^\s*(\w+)=([\w-]*)\s*$/ && do {
+	    $ENV{$1} = $2;
+	};
+    }
+}
+close $arch_env or subprocerr('dpkg-architecture');
+
+my $arch;
+unless ($sourceonly) {
+    $arch = mustsetvar($ENV{'DEB_HOST_ARCH'}, _g('host architecture'));
+} else {
+    $arch = 'source';
+}
+
+(my $sversion = $version) =~ s/^\d+://;
+
+my $pv = "${pkg}_$sversion";
+my $pva = "${pkg}_${sversion}_$arch";
+
+sub signfile {
+    my ($file) = @_;
+    print STDERR " signfile $file\n";
+    my $qfile = quotemeta($file);
+
+    if ($signinterface eq 'gpg') {
+	system("(cat ../$qfile ; echo '') | ".
+	       "$signcommand --local-user ".quotemeta($signkey||$maintainer).
+	       " --clearsign --armor --textmode  > ../$qfile.asc");
+    } else {
+	system("$signcommand -u ".quotemeta($signkey||$maintainer).
+	       " +clearsig=on -fast <../$qfile >../$qfile.asc");
+    }
+    my $status = $?;
+    unless ($status) {
+	system('mv', '--', "../$file.asc", "../$file")
+	    and subprocerr('mv');
+    } else {
+	system('/bin/rm', '-f', "../$file.asc")
+	    and subprocerr('rm -f');
+    }
+    print "\n";
+    return $status
+}
+
+
+sub withecho {
+    print STDERR " @_\n";
+    system(@_)
+	and subprocerr("@_");
+}
+
+if ($checkbuilddep) {
+    if ($admindir) {
+	push @checkbuilddep_args, "--admindir=$admindir";
+    }
+
+    if (system('dpkg-checkbuilddeps', @checkbuilddep_args)) {
+	warning(_g("Build dependencies/conflicts unsatisfied; aborting."));
+	warning(_g("(Use -d flag to override.)"));
+	exit 3;
+    }
+}
+
+unless ($noclean) {
+    withecho($rootcommand, 'debian/rules', 'clean');
+}
+unless ($binaryonly) {
+    chdir('..') or failure('chdir ..');
+    my @opts = @passopts;
+    if ($diffignore) { push @opts, $diffignore }
+    push @opts, @tarignore;
+    withecho('dpkg-source', @opts, '-b', $dir);
+    chdir($dir) or failure("chdir $dir");
+}
+unless ($sourceonly) {
+    withecho('debian/rules', 'build');
+    withecho($rootcommand, 'debian/rules', $binarytarget);
+}
+if ($usepause &&
+    ($signchanges || ( !$binaryonly && $signsource )) ) {
+    print _g("Press the return key to start signing process\n");
+    getc();
+}
+
+my $signerrors;
+unless ($binaryonly) {
+    if ($signsource && signfile("$pv.dsc")) {
+	$signerrors = _g("Failed to sign .dsc and .changes file");
+	$signchanges = 0;
+    }
+}
+
+my @change_opts;
+
+if ($binaryonly) { push @change_opts, $binaryonly }
+if ($sourceonly) { push @change_opts, $sourceonly }
+if ($sourcestyle) { push @change_opts, $sourcestyle }
+
+if ($maint) { push @change_opts, "-m$maint" }
+if ($changedby) { push @change_opts, "-e$changedby" }
+if ($since) { push @change_opts, "-v$since" }
+if ($desc) { push @change_opts, "-C$desc" }
+
+my $chg = "../$pva.changes";
+print STDERR " dpkg-genchanges @change_opts >$chg\n";
+open CHANGES, '-|', 'dpkg-genchanges', @change_opts
+    or subprocerr('dpkg-genchanges');
+
+open OUT, '>', $chg or syserr(_g('write changes file'));
+
+my $infiles = my $files = '';
+while ($_ = <CHANGES>) {
+    print OUT $_ or syserr(_g('write changes file'));
+    chomp;
+
+    if (/^Files:/i) {
+	$infiles = 1;
+    } elsif ($infiles && /^\s+(.*)$/) {
+	$files .= " $1 ";
+    } elsif ($infiles && /^\S/) {
+	$infiles = 0;
+    }
+}
+
+close CHANGES or subprocerr(_g('dpkg-genchanges'));
+close OUT or syserr(_g('write changes file'));
+
+sub fileomitted {
+    my ($regex) = @_;
+
+    return $files !~ /$regex/;
+}
+
+my $srcmsg;
+if (fileomitted '\.deb') {
+    # source only upload
+    if (fileomitted '\.diff\.gz') {
+	$srcmsg = _g('source only upload: Debian-native package');
+    } elsif (fileomitted '\.orig\.tar\.gz') {
+	$srcmsg = _g('source only, diff-only upload (original source NOT included)');
+    } else {
+	$srcmsg = _g('source only upload (original source is included)');
+    }
+} else {
+    $srcmsg = _g('full upload (original source is included)');
+    if (fileomitted '\.dsc') {
+	$srcmsg = _g('binary only upload (no source included)');
+    } elsif (fileomitted '\.diff\.gz') {
+	$srcmsg = _g('full upload; Debian-native package (full source is included)');
+    } elsif (fileomitted '\.orig\.tar\.gz') {
+	$srcmsg = _g('binary and diff upload (original source NOT included)');
+    } else {
+	$srcmsg = _g('full upload (original source is included)');
+    }
+}
+
+if ($signchanges && signfile("$pva.changes")) {
+    $signerrors = _g("Failed to sign .changes file");
+}
+
+if ($cleansource) {
+    withecho($rootcommand, 'debian/rules', 'clean');
+}
+
+print "$progname: $srcmsg\n";
+if ($signerrors) {
+    warning($signerrors);
+    exit 1;
+}

+ 0 - 297
scripts/dpkg-buildpackage.sh

@@ -1,297 +0,0 @@
-#!/bin/sh
-
-set -e
-
-version="1.10.10"; # This line modified by Makefile
-
-progname="$(basename "$0")"
-
-showversion () {
-	echo "Debian $progname version $version."
-
-	echo "
-Copyright (C) 1996 Ian Jackson.
-Copyright (C) 2000 Wichert Akkerman
-This is free software; see the GNU General Public Licence version 2 or
-later for copying conditions. There is NO warranty."
-}
-
-usage () {
-	cat <<END
-Usage: $progname [<options> ...]
-
-Options:
-  -r<gain-root-command>
-                 command to gain root privileges (default is fakeroot if it
-                 exists).
-  -p<sign-command>
-  -d             do not check build dependencies and conflicts.
-  -D             check build dependencies and conflicts.
-  -k<keyid>      the key to use for signing.
-  -sgpg          the sign-command is called like GPG.
-  -spgp          the sign-command is called like PGP.
-  -us            unsigned source.
-  -uc            unsigned changes.
-  -a<arch>       Debian architecture we build for (implies -d).
-  -b             binary-only, do not build source. } also passed to
-  -B             binary-only, no arch-indep files. } dpkg-genchanges
-  -S             source only, no binary files.     }
-  -t<system>     set GNU system type.           } passed to dpkg-architecture
-  -v<version>    changes since version <version>.      }
-  -m<maint>      maintainer for package is <maint>.    }
-  -e<maint>      maintainer for release is <maint>.    } only passed
-  -C<descfile>   changes are described in <descfile>.  } to dpkg-genchanges
-  -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
-  -nc            do not clean source tree (implies -b).
-  -tc            clean source tree when finished.
-  -ap            add pause before starting signature process.
-  -W             turn certain errors into warnings.       } passed to
-  -E             when -W is turned on, -E turned it off.  } dpkg-source
-  -i[<regex>]    ignore diffs of files matching regex.    } only passed
-  -I<filename>   filter out files when building tarballs. } to dpkg-source
-  --admindir=<directory>
-                 change the administrative directory.
-  -h, --help     show this help message.
-      --version  show the version.
-END
-}
-
-rootcommand=''
-if command -v fakeroot >/dev/null 2>&1; then
-	rootcommand=fakeroot
-fi
-
-signcommand=""
-if [ -e "$GNUPGHOME" ] || [ -e "$HOME/.gnupg" ] && \
-		command -v gpg > /dev/null 2>&1; then
-	signcommand=gpg
-elif command -v pgp > /dev/null 2>&1 ; then
-	signcommand=pgp
-fi
-
-signsource='withecho signfile'
-signchanges='withecho signfile'
-cleansource=false
-checkbuilddep=true
-checkbuilddep_args=''
-binarytarget=binary
-sourcestyle=''
-changesversion=''
-since=''
-maint=''
-desc=''
-noclean=false
-usepause=false
-warnable_error=0
-passopts=''
-admindir=''
-
-while [ $# != 0 ]
-do
-	value="$(echo x"$1" | sed -e 's/x--.*=//;s/^x-.//')"
-	case "$1" in
-	-h|--help)
-		usage; exit 0 ;;
-	--version)
-		showversion; exit 0 ;;
-	--admindir=*)
-		admindir="$value" ;;
-	-r*)	rootcommand="$value" ;;
-	-p*)	signcommand="$value" ;;
-	-k*)	signkey="$value" ;;
-	-d)	checkbuilddep=false ;;
-	-D)	checkbuilddep=true ;;
-	-sgpg)  forcesigninterface=gpg ;;
-	-spgp)  forcesigninterface=pgp ;;
-	-us)	signsource=: ;;
-	-uc)	signchanges=: ;;
-	-ap)	usepause="true";;
-	-a*)    targetarch="$value"; checkbuilddep=false ;;
-	-si)	sourcestyle=-si ;;
-	-sa)	sourcestyle=-sa ;;
-	-sd)	sourcestyle=-sd ;;
-	-s[nsAkurKUR])    passopts="$passopts $1";; # passed to dpkg-source
-        -i*)    diffignore=$1;;
-	-I*)	tarignore="$tarignore $1";;
-	-tc)	cleansource=true ;;
-	-t*)    targetgnusystem="$value" ;;          # Order DOES matter!
-	-nc)	noclean=true; if [ -z "$binaryonly" ]; then binaryonly=-b; fi ;;
-	-b)	binaryonly=-b;
-		checkbuilddep_args='';
-		binarytarget=binary;
-		[ "$sourceonly" ] && \
-			{ echo >&2 "$progname: cannot combine $1 and -S" ; exit 2 ; } ;;
-	-B)	binaryonly=-B; checkbuilddep_args=-B; binarytarget=binary-arch; [ "$sourceonly" ] && \
-			{ echo >&2 "$progname: cannot combine $1 and -S" ; exit 2 ; } ;;
-	-S)	sourceonly=-S; checkbuilddep=false; [ "$binaryonly" ] && \
-			{ echo >&2 "$progname: cannot combine $binaryonly and $1" ; exit 2 ; } ;;
-	-v*)	since="$value" ;;
-	-m*)	maint="$value" ;;
-	-e*)	changedby="$value" ;;
-	-C*)	desc="$value" ;;
-	-W)	warnable_error=1; passopts="$passopts -W";;
-	-E)	warnable_error=0; passopts="$passopts -E";;
-	*)	echo >&2 "$progname: unknown option or argument $1"
-		usage; exit 2 ;;
-	esac
-	shift
-done
-
-if [ -z "$signcommand"  ] ; then
-	signsource=:
-	signchanges=:
-fi
-
-if test -n "$forcesigninterface" ; then
-  signinterface=$forcesigninterface
-else
-  signinterface=$signcommand
-fi
-if [ -n "$signcommand" ] && [ "$signinterface" != "gpg" ] && [ "$signinterface" != "pgp" ] ; then
-    echo >&2 "$progname: unknown sign command, assuming pgp style interface"
-fi
-
-mustsetvar () {
-	if [ "x$2" = x ]; then
-		echo >&2 "$progname: unable to determine $3" ; \
-		exit 1
-	else
-		echo "$progname: $3 $2" ; \
-		eval "$1=\"\$2\""
-	fi
-}
-
-curd="`pwd`"
-dirn="$(basename "$curd")"
-mustsetvar package "`dpkg-parsechangelog | sed -n 's/^Source: //p'`" "source package is"
-mustsetvar changesversion "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version is"
-if [ -n "$changedby" ]; then maintainer="$changedby";
-elif [ -n "$maint" ]; then maintainer="$maint";
-else mustsetvar maintainer "`dpkg-parsechangelog | sed -n 's/^Maintainer: //p'`" "source changed by"; fi
-eval `dpkg-architecture -a${targetarch} -t${targetgnusystem} -s -f`
-
-if [ x$sourceonly = x ]; then
-	mustsetvar arch "`dpkg-architecture -a${targetarch} -t${targetgnusystem} -qDEB_HOST_ARCH`" "host architecture"
-else
-	arch=source
-fi
-mustsetvar sversion "$(echo "$changesversion" | perl -pe 's/^\d+://')" "source version without epoch"
-pv="${package}_${sversion}"
-pva="${package}_${sversion}_${arch}"
-
-signfile () {
-	if test "$signinterface" = "gpg" ; then
-		(cat "../$1" ; echo "") | \
-		$signcommand --local-user "${signkey:-$maintainer}" --clearsign --armor \
-			--textmode  > "../$1.asc" 
-	else
-		$signcommand -u "${signkey:-$maintainer}" +clearsig=on -fast <"../$1" \
-			>"../$1.asc"
-	fi
-	status=$?
-	if [ $status -eq 0 ]; then
-		mv -- "../$1.asc" "../$1"
-	else
-		/bin/rm -f "../$1.asc"
-	fi
-	echo
-	return $status
-}
-
-withecho () {
-        echo " $@" >&2
-	"$@"
-}
-
-if [ "$checkbuilddep" = "true" ]; then
-	if [ -n "$admindir" ]; then
-		checkbuilddep_args="$checkbuilddep_args --admindir=$admindir"
-	fi
-
-	if ! dpkg-checkbuilddeps $checkbuilddep_args; then
-		echo >&2 "$progname: Build dependencies/conflicts unsatisfied; aborting."
-		echo >&2 "$progname: (Use -d flag to override.)"
-		exit 3
-	fi
-fi
-
-set -- $binaryonly $sourceonly $sourcestyle
-if [ -n "$maint"	]; then set -- "$@" "-m$maint"		; fi
-if [ -n "$changedby"	]; then set -- "$@" "-e$changedby"	; fi
-if [ -n "$since"	]; then set -- "$@" "-v$since"		; fi
-if [ -n "$desc"		]; then set -- "$@" "-C$desc"		; fi
-
-if [ x$noclean != xtrue ]; then
-	withecho $rootcommand debian/rules clean
-fi
-if [ x$binaryonly = x ]; then
-	cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b "$dirn"; cd "$dirn"
-fi
-if [ x$sourceonly = x ]; then
-	withecho debian/rules build 
-	withecho $rootcommand debian/rules $binarytarget
-fi
-if [ "$usepause" = "true" ] && \
-   ( [ "$signchanges" != ":" ] || ( [ -z "$binaryonly" ] && [ "$signsource" != ":" ] ) ) ; then
-    echo Press the return key to start signing process
-    read dummy_stuff
-fi
-
-signerrors=
-if [ x$binaryonly = x ]; then
-	if ! $signsource "$pv.dsc"; then
-		signerrors="(WARNING: Failed to sign .dsc and .changes file)"
-		signchanges=:
-	fi
-fi
-chg=../"$pva.changes"
-withecho dpkg-genchanges "$@" >"$chg"
-
-fileomitted () {
-	set +e
-	test -z "`sed -n '/^Files:/,/^[^ ]/ s/'$1'$//p' <$chg`"
-	fir=$?
-	set -e
-	return $fir
-}	
-
-
-if fileomitted '\.deb'; then
-	# source only upload
-	if fileomitted '\.diff\.gz'; then
-		srcmsg='source only upload: Debian-native package'
-	elif fileomitted '\.orig\.tar\.gz'; then
-		srcmsg='source only, diff-only upload (original source NOT included)'
-	else
-		srcmsg='source only upload (original source is included)'
-	fi
-else
-	srcmsg='full upload (original source is included)'
-	if fileomitted '\.dsc'; then
-		srcmsg='binary only upload (no source included)'
-	elif fileomitted '\.diff\.gz'; then
-		srcmsg='full upload; Debian-native package (full source is included)'
-	elif fileomitted '\.orig\.tar\.gz'; then
-		srcmsg='binary and diff upload (original source NOT included)'
-	else
-		srcmsg='full upload (original source is included)'
-	fi
-fi
-
-if ! $signchanges "$pva.changes"; then
-	signerrors="(WARNING: Failed to sign .changes file)"
-fi
-
-if $cleansource; then
-	withecho $rootcommand debian/rules clean
-fi
-
-echo "dpkg-buildpackage: $srcmsg"
-if [ -n "$signerrors" ]; then
-	echo >&2 $signerrors
-	exit 1
-fi

+ 1 - 1
scripts/dpkg-source.pl

@@ -31,7 +31,7 @@ my $diff_ignore_default_regexp = '
 (?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$|
 (?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$|
 # File or directory names that should be ignored
 # File or directory names that should be ignored
 (?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git|
 (?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git|
-\.shelf|\.bzr(?:\.backup|tags)?)(?:$|/.*$)
+\.shelf|_MTN|\.bzr(?:\.backup|tags)?)(?:$|/.*$)
 ';
 ';
 
 
 # Take out comments and newlines
 # Take out comments and newlines

+ 9 - 0
scripts/po/ChangeLog

@@ -1,3 +1,12 @@
+2007-09-23  Frank Lichtenheld  <djpig@debian.org>
+
+	* dpkg-dev.pot: Regenerated.
+	* *.po: Merged with dpkg-dev.pot.
+
+2007-09-20  Christian Perrier  <bubulle@debian.org>
+
+	* fr.po: Typo correction
+
 2007-08-30  Peter Karlsson  <peterk@debian.org>
 2007-08-30  Peter Karlsson  <peterk@debian.org>
 
 
 	* LINGUAS, sv.po: Added Swedish.
 	* LINGUAS, sv.po: Added Swedish.

+ 1 - 0
scripts/po/POTFILES.in

@@ -3,6 +3,7 @@
 scripts/822-date.pl
 scripts/822-date.pl
 scripts/controllib.pl
 scripts/controllib.pl
 scripts/dpkg-architecture.pl
 scripts/dpkg-architecture.pl
+scripts/dpkg-buildpackage.pl
 scripts/dpkg-checkbuilddeps.pl
 scripts/dpkg-checkbuilddeps.pl
 scripts/dpkg-distaddfile.pl
 scripts/dpkg-distaddfile.pl
 scripts/dpkg-genchanges.pl
 scripts/dpkg-genchanges.pl

File diff suppressed because it is too large
+ 504 - 351
scripts/po/ca.po


File diff suppressed because it is too large
+ 500 - 351
scripts/po/dpkg-dev.pot


File diff suppressed because it is too large
+ 510 - 355
scripts/po/fr.po


File diff suppressed because it is too large
+ 698 - 503
scripts/po/sv.po