Debian Bug report logs - #353659
lintian: Check for direct use of init.d, when invoke-rc.d should be used instead

version graph

Package: lintian; Maintainer for lintian is Debian Lintian Maintainers <lintian-maint@debian.org>; Source for lintian is src:lintian.

Reported by: Lars Wirzenius <liw@iki.fi>

Date: Mon, 20 Feb 2006 06:18:05 UTC

Severity: wishlist

Fixed in version lintian/1.23.17

Done: Russ Allbery <rra@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#353659; Package lintian. Full text and rfc822 format available.

Acknowledgement sent to Lars Wirzenius <liw@iki.fi>:
New Bug report received and forwarded. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Lars Wirzenius <liw@iki.fi>
To: submit@bugs.debian.org
Subject: lintian: Check for direct use of init.d, when invoke-rc.d should be used instead
Date: Mon, 20 Feb 2006 08:12:47 +0200
Package: lintian
Severity: wishlist

Policy 9.3.3.2 (Running initscripts) says that packages are strongly
recommended to use invoke-rc.d instead of calling the init.d script
directly. This will in the future become mandatory (or so the footnote
says and I fervently hope).

It would be nice if lintian would warn if maintainer scripts use the
init.d script directly and not via invoke-rc.d. Checking that the string
"/etc/init.d/" exists but "invoke-rc.d" does not might be a good enough
approximation to catch most such problems.

-- 
I am a werehuman.




Bug 353659 cloned as bug 353660. Request was from Lars Wirzenius <liw@iki.fi> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Lintian Maintainers <lintian-maint@debian.org>:
Bug#353659; Package lintian. Full text and rfc822 format available.

Acknowledgement sent to Lars Wirzenius <liw@iki.fi>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <lintian-maint@debian.org>. Full text and rfc822 format available.

Message #12 received at 353659@bugs.debian.org (full text, mbox):

From: Lars Wirzenius <liw@iki.fi>
To: 353659@bugs.debian.org
Subject: Re: lintian: Check for direct use of init.d, when invoke-rc.d should be used instead
Date: Sun, 02 Apr 2006 23:55:38 +0300
[Message part 1 (text/plain, inline)]
> It would be nice if lintian would warn if maintainer scripts use the
> init.d script directly and not via invoke-rc.d. Checking that the string
> "/etc/init.d/" exists but "invoke-rc.d" does not might be a good enough
> approximation to catch most such problems.

I did a quick check using the attached shell script to find potentially bad postinst
files. It found, in sarge/main/i386, 134 binary packages that call an init.d script (not
always their own) with a start or restart argument, but don't use invoke-rc.d if it is
available. I then checked the results manually and found that there were only two 
false positives: php4-tclink and uif. Both tell the user how to run the init.d script
but don't do it themselves.

I thus conclude that the test in the script is pretty good. I don't have the time right
now to implement this as a lintian check, but I hope that may happen by someone else's
efforts (or mine, at some future date).

-- 
Those who do, decide.
[find-lack-of-invoke (application/x-shellscript, attachment)]

Tags added: pending Request was from www-data <www-data@wolffelaar.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to Lars Wirzenius <liw@iki.fi>:
Bug#353659. Full text and rfc822 format available.

Message #17 received at 353659-submitter@bugs.debian.org (full text, mbox):

From: www-data <www-data@wolffelaar.nl>
To: control@bugs.debian.org, 353659-submitter@bugs.debian.org
Subject: Lintian bugs fixed in revision r604
Date: Mon, 03 Apr 2006 06:34:31 +0200
package lintian
# Fixed in r604 by rra
tag 353659 + pending
thanks

These bugs are fixed in revision 604 by rra
Log message:
* checks/scripts{.desc,}:
  + [RA] Warn when maintainer scripts run init scripts directly and
    don't use invoke-rc.d.  Thanks, Lars Wirzenius.  (Closes: #353659)





Reply sent to Russ Allbery <rra@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Lars Wirzenius <liw@iki.fi>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #22 received at 353659-close@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: 353659-close@bugs.debian.org
Subject: Bug#353659: fixed in lintian 1.23.17
Date: Fri, 21 Apr 2006 10:02:31 -0700
Source: lintian
Source-Version: 1.23.17

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:

lintian_1.23.17.dsc
  to pool/main/l/lintian/lintian_1.23.17.dsc
lintian_1.23.17.tar.gz
  to pool/main/l/lintian/lintian_1.23.17.tar.gz
lintian_1.23.17_all.deb
  to pool/main/l/lintian/lintian_1.23.17_all.deb



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 353659@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Russ Allbery <rra@debian.org> (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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 21 Apr 2006 09:36:34 -0700
Source: lintian
Binary: lintian
Architecture: source all
Version: 1.23.17
Distribution: unstable
Urgency: low
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Russ Allbery <rra@debian.org>
Description: 
 lintian    - Debian package checker
Closes: 122760 205934 242789 257650 261891 278290 294926 311786 328850 337034 344266 347169 353659 355032 357433 357636 359646 360214 360216 360217 360534 360711 361601 361644 361986 362566
Changes: 
 lintian (1.23.17) unstable; urgency=low
 .
   The "happy Nanaimo hacking" release
 .
   * checks/binaries:
     + [RA] Detect klibc binaries from their requested interpreter and
       allow them to appear static.  (Closes: #328850)
   * checks/common_data.pm:
     + [RA] Include all combinations of cpu and os from the dpkg cputable
       and ostable files (as of dpkg 1.13.16).  (Closes: #337034, #357433)
     + [RA] Include a list of known X metapackages.
   * checks/control-file{.desc,}:
     + [RA] Warn if debian/control in a source package is a symlink.
   * checks/copyright-file{.desc,}:
     + [RA] Don't assume mentions of GPL or GNU General Public License
       after what look like mail headers are referring to the license of
       the package.  Be a bit more specific in the old FSF address check
       to avoid false positives on other Cambridge, MA addresses.  Reported
       by Adam C. Powell IV.  (Closes: #205934)
   * checks/debconf:
     + [RA] Allow Indices as a template field.  cdebconf uses it and
       debconf ignores it.  Reported by Frans Pop.  (Closes: #361986)
   * checks/debdiff{.desc,}:
     + [RA] Warn if the diff contains debian/substvars.  Based on a patch
       by Michael Ablassmeier.  (Closes: #359646)
   * checks/debhelper.desc:
     + [RA] When explaining the warning about deprecated debhelper
       compatibility versions, mention that debhelper defaults to version 1
       if not set anywhere.  (Closes: #360711)
     + [RA] Move simple man page references from Info into Ref.
   * checks/fields{.desc,}:
     + [RA] Allow dpatch in Build-Depends for arch-independent packages if
       it is invoked in clean, build-arch, or binary-arch.
     + [RA] Only list examples of non-standard architectures, since there
       are now too many combinations to list completely.
     + [RA] Catch dependencies on X metapackages, based on a patch by Josh
       Triplett.  No packages are allowed to build-depend, and only
       packages that look like metapackages (arch: all, no files outside of
       /usr/share/doc) are allowed to depend.  (Closes: #347169)
     + [RA] Look for an explicit section of unknown, probably left over
       from dh_make templates, and diagnose it with an error rather than a
       warning.  Reported by Jari Aalto.  (Closes: #355032)
     + [RA] Reorganize dependency checking based on debian/rules analysis.
       Diagnose missing build dependencies on the helper packages we know
       about, catch cases where Build-Depends-Indep should be Build-Depends
       because of the clean target, and make sure users of dh_python
       build-depend on python.  yada is no longer a special case.
       (Closes: #242789, #278290)
     + [RA] Check for conflicting with dependencies and build-conflicting
       with build dependencies.  (Closes: #122760)
     + [RA] Allow xfonts-utils in dependencies.  It's not actually an X
       font package.
   * checks/files{.desc,}:
     + [RA] For the X.Org 7 transition, add explicit checks for fonts and
       binaries installed in /usr/X11R6.  Rename the existing check for
       other files in /usr/X11R6 since the tag had a pluralization error
       and we want package maintainers to see the error again and
       reconsider whether to ignore it.  No packages should be installing
       files in /usr/X11R6 going forward.  Remove the policy cross-refs for
       right now until policy catches up.
   * checks/manpages:
     + [RA] Use system_env instead of system and sanitize the environment
       before running man -l out of caution and to avoid extraneous output
       when CDPATH is set.  Reported by Marc Haber.  (Closes: #360217)
   * checks/nmu{.desc,}:
     + [RA] Warn if debian/changelog in a native source package is a
       symlink and skip checks rather than aborting if it was a symlink to
       a file we didn't unpack.  (Closes: #257650)
   * checks/po-debconf:
     + [RA] Use system_env instead of system out of caution and to avoid
       extraneous output when CDPATH is set.
   * checks/rules{.desc,}:
     + [RA] A new set of checks that parses debian/rules and checks for
       required rules, debian/rules as a symlink, and the correct first
       line.  Based heavily on previous work by René van Bevern.
       (Closes: #294926, #311786)
   * checks/scripts{.desc,}:
     + [RA] Ignore text inside single quotes and, for most checks, text
       inside double quotes when checking for bashisms.  Reported by Frank
       Küster.  (Closes: #344266)
     + [RA] Change canonical zsh path to /bin/zsh at the request of the zsh
       maintainer.  (Closes: #360534)
     + [RA] Change the check for broken error handling with invoke-rc.d to
       maintainer-script-hides-init-failure to be more generic and explain
       what the test looks at.  Add the script name and line number and fix
       a typo.  Thanks, Marc Haber.  (Closes: #360214, #360216)
     + [RA] Warn when maintainer scripts run init scripts directly and
       don't use invoke-rc.d.  Thanks, Lars Wirzenius.  (Closes: #353659)
     + [RA] Find missing ucf dependencies and restructure the code to allow
       easier addition of similar checks.  (Closes: #261891)
     + [RA] Add python2.5, lua50, gbx, and gbx2 to the list of valid
       interpreters.  (Closes: #361601, #361644, #362566)
   * checks/shared-libs:
     + [RA] Limit shlib-without-PT_GNU_STACK-section to only those
       architectures where gcc always adds the section.  Thanks to Frans
       Pop for the report and Bastian Blank for the architecture list.
       (Closes: #357636)
 .
   * collection/objdump-info:
     + [RA] Unset CDPATH before running cd to avoid strange effects from
       the user's environment.
     + [RA] Run readelf -l to collect interpreter information.
 .
   * lib/Dep.pm:
     + [RA] Add initial support for analyzing architecture information in
       dependencies instead of ignoring it.
   * lib/Read_taginfo.pm:
     + [RA] Add support for formatting man page references from Ref.
   * lib/Util.pm:
     + [RA] Add system_env, like system but sanitizing the environment.
 .
   * man/lintian.1:
     + [RA] Mention the new rules check class.
Files: 
 9686c95d8f1a5fd68fa603c0d826a3ab 805 devel optional lintian_1.23.17.dsc
 20ef41a4809606b74c1f9f420ec76768 286359 devel optional lintian_1.23.17.tar.gz
 6df8b4be5de53e2dbf7563ab1b55e40c 247292 devel optional lintian_1.23.17_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFESQ2Q+YXjQAr8dHYRAj1GAJ9uGZk89xodV1GYWRJDtM12kw5IPwCfRrRD
F8AbwtnAdvB2VL9SOiztgEE=
=rws9
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 26 Jun 2007 02:00:42 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 12:46:15 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.