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

Bug#914538: marked as done (lintian: false positives with make prefixes on dh)



Your message dated Mon, 26 Nov 2018 09:13:10 +0000
with message-id <E1gRCx4-000GqM-Th@fasolo.debian.org>
and subject line Bug#914538: fixed in lintian 2.5.114
has caused the Debian Bug report #914538,
regarding lintian: false positives with make prefixes on dh
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.)


-- 
914538: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914538
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: lintian
Version: 2.5.113
Severity: normal
Tags: patch

Dear Maintainer,

When debian/rules includes a make prefix in front of dh, the use of dh
isn’t recognised and lintian reports
package-does-not-use-debhelper-or-cdbs.

The attached patch fixes this.

Regards,

Stephen


-- System Information:
Debian Release: 9.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'stable'), (100, 'unstable-debug'), (100, 'testing-debug'), (100, 'unstable'), (100, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lintian depends on:
ii  binutils                          2.28-5
ii  bzip2                             1.0.6-8.1
ii  diffstat                          1.61-1+b1
ii  dpkg                              1.18.25
ii  dpkg-dev                          1.18.25
ii  file                              1:5.30-1+deb9u2
ii  gettext                           0.19.8.1-2
ii  gnupg [gpg]                       2.1.18-8~deb9u3
ii  intltool-debian                   0.35.0+20060710.4
ii  libapt-pkg-perl                   0.1.32
ii  libarchive-zip-perl               1.59-1+deb9u1
ii  libcgi-pm-perl                    4.35-1
ii  libclass-accessor-perl            0.34-1
ii  libclone-perl                     0.38-2+b1
ii  libdigest-sha-perl                5.96-1+b1
ii  libdpkg-perl                      1.18.25
ii  libemail-valid-perl               1.202-1
ii  libfile-basedir-perl              0.07-1
ii  libipc-run-perl                   0.94-1+deb9u1
ii  liblist-moreutils-perl            0.416-1+b1
ii  libparse-debianchangelog-perl     1.2.0-12
ii  libperl5.24 [libdigest-sha-perl]  5.24.1-3+deb9u4
ii  libtext-levenshtein-perl          0.13-1
ii  libtimedate-perl                  2.3000-2
ii  liburi-perl                       1.71-1
ii  libxml-simple-perl                2.22-1
ii  libyaml-libyaml-perl              0.63-2
ii  man-db                            2.7.6.1-2
ii  patchutils                        0.3.4-2
ii  perl                              5.24.1-3+deb9u4
ii  t1utils                           1.39-2
ii  xz-utils                          5.2.2-1.2+b1

Versions of packages lintian recommends:
ii  libperlio-gzip-perl  0.19-1+b2

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  libhtml-parser-perl    3.72-3
ii  libtext-template-perl  1.46-1

-- no debconf information
>From a36de5d0924aa9df78dba247d2b778951aa44a0f Mon Sep 17 00:00:00 2001
From: Stephen Kitt <skitt@debian.org>
Date: Sat, 24 Nov 2018 16:25:48 +0100
Subject: [PATCH] Avoid false positives with make prefixes on dh

debian/rules which use a - or + prefix on dh trigger
package-does-not-use-debhelper-or-cdbs. This patch allows - or + in
front of dh and includes appropriate unit tests.

Signed-off-by: Stephen Kitt <skitt@debian.org>
---
 checks/debhelper.pm                                        |  4 ++--
 .../debian/debian/control.in                               | 14 ++++++++++++++
 .../debian/debian/rules                                    |  7 +++++++
 .../desc                                                   |  6 ++++++
 .../tags                                                   |  2 ++
 .../debian/debian/control.in                               | 14 ++++++++++++++
 .../debian/debian/rules                                    |  7 +++++++
 .../debhelper-package-uses-debhelper-with-prefix-plus/desc |  6 ++++++
 .../debhelper-package-uses-debhelper-with-prefix-plus/tags |  2 ++
 9 files changed, 60 insertions(+), 2 deletions(-)
 create mode 100644 t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/control.in
 create mode 100755 t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/rules
 create mode 100644 t/tests/debhelper-package-uses-debhelper-with-prefix-minus/desc
 create mode 100644 t/tests/debhelper-package-uses-debhelper-with-prefix-minus/tags
 create mode 100644 t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/control.in
 create mode 100755 t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/rules
 create mode 100644 t/tests/debhelper-package-uses-debhelper-with-prefix-plus/desc
 create mode 100644 t/tests/debhelper-package-uses-debhelper-with-prefix-plus/tags

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 3b3c67e7b..810226f00 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -87,7 +87,7 @@ sub run {
         }
 
         next if /^\s*\#/;
-        if (m/^\s+-?(dh_\S+)/) {
+        if (m/^\s+[@+-]?(dh_\S+)/) {
             my $dhcommand = $1;
             $build_systems{'debhelper'} = 1
               if not exists($build_systems{'dh'});
@@ -131,7 +131,7 @@ sub run {
             }
             $seencommand = 1;
             $needbuilddepends = 1;
-        } elsif (m,^\s+dh\s+,) {
+        } elsif (m,^\s+[@+-]?dh\s+,) {
             $build_systems{'dh'} = 1;
             delete($build_systems{'debhelper'});
             $seen_dh = 1;
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/control.in b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/control.in
new file mode 100644
index 000000000..28b7d974a
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/control.in
@@ -0,0 +1,14 @@
+Source: {$source}
+Priority: optional
+Section: {$section}
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}
+Rules-Requires-Root: binary-targets
+
+Package: {$source}
+Architecture: {$package_architecture}
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/rules b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/rules
new file mode 100755
index 000000000..42680a88b
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/debian/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+PKG = debhelper-package-uses-debhelper-with-prefix-minus
+DOCS = debian/tmp/usr/share/doc/$(PKG)
+
+%:
+	-dh $@
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/desc b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/desc
new file mode 100644
index 000000000..9e337d2a0
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/desc
@@ -0,0 +1,6 @@
+Testname: debhelper-package-uses-debhelper-with-prefix-minus
+Version: 1.0
+Description: Test for packages using debhelper with a - prefix
+Options: --pedantic -I
+Test-Against:
+ package-does-not-use-debhelper-or-cdbs
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/tags b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/tags
new file mode 100644
index 000000000..32e7485b4
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-minus/tags
@@ -0,0 +1,2 @@
+W: debhelper-package-uses-debhelper-with-prefix-minus source: debhelper-but-no-misc-depends debhelper-package-uses-debhelper-with-prefix-minus
+W: debhelper-package-uses-debhelper-with-prefix-minus: empty-binary-package
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/control.in b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/control.in
new file mode 100644
index 000000000..28b7d974a
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/control.in
@@ -0,0 +1,14 @@
+Source: {$source}
+Priority: optional
+Section: {$section}
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}
+Rules-Requires-Root: binary-targets
+
+Package: {$source}
+Architecture: {$package_architecture}
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/rules b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/rules
new file mode 100755
index 000000000..294002eac
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/debian/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+PKG = debhelper-package-uses-debhelper-with-prefix-plus
+DOCS = debian/tmp/usr/share/doc/$(PKG)
+
+%:
+	+dh $@
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/desc b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/desc
new file mode 100644
index 000000000..67704273e
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/desc
@@ -0,0 +1,6 @@
+Testname: debhelper-package-uses-debhelper-with-prefix-plus
+Version: 1.0
+Description: Test for packages using debhelper with a + prefix
+Options: --pedantic -I
+Test-Against:
+ package-does-not-use-debhelper-or-cdbs
diff --git a/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/tags b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/tags
new file mode 100644
index 000000000..94312102e
--- /dev/null
+++ b/t/tests/debhelper-package-uses-debhelper-with-prefix-plus/tags
@@ -0,0 +1,2 @@
+W: debhelper-package-uses-debhelper-with-prefix-plus source: debhelper-but-no-misc-depends debhelper-package-uses-debhelper-with-prefix-plus
+W: debhelper-package-uses-debhelper-with-prefix-plus: empty-binary-package
-- 
2.11.0


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

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

Debian distribution maintenance software
pp.
Chris Lamb <lamby@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@ftp-master.debian.org)


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

Format: 1.8
Date: Mon, 26 Nov 2018 08:21:31 +0000
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.5.114
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Description:
 lintian    - Debian package checker
Closes: 914500 914538 914562
Changes:
 lintian (2.5.114) unstable; urgency=medium
 .
   * checks/debhelper.pm:
     + [CL] Apply a patch from Stephen Kitt to avoid false-positives for the
       package-does-not-use-debhelper-or-cdbs tag if the call to dh(1) is
       prefixed with "@", "+" or "-".  (Closes: #914538)
   * checks/*, t/*:
     + [CL] Consistently use (eg.) "DEP 5" over "DEP-5" to match the style
       used on dep.debian.net.  (Closes: #914562)
 .
   * data/files/documentation-file-regex:
     + [CL] Prevent false-positives for files called (eg.) readMesh_off.m
       for the package-contains-documentation-outside-usr-share-doc tag
       which was matching an overly-permissive regex.  Thanks to Rafael
       Laboissière (rafael) for the report.  (Closes: #914500)
   * data/spelling/corrections:
     + [PW] Add a number of corrections.
 .
   * t/*:
     + [CL] Apply a patch series from Felix Lechner to make the templating
       more flexible in tests, re-using the Skeleton: statements in "desc"
       files for more complex templating logic.  (MR: !75)
Checksums-Sha1:
 2ae5d98b239cb3bc3c350efd9a15abb8acce09c0 3587 lintian_2.5.114.dsc
 ad327bce56b453dc0f5ceb550602dfe945283e2a 1614272 lintian_2.5.114.tar.xz
 15d37f0c4090b0b747b660e741bf2024b024dc03 1156804 lintian_2.5.114_all.deb
 6ec21ef7f46fc92832ed794434418bd9ce212152 17593 lintian_2.5.114_amd64.buildinfo
Checksums-Sha256:
 8695a8485843f78302132901dd734fceb61e62a79d7523828d335ed6340e3510 3587 lintian_2.5.114.dsc
 ee73a9e3132ccadc8047ba37d8189cf6e6d00bb0555e76753b355762cc725cd9 1614272 lintian_2.5.114.tar.xz
 751ca442802b625f20ab2359195edb260aa67a544270a5db3d214af3c80347b1 1156804 lintian_2.5.114_all.deb
 599c250797fe65b4de639d5398d0470577332ef4387b607e96f97aaa6025987d 17593 lintian_2.5.114_amd64.buildinfo
Files:
 5b7042f01856d69a704e1b3990d114cd 3587 devel optional lintian_2.5.114.dsc
 6fca1df494e3b114b0cf7c5db07dfb9f 1614272 devel optional lintian_2.5.114.tar.xz
 cc80f8156493dac0e8279d2b33398849 1156804 devel optional lintian_2.5.114_all.deb
 7511e665aaeca247c2a8048a725ce8aa 17593 devel optional lintian_2.5.114_amd64.buildinfo

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

iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlv7shQACgkQHpU+J9Qx
Hli6CA/+MV/3p/1fRR5KVEbeBMPCPd+OZrzMbv4xIMAdCpoEHV0TY+Q2NChzo9ZR
BM2o4+kPo4NV3sDE0ZlMsmx5EAX76u+4SzMKGcJx4p8jZIfXzHfwO6HhyNlwNnwA
nSi4B5chu3os0QTfDU2ycD/W8vhqxdAU5wmCNtGj3nBW6DwoCNlgCeTLaeB7yfIP
se7ZGM9h9HzmNaMcYb6iJgkkb9iCPIzPTAFx/rSUF+5x8/TH0xTm1vzpdL1pHReS
F2mvbGIjeihPYCqFy5YE4Oxvmp0f+iyJYT/dkSGfLVH+58rbFI2B2H3sBe5ZvukU
PpIVvFsLesD7pNbFo9xwgIKucBEmczodvDeLUqzL2ZjJEdQzmjsk1t+E5ggIb7Vq
aq4zJr+vcQwAe8FoATWop93vbj+WNq45HABsKEb+sooFjcrxM7aq+QP54pt7IM1b
DbMhDI2BEsP1ya9SwV6yiuFzi/kAAdobzFUHsgkErT3eHq9XUOlVbhddkY8gVWIh
rXo7DWZ7rHEyKvlOS24PDCOscJfRe4tmhDf1keAJ/xErAfcBF07HD7ZTSvxCIWvT
jFEVCifB4/gQqxjB8ZkgSaq0L2iJ22PbkP2pfoFS0zhMU6b42ibjSCWfFh+Gj330
L/lY/r16UeCK2sKd12R/ZT2XplFIBsXTWlA6nOjrzb1roveL2MA=
=nMvj
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: