[SCM] Git repository for devscripts branch, jessie, updated. v2.12.3-4-g7a78bd5

James McCoy jamessan at debian.org
Sat Sep 15 20:24:45 UTC 2012


The following commit has been merged in the jessie branch:
commit 5031e2a8eaa85443eb98649aba1395fae6cbd35f
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Sep 14 15:18:37 2012 -0500

    Modify licensecheck to recognize the MPL v2.0.
    
    It should recognize both as given in "Exhibit A" (no comma)
    as well as used in Eigen post-relicensing (comma).
    
    Tests have been added for MPL 1.1 (based on license text) as
    well as the two variations of MPL 2.0 notices.
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Signed-off-by: James McCoy <jamessan at debian.org>

diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 26740e1..c5c7808 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -478,8 +478,8 @@ sub parselicense($) {
 	}
     }
 
-    if ($licensetext =~ /Mozilla Public License Version ([^ ]+)/) {
-	$license = "MPL (v$1) $license";
+    if ($licensetext =~ /Mozilla Public License,? (Version|v\.) (\d+(?:\.\d+)?)/) {
+	$license = "MPL (v$2) $license";
     }
 
     if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+)/) {
diff --git a/test/licensecheck/mpl-1.1.sh b/test/licensecheck/mpl-1.1.sh
new file mode 100644
index 0000000..6cf945b
--- /dev/null
+++ b/test/licensecheck/mpl-1.1.sh
@@ -0,0 +1,16 @@
+# The contents of this file are subject to the Mozilla Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is debian devscripts code.
+#
+# The Initial Developer of the Original Code is
+# devscripts developers.
+# Portions created by the Initial Developer are Copyright (C) 2012
+# the Initial Developer. All Rights Reserved.
diff --git a/test/licensecheck/mpl-2.0-comma.sh b/test/licensecheck/mpl-2.0-comma.sh
new file mode 100644
index 0000000..caf2954
--- /dev/null
+++ b/test/licensecheck/mpl-2.0-comma.sh
@@ -0,0 +1,5 @@
+# Copyright devscripts developers
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/licensecheck/mpl-2.0.sh b/test/licensecheck/mpl-2.0.sh
new file mode 100644
index 0000000..1ce4472
--- /dev/null
+++ b/test/licensecheck/mpl-2.0.sh
@@ -0,0 +1,5 @@
+# Copyright devscripts developers
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/test_licensecheck b/test/test_licensecheck
index e7178df..fb67859 100755
--- a/test/test_licensecheck
+++ b/test/test_licensecheck
@@ -48,6 +48,12 @@ testDual() {
     license "dual.c" "Public domain GPL (v3)"
 }
 
+testMPL() {
+	license "mpl-1.1.sh" "MPL (v1.1)"
+	license "mpl-2.0.sh" "MPL (v2.0)"
+	license "mpl-2.0-comma.sh" "MPL (v2.0)"
+}
+
 testMachine() {
     license2 "-m" "beerware.cpp" "Beerware"
     license2 "--machine" "lgpl-2.1.h" "LGPL (v2.1)"

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list