[Reproducible-commits] [dpkg] 30/74: dpkg-source: Check that debian/tests/control is a regular file

Mattia Rizzolo mattia at debian.org
Sun Jul 3 22:22:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 1.18.8
in repository dpkg.

commit ff8c1d6aad5a8976c1f60dff6c2a7fc75f3cfe33
Author: Guillem Jover <guillem at debian.org>
Date:   Tue Jun 21 22:40:16 2016 +0200

    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.
---
 debian/changelog       | 1 +
 scripts/dpkg-source.pl | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 894160d..1d1e334 100644
--- a/debian/changelog
+++ b/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
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index a9783eb..7d71e05 100755
--- a/scripts/dpkg-source.pl
+++ b/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'),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list