[licensecheck] 92/112: Fix tighten detection of ISC license (was misdetecting curl).

Jonas Smedegaard dr at jones.dk
Fri Nov 25 22:02:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository licensecheck.

commit 2d122ed3d32154b91a5ae0b02d45c9a7856eadcb
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Fri Nov 25 13:53:34 2016 +0100

    Fix tighten detection of ISC license (was misdetecting curl).
---
 lib/App/Licensecheck.pm |  2 +-
 t/SPDX/ISC.txt          |  8 ++++++++
 t/SPDX/curl.txt         | 10 ++++++++++
 t/fedora.t              |  2 +-
 4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm
index b17d972..1ffbad5 100755
--- a/lib/App/Licensecheck.pm
+++ b/lib/App/Licensecheck.pm
@@ -668,7 +668,7 @@ sub parse_license
 
 	# ISC
 	given ($licensetext) {
-		when ( /Permission to use, copy, modify, and(\/or)? distribute this software for any purpose with or without fee is hereby granted, provided.*copyright notice.*permission notice.*all copies/ ) {
+		when ( /Permission to use, copy, modify, and\/or distribute this software for any purpose with or without fee is hereby granted, provided.*copyright notice.*permission notice.*all copies/ ) {
 			$gen_license->('ISC');
 		}
 	}
diff --git a/t/SPDX/ISC.txt b/t/SPDX/ISC.txt
new file mode 100644
index 0000000..d50e0cf
--- /dev/null
+++ b/t/SPDX/ISC.txt
@@ -0,0 +1,8 @@
+ISC License:
+
+Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-2003 by Internet Software Consortium
+
+Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
\ No newline at end of file
diff --git a/t/SPDX/curl.txt b/t/SPDX/curl.txt
new file mode 100644
index 0000000..dd333ab
--- /dev/null
+++ b/t/SPDX/curl.txt
@@ -0,0 +1,10 @@
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2015, Daniel Stenberg, <daniel at haxx.se>.
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
diff --git a/t/fedora.t b/t/fedora.t
index 610d55e..552af53 100644
--- a/t/fedora.t
+++ b/t/fedora.t
@@ -27,7 +27,7 @@ test "Parse corpus" => sub {
 
 run_me(
 	{   license =>
-			'MIT~oldstyle and/or DSDP and/or curl and/or MIT~oldstyle~disclaimer and/or Expat and/or ISC and/or Adobe-Glyph and/or BSL and/or PostgreSQL',
+			'MIT~oldstyle and/or DSDP and/or curl and/or MIT~oldstyle~disclaimer and/or Expat and/or Adobe-Glyph and/or BSL and/or PostgreSQL',
 		corpus => 'MIT'
 	}
 );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/licensecheck.git



More information about the Pkg-perl-cvs-commits mailing list