Bug#598412: lintian: More checks for debian/copyright dh_make's template
Hi Niels!
On Sat, Jun 4, 2011 at 10:03 PM, Niels Thykier <niels@thykier.net> wrote:
> Thanks for the report; I have applied changes to cover the most obvious
> issues, but we currently do not check for all of them (or changed some
> of them a bit).
I am really sorry that I did not explain it correctly on my bug report
(it gave the impression that I saw that copyright file exactly as I
wrote before, but I was only hiding the person name, the URL, etc)
The attached patch is near to what I was trying to explain on the
first message (please, check it as I am unsure about the last part of
it).
The patch explained is this:
It checks for "Author(s)": we should have only one author [thus
"Author" only] or multiple authors [thus "Authors"]; never Author(s)
It checks for "<years>": new dh-make template creates these lines:
=====
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
=====
It checks for "<special license>": new dh-make also creates "License:
<special license>" in the template
Then it checks for "url://" since "url" is not a valid protocol (it
should be http, ftp or something else). I was thinking if maybe
another tag should be created for this (something like
copyright-has-invalid-protocol-in-url", but it is too overkill I
think)
Then it checks for these two lines (also create by dh-make):
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Could you give a look at this possible patch, please?
Thank you very much!
Best regards,
Nelson
diff --git a/checks/copyright-file b/checks/copyright-file
index d10fa80..cd97566 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -271,8 +271,9 @@ if (m,\<put author[\'\(]s\)? name and email here\>,) {
tag 'helper-templates-in-copyright';
}
if (m,\<Copyright \(C\) YYYY Name OfAuthor\>,o or
- m,\<Copyright \(C\) \d{4} Upstream Full Name\>,o or
- m,My Full Name \<name\@place.com\>,o or
+ m,Author\(s\),o or
+ m,\<years\>,o or
+ m,\<special license\>,o or
m,\<likewise for another author\>,o) {
tag 'helper-templates-in-copyright';
}
@@ -281,11 +282,12 @@ if (m/This copyright info was automatically extracted/) {
tag 'copyright-contains-dh-make-perl-boilerplate';
}
-if (m,url://example\.com, or m,url://somewhere\.com,) {
+if (m,url://example\.com, or m,url://,) {
tag 'copyright-has-url-from-dh_make-boilerplate';
}
-if (m{\# Please also look if there are files or directories which have a\n\# different copyright/license attached and list them here\.}) {
+if (m{\# Please also look if there are files or directories which have a\n\# different copyright/license attached and list them here\.}, or
+ m{\# If you want to use GPL v2 or later for the /debian/\* files use\n\# the following clauses, or change it to suit. Delete these two lines}) {
tag 'copyright-contains-dh_make-todo-boilerplate';
}
Reply to: