[SCM] Debian package checker branch, master, updated. 2.5.1-28-g4e5e2b5
The following commit has been merged in the master branch:
commit 4e5e2b590d5cfc80438f93735a2b3bc39f2e87d9
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jul 2 01:01:41 2011 +0200
Create separate tag for upstart-jobs not being reg. by update-rc.d
This allow upstart vendors to disable this tag to avoid false-
positives.
diff --git a/checks/init.d b/checks/init.d
index 5c714a7..9c7fdd2 100644
--- a/checks/init.d
+++ b/checks/init.d
@@ -186,14 +186,24 @@ for (keys %initd_postinst) {
opendir(INITD, 'init.d') or fail("cannot read init.d directory: $!");
for (readdir(INITD)) {
my $script = $_;
+ my $tagname = 'script-in-etc-init.d-not-registered-via-update-rc.d';
next if grep {$script eq $_} qw(. .. README skeleton rc rcS);
+ # In an upstart system, such as Ubuntu, init scripts are symlinks to
+ # upstart-job which are not registered with update-rc.d.
+ if (-l "init.d/$_") {
+ my $target = readlink("init.d/$_");
+ if ($target =~ m,(?:\A|/)lib/init/upstart-job\z,) {
+ $tagname = 'upstart-job-in-etc-init.d-not-registered-via-update-rc.d';
+ }
+ }
+
+
# If $initd_postinst is true for this script, we already checked the
# syntax in the above loop. Check the syntax of unregistered scripts so
# that we get more complete Lintian coverage in the first pass.
unless ($initd_postinst{$script}) {
- tag 'script-in-etc-init.d-not-registered-via-update-rc.d',
- "etc/init.d/$script";
+ tag $tagname, "etc/init.d/$script";
check_init("init.d/$script") if -f "init.d/$script";
}
}
diff --git a/checks/init.d.desc b/checks/init.d.desc
index 976298e..6870d3c 100644
--- a/checks/init.d.desc
+++ b/checks/init.d.desc
@@ -89,6 +89,19 @@ Info: The package installs an <tt>/etc/init.d</tt> script which is
unless you omit the links intentionally for some reason or create the
links some other way.
+Tag: upstart-job-in-etc-init.d-not-registered-via-update-rc.d
+Severity: normal
+Certainty: possible
+Info: The package installs an upstart-job in <tt>/etc/init.d</tt>
+ which is not registered in the <tt>postinst</tt> script. On
+ non-upstart systems this is usually a bug, unless you omit the links
+ intentionally for some reason or create the links some other way.
+ .
+ This tag should only be emitted for vendors that do not use upstart
+ by default (such as Debian). If this tag is emitted by a vendor
+ using upstart (e.g. Ubuntu), it may be a misconfiguration of their
+ Lintian vendor profile.
+
Tag: init.d-script-has-duplicate-lsb-section
Severity: important
Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 5a3c411..d2c4d3b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ lintian (2.5.2) UNRELEASED; urgency=low
+ Added:
- package-has-long-file-name
- source-package-component-has-long-file-name
+ - upstart-job-in-etc-init.d-not-registered-via-update-rc.d
* checks/binaries:
+ [NT] Added lib/${MULTIARCH_DIR} to the list of paths to
@@ -36,6 +37,13 @@ lintian (2.5.2) UNRELEASED; urgency=low
+ [NT] Removed a leading slash from the filename part of the
extra for python-debug-in-wrong-location. Thanks to
Jakub Wilk for the report and the patch. (Closes: #631530)
+ * checks/init.d{,.desc}:
+ + [NT] Provide a separate tag for upstart-jobs not registered
+ via update-rc.d in postinst. This allows vendors (such as
+ Ubuntu) to disable this tag for upstart-jobs only using the
+ new vendor profiles. While this would break overrides, all
+ existing overrides appears to be for normal scripts rather
+ than upstart-jobs. (Closes: #631872)
* checks/rules:
+ [NT] Check included files in d/rules against a limited
number of common makefile snippets, which are known not
diff --git a/profiles/ubuntu/main.profile b/profiles/ubuntu/main.profile
index 0b79f5d..32f77cc 100644
--- a/profiles/ubuntu/main.profile
+++ b/profiles/ubuntu/main.profile
@@ -1,4 +1,5 @@
# The default profile for Ubuntu and derivatives thereof.
Profile: ubuntu/main
Extends: debian/main
-Disable-Tag: debian-changelog-file-is-a-symlink
+Disable-Tag: debian-changelog-file-is-a-symlink,
+ upstart-job-in-etc-init.d-not-registered-via-update-rc.d
diff --git a/t/tests/init.d-symlink/desc b/t/tests/init.d-symlink/desc
index b56407c..0f10617 100644
--- a/t/tests/init.d-symlink/desc
+++ b/t/tests/init.d-symlink/desc
@@ -6,4 +6,4 @@ Test-Against:
init.d-script-not-included-in-package
init.d-script-not-marked-as-conffile
Test-For:
- script-in-etc-init.d-not-registered-via-update-rc.d
+ upstart-job-in-etc-init.d-not-registered-via-update-rc.d
diff --git a/t/tests/init.d-symlink/tags b/t/tests/init.d-symlink/tags
index e37d7fb..a6106d7 100644
--- a/t/tests/init.d-symlink/tags
+++ b/t/tests/init.d-symlink/tags
@@ -1 +1 @@
-W: init.d-symlink: script-in-etc-init.d-not-registered-via-update-rc.d etc/init.d/lintian-unreg
+W: init.d-symlink: upstart-job-in-etc-init.d-not-registered-via-update-rc.d etc/init.d/lintian-unreg
--
Debian package checker
Reply to: