lintian: r1195 - in trunk: checks debian testset testset/maintainer-scripts/debian
Author: rra
Date: 2008-02-09 07:58:51 +0100 (Sat, 09 Feb 2008)
New Revision: 1195
Modified:
trunk/checks/scripts
trunk/checks/scripts.desc
trunk/debian/changelog
trunk/testset/maintainer-scripts/debian/postinst
trunk/testset/tags.maintainer-scripts
Log:
The "100 open bugs is magical" release.
* checks/scripts{.desc,}:
+ [RA] Warn of use of start-stop-daemon in maintainer scripts unless
used with --stop. Thanks, Kurt Roeckx. (Closes: #381180)
Modified: trunk/checks/scripts
===================================================================
--- trunk/checks/scripts 2008-02-08 22:27:27 UTC (rev 1194)
+++ trunk/checks/scripts 2008-02-09 06:58:51 UTC (rev 1195)
@@ -478,7 +478,7 @@
or fail("cannot open maintainer script $filename for reading: $!");
my %warned;
- my ($saw_init, $saw_invoke, $saw_debconf);
+ my ($saw_init, $saw_invoke, $saw_start_stop, $saw_debconf);
my $cat_string = "";
while (<C>) {
@@ -491,8 +491,7 @@
$warned{tmp} = 1;
}
if (m/^\s*killall(?:\s|\z)/) {
- tag "killall-is-dangerous", "$file:$."
- unless $warned{killall};
+ tag "killall-is-dangerous", "$file:$." unless $warned{killall};
$warned{killall} = 1;
}
if (m/^\s*mknod(?:\s|\z)/ and not m/\sp\s/) {
@@ -606,6 +605,9 @@
}
}
if (!$cat_string) {
+ if (/^\s*start-stop-daemon\s+/ && !/\s--stop\b/) {
+ tag 'start-stop-daemon-in-maintainer-script', "$file:$.";
+ }
# Don't use chown foo.bar
if (/(chown\s+[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+)\s+/) {
tag "deprecated-chown-usage", "$file:$. \'$1\'";
Modified: trunk/checks/scripts.desc
===================================================================
--- trunk/checks/scripts.desc 2008-02-08 22:27:27 UTC (rev 1194)
+++ trunk/checks/scripts.desc 2008-02-09 06:58:51 UTC (rev 1195)
@@ -228,6 +228,13 @@
Info: Maintainer scripts must not create device files directly. They
should call MAKEDEV instead.
+Tag: start-stop-daemon-in-maintainer-script
+Type: warning
+Info: The maintainer script seems to calll <tt>start-stop-daemon</tt>
+ directly. Long-running daemons should be started and stopped via init
+ scripts using <tt>invoke-rc.d</tt> rather than directly in maintainer
+ scripts.
+
Tag: maintainer-script-removes-device-files
Type: error
Ref: policy 10.6
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-02-08 22:27:27 UTC (rev 1194)
+++ trunk/debian/changelog 2008-02-09 06:58:51 UTC (rev 1195)
@@ -1,5 +1,7 @@
-lintian (1.23.45) UNRELEASED; urgency=low
+lintian (1.23.45) unstable; urgency=low
+ The "100 open bugs is magical" release.
+
* checks/debconf:
+ [RA] Recognize require as well as use when loading debconf modules
in Perl. Thanks, Manoj Srivastava. (Closes: #464775)
@@ -12,8 +14,11 @@
* checks/po-debconf:
+ [RA] Also accept nnn_NN names for po files. nds_DE and nds_NL are
valid locales. Thanks, Christian Perrier.
+ * checks/scripts{.desc,}:
+ + [RA] Warn of use of start-stop-daemon in maintainer scripts unless
+ used with --stop. Thanks, Kurt Roeckx. (Closes: #381180)
- -- Russ Allbery <rra@debian.org> Fri, 08 Feb 2008 14:26:10 -0800
+ -- Russ Allbery <rra@debian.org> Fri, 08 Feb 2008 22:58:32 -0800
lintian (1.23.44) unstable; urgency=low
Modified: trunk/testset/maintainer-scripts/debian/postinst
===================================================================
--- trunk/testset/maintainer-scripts/debian/postinst 2008-02-08 22:27:27 UTC (rev 1194)
+++ trunk/testset/maintainer-scripts/debian/postinst 2008-02-09 06:58:51 UTC (rev 1195)
@@ -127,3 +127,9 @@
if test -a /etc/default ; then
echo "$RANDOM|stuff"
fi
+
+# Calling start-stop-daemon directly in an init script.
+start-stop-daemon --start --quiet --name foo --startas /usr/bin/foo
+
+# But stopping it is fine -- we may be working around something else.
+start-stop-daemon --stop --quiet --name foo --startas /usr/bin/foo
Modified: trunk/testset/tags.maintainer-scripts
===================================================================
--- trunk/testset/tags.maintainer-scripts 2008-02-08 22:27:27 UTC (rev 1194)
+++ trunk/testset/tags.maintainer-scripts 2008-02-09 06:58:51 UTC (rev 1195)
@@ -74,4 +74,5 @@
W: maintainer-scripts: postrm-does-not-purge-debconf
W: maintainer-scripts: postrm-has-useless-call-to-ldconfig
W: maintainer-scripts: read-in-maintainer-script postinst:18
+W: maintainer-scripts: start-stop-daemon-in-maintainer-script postinst:132
W: maintainer-scripts: update-alternatives-remove-called-in-postrm
Reply to: