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

[SCM] Debian package checker branch, master, updated. 2.3.0-54-g46f1eca



The following commit has been merged in the master branch:
commit 46f1eca32c44e0befba21ac00ae3036c75920a8c
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Sat Jan 2 00:20:16 2010 -0600

    Add new check for udev rules in /etc/udev/rules.d
    
    * checks/files{,.desc}:
      + [RG] Check that udev rules are not installed in /etc/udev/rules.d.
        Thanks, Marco d'Itri.  (Closes: #559208)

diff --git a/checks/files b/checks/files
index fa59aa7..c9bc7a8 100644
--- a/checks/files
+++ b/checks/files
@@ -273,6 +273,10 @@ foreach my $file (sort keys %{$info->index}) {
 	elsif ($file =~ m,^etc/rc\.boot/\S,) {
 	    tag "package-installs-into-etc-rc.boot", "$file";
 	}
+	# ---------------- /etc/udev/rules.d
+	elsif ($file =~ m,^etc/udev/rules\.d/\S,) {
+	    tag "udev-rule-in-etc", "$file";
+	}
     }
     # ---------------- /usr
     elsif ($file =~ m,^usr/,) {
diff --git a/checks/files.desc b/checks/files.desc
index ea02e28..14863fc 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1083,3 +1083,11 @@ Info: The given, apparently compressed, file is shipped in the package
  in addition to another file with the same name without the
  compression-method extension.  Normally this indicates a mistake in the
  installation process of the package.
+
+Tag: udev-rule-in-etc
+Severity: important
+Certainty: certain
+Ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559208
+Info: This package ships a udev rule and installs it under
+ <tt>/etc/udev/rules.d</tt>, which is reserved for user-installed files.
+ The correct directory for system rules is <tt>/lib/udev/rules.d</tt>.
diff --git a/debian/changelog b/debian/changelog
index 9599949..98dbf4d 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ lintian (2.3.1) UNRELEASED; urgency=low
       - debian-news-entry-uses-asterisk
       - debian-news-entry-without-blank-line
       - non-native-package-with-native-version
+      - udev-rule-in-etc
 
   * {checks,collection}/*.desc:
     + [RG] Remove Unpack-Level fields and depend on the 'unpacked'
@@ -40,6 +41,8 @@ lintian (2.3.1) UNRELEASED; urgency=low
   * checks/files{,.desc}:
     + [RG] Add a missing 'it' to the description of duplicate-font-file.
     + [RG] Add detection of nusoap to the embedded PHP libraries check.
+    + [RG] Check that udev rules are not installed in /etc/udev/rules.d.
+      Thanks, Marco d'Itri.  (Closes: #559208)
   * checks/init.d{,.desc}:
     + [RG] Bump severity of init.d-script-sourcing-without-test to serious.
     + [RG] Lower the severity of init.d-script-does-not-provide-itself
diff --git a/t/tests/files-foo-in-bar/debian/debian/install b/t/tests/files-foo-in-bar/debian/debian/install
index bc4dd26..abaf98f 100644
--- a/t/tests/files-foo-in-bar/debian/debian/install
+++ b/t/tests/files-foo-in-bar/debian/debian/install
@@ -1,4 +1,5 @@
 bar bin/foo
+bar etc/udev/rules.d
 bar mnt/foo
 bar tmp/foo
 bar usr/bin/foo
diff --git a/t/tests/files-foo-in-bar/desc b/t/tests/files-foo-in-bar/desc
index 8cb7474..e25ac59 100644
--- a/t/tests/files-foo-in-bar/desc
+++ b/t/tests/files-foo-in-bar/desc
@@ -14,3 +14,4 @@ Test-For:
  non-standard-dir-in-usr
  non-standard-dir-in-var
  subdir-in-bin
+ udev-rule-in-etc
diff --git a/t/tests/files-foo-in-bar/tags b/t/tests/files-foo-in-bar/tags
index ed80e93..181b4e0 100644
--- a/t/tests/files-foo-in-bar/tags
+++ b/t/tests/files-foo-in-bar/tags
@@ -14,6 +14,7 @@ E: files-foo-in-bar: nested-examples-directory usr/share/doc/files-foo-in-bar/ex
 E: files-foo-in-bar: non-standard-dir-in-var var/foo/
 E: files-foo-in-bar: subdir-in-bin bin/foo/
 E: files-foo-in-bar: subdir-in-usr-bin usr/bin/foo/
+E: files-foo-in-bar: udev-rule-in-etc etc/udev/rules.d/bar
 W: files-foo-in-bar: debug-package-should-be-named-dbg usr/lib/debug/bar
 W: files-foo-in-bar: executable-not-elf-or-script ./bin/foo/bar
 W: files-foo-in-bar: executable-not-elf-or-script ./usr/bin/foo/bar

-- 
Debian package checker


Reply to: