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

[lintian] 01/01: Drop copyright-year-in-future after all; it's just too error prone and time-consuming to maintain given the severity of the issues it can find. (Closes: #877766)



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

lamby pushed a commit to branch master
in repository lintian.

commit b82460be905f860ef0b878b4b927c29ae9535566
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Oct 6 10:45:40 2017 +0100

    Drop copyright-year-in-future after all; it's just too error prone and time-consuming to maintain given the severity of the issues it can find. (Closes: #877766)
---
 checks/copyright-file.desc                         |  6 ---
 checks/copyright-file.pm                           | 34 -----------------
 debian/changelog                                   |  4 ++
 .../debian/debian/changelog.in                     |  5 ---
 .../debian/debian/copyright                        | 44 ----------------------
 t/tests/copyright-file-year-in-future/desc         |  6 ---
 t/tests/copyright-file-year-in-future/tags         |  6 ---
 t/tests/standards-version-timewarp-unrel/desc      |  1 -
 t/tests/standards-version-timewarp/desc            |  1 -
 9 files changed, 4 insertions(+), 103 deletions(-)

diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
index f2ed0a8..fb4bbaa 100644
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -400,9 +400,3 @@ Info: The copyright file has lines ending in CRLF instead of just LF.
  <tt>CR</tt> character in the file:
  .
  <tt>sed -i 's/\r//g' path/to/file</tt>
-
-Tag: copyright-year-in-future
-Severity: normal
-Certainty: certain
-Info: The copyright file refers to a year that is greater than the last entry
- in <tt>debian/changelog</tt>. Usually this is a typo.
diff --git a/checks/copyright-file.pm b/checks/copyright-file.pm
index 3f3feb3..d816979 100644
--- a/checks/copyright-file.pm
+++ b/checks/copyright-file.pm
@@ -61,18 +61,6 @@ sub run {
         $found = 1;
     }
 
