Subject: [PATCH] Implement copyright-with-no-real-debian-copyright (Closes: #497347)

From: Raphael Geissert <[email-masked]>
Date: Mon, 1 Sep 2008 20:13:17 -0500

Signed-off-by: Raphael Geissert <[email-masked]>
---
 checks/copyright-file                          |    4 ++++
 checks/copyright-file.desc                     |    9 +++++++++
 testset/copyright/debian/copyright.misc-errors |    3 +++
 testset/copyright/debian/copyright.no-errors   |    4 ++--
 testset/tags.copyright                         |    1 +
 5 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/checks/copyright-file b/checks/copyright-file
index f3eee1b..687ccd5 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -261,6 +261,10 @@ if (m{This copyright info was automatically extracted from the perl module\.\nIt
     tag "copyright-contains-dh-make-perl-boilerplate", "";
 }
 
+if (m,The\s+Debian\s+packaging\s+is\s+\(C\)\s+\d+,i) {
+    tag 'copyright-with-no-real-debian-copyright';
+}
+
 if ($found && !$linked && !/(Copyright|Copr\.|\302\251)(.*|[\(C\):\s]+)\b\d{4}\b|\bpublic\s+domain\b/i) {
     tag 'copyright-without-copyright-notice';
 }
diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
index 9b5f2df..b8b2f39 100644
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -324,3 +324,12 @@ Info: This package appears to be covered by the GNU GPL but depends on
  linked with OpenSSL, is covered by the GNU GPL, please add a lintian
  override for this tag.  Lintian currently has no good way of
  distinguishing between that case and problematic packages.
+
+Tag: copyright-with-no-real-debian-copyright
+Type: warning
+Severity: normal
+Certainty: certain
+Info: The copyright file contains dh-make's incomplete Debian packaging
+ copyright boilerplate. As <tt>(C)</tt> is not considered as a valid way to
+ express the copyright ownership the word <tt>Copyright</tt> or the ©
+ symbol should be used instead or in addition to <tt>(C)</tt>.
diff --git a/testset/copyright/debian/copyright.misc-errors b/testset/copyright/debian/copyright.misc-errors
index c434ac0..29d8b62 100644
--- a/testset/copyright/debian/copyright.misc-errors
+++ b/testset/copyright/debian/copyright.misc-errors
@@ -16,3 +16,6 @@ This path /usr/share/doc/copyright is obsolete.
 This copyright info was automatically extracted from the perl module.
 It may not be accurate, so you better check the module sources
 if you don't want to get into legal troubles.
+
+The Debian packaging is (C) 2008, this line is incorrect as (C) is neither a
+replacement of Copyright nor ©.
diff --git a/testset/copyright/debian/copyright.no-errors b/testset/copyright/debian/copyright.no-errors
index ac71512..c283827 100644
--- a/testset/copyright/debian/copyright.no-errors
+++ b/testset/copyright/debian/copyright.no-errors
@@ -32,5 +32,5 @@ License:
 On Debian systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
 
-The Debian packaging is (C) 2008, Tobias Toedter <[email-masked]> and
-is licensed under the GPL, see above.
+The Debian packaging is Copyright (C) 2008, Tobias Toedter <[email-masked]>
+and is licensed under the GPL, see above.
diff --git a/testset/tags.copyright b/testset/tags.copyright
index c78fa16..002e27a 100644
--- a/testset/tags.copyright
+++ b/testset/tags.copyright
@@ -17,5 +17,6 @@ W: copyright.iso-8859-1: debian-copyright-file-uses-obsolete-national-encoding a
 W: copyright.misc-errors: copyright-contains-dh-make-perl-boilerplate
 W: copyright.misc-errors: copyright-has-url-from-dh_make-boilerplate
 W: copyright.misc-errors: copyright-lists-upstream-authors-with-dh_make-boilerplate
+W: copyright.misc-errors: copyright-with-no-real-debian-copyright
 W: copyright.old-style: copyright-without-copyright-notice
 W: copyright.symlink: copyright-without-copyright-notice