[SCM] Debian package checker branch, master, updated. 2.5.10-223-gb2bdf79
The following commit has been merged in the master branch:
commit b2bdf790101f9eb9d47ade181061265a827ded13
Author: Niels Thykier <niels@thykier.net>
Date: Mon Oct 22 17:04:48 2012 +0200
c/conffiles: Check the file-type of conffiles
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/conffiles b/checks/conffiles
index ff2dc60..66d2a31 100644
--- a/checks/conffiles
+++ b/checks/conffiles
@@ -76,6 +76,9 @@ if (-f $cf) {
# Read package contents...
foreach my $file ($info->sorted_index) {
my $index_info = $info->index ($file);
+ if (not $index_info->is_file and exists $conffiles{$file}) {
+ tag 'conffile-has-bad-file-type', $file;
+ }
next unless $file =~ m,^etc, and $index_info->is_file;
# If there is a /etc/foo, it must be a conffile (with a few exceptions).
diff --git a/checks/conffiles.desc b/checks/conffiles.desc
index 8d51e09..f679cd3 100644
--- a/checks/conffiles.desc
+++ b/checks/conffiles.desc
@@ -51,3 +51,11 @@ Certainty: certain
Ref: policy 9.3.3
Info: The symbolic links in <tt>/etc/rc?.d</tt> may not be marked as conffiles.
+Tag: conffile-has-bad-file-type
+Severity: important
+Certainty: certain
+Ref: #690051, #690910
+Info: The conffiles lists this path, which is not a file. This will
+ almost certainly not work.
+ .
+ Note that dpkg does not support symlinks being conffiles.
diff --git a/debian/changelog b/debian/changelog
index 293f8d5..b0b677c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.5.11) UNRELEASED; urgency=low
* Summary of tag changes:
+ Added:
+ - conffile-has-bad-file-type
- debug-package-for-multi-arch-same-pkg-not-coinstallable
- dm-upload-allowed-is-obsolete
- field-name-typo-in-dep5-copyright
@@ -35,9 +36,11 @@ lintian (2.5.11) UNRELEASED; urgency=low
+ [NT] Emit "missing changelog" for packages that are missing
their usr/share/doc/<pkg>/ dir and do not have a doc symlink.
Thanks to Faheem Mitha for the report. (Closes: #683224)
- * checks/conffiles:
+ * checks/conffiles{,.desc}:
+ [NT] Remove leading slash on the filename when emitting
file-in-etc-rc.d-marked-as-conffile.
+ + [NT] Add check for "non-file" conffiles. Thanks to Guillem
+ Jover for the report. (Closes: #690910)
* checks/control-file.desc:
+ [NT] Bump obsolete-relation-form-in-source to serious as these
forms are now "must not" instead of "should not".
diff --git a/t/COVERAGE b/t/COVERAGE
index 64acaae..80def48 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,5 +1,5 @@
-Last generated 2012-10-13
-Coverage (Tags): 886/964 (91.91%), w. legacy tests: 952/964 (98.76%)
+Last generated 2012-10-22
+Coverage (Tags): 890/968 (91.94%), w. legacy tests: 956/968 (98.76%)
Coverage (Checks): 33/41 (80.49%), w. legacy tests: 36/41 (87.80%)
The following tags are not tested by the test suite:
diff --git a/t/tests/conffiles-general/debian/debian/conffiles b/t/tests/conffiles-general/debian/debian/conffiles
index 27cb89f..6b81f06 100644
--- a/t/tests/conffiles-general/debian/debian/conffiles
+++ b/t/tests/conffiles-general/debian/debian/conffiles
@@ -1,5 +1,7 @@
/etc/foo
/etc/rc2.d/file
+/etc/symlink
/usr/share/foo
/var/cache/foo
etc/foo
+
diff --git a/t/tests/conffiles-general/debian/debian/links b/t/tests/conffiles-general/debian/debian/links
new file mode 100644
index 0000000..01a5497
--- /dev/null
+++ b/t/tests/conffiles-general/debian/debian/links
@@ -0,0 +1 @@
+etc/foo etc/symlink
diff --git a/t/tests/conffiles-general/debian/debian/rules b/t/tests/conffiles-general/debian/debian/rules
index 0a9c3b1..8c21a7c 100755
--- a/t/tests/conffiles-general/debian/debian/rules
+++ b/t/tests/conffiles-general/debian/debian/rules
@@ -5,4 +5,6 @@ pkg=conffiles-general
dh $@
override_dh_builddeb:
+ mkdir -p debian/$(pkg)/etc/
+ echo "Hallo World" > debian/$(pkg)/etc/foo
dpkg-deb --nocheck --build debian/$(pkg) ../$(pkg)_1.0_all.deb
diff --git a/t/tests/conffiles-general/desc b/t/tests/conffiles-general/desc
index e0b89e5..4b9b2ce 100644
--- a/t/tests/conffiles-general/desc
+++ b/t/tests/conffiles-general/desc
@@ -3,8 +3,9 @@ Sequence: 6000
Version: 1.0
Description: Test for conffile-related checks
Test-For:
+ conffile-has-bad-file-type
+ duplicate-conffile
file-in-etc-rc.d-marked-as-conffile
file-in-usr-marked-as-conffile
non-etc-file-marked-as-conffile
relative-conffile
- duplicate-conffile
diff --git a/t/tests/conffiles-general/tags b/t/tests/conffiles-general/tags
index 0870cb5..afecc53 100644
--- a/t/tests/conffiles-general/tags
+++ b/t/tests/conffiles-general/tags
@@ -1,3 +1,4 @@
+E: conffiles-general: conffile-has-bad-file-type etc/symlink
E: conffiles-general: duplicate-conffile etc/foo
E: conffiles-general: file-in-etc-rc.d-marked-as-conffile etc/rc2.d/file
E: conffiles-general: file-in-usr-marked-as-conffile usr/share/foo
--
Debian package checker
Reply to: