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

Bug#838997: marked as done (lintian: checks/init.d: Check for initscripts that source /lib/lsb/init-functions without declaring the corresponding dependency on lsb-base (>= 3.0-6).)



Your message dated Tue, 04 Oct 2016 22:30:44 +0000
with message-id <E1brYEW-0001f4-2l@franck.debian.org>
and subject line Bug#838997: fixed in lintian 2.5.48
has caused the Debian Bug report #838997,
regarding lintian: checks/init.d: Check for initscripts that source /lib/lsb/init-functions without declaring the corresponding dependency on lsb-base (>= 3.0-6).
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
838997: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838997
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: lintian
Severity: wishlist
Tags: patch

Hi,

Attached is the following:

  commit 288035a951de277d0248ce28c561fbf7f8646839
  Author: Chris Lamb <lamby@debian.org>
  Date:   Tue Sep 27 16:28:04 2016 +0200
  
      checks/init.d: Check for initscripts that source /lib/lsb/init-functions without declaring the corresponding dependency on lsb-base (>= 3.0-6).
      
      Signed-off-by: Chris Lamb <lamby@debian.org>
  
   checks/init.d.desc          |  5 +++++
   checks/init.d.pm            | 12 +++++++++---
   t/tests/legacy-scripts/desc |  2 ++
   t/tests/legacy-scripts/tags |  1 +
   4 files changed, 17 insertions(+), 3 deletions(-)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
>From 288035a951de277d0248ce28c561fbf7f8646839 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Tue, 27 Sep 2016 16:28:04 +0200
Subject: [PATCH] checks/init.d: Check for initscripts that source
 /lib/lsb/init-functions without declaring the corresponding dependency on
 lsb-base (>= 3.0-6).

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/init.d.desc          |  5 +++++
 checks/init.d.pm            | 12 +++++++++---
 t/tests/legacy-scripts/desc |  2 ++
 t/tests/legacy-scripts/tags |  1 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/checks/init.d.desc b/checks/init.d.desc
index ce33ba5..5b31754 100644
--- a/checks/init.d.desc
+++ b/checks/init.d.desc
@@ -370,3 +370,8 @@ Info: The given init script declares a dependency on the
  totally broken.
 Ref: https://wiki.debian.org/LSBInitScripts
 
+Tag: init.d-script-needs-depends-on-lsb-base
+Severity: important
+Certainty: possible
+Info: The given init script sources <tt>/lib/lsb/init-functions</tt> without
+ declaring the corresponding dependency on lsb-base (>= 3.0-6).
diff --git a/checks/init.d.pm b/checks/init.d.pm
index f91afa1..4174a4d 100644
--- a/checks/init.d.pm
+++ b/checks/init.d.pm
@@ -198,7 +198,7 @@ sub run {
 
         # Check if file exists in package and check the script for
         # other issues if it was included in the package.
-        check_init($initd_path);
+        check_init($initd_path, $info);
     }
 
     return unless $initd_dir and $initd_dir->is_dir;
@@ -222,7 +222,7 @@ sub run {
         # coverage in the first pass.
         unless ($initd_postinst{$script->basename}) {
             tag $tagname, $script;
-            check_init($script);
+            check_init($script, $info);
         }
     }
 
@@ -230,7 +230,7 @@ sub run {
 }
 
 sub check_init {
-    my ($initd_path) = @_;
+    my ($initd_path, $info) = @_;
 
     # 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,
@@ -321,6 +321,12 @@ sub check_init {
         while ($l =~ s/^[^\#]*?(start|stop|restart|force-reload|status)//o) {
             $tag{$1} = 1;
         }
+
+        if ($l =~ m{^\s*\.\s+/lib/lsb/init-functions}
+            && not $info->relation('strong')->implies('lsb-base (>= 3.0-6)')) {
+            tag 'init.d-script-needs-depends-on-lsb-base',
+              $initd_path, "(line $.)";
+        }
     }
     close($fd);
 
diff --git a/t/tests/legacy-scripts/desc b/t/tests/legacy-scripts/desc
index d95a521..ee8dc4e 100644
--- a/t/tests/legacy-scripts/desc
+++ b/t/tests/legacy-scripts/desc
@@ -4,3 +4,5 @@ Sequence: 9999
 Version: 6ds-1ubuntu0.5.10.1
 Type: non-native
 Description: Legacy test "scripts"
+Test-For:
+ init.d-script-needs-depends-on-lsb-base
diff --git a/t/tests/legacy-scripts/tags b/t/tests/legacy-scripts/tags
index 3f2854c..0436902 100644
--- a/t/tests/legacy-scripts/tags
+++ b/t/tests/legacy-scripts/tags
@@ -10,6 +10,7 @@ E: scripts: init.d-script-does-not-implement-required-option etc/init.d/lsb-brok
 E: scripts: init.d-script-does-not-implement-required-option etc/init.d/lsb-broken restart
 E: scripts: init.d-script-has-duplicate-lsb-section etc/init.d/lsb-broken
 E: scripts: init.d-script-has-unterminated-lsb-section etc/init.d/lsb-broken:15
+E: scripts: init.d-script-needs-depends-on-lsb-base etc/init.d/skeleton (line 40)
 E: scripts: missing-dep-for-interpreter jruby => jruby | jruby1.0 | jruby1.1 | jruby1.2 (usr/bin/jruby-broken)
 E: scripts: missing-dep-for-interpreter lefty => graphviz (usr/bin/lefty-foo)
 E: scripts: package-installs-python-bytecode usr/lib/python2.3/site-packages/test.pyc
-- 
2.9.3


--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.5.48

We believe that the bug you reported is fixed in the latest version of
lintian, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 838997@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <niels@thykier.net> (supplier of updated lintian package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 04 Oct 2016 19:37:17 +0000
Source: lintian
Binary: lintian
Architecture: source
Version: 2.5.48
Distribution: unstable
Urgency: low
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Description:
 lintian    - Debian package checker
Closes: 814326 823627 831633 836756 837502 837801 838195 838246 838603 838997 839086 839228 839263 839553
Changes:
 lintian (2.5.48) unstable; urgency=low
 .
   * Summary of tag changes:
     + Added:
       - file-name-contains-wildcard-character
       - homepage-for-cran-package-not-canonical
       - init.d-script-needs-depends-on-lsb-base
       - maintscript-includes-maint-script-parameters
     + Removed:
       - hardening-no-stackprotector
 .
   * checks/binaries.{desc,pm}:
     + [NT] Rewrite/embed the necessary bits from hardening-check to
       implement the default hardening-no-* checks directly in lintian.
       This is because hardening-check appears to be losing its
       "home" with the coming removal of hardening-wrapper and
       hardening-includes.  (Closes: #836756)
     + [JW] Remove the hardening-no-stackprotector tag.
     + [NT] Allow "golang-any" as an alternative to "golang-go" in
       Build-Depends for detecting golang binaries.  Thanks to
       Martín Ferrari for the report and the initial patch.
       (Closes: #839228)
   * checks/changelog-file.{desc,pm}:
     + [JW] Bump threshold for improbable bug number to 2000.
   * checks/control-file.{desc,pm}:
     + [JW] Add references to tags related to build profiles.
     + [JW] Relax Build-Profiles syntax check to allow (almost) any
       characters in profile names.  Thanks to Ximin Luo for the bug report.
       (Closes: #839086)
     + [JW] Add support for pkg.<srcpkg>.<anything> build profiles.
   * checks/debhelper.pm:
     + [JW] Ignore comments in debian/rules.
     + [JW] Fix parsing rule targets in lines containing multiple colons.
       Thanks to Andreas Beckmann for the bug report.  (Closes: #838246)
     + [CL] Check for .maintscript files that include
       "maint-script-parameters".  (Closes: #838195)
     + [NT] Fix typo that prevented lintian from detecting uses of the
       dhmk build-system.
   * checks/fields.{desc,pm}:
     + [JW] Fix typo.
     + [JW] Add references to tags related to build profiles.
     + [JW] Add support for pkg.<srcpkg>.<anything> build profiles.
     + [JW] Demote tags for build-depends related to build profiles to
       pedantic, as the required packages are available in stable.
       Thanks to Helmut Grohne for the bug report.  (Closes: #831633)
     + [NT] Apply patch from Dylan Aïssi to tag r-bioc packages not in
       section "gnu-r".  (Closes: #839263)
     + [NT] Apply patch from Dylan Aïssi to tag non-canonical uses of
       the cran homepage in the Homepage field.  (Closes: #839553)
   * checks/files.{desc,pm}:
     + [CL, NT] Tag usages of shell wildcard characters in file names.
       (Closes: #814326)
   * checks/init.d.{desc,pm}:
     + [CL, NT]: Emit a tag for initscripts that source the
       /lib/lsb/init-functions utility functions without declaring the
       corresponding dependency on lsb-base (>= 3.0-6).
       (Closes: #838997)
   * checks/shared-libs.desc:
     + [JW] Fix typos.
   * checks/testsuite.pm:
     + [JW] Apply patch from Sean Whitton to recognise autopkgtest-pkg-elpa
       as a valid value for the Testsuite field.  (Closes: #837801)
 .
   * collection/hardening-info:
     + [NT] Removed.
 .
   * data/fields/build-profiles:
     + [JW] Add new profiles: nogolang, nojava, noperl, nopython, noudeb.
   * data/fields/obsolete-packages:
     + [NT] Apply patch from Otto Kekäläinen to assist with the transition
       to the "default-mysql-*" packages.  (Closes: #838603)
   * data/fields/perl-provides:
     + [NT] Refresh perl provides.
   * data/files/js-libraries:
     + [BR] Apply patch from Jean-Michel Vourgère to add detection of
       libjs-jquery-migrate-1.  (Closes: #823627)
   * data/files/php-libraries:
     + [JW] Apply patch from Marcelo Jorge Vieira to update package name
       for php-gettext.  (Closes: #837502)
   * data/spelling/corrections:
     + [JW, PW] Add more corrections.
 .
   * debian/control:
     + [NT] Drop dependencies on hardening-includes as we no longer need
       hardening-check.
   * debian/copyright:
     + [JW] Add Paul Wise.
     + [JW] Remove now-unneeded separate entry for spellintian.t.
     + [JW] Update copyright years.
     + [CL] Add Chris Lamb.
 .
   * helpers/coll/hardening-info-helper:
     + [NT] Removed.
   * helpers/coll/objdump-info-helper:
     + [NT] Expose a few more bits from readelf needed to implement some
       of the hardening checks.
 .
   * lib/Lintian/Collect/Binary.pm:
     + [NT] Expose a few more bits from readelf needed to implement some
       of the hardening checks.
 .
   * profiles/debian/extra-hardening.profile:
     + [NT] Removed - we no longer support the stackprotector tag.
   * profiles/debian/ftp-master-auto-reject.profile:
     + [JW] Refresh against current rule set.
   * profiles/debian/main.profile:
     + [JW] Stop disabling the hardening-no-stackprotector tag.
 .
   * t/scripts/spellintian.t:
     + [JW] Relicense as GPLv2+, like the rest of Lintian.
Checksums-Sha1:
 a97a30a7e59db4b688995dc693eaf65712201c3b 2781 lintian_2.5.48.dsc
 fc0c4868b547ed9321b8be5177f3857992bb93be 1231432 lintian_2.5.48.tar.xz
Checksums-Sha256:
 96d52c761cb3d6fa1884a83d0fd62d8992dcebf3899f13ee9959197775301c73 2781 lintian_2.5.48.dsc
 c76a94b8a7f4eb90e21f9c51f2cf6909246a4fbd33d824cdedf33d17e696ee1c 1231432 lintian_2.5.48.tar.xz
Files:
 9918b0f9c69bf35d90d60bacde4a688b 2781 devel optional lintian_2.5.48.dsc
 3c8ce94e94fce55e0e0590d0e4029419 1231432 devel optional lintian_2.5.48.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJX9AtrAAoJEAVLu599gGRCl0kP/A3rbba6jnBJK9DGaujw0OiF
Xa+NtV9tMT3epRwMxm2X24G3UD3yOs3WAY813YqdCB1d5J01QZoymoFWoIeMH0eW
5PokzHCYikzu/zP9uck9U1+FOJAmJ3DGrekBmxa2jN5A2ar7CWoJNy87WLfXzMAM
pO6YCau+xqaU/KV0jGClgIQdwwgc+Z7HHcJds3iivdfCfSR+9xNoS9ik9Er8k4lB
YikBBQ4HAVE5mTxCxo02q/L960ijaaaPXsClOD7B0v8bRjfVDcjVf9G5Q679WfAF
0IuzaSdiTURm+NBPUwqmP8BwcEfIeFVEbd6rYGbGe5fTQiKcZPMp7F3SJPHFXQSB
74f6Ods5X5SdnSZmlutzR+vgVbMSXcrnDEx9MCFW4Njsrso2y0IRG7citHy7Vbbn
ndgIzfOSAKIiU76fFLfq/eBDap4SOd6FC4BPIVP4AB2hWvFRieIYTLU6wPZLK4+z
M5bR0kfFnzieKAyZvHk2h6fHynhPDUy68zc7RldyN0M3xvmGl4hR1pLmUOJhjZFo
NhMtXxznsuTY8Sg0vaYOiBNHqBpjn+/zlbRKhxlxN1U9/DlWOWzbuj4gb+hRcoCp
vsq/yf3zkHNvr+o8sosTFrHfaQHlZ8w4kh3bAaKeD5Y/nIIN6x6CWqVXmYfQnmJ/
nIA2kEuOU78klcsgts8E
=QE3b
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: