[lintian] 02/02: d/s/…-bad-command: Fix …-not-use-adduser-system-without-home FP
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository lintian.
commit 1d6b8a0a24c4bc477fd188964484f9480b76bce2
Author: Axel Beckert <abe@deuxchevaux.org>
Date: Sun Aug 30 20:59:47 2015 +0200
d/s/…-bad-command: Fix …-not-use-adduser-system-without-home FP
Fix maintainer-script-should-not-use-adduser-system-without-home false
positve in cases where --system and --home are ordered differently
than initially expected.
This is fixed by breaking the current regexp into two alternative
parts and making sure the original never matches if --home comes
before --system by using a negative look ahead assert (?!…) quite
early in the first alternative.
Yes, this is even uglier and more unreadable than before, but it now
has less false positives.
Closes: #797395
Signed-off-by: Axel Beckert <abe@deuxchevaux.org>
---
data/scripts/maintainer-script-bad-command | 2 +-
debian/changelog | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/data/scripts/maintainer-script-bad-command b/data/scripts/maintainer-script-bad-command
index bfad17a..372e4f6 100644
--- a/data/scripts/maintainer-script-bad-command
+++ b/data/scripts/maintainer-script-bad-command
@@ -29,7 +29,7 @@ maintainer-script-removes-device-files ~~ 0 ~~
maintainer-script-should-not-hide-init-failure ~~ 0 ~~ ~~ ~~invoke-rc.d.*\|\| \s+ exit \s+ 0
maintainer-script-should-not-modify-ld-so-conf ~~ 0 ~~^libc ~~ ~~(?:\A\s*(?:cp|mv)\s+.*\s+|>\s*)/etc/ld\.so\.conf\s*(?:\s|\Z)
maintainer-script-should-not-modify-netbase-managed-file ~~ 0 ~~ ~~ ~~(?:\A\s*(?:cp|mv)\s+.*\s+|>\s*)(/etc/(?:services|protocols|rpc))\s*(?:\s|\Z)
-maintainer-script-should-not-use-adduser-system-without-home ~~ 1 ~~ ~~ ~~(adduser(?:\s.*)?\s--system(?=\s)(?!.*\s--home\s+(?:["']?/(?!home/)|"?\$[\(\[\{]?)).*)
+maintainer-script-should-not-use-adduser-system-without-home ~~ 1 ~~ ~~ ~~(adduser\s(?:(?!.*(?<=\s)--home\s.*\s--system).*(?<=\s)--system(?=\s)(?!.*\s--home\s+(?:["]?/(?!home/)|["]?\$[\(\[\{]?))|--home\s+["]?/home/.*\s--system(?:\s|$)).*)
maintainer-script-should-not-use-ancient-dpkg-epoch-check ~~ 0 ~~ ~~ ~~${LEADIN}dpkg\s+--assert-working-epoch\b
maintainer-script-should-not-use-ancient-dpkg-multi-conrep-check~~ 0 ~~ ~~ ~~${LEADIN}dpkg\s+--assert-multi-conrep\b
maintainer-script-should-not-use-deprecated-chown-usage ~~ 0 ~~ ~~ ~~(chown(?:\s+--?[A-Za-z-]+)*\s+[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+)\s+
diff --git a/debian/changelog b/debian/changelog
index a4080d3..1012308 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,10 @@ lintian (2.5.37) UNRELEASED; urgency=medium
* data/fields/archive-sections:
+ [NT] Remove the "debugsym" section as "ddebs" will be put in
the regular "debug" section.
+ * data/scripts/maintainer-script-bad-command:
+ + [AB] Fix maintainer-script-should-not-use-adduser-system-without-home
+ false positve in cases where --system and --home are ordered
+ differently than initially expected. (Closes: #797395)
* debian/control:
+ [AB] Update Vcs-Browser header to use https and cgit.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: