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

[SCM] Debian package checker branch, master, updated. 2.2.0-40-gd8f9e52



The following commit has been merged in the master branch:
commit 930db650f5e6aae3bcfdbdacc50f342d1c2f59a7
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Sat Jan 31 15:49:36 2009 -0600

    Check for references to versionless common license files
    
    Check for copyright files referring to versionless licence files in
    /usr/share/common-licenses.

diff --git a/checks/copyright-file b/checks/copyright-file
index db0814d..72c6c71 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -150,6 +150,15 @@ if (m,usr/share/common-licenses/(GPL|LGPL|BSD|Artistic)\.gz,) {
     tag "copyright-refers-to-compressed-license", "$&";
 }
 
+if (m,(usr/share/common-licenses/(L?GPL|GFDL))[^-],i) {
+    my $ref = $1;
+    if (m,\b(any|or)\s+later(\s+version)?\b,i) {
+	tag "copyright-refers-to-symlink-license", $ref;
+    } else {
+	tag "copyright-refers-to-versionless-license-file", $ref;
+    }
+}
+
 if (m,usr/share/common-licences,) {
     tag "copyright-refers-to-incorrect-directory", "$&";
     $wrong_directory_detected = 1;
diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
index 238dee1..1e950f0 100644
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -320,3 +320,31 @@ 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-refers-to-symlink-license
+Severity: pedantic
+Certainty: possible
+Info: The copyright file refers to GPL, LGPL, or GFDL licenses by pointing
+ to the versionless license file in <tt>/usr/share/common-licenses</tt>.
+ Even when it is said that the package is covered by a specific version or
+ later, it should refer to the license file which has the version of the
+ license mentioned in the copyright file in its name. Otherwise as soon as the
+ symbolic link changes it would be pointing to a version which is not the one
+ under which it was licensed.
+ .
+ That is, if the source code was released under the GNU GPL 3 it should refer
+ to <tt>/usr/share/common-licenses/GPL-3</tt>, and not to <tt>/GPL</tt>.
+
+Tag: copyright-refers-to-versionless-license-file
+Severity: normal
+Certainty: possible
+Info: The copyright file refers to GPL, LGPL, or GFDL licenses by pointing
+ to the versionless license file in <tt>/usr/share/common-licenses</tt>.
+ As the copyright file does not appear to state that the content was released
+ under a specific version or any later version of those licenses, it should
+ refer to the file which has the version of the license mentioned in the
+ copyright file in its name. Otherwise it could point to a version which is not
+ the one under which it was licensed.
+ .
+ That is, if the source code was released under the GNU GPL 3 it should refer
+ to <tt>/usr/share/common-licenses/GPL-3</tt>, and not to <tt>/GPL</tt>.
diff --git a/t/templates/skel/debian/copyright b/t/tests/copyright-file-license-symlink/debian/debian/bad.copyright
similarity index 72%
copy from t/templates/skel/debian/copyright
copy to t/tests/copyright-file-license-symlink/debian/debian/bad.copyright
index b780d82..b38a398 100644
--- a/t/templates/skel/debian/copyright
+++ b/t/tests/copyright-file-license-symlink/debian/debian/bad.copyright
@@ -6,16 +6,15 @@ So far as it is copyrightable at all, this template is
 
 This program is free software; you may redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+the Free Software Foundation in its version 3.
 
 This is distributed in the hope that it will be useful, but without
 any warranty; without even the implied warranty of merchantability or
 fitness for a particular purpose. See the GNU General Public License
 for more details.
 
-A copy of the GNU General Public License version 2 is available as
-/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution
-or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+A copy of the GNU General Public License version 3 is available as
+/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution
+or at http://www.gnu.org/licenses/old-licenses/gpl-3.0.html.
 You can also obtain it by writing to the Free Software Foundation, Inc.,
 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/t/tests/files-fonts/debian/debian/control.in b/t/tests/copyright-file-license-symlink/debian/debian/control.in
similarity index 74%
copy from t/tests/files-fonts/debian/debian/control.in
copy to t/tests/copyright-file-license-symlink/debian/debian/control.in
index 63e4097..e96a893 100644
--- a/t/tests/files-fonts/debian/debian/control.in
+++ b/t/tests/copyright-file-license-symlink/debian/debian/control.in
@@ -6,22 +6,18 @@ Standards-Version: 3.8.0
 Build-Depends: debhelper (>= 7)
 Homepage: http://lintian.debian.org/
 
-Package: {$srcpkg}
+Package: bad
 Architecture: {$architecture}
 Depends: $\{misc:Depends\}
 Description: {$description}
- Non-font package containing fonts.
- .
  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
  things.  It should not be installed like a regular package.
 
-Package: ttf-{$srcpkg}
+Package: pedantic
 Architecture: {$architecture}
 Depends: $\{misc:Depends\}
-Description: {$description} (okay)
- Font package containing fonts.
- .
- This is a test package designed to exercise some feature or tag of
+Description: {$description} -- pedantic edition :)
+ This is a test package designed to exercise some check of
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.
diff --git a/t/templates/skel/debian/copyright b/t/tests/copyright-file-license-symlink/debian/debian/pedantic.copyright
similarity index 93%
copy from t/templates/skel/debian/copyright
copy to t/tests/copyright-file-license-symlink/debian/debian/pedantic.copyright
index b780d82..3f04ae2 100644
--- a/t/templates/skel/debian/copyright
+++ b/t/tests/copyright-file-license-symlink/debian/debian/pedantic.copyright
@@ -15,7 +15,7 @@ fitness for a particular purpose. See the GNU General Public License
 for more details.
 
 A copy of the GNU General Public License version 2 is available as
