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

dpkg-buildpackage: Do not interpret the dsc filename as a regex

This only affects generated .changes files, when signing a .dsc file
with metacharacters in its filename.

Closes: #742535
Guillem Jover лет назад: 12
Родитель
Сommit
86aabea726
2 измененных файлов с 3 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-buildpackage.pl

+ 2 - 0
debian/changelog

@@ -36,6 +36,8 @@ dpkg (1.17.7) UNRELEASED; urgency=low
     as optional name=value1,value2 entries, with names «arch» and «profile».
     Use the now recognized field Build-Profiles from binary stanzas in the
     source control file to fill the «profile» value.
+  * Do not interpret the .dsc filename as a regex when recomputing the
+    md5sum for the .changes file after signing the .dsc. Closes: #742535
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 1 - 1
scripts/dpkg-buildpackage.pl

@@ -569,7 +569,7 @@ if ($signsource) {
     my $md5sum_regex = checksums_get_property('md5', 'regex');
     my $dsc_md5sum = $checksums->get_checksum("$pv.dsc", 'md5');
     my $dsc_size = $checksums->get_size("$pv.dsc");
-    my $dsc_files_regex = qr/$md5sum_regex\s+\d+\s+(\S+\s+\S+\s+$pv\.dsc)/;
+    my $dsc_files_regex = qr/$md5sum_regex\s+\d+\s+(\S+\s+\S+\s+\Q$pv\E\.dsc)/;
     $changes->{'Files'} =~ s/^$dsc_files_regex$/$dsc_md5sum $dsc_size $1/m;
 
     $changes->save($chg);