-    # Extract the year from the most recent entry in debian/changelog. We do
-    # not use UNRELEASED entries as there is no guarantee that their timestamps
-    # are meaningful.
-    my $latest_year = 0;
-    my $changes = $info->changelog;
-    if (defined($changes)) {
-        my ($entry) = $info->changelog->data;
-        if ($entry->{'Distribution'} ne 'UNRELEASED') {
-            $latest_year = (gmtime($entry->{Timestamp}))[5] + 1900;
-        }
-    }
-
     if (my $index_info = $info->index("$path/copyright")) {
         $found = 1;
         if ($index_info->is_symlink) {
@@ -344,28 +332,6 @@ qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i
         tag 'copyright-without-copyright-notice'
           unless /(?:Copyright|Copr\.|\302\251)(?:.*|[\(C\):\s]+)\b\d{4}\b
                |\bpublic(?:\s+|-)domain\b/xi;
-
-        if ($latest_year) {
-            my $linenum = 1;
-            foreach my $line (split /^/m) {
-                while (
-                    $line =~ /(?<![a-z][\s\-\/])\b(?<![:\/\.\@])
-                    (\d{4}) \b(?!\.)/xig
-                  ) {
-                    my $year = $1;
-                    my $column = $-[0] + 1;
-                    next if $year <= $latest_year;
-                    next if $line =~ m/Original Author/;
-                    # "Sun Microsystems, 4150 Network Drive, CA"
-                    next if $year == 4150;
-                    # "Clause 252.227-7013 (c) (1) of DFARs" in Tcl license
-                    next if $year == 7013;
-                    tag 'copyright-year-in-future',
-                      "$year > $latest_year (line $linenum, column $column)";
-                }
-                $linenum++;
-            }
-        }
     }
 
     check_spelling($_, $group->info->spelling_exceptions,
diff --git a/debian/changelog b/debian/changelog
index deef5f2..45882f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ lintian (2.5.55) UNRELEASED; urgency=medium
 
   "XXX: generate tag summary"
 
+  * checks/copyright-file.pm:
+    + [CL] Drop copyright-year-in-future after all; it's just too error
+      prone and time-consuming to maintain given the severity of the issues
+      it can find.  (Closes: #877766)
   * checks/{files,manpages}.{desc,pm}:
     + [NT] Stop treating usr/man and usr/X11R6/man as manpage directories
       to simplify some code paths.  Nothing ships manpages in these
diff --git a/t/tests/copyright-file-year-in-future/debian/debian/changelog.in b/t/tests/copyright-file-year-in-future/debian/debian/changelog.in
deleted file mode 100644
index c06ea7d..0000000
--- a/t/tests/copyright-file-year-in-future/debian/debian/changelog.in
+++ /dev/null
@@ -1,5 +0,0 @@
-{$source} ({$version}) unstable; urgency=low
-
-  * Lintian Test Suite.
-
- -- {$author}  Thu, 20 Jul 2017 23:01:57 +0100
diff --git a/t/tests/copyright-file-year-in-future/debian/debian/copyright b/t/tests/copyright-file-year-in-future/debian/debian/copyright
deleted file mode 100644
index af94099..0000000
--- a/t/tests/copyright-file-year-in-future/debian/debian/copyright
+++ /dev/null
@@ -1,44 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: lintian
-Upstream-Contact: Lintian Maintainers <debian-lint-maint@lists.debian.org>
-Source: http://git.debian.org/?p=lintian/lintian.git
-
-Files: *
-Copyright:
- 2000 Lintian Maintainers <debian-lint-maint@lists.debian.org>
- 2100 Lintian Maintainers <debian-lint-maint@lists.debian.org>
- 2101, 2102 Lintian Maintainers <debian-lint-maint@lists.debian.org>
- 2103-2104 Lintian Maintainers <debian-lint-maint@lists.debian.org>
- 2000 Lintian Maintainers (http://debian.org:2200)
- 2000 Lintian Maintainers <2201.rransom.2202@2203.debian.org>
- 2000 ISO 2203-2 & ISO-2204 LLC. (2008)
- 2000 Lintian Maintainers, Immensee, CH-2205, Switzerland.
- 2000 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A.
- 2112 D. Original Author.
- 2000 Lintian Maintainers <http://example.com/4200/LICENSE>
- 2000 Clause 252.227-7013 (c) (1) of DFARs.
-License: MIT
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- .
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- 3. Neither the name of the University nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
- .
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
diff --git a/t/tests/copyright-file-year-in-future/desc b/t/tests/copyright-file-year-in-future/desc
deleted file mode 100644
index 8953e5a..0000000
--- a/t/tests/copyright-file-year-in-future/desc
+++ /dev/null
@@ -1,6 +0,0 @@
-Testname: copyright-file-year-in-future
-Version: 1.0
-Description: Test for "future" years in debian/copyright
-Test-For:
- copyright-year-in-future
- timewarp-standards-version
diff --git a/t/tests/copyright-file-year-in-future/tags b/t/tests/copyright-file-year-in-future/tags
deleted file mode 100644
index a123799..0000000
--- a/t/tests/copyright-file-year-in-future/tags
+++ /dev/null
@@ -1,6 +0,0 @@
-W: copyright-file-year-in-future source: timewarp-standards-version (2017-07-20 < 2017-09-27)
-W: copyright-file-year-in-future: copyright-year-in-future 2100 > 2017 (line 9, column 2)
-W: copyright-file-year-in-future: copyright-year-in-future 2101 > 2017 (line 10, column 2)
-W: copyright-file-year-in-future: copyright-year-in-future 2102 > 2017 (line 10, column 8)
-W: copyright-file-year-in-future: copyright-year-in-future 2103 > 2017 (line 11, column 2)
-W: copyright-file-year-in-future: copyright-year-in-future 2104 > 2017 (line 11, column 7)
diff --git a/t/tests/standards-version-timewarp-unrel/desc b/t/tests/standards-version-timewarp-unrel/desc
index 00e6422..d0647c6 100644
--- a/t/tests/standards-version-timewarp-unrel/desc
+++ b/t/tests/standards-version-timewarp-unrel/desc
@@ -3,4 +3,3 @@ Version: 1.0
 Description: Test newer standards version with unreleased old changelog date
 Test-Against:
  timewarp-standards-version
- copyright-year-in-future
diff --git a/t/tests/standards-version-timewarp/desc b/t/tests/standards-version-timewarp/desc
index 329d4be..1423d07 100644
--- a/t/tests/standards-version-timewarp/desc
+++ b/t/tests/standards-version-timewarp/desc
@@ -2,4 +2,3 @@ Testname: standards-version-timewarp
 Version: 1.0
 Description: Test newer standards version with old changelog date
 Test-For: timewarp-standards-version
-Test-Against: copyright-year-in-future

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


Reply to: