Package: devscripts
Version: 2.10.72
Severity: normal
Tags: patch
Hi!
I noticed while packaging AppArmor that many cases of LGPL and some cases
of GPL versions were not being correctly identified. The attached patch
fixes several of the regular expressions and adds some additional language
cases.
licensecheck will now correctly match these LGPL uses:
* The libapparmor library is licensed under the terms of the GNU
* Lesser General Public License, version 2.1. Please see the file
* COPYING.LGPL.
and
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser General
* Public License published by the Free Software Foundation.
and find the version for this use of GPL:
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
Thanks!
-Kees
--
Kees Cook @debian.org
--- /usr/bin/licensecheck 2011-03-23 06:40:55.000000000 -0700
+++ /tmp/licensecheck 2011-04-18 17:14:35.141817155 -0700
@@ -388,11 +388,11 @@
my $extrainfo = "";
my $license = "";
- if ($licensetext =~ /version ([^ ]+) (?:\(?only\)?.? )?(?:of the GNU (Affero )?General Public License )?as published by the Free Software Foundation/i or
- $licensetext =~ /GNU (?:Affero )?General Public License as published by the Free Software Foundation; version ([^ ]+) /i) {
+ if ($licensetext =~ /version ([^ ]+) (?:\(?only\)?.? )?(?:of the GNU (Affero )?(Lesser |Library )?General Public License )?(as )?published by the Free Software Foundation/i or
+ $licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License (?:as )?published by the Free Software Foundation; version ([^ ]+) /i) {
$gplver = " (v$1)";
- } elsif ($licensetext =~ /GNU (Affero ?)General Public License, version ([^ ]+?)[ .]/) {
+ } elsif ($licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License, version (\d+(?:\.\d+)?)[ \.]/) {
$gplver = " (v$1)";
} elsif ($licensetext =~ /either version ([^ ]+) of the License, or \(at your option\) any later version/) {
$gplver = " (v$1 or later)";
@@ -410,7 +410,7 @@
$license = "GENERATED FILE";
}
- if ($licensetext =~ /is free software.? you can redistribute it and\/or modify it under the terms of the (GNU (Library|Lesser) General Public License|LGPL)/i) {
+ if ($licensetext =~ /is (free software.? you can redistribute it and\/or modify it|licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i) {
$license = "LGPL$gplver$extrainfo $license";
}