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

Use the Debian keyring in dpkg-source when checking signatures
of .dsc files, if available. Closes: #364726

Frank Lichtenheld лет назад: 20
Родитель
Сommit
fb8e55db54
3 измененных файлов с 15 добавлено и 1 удалено
  1. 7 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 6 1
      scripts/dpkg-source.pl

+ 7 - 0
ChangeLog

@@ -7,6 +7,13 @@
 	are matched by a way stricter regex. (Characters now
 	allowed are '+' and '.').
 
+2006-05-10  Robert Millan  <rmh@aybabtu.com>,
+	    Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/dpkg-source.pl: When checking the
+	signature of a .dsc file, use the Debian
+	keyring if available.
+
 2006-05-04  Guillem Jover  <guillem@debian.org>
 
 	* configure.ac: Bump version to 1.13.20~.

+ 2 - 0
debian/changelog

@@ -7,6 +7,8 @@ dpkg (1.13.20~) UNRELEASED; urgency=low
   * Allow '+' and '.' in distribution names in Debian changelogs.
     Based on a patch by John Wright.
     Closes: #361171
+  * Use the Debian keyring in dpkg-source when checking signatures
+    of .dsc files, if available. Closes: #364726
 
   [ Updated dpkg Translations ]
   * Portuguese (Miguel Figueiredo).

+ 6 - 1
scripts/dpkg-source.pl

@@ -581,7 +581,12 @@ if ($opmode eq 'build') {
 
     if ($is_signed) {
 	if (-x '/usr/bin/gpg') {
-	    my $gpg_command = 'gpg -q --verify '.quotemeta($dsc).' 2>&1';
+	    my $gpg_command = 'gpg -q --verify ';
+	    if (-r '/usr/share/keyrings/debian-keyring.gpg') {
+		$gpg_command = $gpg_command.'--keyring /usr/share/keyrings/debian-keyring.gpg ';
+	    }
+	    $gpg_command = $gpg_command.quotemeta($dsc).' 2>&1';
+
 	    my @gpg_output = `$gpg_command`;
 	    my $gpg_status = $? >> 8;
 	    if ($gpg_status) {