Преглед на файлове

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

This option disables signing any file. This makes this option
a future-proof way to disable all signing, in case we add yet more
files to sign, so that programs do not have to keep learning what
options to pass.
Guillem Jover преди 9 години
родител
ревизия
b29f31f1a0
променени са 3 файла, в които са добавени 14 реда и са изтрити 1 реда
  1. 2 0
      debian/changelog
  2. 6 1
      man/dpkg-buildpackage.man
  3. 6 0
      scripts/dpkg-buildpackage.pl

+ 2 - 0
debian/changelog

@@ -1,6 +1,8 @@
 dpkg (1.18.20) UNRELEASED; urgency=medium
 dpkg (1.18.20) UNRELEASED; urgency=medium
 
 
   [ Guillem Jover ]
   [ Guillem Jover ]
+  * Add a new --no-sign option to dpkg-buildpackage, to make it possible to
+    disable all signing in a future-proof way.
   * Perl modules:
   * Perl modules:
     - Mask the machine bits for SH and MIPS in the ELF processor flags in
     - Mask the machine bits for SH and MIPS in the ELF processor flags in
       Dpkg::Shlibs::Objdump. These do not define the ABI, and make the
       Dpkg::Shlibs::Objdump. These do not define the ABI, and make the

+ 6 - 1
man/dpkg-buildpackage.man

@@ -91,7 +91,8 @@ It runs the \fBcheck\fP hook and calls a package checker for the
 with \fB\-\-check\-command\fP).
 with \fB\-\-check\-command\fP).
 .IP \fB11.\fP 3
 .IP \fB11.\fP 3
 It runs the \fBsign\fP hook and calls \fBgpg2\fP or \fBgpg\fP (as long as it
 It runs the \fBsign\fP hook and calls \fBgpg2\fP or \fBgpg\fP (as long as it
-is not an UNRELEASED build) to sign the \fB.dsc\fP file (if any, unless
+is not an UNRELEASED build, or \-\-no\-sign is specified) to sign the
+\fB.dsc\fP file (if any, unless
 \fB\-us\fP or \fB\-\-unsigned\-source\fP is specified), the \fB.buildinfo\fP
 \fB\-us\fP or \fB\-\-unsigned\-source\fP is specified), the \fB.buildinfo\fP
 file (unless \fB\-ui\fP or \fB\-\-unsigned\-buildinfo\fP is specified) and
 file (unless \fB\-ui\fP or \fB\-\-unsigned\-buildinfo\fP is specified) and
 the \fB.changes\fP file (unless \fB\-uc\fP or \fB\-\-unsigned\-changes\fP
 the \fB.changes\fP file (unless \fB\-uc\fP or \fB\-\-unsigned\-changes\fP
@@ -403,6 +404,10 @@ Do not sign the \fB.buildinfo\fP file (since dpkg 1.18.19).
 .BR \-uc ", " \-\-unsigned\-changes
 .BR \-uc ", " \-\-unsigned\-changes
 Do not sign the \fB.changes\fP file (long option since dpkg 1.18.8).
 Do not sign the \fB.changes\fP file (long option since dpkg 1.18.8).
 .TP
 .TP
+.B \-\-no\-sign
+Do not sign any file, this includes the source package, the \fB.buildinfo\fP
+file and the \fB.changes\fP file (since dpkg 1.18.20).
+.TP
 .BR \-\-force\-sign
 .BR \-\-force\-sign
 Force the signing of the resulting files (since dpkg 1.17.0), regardless of
 Force the signing of the resulting files (since dpkg 1.17.0), regardless of
 \fB\-us\fP, \fB\-\-unsigned\-source\fP,
 \fB\-us\fP, \fB\-\-unsigned\-source\fP,

+ 6 - 0
scripts/dpkg-buildpackage.pl

@@ -105,6 +105,7 @@ sub usage {
   -us, --unsigned-source      unsigned source package.
   -us, --unsigned-source      unsigned source package.
   -ui, --unsigned-buildinfo   unsigned .buildinfo file.
   -ui, --unsigned-buildinfo   unsigned .buildinfo file.
   -uc, --unsigned-changes     unsigned .changes file.
   -uc, --unsigned-changes     unsigned .changes file.
+      --no-sign               do not sign any file.
       --force-sign            force signing the resulting files.
       --force-sign            force signing the resulting files.
       --admindir=<directory>  change the administrative directory.
       --admindir=<directory>  change the administrative directory.
   -?, --help                  show this help message.
   -?, --help                  show this help message.
@@ -253,6 +254,11 @@ while (@ARGV) {
 	warning(g_('-s%s is deprecated; always using gpg style interface'), $1);
 	warning(g_('-s%s is deprecated; always using gpg style interface'), $1);
     } elsif (/^--force-sign$/) {
     } elsif (/^--force-sign$/) {
 	$signforce = 1;
 	$signforce = 1;
+    } elsif (/^--no-sign$/) {
+	$signforce = 0;
+	$signsource = 0;
+	$signbuildinfo = 0;
+	$signchanges = 0;
     } elsif (/^-us$/ or /^--unsigned-source$/) {
     } elsif (/^-us$/ or /^--unsigned-source$/) {
 	$signsource = 0;
 	$signsource = 0;
     } elsif (/^-ui$/ or /^--unsigned-buildinfo$/) {
     } elsif (/^-ui$/ or /^--unsigned-buildinfo$/) {