[lintian] 01/01: Detects problem with dpkg-maintscript-helper symlink_to_dir.
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit f60da601098a2c7d8a6f78c619486d01b042faa8
Author: bastien <roucaries.bastien+debian@gmail.com>
Date: Fri Jul 3 16:06:14 2015 +0200
Detects problem with dpkg-maintscript-helper symlink_to_dir.
Detect problem with trailling /
---
checks/scripts.desc | 9 +++++++++
data/scripts/maintainer-script-bad-command | 1 +
debian/changelog | 2 ++
t/tests/scripts-maintainer-general/debian/debian/postinst | 11 +++++++++++
t/tests/scripts-maintainer-general/tags | 1 +
5 files changed, 24 insertions(+)
diff --git a/checks/scripts.desc b/checks/scripts.desc
index 5cfc757..3454e3f 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -368,6 +368,15 @@ Info: The maintainer script seems to call <tt>start-stop-daemon</tt>
scripts.
Ref: policy 9.3.3.2
+Tag: maintainer-script-should-not-use-slash-for-dpkg-maintscript-helper-symlink_to_dir
+Severity: serious
+Certainty: certain
+Info: The maintainer script seems to call <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.
+Ref: dpkg-maintscript-helper (1)
+
Tag: maintainer-script-removes-device-files
Severity: serious
Certainty: certain
diff --git a/data/scripts/maintainer-script-bad-command b/data/scripts/maintainer-script-bad-command
index 4b5cd56..174979e 100644
--- a/data/scripts/maintainer-script-bad-command
+++ b/data/scripts/maintainer-script-bad-command
@@ -41,6 +41,7 @@ maintainer-script-should-not-use-service ~~ 1 ~~
maintainer-script-should-not-use-start-stop-daemon ~~ 0 ~~ ~~ ~~\bstart-stop-daemon(?=\s)(?!.*\s--stop\b)
maintainer-script-should-not-use-update-alternatives-remove ~~ 1 ~~ ~~^postrm$ ~~\b update\-alternatives\s+\-\-remove\b
maintainer-script-should-not-use-update-alternatives-set ~~ 1 ~~ ~~ ~~^(?!\s*echo\s+["'][^'"]*)\bupdate\-alternatives\s+\-\-(?:set|set\-selections|config)\b
+maintainer-script-should-not-use-slash-for-dpkg-maintscript-helper-symlink_to_dir ~~ 1 ~~ ~~ ~~ dpkg-maintscript-helper\s+symlink_to_dir\s+[^\s]+/\s
# sendmail use override do not change it now
suidregister-used-in-maintainer-script ~~ 1 ~~ ~~ ~~\bsuidregister\b
diff --git a/debian/changelog b/debian/changelog
index ba7121d..6a33b1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ lintian (2.5.33) UNRELEASED; urgency=medium
to Riley Baird for the report. (Closes: #789577)
* checks/infofiles.pm:
+ [NT] Fix use of undefined variable in some cases.
+ * checks/scripts.{desc,pm}:
+ + [BR] Detects problem with dpkg-maintscript-helper symlink_to_dir.
* checks/systemd.{desc,pm}:
+ [NT] Apply patches from Felipe Sateler to refactor the
systemd checks. Notably this also fixes some duplicate
diff --git a/t/tests/scripts-maintainer-general/debian/debian/postinst b/t/tests/scripts-maintainer-general/debian/debian/postinst
index 755d4a1..2fa1973 100755
--- a/t/tests/scripts-maintainer-general/debian/debian/postinst
+++ b/t/tests/scripts-maintainer-general/debian/debian/postinst
@@ -181,5 +181,16 @@ then
true;
fi
+# bad
+dpkg-maintscript-helper symlink_to_dir \
+ /usr/share/autoconf-archive/html/ \
+ ../../autoconf-archive/html \
+ 20111221-2~ -- "$@"
+
+# good
+dpkg-maintscript-helper symlink_to_dir \
+ /usr/share/autoconf-archive/html \
+ ../../autoconf-archive/html \
+ 20111221-2~ -- "$@"
#DEBHELPER#
diff --git a/t/tests/scripts-maintainer-general/tags b/t/tests/scripts-maintainer-general/tags
index 6efc8bb..4e046f7 100644
--- a/t/tests/scripts-maintainer-general/tags
+++ b/t/tests/scripts-maintainer-general/tags
@@ -12,6 +12,7 @@ E: scripts-maintainer-general: maintainer-script-should-not-use-adduser-system-w
E: scripts-maintainer-general: maintainer-script-should-not-use-dpkg-status-directly postinst:56
E: scripts-maintainer-general: maintainer-script-should-not-use-install-sgmlcatalog postinst:74
E: scripts-maintainer-general: maintainer-script-should-not-use-install-sgmlcatalog postinst:75
+E: scripts-maintainer-general: maintainer-script-should-not-use-slash-for-dpkg-maintscript-helper-symlink_to_dir postinst:188
E: scripts-maintainer-general: maintainer-shell-script-fails-syntax-check prerm
E: scripts-maintainer-general: mknod-in-maintainer-script postinst:125
E: scripts-maintainer-general: read-in-maintainer-script postinst:10
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: