This is an automated email from the git hooks/post-receive script. js pushed a commit to branch master in repository licensecheck.
commit bb9c2639c630897b837761aa638dcb10b07166d6 Author: Jonas Smedegaard <d...@jones.dk> Date: Mon Oct 10 01:28:18 2016 +0200 Add license patterns fsful fsfullr, and trait patterns fsf_unlimited fsf_unlimited_retention. --- lib/App/Licensecheck.pm | 18 ++++++++---------- lib/Regexp/Pattern/License.pm | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm index 63da4a6..e218d04 100755 --- a/lib/App/Licensecheck.pm +++ b/lib/App/Licensecheck.pm @@ -56,8 +56,6 @@ See the script for casual usage. # legacy descriptive names different from SPDX shortnames my %SPDX = ( - FSFUL => 'FSF Unlimited', - FSFULLR => 'FSF Unlimited (with Retention)', FTL => 'Freetype', Libpng => 'libpng', 'MS-PL' => 'Ms-PL', @@ -72,8 +70,8 @@ my %SPDX = ( my $under_terms_of = qr/(?:(?:Licensed|released) under|(?:according to|under) the (?:conditions|terms) of)/i; -my $any_of = qr/(?:any|one or more) of the following/i; -my $or_option_re = qr/(?:and|or)(?: ?\(?at your (?:choice|option)\)?)?/i; +my $any_of = qr/(?:any|one or more) of the following/i; +my $or_option_re = qr/(?:and|or)(?: ?\(?at your (?:choice|option)\)?)?/i; my $default_check_regex = q! /[\w-]+$ # executable scripts or README like file @@ -801,10 +799,10 @@ sub parse_license # FSFUL given ($licensetext) { - when ( /This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it\./i ) { - $gen_license->('FSFUL'); + when ( /$L{re}{fsful}/i ) { + $gen_license->('fsful'); } - when ( /This (\w+)(?: (?:file|script))? is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it\./i ) { + when ( /This (\w+)(?: (?:file|script))? is free software; $L{re}{fsf_unlimited}/i ) { $license = "FSF Unlimited ($1 derivation) $license"; push @spdx_license, "FSFUL~$1"; } @@ -812,10 +810,10 @@ sub parse_license # FSFULLR given ($licensetext) { - when ( /This file is free software; the Free Software Foundation gives unlimited permission to copy and\/or distribute it, with or without modifications, as long as this notice is preserved/i ) { - $gen_license->('FSFULLR'); + when ( /$L{re}{fsfullr}/i ) { + $gen_license->('fsfullr'); } - when ( /This (\w+)(?: (?:file|script))? is free software; the Free Software Foundation gives unlimited permission to copy and\/or distribute it, with or without modifications, as long as this notice is preserved/i ) { + when ( /This (\w+)(?: (?:file|script))? is free software; $L{re}{fsf_unlimited_retention}/i ) { $license = "FSF Unlimited (with Retention, $1 derivation) $license"; push @spdx_license, "FSFULLR~$1"; } diff --git a/lib/Regexp/Pattern/License.pm b/lib/Regexp/Pattern/License.pm index c4c13f7..d934407 100644 --- a/lib/Regexp/Pattern/License.pm +++ b/lib/Regexp/Pattern/License.pm @@ -66,6 +66,10 @@ Patterns each covering a single license. =item * fsfap +=item * fsful + +=item * fsfullr + =item * gfdl =item * gfdl_niv @@ -114,9 +118,14 @@ my $the = qr/(?:[Tt]he )/; my $gnu = qr/(?:GNU )/; my $gpl = qr/General Public License/; -my $by_fsf = qr/(?: (?:as )?published by $the?Free Software Foundation)/; +my $fsf = qr/(?:$the?Free Software Foundation)/; +my $by_fsf = qr/(?: (?:as )?published by $fsf)/; my $niv = qr/with no Invariant Sections(?:, with no Front-Cover Texts, and with no Back-Cover Texts)?/; +my $fsf_ul + = qr/$fsf gives unlimited permission to copy, distribute and modify it/; +my $fsf_ullr + = qr/$fsf_ul, with or without modifications, as long as this notice is preserved/; our %RE = ( adobe_2006 => { @@ -259,6 +268,16 @@ our %RE = ( pat => qr/Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved/, }, + fsful => { + name => 'FSFUL', + caption => 'FSF Unlimited', + pat => qr/This configure script is free software; $fsf_ul/, + }, + fsfullr => { + name => 'FSFULLR', + caption => 'FSF Unlimited (with Retention)', + pat => qr/This file is free software; $fsf_ullr/, + }, gfdl => { name => 'GFDL', summary => 'GNU Free Documentation License', @@ -380,6 +399,10 @@ Patterns each covering a single trait occuring in licenses. =item * disclaimer +=item * fsf_unlimited + +=item * fsf_unlimited_retention + =item * version_later =item * version_later_paragraph @@ -429,6 +452,16 @@ $RE{'disclaimer'} = { pat => qr/$P{discl}/, }; +$RE{'fsf_unlimited'} = { + tags => ['trait'], + pat => qr/$fsf_ul/, +}; + +$RE{'fsf_unlimited_retention'} = { + tags => ['trait'], + pat => qr/$fsf_ullr/, +}; + $RE{'version_later'} = { caption => 'version "or later"', tags => ['trait'], -- 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