Bug#687664: devscripts-licensecheck: Does not recognize MPL 2.0
Ryan Pavlik
rpavlik at iastate.edu
Fri Sep 14 20:35:02 UTC 2012
Package: devscripts
Version: 2.10.61ubuntu5.1
Severity: wishlist
Tags: patch
Running the latest Git master of licensecheck.pl against the upstream Eigen source, I noticed it was report "UNKNOWN" for the MPL 2.0 licensed files. A small change to the regex made it possible to recognize 2.0 as well as 1.1, etc. I am including a patch along with tests.
-- Package-specific info:
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i -I"
-- System Information:
Debian Release: squeeze/sid
APT prefers lucid-updates
APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 'lucid-backports'), (500, 'lucid'), (50, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-42-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages devscripts depends on:
ii dpkg-dev 1.16.1.2ubuntu5~ppa1~lucid1 Debian package development tools
ii libc6 2.11.1-0ubuntu7.10 Embedded GNU C Library: Shared lib
ii perl 5.10.1-8ubuntu2.1 Larry Wall's Practical Extraction
Versions of packages devscripts recommends:
ii at 3.1.11-1ubuntu5.1 Delayed job execution and batch pr
ii bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1 simple mail user agent
ii bzr 2.1.4-0ubuntu1 easy to use distributed version co
ii curl 7.19.7-1ubuntu1.1 Get a file from an HTTP, HTTPS or
ii cvs 1:1.12.13-12ubuntu1.10.04.1 Concurrent Versions System
ii dctrl-too 2.14 Command-line tools to process Debi
ii dput 0.9.5.1ubuntu1 Debian package upload tool
ii fakeroot 1.14.4-1ubuntu1 Gives a fake root environment
ii firefox [ 15.0.1+build1-0ubuntu0.10.04.1 Safe and easy web browser from Moz
ii git [git- 1:1.7.11.3-0ppa1~lucid1 fast, scalable, distributed revisi
ii git-core 1:1.7.11.3-0ppa1~lucid1 fast, scalable, distributed revisi
ii gnupg 1.4.10-2ubuntu1 GNU privacy guard - a free PGP rep
ii google-ch 21.0.1180.89-r154005 The web browser from Google
ii libauthen 2.13-1 Authen::SASL - SASL Authentication
ii libparse- 2.005-2 Easy OO parsing of Debian control-
ii libterm-s 0.2-4build3 Perl extension for retrieving term
ii libtimeda 1.1900-1 Time and date functions for Perl
ii liburi-pe 1.52-1 module to manipulate and access UR
ii libwww-pe 5.834-1ubuntu0.1 Perl HTTP/WWW client/server librar
ii lintian 2.4.3ubuntu1~lucid1 Debian package checker
ii lsb-relea 4.0-0ubuntu8 Linux Standard Base version report
ii lzma 4.43-14ubuntu2 Compression method of 7z format in
ii man-db 2.5.7-2ubuntu1 on-line manual pager
ii mercurial 2.3.1-0ppa2~lucid1 easy-to-use, scalable distributed
ii openssh-c 1:5.3p1-3ubuntu7 secure shell (SSH) client, for sec
ii patch 2.6.1-3 Apply a diff file to an original
ii patchutil 0.3.1-2build1 Utilities to work with patches
ii sensible- 0.0.1ubuntu3 Utilities for sensible alternative
ii strace 4.5.19-2 A system call tracer
ii subversio 1.6.6dfsg-2ubuntu1.3 Advanced version control system
ii unzip 6.0-1build1 De-archiver for .zip files
ii w3m [www- 0.5.2-2.1ubuntu1.2 WWW browsable pager with excellent
ii wdiff 0.5-19 Compares two files word by word
ii wget 1.12-1.1ubuntu2.1 retrieves files from the web
Versions of packages devscripts suggests:
ii build-essenti 11.4build1 Informational list of build-essent
pn cvs-buildpack <none> (no description available)
ii debian-keyrin 2009.11.04 GnuPG (and obsolete PGP) keys of D
pn devscripts-el <none> (no description available)
pn equivs <none> (no description available)
ii gnuplot 4.4.3-0ubuntu2~ppa1~lucid1 A command-line driven interactive
pn libcrypt-ssle <none> (no description available)
pn libfile-deskt <none> (no description available)
ii libnet-smtp-s 1.01-2 SSL support for Net::SMTP
pn libsoap-lite- <none> (no description available)
ii libyaml-syck- 1.07-1build1 fast, lightweight YAML loader and
pn mutt <none> (no description available)
ii svn-buildpack 0.7.1 helper programs to maintain Debian
ii ubuntu-dev-to 0.99.1 useful tools for Ubuntu developers
ii w3m 0.5.2-2.1ubuntu1.2 WWW browsable pager with excellent
-- no debconf information
-------------- next part --------------
>From 041f90cb124128cf74dc7db90185ffd36ec1cd0f Mon Sep 17 00:00:00 2001
From: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri, 14 Sep 2012 15:18:37 -0500
Subject: [PATCH] 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>
---
scripts/licensecheck.pl | 4 ++--
test/licensecheck/mpl-1.1.sh | 16 ++++++++++++++++
test/licensecheck/mpl-2.0-comma.sh | 5 +++++
test/licensecheck/mpl-2.0.sh | 5 +++++
test/test_licensecheck | 6 ++++++
5 files changed, 34 insertions(+), 2 deletions(-)
create mode 100644 test/licensecheck/mpl-1.1.sh
create mode 100644 test/licensecheck/mpl-2.0-comma.sh
create mode 100644 test/licensecheck/mpl-2.0.sh
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..aa75a2a
--- /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)"
--
1.7.11.3
More information about the devscripts-devel
mailing list