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

[SCM] Debian package checker branch, master, updated. 2.5.3-238-g585452e



The following commit has been merged in the master branch:
commit 585452ee6e6bf258d2f061f3a2a63566fc30ffd8
Author: Arno Töll <debian@toell.net>
Date:   Sat Nov 5 22:51:28 2011 +0100

    Add {maintainer,uploader}-address-causes-mail-loops-or-bounces
    
    These new tags warns if an email is a known bounce address or is set
    to one of the Debian forward emails (i.e. @packages.qa.debian.org).
    The latter is very likely to cause a mail-loop and is not a valid
    maintainer address.

diff --git a/checks/fields.desc b/checks/fields.desc
index 4f68c57..695a21a 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -186,6 +186,19 @@ Info: The maintainer address includes localhost(.localdomain), which is
  an invalid e-mail address.
 Ref: policy 5.6.2
 
+Tag: maintainer-address-causes-mail-loops-or-bounces
+Severity: serious
+Certainty: certain
+Info: The maintainer e-mail address either loops back to itself because
+ it is set to package@packages.debian.org or
+ package@packages.qa.debian.org  or references an email address
+ (typically a mailing list) which is  known to bounce mails. Policy
+ states: The email address given in the Maintainer control field must
+ accept  mail from those role accounts in Debian used to send automated
+ mails  regarding the package. This includes non-spam mail from the bug-
+ tracking system.
+Ref: policy 3.3
+
 Tag: uploader-name-missing
 Severity: serious
 Certainty: certain
@@ -227,6 +240,19 @@ Info: The uploader address includes localhost(.localdomain), which is
  an invalid e-mail address.
 Ref: policy 5.6.3
 
+Tag: uploader-address-causes-mail-loops-or-bounces
+Severity: serious
+Certainty: certain
+Info: The maintainer e-mail address either loops back to itself because
+ it is set to package@packages.debian.org or
+ package@packages.qa.debian.org  or references an email address
+ (typically a mailing list) which is  known to bounce mails. Policy
+ states: The email address given in the Maintainer control field must
+ accept  mail from those role accounts in Debian used to send automated
+ mails  regarding the package. This includes non-spam mail from the bug-
+ tracking system.
+Ref: policy 3.3
+
 Tag: wrong-debian-qa-address-set-as-maintainer
 Severity: important
 Certainty: certain
diff --git a/data/fields/bounce-addresses b/data/fields/bounce-addresses
new file mode 100644
index 0000000..cb84fed
--- /dev/null
+++ b/data/fields/bounce-addresses
@@ -0,0 +1,4 @@
+# Manually maintained list of known e-mail addresses which bounce e-mails from
+# role accounts.
+
+ubuntu-devel-discuss@lists.ubuntu.com
diff --git a/debian/changelog b/debian/changelog
index ca89318..575f994 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,12 +6,14 @@ lintian (2.5.4) UNRELEASED; urgency=low
       - gzip-file-is-not-multi-arch-same-safe
       - init.d-script-does-not-implement-optional-option
       - init.d-script-missing-lsb-description
+      - maintainer-address-causes-mail-loops-or-bounces
       - missing-build-dependency-for-dh-addon
       - package-depends-on-lower-priority-package
       - package-would-benefit-from-build-arch-targets
       - python-depends-but-no-python-helper
       - python3-depends-but-no-python3-helper
       - transitional-package-should-be-oldlibs-extra
+      - uploader-address-causes-mail-loops-or-bounces
 
   * checks/*:
     + [JW] Replace common_data.pm with Lintian::Check.
@@ -73,6 +75,9 @@ lintian (2.5.4) UNRELEASED; urgency=low
     + [NT] Ensure transitional packages are in section oldlibs and
       priority extra.  Thanks to Josh Triplett for the report.
       (Closes: #645438)
+    + [NT] Check for bouncing and looping email addresses.  Thanks to
+      Ansgar Burchardt and Arno Töll for the bug report and patch.
+      (Closes: #636599)
   * checks/files{,.desc}:
     + [JW] Suggest the usage of "-delete" rather than "| xargs rm -f".
       (Closes: #641983)
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index 5050843..fed1179 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -28,6 +28,8 @@ use Email::Valid;
 use Lintian::Data;
 use Lintian::Tags qw(tag);
 
+our $KNOWN_BOUNCE_ADDRESSES = Lintian::Data->new('fields/bounce-addresses');
+
 our @ISA    = qw(Exporter);
 our @EXPORT = qw(check_maintainer check_spelling check_spelling_picky $known_shells_regex);
 
@@ -79,6 +81,14 @@ the tags below will be replaced with the value of FIELD.
 The e-mail address portion of MAINTAINER is at C<localhost> or some other
 similar domain.
 
+=item %s-address-causes-mail-loops-or-bounces
+
+The e-mail address portion of MAINTAINER or UPLOADER refers to the PTS
+e-mail addresses  C<package@packages.debian.org> or
+C<package@packages.qa.debian.org>, or, alternatively refers to a mailing
+list which is known to bounce off-list mails sent by Debian role accounts.
+
+
 =item %s-address-looks-weird
 
 MAINTAINER may be syntactically correct, but it isn't conventionally
@@ -177,6 +187,12 @@ sub check_maintainer {
             tag "$field-address-is-on-localhost", $maintainer;
         }
 
+        if (($field ne 'changed-by') and
+            ($mail =~ /\@packages\.(?:qa\.)?debian\.org/i or $KNOWN_BOUNCE_ADDRESSES->known($mail))) {
+            tag "$field-address-causes-mail-loops-or-bounces", $maintainer
+        }
+
+
         # Some additional checks that we only do for maintainer fields.
         if ($field eq 'maintainer') {
             if (($mail eq 'debian-qa@lists.debian.org') or
diff --git a/profiles/ubuntu/main.profile b/profiles/ubuntu/main.profile
index 8000d00..753fd36 100644
--- a/profiles/ubuntu/main.profile
+++ b/profiles/ubuntu/main.profile
@@ -2,7 +2,8 @@
 Profile: ubuntu/main
 Extends: debian/main
 Disable-Tags: debian-changelog-file-is-a-symlink,
- lzma-deb-archive, no-upstream-changelog,
+ lzma-deb-archive, maintainer-address-causes-mail-loops-or-bounces,
+ no-upstream-changelog, uploader-address-causes-mail-loops-or-bounces,
  upstart-job-in-etc-init.d-not-registered-via-update-rc.d
 
 # Serious as it may break Lucid upgrade path
diff --git a/t/COVERAGE b/t/COVERAGE
index 4cbe1ae..b6736cd 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,5 +1,5 @@
-Last generated 2011-11-20
-Coverage: 767/944 (81.25%), w. legacy tests: 876/944 (92.80%)
+Last generated 2011-11-21
+Coverage: 773/949 (81.45%), w. legacy tests: 881/949 (92.83%)
 
 The following tags are not tested by the test suite:
 
@@ -140,7 +140,6 @@ init.d init.d-script-has-duplicate-lsb-section
 init.d init.d-script-has-unknown-lsb-keyword
 init.d init.d-script-has-unterminated-lsb-section
 init.d init.d-script-missing-lsb-keyword
-init.d init.d-script-missing-lsb-short-description
 init.d init.d-script-not-included-in-package
 init.d init.d-script-not-marked-as-conffile
 init.d output-of-updaterc.d-not-redirected-to-dev-null
@@ -335,6 +334,5 @@ scripts
   init.d-script-has-unknown-lsb-keyword
   init.d-script-has-unterminated-lsb-section
   init.d-script-missing-lsb-keyword
-  init.d-script-missing-lsb-short-description
   script-in-usr-share-doc
   script-with-language-extension
diff --git a/t/scripts/implemented-tags.t b/t/scripts/implemented-tags.t
index 455721f..562422a 100755
--- a/t/scripts/implemented-tags.t
+++ b/t/scripts/implemented-tags.t
@@ -36,6 +36,7 @@ our $EXCLUDE =
                  .*-not-full-name$
                  .*-address-looks-weird$
                  .*-address-is-on-localhost$
+                 .*-address-causes-mail-loops-or-bounces$
                  ^wrong-debian-qa-address-set-as-maintainer$
                  ^wrong-debian-qa-group-name$
                  ^malformed-override$
diff --git a/t/tests/spelling-multiword/debian/debian/control.in b/t/tests/fields-maintainer-bounces/debian/debian/control.in
similarity index 67%
copy from t/tests/spelling-multiword/debian/debian/control.in
copy to t/tests/fields-maintainer-bounces/debian/debian/control.in
index 7be593e..2a44bdf 100644
--- a/t/tests/spelling-multiword/debian/debian/control.in
+++ b/t/tests/fields-maintainer-bounces/debian/debian/control.in
@@ -1,7 +1,9 @@
 Source: {$srcpkg}
 Priority: extra
-Section: {$section}
-Maintainer: {$author}
+Section: devel
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Uploaders: I Will Loop <fields-maintainer-bounces@packages.debian.org>,
+ I Will Loop Too <fields-maintainer-bounces@PACKAGES.QA.DEBIAN.ORG>
 Standards-Version: {$standards_version}
 Build-Depends: debhelper (>= 7.0.50~)
 
@@ -13,13 +15,4 @@ Description: {$description}
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.  It may
  be an empty package.
- .
- Spelling errors:
-   * Allows to
-   * An other error
-   * Debian/GNU Linux
-   * Permits to
-   * This packages
- .
- Not errors:
-   * These packages
+
diff --git a/t/tests/fields-maintainer-bounces/desc b/t/tests/fields-maintainer-bounces/desc
new file mode 100644
index 0000000..85461ac
--- /dev/null
+++ b/t/tests/fields-maintainer-bounces/desc
@@ -0,0 +1,9 @@
+Testname: fields-maintainer-bounces
+Sequence: 6000
+Version: 1.0
+Description: test e-mail addresses which are known to bounce e-mails
+# To avoid NMU warnings / having a changelog.in
+Author: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Test-For:
+ uploader-address-causes-mail-loops-or-bounces
+ maintainer-address-causes-mail-loops-or-bounces
diff --git a/t/tests/fields-maintainer-bounces/tags b/t/tests/fields-maintainer-bounces/tags
new file mode 100644
index 0000000..e1b1e68
--- /dev/null
+++ b/t/tests/fields-maintainer-bounces/tags
@@ -0,0 +1,4 @@
+E: fields-maintainer-bounces source: maintainer-address-causes-mail-loops-or-bounces Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+E: fields-maintainer-bounces source: uploader-address-causes-mail-loops-or-bounces I Will Loop <fields-maintainer-bounces@packages.debian.org>
+E: fields-maintainer-bounces source: uploader-address-causes-mail-loops-or-bounces I Will Loop Too <fields-maintainer-bounces@PACKAGES.QA.DEBIAN.ORG>
+E: fields-maintainer-bounces: maintainer-address-causes-mail-loops-or-bounces Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
diff --git a/t/tests/fields-maintainer-general/debian/debian/control.in b/t/tests/fields-maintainer-general/debian/debian/control.in
index 68df25e..3eaf05a 100644
--- a/t/tests/fields-maintainer-general/debian/debian/control.in
+++ b/t/tests/fields-maintainer-general/debian/debian/control.in
@@ -4,6 +4,7 @@ Section: {$section}
 Maintainer: <lintian-maint@debian.org>
 Uploaders: <lintian-maint@debian.org>, Russ Allbery <rra@debian.org>,
  Russ Allbery <rra@debian.org>,
+ I L. Oop  <fields-maintainer-general@packages.qa.debian.org>,
  Mr. Missing Comma <mrmc@comma.com>
  Mrs. Missing Comma <mrsmc@comma.com>
 Standards-Version: {$standards_version}
diff --git a/t/tests/fields-maintainer-general/desc b/t/tests/fields-maintainer-general/desc
index 579b26e..6eb6bfc 100644
--- a/t/tests/fields-maintainer-general/desc
+++ b/t/tests/fields-maintainer-general/desc
@@ -8,4 +8,4 @@ Test-For:
  maintainer-name-missing
  uploader-address-malformed
  uploader-name-missing
-
+ uploader-address-causes-mail-loops-or-bounces
diff --git a/t/tests/fields-maintainer-general/tags b/t/tests/fields-maintainer-general/tags
index dea236f..3eb787c 100644
--- a/t/tests/fields-maintainer-general/tags
+++ b/t/tests/fields-maintainer-general/tags
@@ -1,4 +1,5 @@
 E: fields-maintainer-general source: maintainer-name-missing <lintian-maint@debian.org>
+E: fields-maintainer-general source: uploader-address-causes-mail-loops-or-bounces I L. Oop  <fields-maintainer-general@packages.qa.debian.org>
 E: fields-maintainer-general source: uploader-address-malformed Mr. Missing Comma <mrmc@comma.com> Mrs. Missing Comma <mrsmc@comma.com>
 E: fields-maintainer-general source: uploader-name-missing <lintian-maint@debian.org>
 E: fields-maintainer-general: maintainer-name-missing <lintian-maint@debian.org>
diff --git a/testset/debconf/debian/changelog b/testset/debconf/debian/changelog
index 2569799..1aa50be 100644
--- a/testset/debconf/debian/changelog
+++ b/testset/debconf/debian/changelog
@@ -3,4 +3,4 @@ debconf (1~rc1) unstable; urgency=low
   * Initial Release
   * Changelog line with exactly 80 characters which tests the line-too-long tag.
 
- -- Lintian Maintainers <lintian@packages.debian.org>  Wed,  3 May 2006 18:07:19 -0500
+ -- Lintian Maintainers <debian-lint-maint@debian.org>  Wed,  3 May 2006 18:07:19 -0500
diff --git a/testset/debconf/debian/control b/testset/debconf/debian/control
index 3f72a24..bf9f4e9 100644
--- a/testset/debconf/debian/control
+++ b/testset/debconf/debian/control
@@ -2,7 +2,7 @@ Source: debconf
 Section: utils
 Priority: optional
 Build-Depends: debhelper (>= 4), dpatch
-Maintainer: Lintian Maintainers <lintian@packages.debian.org>
+Maintainer: Lintian Maintainers <debian-lint-maint@debian.org>
 Standards-Version: 3.7.2
 
 Package: debconf-test

-- 
Debian package checker


Reply to: