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

[lintian] 01/01: Warn when packages specify a "Bugs:" field in debian/control as this can make reportbug unable to report bugs. (Closes: #741071)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 0bd2f7bb5f0bdfe916efa2ff5eba5c04169fd372
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Dec 22 20:33:55 2017 +0000

    Warn when packages specify a "Bugs:" field in debian/control as this can make reportbug unable to report bugs. (Closes: #741071)
---
 checks/control-file.desc                               | 7 +++++++
 checks/control-file.pm                                 | 3 +++
 debian/changelog                                       | 3 +++
 t/tests/control-file-pedantic/debian/debian/control.in | 2 ++
 t/tests/control-file-pedantic/desc                     | 4 +++-
 t/tests/control-file-pedantic/tags                     | 4 +++-
 6 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/checks/control-file.desc b/checks/control-file.desc
index 000f148..41e3fec 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -330,3 +330,10 @@ Severity: classification
 Certainty: certain
 Info: Package requires fakeroot or similar to build binary targets and explicitly declares it.
 Ref: /usr/share/doc/dpkg-dev/rootless-builds.txt.gz
+
+Tag: bugs-field-in-debian-control
+Severity: normal
+Certainty: certain
+Info: The <tt>debian/control</tt> file contains an Bugs field. This can make
+ reportbug unable to report bugs.
+Ref: #740944
diff --git a/checks/control-file.pm b/checks/control-file.pm
index 0976964..1e2fe3b 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -101,6 +101,9 @@ sub run {
             if ($field eq 'xc-package-type') {
                 tag 'xc-package-type-in-debian-control', "line $.";
             }
+            if ($field eq 'bugs') {
+                tag 'bugs-field-in-debian-control', "line $.";
+            }
             unless (/^\S+: \S/ || /^\S+:$/) {
                 tag 'debian-control-has-unusual-field-spacing', "line $.";
             }
diff --git a/debian/changelog b/debian/changelog
index 4d056c5..b962363 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ lintian (2.5.66) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/control-file.{pm,desc}:
+    + [CL] Warn when packages specify a "Bugs:" field in debian/control as
+      this can make reportbug unable to report bugs.  (Closes: #741071)
   * checks/cruft.{pm,desc}:
     + [CL] Check for packages that invoke AC_PATH_PROG without considering
       cross-compilation. Thanks to Helmut Grohne for the idea and
diff --git a/t/tests/control-file-pedantic/debian/debian/control.in b/t/tests/control-file-pedantic/debian/debian/control.in
index d5c5a1b..bf2b249 100644
--- a/t/tests/control-file-pedantic/debian/debian/control.in
+++ b/t/tests/control-file-pedantic/debian/debian/control.in
@@ -6,12 +6,14 @@ Standards-Version: {$standards_version}
 Build-Depends: {$build_depends}
 Rules-Requires-Root: no
 Homepage: https://lintian.debian.org/
+Bugs: https://example.org/
 
 Package: {$source}-udeb
 Section: debian-installer
 Architecture: {$architecture}
 Depends: $\{misc:Depends\}
 XC-Package-Type: udeb
+Bugs: https://example.com/
 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
diff --git a/t/tests/control-file-pedantic/desc b/t/tests/control-file-pedantic/desc
index 3fd13e9..18cf155 100644
--- a/t/tests/control-file-pedantic/desc
+++ b/t/tests/control-file-pedantic/desc
@@ -3,4 +3,6 @@ Version: 1.0
 Skeleton: pedantic
 Options: --pedantic -I -E
 Description: Pedantic tests for control file issues
-Test-For: xc-package-type-in-debian-control
+Test-For:
+ bugs-field-in-debian-control
+ xc-package-type-in-debian-control
diff --git a/t/tests/control-file-pedantic/tags b/t/tests/control-file-pedantic/tags
index 9d820b2..007aece 100644
--- a/t/tests/control-file-pedantic/tags
+++ b/t/tests/control-file-pedantic/tags
@@ -1 +1,3 @@
-P: control-file-pedantic source: xc-package-type-in-debian-control line 14
+P: control-file-pedantic source: xc-package-type-in-debian-control line 15
+W: control-file-pedantic source: bugs-field-in-debian-control line 16
+W: control-file-pedantic source: bugs-field-in-debian-control line 9

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: