[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 that does not refer to official Debian infrastructure 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 b43be35afdcfd9efcf5d2c1f1e6087fc94b04729
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Dec 22 21:57:56 2017 +0000

    Warn when packages specify a "Bugs" field in debian/control that does not refer to official Debian infrastructure as this can make reportbug unable to report bugs. (Closes: #741071)
---
 checks/control-file.desc                               | 9 ++++++---
 checks/control-file.pm                                 | 2 +-
 debian/changelog                                       | 5 +++--
 t/tests/control-file-pedantic/debian/debian/control.in | 2 +-
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/checks/control-file.desc b/checks/control-file.desc
index 41e3fec..526ced2 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -333,7 +333,10 @@ 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.
+Certainty: possible
+Info: The <tt>debian/control</tt> file contains an Bugs field that does
+ not refer to Debian infrastructure. This is recognized by the string
+ ".debian.org".
+ .
+ This can likely to make reportbug unable to report bugs.
 Ref: #740944
diff --git a/checks/control-file.pm b/checks/control-file.pm
index 1e2fe3b..4f6ef76 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -101,7 +101,7 @@ sub run {
             if ($field eq 'xc-package-type') {
                 tag 'xc-package-type-in-debian-control', "line $.";
             }
-            if ($field eq 'bugs') {
+            if ($field eq 'bugs' and not m/\.debian\.org/) {
                 tag 'bugs-field-in-debian-control', "line $.";
             }
             unless (/^\S+: \S/ || /^\S+:$/) {
diff --git a/debian/changelog b/debian/changelog
index b962363..bb75512 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,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)
+    + [CL] Warn when packages specify a "Bugs" field in debian/control that
+      does not refer to official Debian infrastructure 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 bf2b249..b581755 100644
--- a/t/tests/control-file-pedantic/debian/debian/control.in
+++ b/t/tests/control-file-pedantic/debian/debian/control.in
@@ -13,7 +13,7 @@ Section: debian-installer
 Architecture: {$architecture}
 Depends: $\{misc:Depends\}
 XC-Package-Type: udeb
-Bugs: https://example.com/
+Bugs: debbugs://bugs.debian.org/
 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

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


Reply to: