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

Bug#569492: lintian: Avoid checking upstart jobs linked from /etc/init.d



Package: lintian
Version: 2.3.2
Tags: patch

Upstart jobs are installed in /etc/init, however, symlinks are placed
in /etc/init.d to the upstart binaries, which helps backward
compatibility.

These symlinks all point to /lib/init/upstart-job, which is a shell
script, but not actually an init script, and thus should not be
subjected to these lintian checks:
 * init.d-script-missing-lsb-section
 * script-in-etc-init.d-not-registered-via-update-rc.d

The following patch from Jos Boumans ensure that these rules are not
enforced on init.d links which are really upstart jobs.

We are carrying this patch in Ubuntu.  We would appreciate Debian's
consideration of merging it upstream.

Thanks.
-- 
:-Dustin

Dustin Kirkland
Canonical, LTD
kirkland@canonical.com
GPG: 1024D/83A61194
diff -Nru lintian-2.2.18ubuntu1/checks/init.d lintian-2.2.18ubuntu2/checks/init.d
--- lintian-2.2.18ubuntu1/checks/init.d	2009-11-13 08:36:39.000000000 +0100
+++ lintian-2.2.18ubuntu2/checks/init.d	2009-12-27 03:26:08.000000000 +0100
@@ -180,9 +180,16 @@
 opendir(INITD, "init.d") or fail("cannot read init.d directory: $!");
 for (readdir(INITD)) {
     next if $_ eq '.' || $_ eq '..' || $_ eq 'README' || $_ eq 'skeleton';
+    
+    my $f = "init.d/$_";
+
+    # don't check upstart jobs. See Ubuntu bug report:
+    # https://bugs.launchpad.net/ubuntu/+source/lintian/+bug/496798    
+    next if -l $f and readlink($f) =~ m|lib/init/upstart-job$|;
+    
     unless ($initd_postinst{$_}) {
 	tag "script-in-etc-init.d-not-registered-via-update-rc.d", "/etc/init.d/$_";
-	check_init("init.d/$_") if -f "init.d/$_";
+	check_init("$f") if -f "$f";
     }
 }
 closedir(INITD);

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: