Kaynağa Gözat

dpkg-source: Check that debian/tests/control is a regular file

We are parsing the file now, so make sure it's something we can actually
work with.
Guillem Jover 10 yıl önce
ebeveyn
işleme
ff8c1d6aad
2 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 1 0
      debian/changelog
  2. 2 0
      scripts/dpkg-source.pl

+ 1 - 0
debian/changelog

@@ -8,6 +8,7 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
   * Add configuration file support to dpkg-buildpackage, as buildpackage.conf
     under either the dpkg system or user configuration directories.
     Closes: #539692, #765494
+  * Check that debian/tests/control is a regular file before parsing it.
   * Perl modules:
     - Use warnings::warnif() instead of carp() for deprecated warnings.
     - Add new format_range() method and deprecate dpkg() and rfc822() methods

+ 2 - 0
scripts/dpkg-source.pl

@@ -504,6 +504,8 @@ sub set_testsuite_field
     my $testsuite_field = $fields->{'Testsuite'} // '';
     my %testsuite = map { $_ => 1 } split /\s*,\s*/, $testsuite_field;
     if (-e "$dir/debian/tests/control") {
+        error(g_('test control %s is not a regular file'),
+              'debian/tests/control') unless -f _;
         $testsuite{autopkgtest} = 1;
     } elsif ($testsuite{autopkgtest}) {
         warning(g_('%s field contains value %s, but no tests control file %s'),