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

[SCM] Debian package checker branch, master, updated. 2.5.15-10-gbed4738



The following commit has been merged in the master branch:
commit bed4738702657d65c04b570f61fccb3be1e97597
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Jul 27 23:13:00 2013 +0200

    Revert "Warn about any reference to /lib/init in init.d scripts"
    
    It seems that adding this tag was a bit too early (see #710559).
    
    This reverts commit dd0a448c2793a151c0bca09009b33a043aebd67c.
    
    Conflicts:
    	t/tests/files-bad-perm-owner/debian/debian/binary.init
    	t/tests/init.d-lsb-headers/debian/debian/init.d-lsb-headers-missing.init
    	t/tests/init.d-lsb-headers/debian/debian/init.d-lsb-headers-virtual.init

diff --git a/checks/init.d.desc b/checks/init.d.desc
index 526dfe9..84a8c7a 100644
--- a/checks/init.d.desc
+++ b/checks/init.d.desc
@@ -366,13 +366,3 @@ Info: The given init script declares a dependency on a virtual facility
  If the dependency can not be satisfied upon the package's
  installation, insserv will refuse the activation of the init.d script.
 Ref: http://wiki.debian.org/LSBInitScripts
-
-Tag: init.d-script-call-internal-API
-Severity: normal
-Certainty: possible
-Info: The given init script call an internal API under
- <tt>/lib/init</tt>.  <tt>/lib/init/rw</tt> has gone away, and the
- scripts in <tt>/lib/init/*.sh</tt> represent internal implementation
- details of initscripts.  They are not public API for other packages
- to use.  Nonetheless, some packages incorrectly reference those
- scripts, notably /lib/init/vars.sh.
diff --git a/checks/init.d.pm b/checks/init.d.pm
index 1504485..3d38e6d 100644
--- a/checks/init.d.pm
+++ b/checks/init.d.pm
@@ -74,7 +74,7 @@ our $INITD_NAME_REGEX = qr/[\w\.\+][\w\-\.\+]*/;
 
 sub run {
 
-my ($pkg, undef, $info) = @_;
+my (undef, undef, $info) = @_;
 
 my $initd_dir = $info->lab_data_path ('init.d');
 
@@ -182,7 +182,7 @@ foreach my $initd_file (keys %initd_postinst) {
     # Check if file exists in package and check the script for other issues if
     # it was included in the package.
     if (-f $initd_path) {
-        check_init($initd_file, $initd_path, $pkg);
+        check_init($initd_file, $initd_path);
     } elsif (not -l $initd_path) {
         tag 'init.d-script-not-included-in-package', "etc/init.d/$initd_file";
     }
@@ -213,7 +213,7 @@ for my $script (readdir($dirfd)) {
     # that we get more complete Lintian coverage in the first pass.
     unless ($initd_postinst{$script}) {
         tag $tagname, "etc/init.d/$script";
-        check_init($script, $script_path, $pkg) if -f $script_path;
+        check_init($script, $script_path) if -f $script_path;
     }
 }
 closedir($dirfd);
@@ -222,7 +222,7 @@ return;
 }
 
 sub check_init {
-    my ($initd_file, $initd_path, $pkg) = @_;
+    my ($initd_file, $initd_path) = @_;
 
     # In an upstart system, such as Ubuntu, init scripts are symlinks to
     # upstart-job.  It doesn't make sense to check the syntax of upstart-job,
@@ -295,13 +295,6 @@ sub check_init {
         $needs_fs{'remote'} = 1 if ($l =~ m,^[^\#]*/usr/,);
         $needs_fs{'local'}  = 1 if ($l =~ m,^[^\#]*/var/,);
 
-        # /lib/init/* scripts are only for use by init
-        if ($pkg ne 'initscripts') {
-            if ($l =~ m,^[^\#]*/lib/init/,) {
-                tag 'init.d-script-call-internal-API', "etc/init.d/${initd_file}";
-            }
-        }
-
         while ($l =~ s/^[^\#]*?(start|stop|restart|force-reload|status)//o) {
             $tag{$1} = 1;
         }
diff --git a/debian/changelog b/debian/changelog
index b5d5529..41cfb8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ lintian (2.5.16) UNRELEASED; urgency=low
       "AllowOverride".  Thanks to Jean-Michel Vourgère
       for the report and an initial patch.
       (Closes: #717621)
+  * checks/init.d.{desc,pm}:
+    + [NT] Revert init.d-script-call-internal-API for now.
+      Refer to #710559 for more information.
   * checks/scripts.pm:
     + [NT] Stop emitting package-uses-local-diversion for
       calls to dpkg-divert without --package as dpkg 1.16.0
diff --git a/t/tests/init.d-general/debian/debian/control.in b/t/tests/init.d-general/debian/debian/control.in
index c831e9e..7b01af0 100644
--- a/t/tests/init.d-general/debian/debian/control.in
+++ b/t/tests/init.d-general/debian/debian/control.in
@@ -43,13 +43,3 @@ Description: {$description} -- sourcing without test
  This is a test package designed to exercise some feature or tag of
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.
-
-Package: {$srcpkg}-script-call-internal-api
-Architecture: {$architecture}
-Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
-Description: {$description} -- sourcing internal API
- Test a check for . /lib/init sourcing that is use of internal API
- .
- This is a test package designed to exercise some feature or tag of
- Lintian.  It is part of the Lintian test suite and may do very odd
- things.  It should not be installed like a regular package.
diff --git a/t/tests/init.d-general/debian/debian/init.d-general-script-call-internal-api.init b/t/tests/init.d-general/debian/debian/init.d-general-script-call-internal-api.init
deleted file mode 100644
index 5d36ab0..0000000
--- a/t/tests/init.d-general/debian/debian/init.d-general-script-call-internal-api.init
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/bash
-
-### BEGIN INIT INFO
-# Provides:          init.d-general-script-call-internal-api
-# Required-Start:    $local_fs $remote_fs $network $named $time
-# Required-Stop:     $local_fs $remote_fs $network $named $time
-# Should-Start:      $syslog
-# Should-Stop:       $syslog
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Starts The Onion Router daemon processes
-# Description:       Start The Onion Router, a TCP overlay
-#                    network client that provides anonymous
-#                    transport.
-### END INIT INFO
-
-# Load the VERBOSE setting and other rcS variables (internal API)
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-. /lib/lsb/init-functions
-
-printf "start status stop reload restart force-reload\n";
diff --git a/t/tests/init.d-general/desc b/t/tests/init.d-general/desc
index 87f66b5..6f4711f 100644
--- a/t/tests/init.d-general/desc
+++ b/t/tests/init.d-general/desc
@@ -8,4 +8,3 @@ Test-For:
  init.d-script-does-not-implement-required-option
  init.d-script-sourcing-without-test
  init.d-script-uses-usr-interpreter
- init.d-script-call-internal-API
diff --git a/t/tests/init.d-general/tags b/t/tests/init.d-general/tags
index 2c7a493..8147325 100644
--- a/t/tests/init.d-general/tags
+++ b/t/tests/init.d-general/tags
@@ -7,4 +7,3 @@ E: init.d-general-sourcing-without-test: init.d-script-sourcing-without-test etc
 I: init.d-general-bugs: init.d-script-does-not-implement-optional-option etc/init.d/init.d-general-bugs status
 W: init.d-general-interpreter-in-usr-dir: init.d-script-does-not-source-init-functions etc/init.d/init.d-general-interpreter-in-usr-dir
 W: init.d-general-interpreter-in-usr-dir: init.d-script-uses-usr-interpreter etc/init.d/init.d-general-interpreter-in-usr-dir /usr/bin/perl
-W: init.d-general-script-call-internal-api: init.d-script-call-internal-API etc/init.d/init.d-general-script-call-internal-api
diff --git a/t/tests/systemd-general/tags b/t/tests/systemd-general/tags
index 5f1f76f..ad662b4 100644
--- a/t/tests/systemd-general/tags
+++ b/t/tests/systemd-general/tags
@@ -7,7 +7,6 @@ E: systemd-general: systemd-no-service-for-init-script systemd-general
 E: systemd-general: systemd-service-file-outside-lib etc/systemd/system/fifo-pipe-as-init.service
 E: systemd-general: systemd-service-file-outside-lib etc/systemd/system/test.service
 E: systemd-general: systemd-tmpfiles.d-outside-usr-lib etc/tmpfiles.d/test.conf
-W: systemd-general: init.d-script-call-internal-API etc/init.d/systemd-general
 W: systemd-general: init.d-script-does-not-source-init-functions etc/init.d/systemd-general
 W: systemd-general: maintainer-script-calls-systemctl postrm:6
 W: systemd-general: script-in-etc-init.d-not-registered-via-update-rc.d etc/init.d/fifo-pipe-as-init

-- 
Debian package checker


Reply to: