[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.2-132-g9faa8c3



The following commit has been merged in the master branch:
commit cda9efd6a8863a06f2a305eef395035698feeebb
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Sep 10 11:43:54 2011 +0200

    Check that all members of the control.tar.gz are files or dirs

diff --git a/checks/control-files b/checks/control-files
index 92b1f6c..740a4ec 100644
--- a/checks/control-files
+++ b/checks/control-files
@@ -51,7 +51,16 @@ foreach my $file (sort keys %$cindex) {
     my $operm;
     my $experm;
 
-    next if $file eq '';
+    # the control.tar.gz should only contain files (and the "root"
+    # dir, but that /should/ the "empty file" case in the beginning of
+    # the loop) In any event, allow directories just in case - the
+    # check here is mostly to catch symlinks (and "devices" etc.)
+    if ($cindex_info->{type} !~ m/^[-d]$/o) {
+        tag 'control-file-is-not-a-file', $file;
+        # Doing further checks is probably not going to yield anything
+        # remotely useful.
+        next;
+    }
 
     # valid control file?
     unless ( $ctrl->known($file) ) {
diff --git a/checks/control-files.desc b/checks/control-files.desc
index 14eadfd..8ece2a2 100644
--- a/checks/control-files.desc
+++ b/checks/control-files.desc
@@ -40,3 +40,8 @@ Severity: serious
 Certainty: certain
 Ref: policy 10.9
 Info: All control files should be owned by root/root.
+
+Tag: control-file-is-not-a-file
+Severity: serious
+Certainty: certain
+Info: The package contains a control file that is not a regular file.
diff --git a/debian/changelog b/debian/changelog
index d8155bf..8b51229 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ lintian (2.5.3) UNRELEASED; urgency=low
   * Summary of tag changes:
     + Added:
       - boilerplate-copyright-format-uri
+      - control-file-is-not-a-file
       - comma-separated-files-in-dep5-copyright
       - copyright-has-crs
       - debian-copyright-is-symlink
@@ -55,6 +56,9 @@ lintian (2.5.3) UNRELEASED; urgency=low
     + [JW] Merged etcfiles into conffile.  (Closes: #637590)
   * checks/conffile:
     + [NT] Skip all checks if "conffiles" is a symlink.
+  * checks/control-files{,.desc}:
+    + [NT] Check that all members of the control.tar.gz are either
+      regular files or directories.
   * checks/copyright-file{,.desc}:
     + [JW] Check for CRLF line endings in copyright files.
       (Closes: #634191)
diff --git a/t/COVERAGE b/t/COVERAGE
index 4d99fe7..096ea13 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,5 +1,5 @@
 Last generated 2011-09-10
-Coverage: 721/936 (77.03%), w. legacy tests: 843/936 (90.06%)
+Coverage: 723/937 (77.16%), w. legacy tests: 844/937 (90.07%)
 
 The following tags are not tested by the test suite:
 
@@ -120,7 +120,6 @@ binaries statically-linked-binary
 binaries unstripped-binary-or-object
 
 changelog-file changelog-file-missing-in-native-package
-changelog-file debian-changelog-file-missing-or-wrong-name
 changelog-file wrong-name-for-debian-news-file
 
 copyright-file old-fsf-address-in-copyright-file
@@ -250,7 +249,6 @@ Breakdown of remaining tags in legacy test suite by test case:
 
 binary
   binary-has-unneeded-section
-  debian-changelog-file-missing-or-wrong-name
   deprecated-kdelnk-file
   desktop-contains-deprecated-header
   desktop-entry-missing-required-key
diff --git a/t/debs/control-files-traversal/desc b/t/debs/control-files-traversal/desc
index 60dc3e1..f393384 100644
--- a/t/debs/control-files-traversal/desc
+++ b/t/debs/control-files-traversal/desc
@@ -2,4 +2,5 @@ Testname: control-files-traversal
 Sequence: 6000
 Version: 1.0
 Description: Test for bad owner of control files
-Options: -C conffiles,md5sums -IE
+Options: -C conffiles,md5sums,control-files -IE
+Test-For: control-file-is-not-a-file
diff --git a/t/debs/control-files-traversal/tags b/t/debs/control-files-traversal/tags
index e69de29..d556ced 100644
--- a/t/debs/control-files-traversal/tags
+++ b/t/debs/control-files-traversal/tags
@@ -0,0 +1 @@
+E: control-files-traversal: control-file-is-not-a-file conffiles

-- 
Debian package checker


Reply to: