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

dpkg-buildpackage: Remove deprecated support for PGP style interface

Guillem Jover лет назад: 14
Родитель
Сommit
a22c0eb2dc
4 измененных файлов с 20 добавлено и 45 удалено
  1. 2 0
      debian/changelog
  2. 9 9
      doc/README.feature-removal-schedule
  3. 2 4
      man/dpkg-buildpackage.1
  4. 7 32
      scripts/dpkg-buildpackage.pl

+ 2 - 0
debian/changelog

@@ -17,6 +17,8 @@ dpkg (1.16.4) UNRELEASED; urgency=low
     Closes: #671198
   * Do not mask PIE from dpkg-buildflags on m68k, it appears to work now.
     Requested by Thorsten Glaser <tg@mirbsd.de>.
+  * Remove deprecated support for PGP style signing command interface from
+    dpkg-buildpackage.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).

+ 9 - 9
doc/README.feature-removal-schedule

@@ -34,15 +34,6 @@ Warning: program
 Why:
  This option has been superseded by -tudeb.
 
-What: support of PGP
-Status: deprecated
-When: 1.15.x
-Warning: program
-Why:
- PGP is not part of Debian and GnuPG has been the standard tool for digital
- signatures for several years already. Supporting only GnuPG enables us to
- rely on some of its features.
-
 What: --print-installation-architecture (dpkg option)
 Status: obsolete
 When: 1.15.x
@@ -124,3 +115,12 @@ Why:
  Having two ways to let the administrator get to a shell on conffile prompt
  is confusing, it also difficults setting up a consistent environment to be
  used by external programs.
+
+What: support for PGP
+Status: removed
+When: 1.16.4
+Warning: program
+Why:
+ PGP is not part of Debian and GnuPG has been the standard tool for digital
+ signatures for several years already. Supporting only GnuPG enables us to
+ rely on some of its features.

+ 2 - 4
man/dpkg-buildpackage.1

@@ -199,13 +199,11 @@ another make program (for example by using
 as \fIrules-file\fR).
 .TP
 .BI \-p sign-command
-When \fBdpkg\-buildpackage\fP needs to execute GPG or PGP to sign a source
+When \fBdpkg\-buildpackage\fP needs to execute GPG to sign a source
 control (\fB.dsc\fP) file or a \fB.changes\fP file it will run
 \fIsign-command\fP (searching the \fBPATH\fP if necessary) instead of
 \fBgpg\fP. \fIsign-command\fP will get all the arguments that
-\fBpgp\fP would have gotten. If \fIsign-command\fP
-takes its arguments in GPG rather than PGP style, you should give
-the \fB\-sgpg\fP option. \fIsign-command\fP
+\fBgpg\fP would have gotten. \fIsign-command\fP
 should not contain spaces or any other shell metacharacters.
 .TP
 .BI \-k key-id

+ 7 - 32
scripts/dpkg-buildpackage.pl

@@ -63,8 +63,6 @@ Options:
   --as-root      ensure -T calls the target with root rights
   -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).
@@ -108,11 +106,9 @@ if ( ( ($ENV{GNUPGHOME} && -e $ENV{GNUPGHOME})
        || ($ENV{HOME} && -e "$ENV{HOME}/.gnupg") )
      && find_command('gpg')) {
 	 $signcommand = 'gpg';
-} elsif (find_command('pgp')) {
-	$signcommand = 'pgp'
 }
 
-my ($admindir, $signkey, $forcesigninterface, $usepause, $noclean,
+my ($admindir, $signkey, $usepause, $noclean,
     $cleansource, $since, $maint,
     $changedby, $desc, $parallel);
 my $checkbuilddep = 1;
@@ -173,7 +169,8 @@ while (@ARGV) {
     } elsif (/^-([dD])$/) {
 	$checkbuilddep = ($1 eq 'D');
     } elsif (/^-s(gpg|pgp)$/) {
-	$forcesigninterface = $1;
+	# Deprecated option
+	warning(_g("-s%s is deprecated; always using gpg style interface"), $1);
     } elsif (/^-us$/) {
 	$signsource = 0;
     } elsif (/^-uc$/) {
@@ -273,23 +270,6 @@ unless ($signcommand) {
     $signchanges = 0;
 }
 
-my $signinterface;
-if ($forcesigninterface) {
-    $signinterface = $forcesigninterface;
-} else {
-    $signinterface = $signcommand;
-}
-
-if ($signcommand) {
-    if ($signinterface !~ /^(gpg|pgp)$/) {
-	warning(_g("unknown sign command, assuming pgp style interface"));
-    } elsif ($signinterface eq 'pgp') {
-	if ($signsource or $signchanges) {
-	    warning(_g("PGP support is deprecated (see README.feature-removal-schedule)"));
-	}
-    }
-}
-
 my $build_opts = Dpkg::BuildOptions->new();
 if (defined $parallel) {
     $parallel = $build_opts->get("parallel") if $build_opts->has("parallel");
@@ -531,15 +511,10 @@ sub signfile {
     print STDERR " signfile $file\n";
     my $qfile = quotemeta($file);
 
-    if ($signinterface eq 'gpg') {
-	system("(cat ../$qfile ; echo '') | ".
-	       "$signcommand --utf8-strings --local-user "
-	       .quotemeta($signkey||$maintainer).
-	       " --clearsign --armor --textmode  > ../$qfile.asc");
-    } else {
-	system("$signcommand -u ".quotemeta($signkey||$maintainer).
-	       " +clearsig=on -fast <../$qfile >../$qfile.asc");
-    }
+    system("(cat ../$qfile ; echo '') | " .
+           "$signcommand --utf8-strings --local-user " .
+           quotemeta($signkey || $maintainer) .
+           " --clearsign --armor --textmode  > ../$qfile.asc");
     my $status = $?;
     unless ($status) {
 	system('mv', '--', "../$file.asc", "../$file")