Przeglądaj źródła

dpkg-buildpackage: Add new --force-sign option

This will allow to override the decision to not sign due to -us, -uc,
or other internal heuristic.
Guillem Jover 13 lat temu
rodzic
commit
60640dc051
3 zmienionych plików z 16 dodań i 3 usunięć
  1. 1 0
      debian/changelog
  2. 6 2
      man/dpkg-buildpackage.1
  3. 9 1
      scripts/dpkg-buildpackage.pl

+ 1 - 0
debian/changelog

@@ -20,6 +20,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Do not pass -e in shell script shebangs, set it in the body.
   * Add new dpkg-parsechangelog --show-field option to print a field value.
     Closes: #284664
+  * Add new dpkg-buildpackage --force-sign option.
 
  -- Guillem Jover <guillem@debian.org>  Fri, 03 Aug 2012 13:21:00 +0200
 

+ 6 - 2
man/dpkg-buildpackage.1

@@ -3,7 +3,7 @@
 .\" Copyright © 1995-1996 Ian Jackson
 .\" Copyright © 2000 Wichert Akkerman <wakkerma@debian.org>
 .\" Copyright © 2007-2008 Frank Lichtenheld <djpig@debian.org>
-.\" Copyright © 2008-2011 Guillem Jover <guillem@debian.org>
+.\" Copyright © 2008-2013 Guillem Jover <guillem@debian.org>
 .\" Copyright © 2008-2012 Raphaël Hertzog <hertzog@debian.org>
 .\"
 .\" This is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .
-.TH dpkg\-buildpackage 1 "2012-05-04" "Debian Project" "dpkg utilities"
+.TH dpkg\-buildpackage 1 "2013-03-31" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-buildpackage \- build binary or source packages from sources
 .
@@ -214,6 +214,10 @@ Do not sign the source package.
 .TP
 .BR \-uc
 Do not sign the \fB.changes\fP file.
+.TP
+.BR \-\-force\-sign
+Force the signing of the resulting files (since dpkg 1.17.0),
+regardless of \fB\-us\fP or \fB\-uc\fP or other internal heuristics.
 .P
 .BR \-i [\fIregexp\fP]
 .br

+ 9 - 1
scripts/dpkg-buildpackage.pl

@@ -4,7 +4,7 @@
 #
 # Copyright © 1996 Ian Jackson
 # Copyright © 2000 Wichert Akkerman
-# Copyright © 2006-2010,2012 Guillem Jover <guillem@debian.org>
+# Copyright © 2006-2010,2012-2013 Guillem Jover <guillem@debian.org>
 # Copyright © 2007 Frank Lichtenheld
 #
 # This program is free software; you can redistribute it and/or modify
@@ -74,6 +74,8 @@ sub usage {
   -ap            add pause before starting signature process.
   -us            unsigned source package.
   -uc            unsigned .changes file.
+      --force-sign
+                 force signing the resulting files.
       --admindir=<directory>
                  change the administrative directory.
   -?, --help     show this help message.
@@ -113,6 +115,7 @@ my ($admindir, $signkey, $usepause, $noclean,
     $cleansource, $since, $maint,
     $changedby, $desc, $parallel);
 my $checkbuilddep = 1;
+my $signforce = 0;
 my $signsource = 1;
 my $signchanges = 1;
 my $buildtarget = 'build';
@@ -172,6 +175,8 @@ while (@ARGV) {
     } elsif (/^-s(gpg|pgp)$/) {
 	# Deprecated option
 	warning(_g("-s%s is deprecated; always using gpg style interface"), $1);
+    } elsif (/^--force-sign$/) {
+	$signforce = 1;
     } elsif (/^-us$/) {
 	$signsource = 0;
     } elsif (/^-uc$/) {
@@ -325,6 +330,9 @@ if (!defined $signcommand &&
 if (not $signcommand) {
     $signsource = 0;
     $signchanges = 0;
+} elsif ($signforce) {
+    $signsource = 1;
+    $signchanges = 1;
 }
 
 # Preparation of environment stops here