-/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution
+/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution
 or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 You can also obtain it by writing to the Free Software Foundation, Inc.,
 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/t/tests/copyright-file-license-symlink/desc b/t/tests/copyright-file-license-symlink/desc
new file mode 100644
index 0000000..4e96096
--- /dev/null
+++ b/t/tests/copyright-file-license-symlink/desc
@@ -0,0 +1,8 @@
+Testname: copyright-file-license-symlink
+Sequence: 6000
+Version: 1.0
+Description: Test the versionless license files checks
+Test-For:
+ copyright-refers-to-symlink-license
+ copyright-refers-to-versionless-license-file
+Options: --pedantic
\ No newline at end of file
diff --git a/t/tests/copyright-file-license-symlink/tags b/t/tests/copyright-file-license-symlink/tags
new file mode 100644
index 0000000..c099623
--- /dev/null
+++ b/t/tests/copyright-file-license-symlink/tags
@@ -0,0 +1,2 @@
+P: pedantic: copyright-refers-to-symlink-license usr/share/common-licenses/GPL
+W: bad: copyright-refers-to-versionless-license-file usr/share/common-licenses/GPL
diff --git a/testset/binary/debian/copyright b/testset/binary/debian/copyright
index e49e187..1d6806d 100644
--- a/testset/binary/debian/copyright
+++ b/testset/binary/debian/copyright
@@ -2,7 +2,7 @@ hello.c is released under public domain.  This is distributed in the hope that
 it will be useful, but without any warranty; without even the implied warranty
 of merchantability or fitness for a particular purpose.
 
-A reference to /usr/share/common-licenses/GPL to make it look like this
+A reference to /usr/share/common-licenses/GPL-2 to make it look like this
 package is under the GPL and trigger the OpenSSL warning.
 
 Test for old FSF address:
diff --git a/testset/libbaz/debian/copyright b/testset/libbaz/debian/copyright
index a7a70dc..a874c87 100644
--- a/testset/libbaz/debian/copyright
+++ b/testset/libbaz/debian/copyright
@@ -2,7 +2,7 @@ This package is released under public domain.  This is distributed in the hope
 that it will be useful, but without any warranty; without even the implied
 warranty of merchantability or fitness for a particular purpose.
 
-A reference to /usr/share/common-licenses/GPL to make it look like this
+A reference to /usr/share/common-licenses/GPL-2 to make it look like this
 package is under the GPL and trigger the OpenSSL warning.
 
 However, this has an OpenSSL exception.

-- 
Debian package checker


Reply to: