This is an automated email from the git hooks/post-receive script. js pushed a commit to branch master in repository licensecheck.
commit 097d20967dad655a937406976642585e45505aa1 Author: Jonas Smedegaard <d...@jones.dk> Date: Wed Sep 21 06:53:57 2016 +0200 Improve detection of license AGPL. --- lib/App/Licensecheck.pm | 15 ++++++++++++++- t/Software-License.t | 2 +- t/grant.t | 7 ++++++- t/grant/AGPL/fastx.c | 17 +++++++++++++++++ t/grant/AGPL/fet.cpp | 20 ++++++++++++++++++++ t/grant/AGPL/setup.py | 26 ++++++++++++++++++++++++++ 6 files changed, 84 insertions(+), 3 deletions(-) diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm index 4fbd67a..6828676 100755 --- a/lib/App/Licensecheck.pm +++ b/lib/App/Licensecheck.pm @@ -430,7 +430,7 @@ sub parse_license $gplver = " (v$1)"; @spdx_gplver = ($1); } - when ( /GNU (?:Affero |Lesser |Library )?General Public License ?(?:[(),GPL]+) ?$ver_prefix_re($ver_re)[ \.]/i ) { + when ( /GNU (?:Affero |Lesser |Library )?General Public License ?(?:[(),AGPL]+) ?$ver_prefix_re($ver_re)[ \.]/i ) { $gplver = " (v$1)"; @spdx_gplver = ($1); } @@ -488,6 +488,19 @@ sub parse_license $license = "AGPL$gplver$extrainfo $license"; push @spdx_license, $gen_spdx->('AGPL'); } + # exclude GPL-3 license + when ( /GNU Affero General Public License into/i ) { + $license = "AGPL (v$1) $license"; + break; + } + # exclude MPL-2.0 license + when ( /means either [^.]+, the GNU Affero General Public License/i ) { + $license = "AGPL (v$1) $license"; + break; + } + when ( /AFFERO GENERAL PUBLIC LICENSE(?:,? $ver_prefix_re($ver_re)(,? or(?: any)? (?:later|newer))?)?/i ) { + $gen_license->( 'AGPL' $1, $2 ); + } } # GPL diff --git a/t/Software-License.t b/t/Software-License.t index 789ee1b..6d481ff 100644 --- a/t/Software-License.t +++ b/t/Software-License.t @@ -27,7 +27,7 @@ my %LICENSES = ( Mozilla_1_0 => 'MPL (v1.0)', None => 'UNKNOWN', PostgreSQL => 'UNKNOWN', - AGPL_3 => 'UNKNOWN', + AGPL_3 => 'AGPL (v3)', SSLeay => 'BSD (2 clause)', Apache_1_1 => 'Apache (v1.1)', Mozilla_1_1 => 'MPL (v1.1)', diff --git a/t/grant.t b/t/grant.t index 9d89aa3..5a0c5e2 100644 --- a/t/grant.t +++ b/t/grant.t @@ -25,6 +25,11 @@ test "Parse corpus" => sub { } }; +# AGPL +run_me( { license => 'AGPL-3+', corpus => 'AGPL/fastx.c' } ); +run_me( { license => 'AGPL-3+', corpus => 'AGPL/fet.cpp' } ); +run_me( { license => 'AGPL-3+', corpus => 'AGPL/setup.py' } ); + # Apache run_me( { license => 'Apache-2.0 or GPL-2', corpus => 'Apache_and_more/PIE.htc' } @@ -47,7 +52,7 @@ run_me( # EPL run_me( - { license => 'LGPL-2.1 and/or Apache-2.0+', + { license => 'AGPL-3+ and/or LGPL-2.1 and/or Apache-2.0+', corpus => 'EPL_and_more/Base64Coder.java' } ); diff --git a/t/grant/AGPL/fastx.c b/t/grant/AGPL/fastx.c new file mode 100644 index 0000000..5434e48 --- /dev/null +++ b/t/grant/AGPL/fastx.c @@ -0,0 +1,17 @@ +/* + FASTX-toolkit - FASTA/FASTQ preprocessing tools. + Copyright (C) 2009-2013 A. Gordon (assafgor...@gmail.com) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ diff --git a/t/grant/AGPL/fet.cpp b/t/grant/AGPL/fet.cpp new file mode 100644 index 0000000..44f5ef1 --- /dev/null +++ b/t/grant/AGPL/fet.cpp @@ -0,0 +1,20 @@ +/* +File fet.cpp - this is where the program FET starts +*/ + +/*************************************************************************** + fet.cpp - description + ------------------- + begin : 2002 + copyright : (C) 2002 by Lalescu Liviu + email : Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address) + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU Affero General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + ***************************************************************************/ diff --git a/t/grant/AGPL/setup.py b/t/grant/AGPL/setup.py new file mode 100644 index 0000000..0b8d3f0 --- /dev/null +++ b/t/grant/AGPL/setup.py @@ -0,0 +1,26 @@ +#!/usr/bin/python -W default +import warnings; warnings.simplefilter('default') + +import distutils.sysconfig +import os +import sys + +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup, Extension + +long_description = """\ +Embeds the Python interpreter into PAM \ +so PAM modules can be written in Python""" + +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Natural Language :: English", + "Operating System :: Unix", + "Programming Language :: C", + "Programming Language :: Python", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Systems Administration :: Authentication/Directory"] -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/licensecheck.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits