Framwork: add LICENSE generator and auto-generated file

(cherry picked from commit a32ea6325a)
(cherry picked from commit 6d49d71b2b)
This commit is contained in:
Franco Fichtner 2017-08-07 18:32:34 +02:00
parent 0add4c6175
commit 3be7922ab7
32 changed files with 223 additions and 42 deletions

50
LICENSE Normal file
View file

@ -0,0 +1,50 @@
Copyright (c) 2016 <gitdevmod@github.com>
Copyright (c) 2015-2016 Ad Schellevis
Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
Copyright (c) 2005-2006 Colin Smith <ethethlay@gmail.com>
Copyright (c) 2011 Dan Myers
Copyright (c) 2017 David Harrigan
Copyright (c) 2014-2017 Deciso B.V.
Copyright (c) 2008 Donovan Schonknecht
Copyright (c) 2016-2017 EURO-LOG AG
Copyright (c) 2006 Eric Friesen
Copyright (c) 2008-2010 Ermal Luçi
Copyright (c) 2017 Fabian Franz
Copyright (c) 2014-2017 Franco Fichtner <franco@opnsense.org>
Copyright (c) 2016-2017 Frank Wall
Copyright (c) 2010 Jim Pingle <jimp@pfsense.org>
Copyright (c) 2004-2005 Jonathan Watt <jwatt@jwatt.org>
Copyright (c) 2015 Jos Schellevis
Copyright (c) 2003-2006 Manuel Kasper <mk@neon1.net>
Copyright (c) 2017 Michael Muenz
Copyright (c) 2012 Pierre POMES <pierre.pomes@gmail.com>
Copyright (c) 2004-2012 Scott Ullrich <sullrich@gmail.com>
Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
Copyright (c) 2008 Shrew Soft Inc.
Copyright (c) 2013 Stanley P. Miller \ stan-qaz
Copyright (c) 2004-2005 T. Lechat <dev@lechat.org>
Copyright (c) 2010 Yehuda Katz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

View file

@ -23,3 +23,8 @@ ${TARGET}:
@${MAKE} -C ${PLUGIN_DIR} ${TARGET}
. endfor
.endfor
license:
@${.CURDIR}/Scripts/license . > ${.CURDIR}/LICENSE
.PHONY: license

127
Scripts/license Executable file
View file

@ -0,0 +1,127 @@
#!/usr/bin/env perl
# Copyright (c) 2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
use strict;
use warnings;
use autodie;
use Cwd;
use File::Find;
use File::Slurp;
my $src = shift || 'src';
my $cwd = getcwd;
my $lic = << 'END_LIC';
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
END_LIC
my %copyrights = ();
sub process_file
{
my $filename = $File::Find::name;
return if not -f "$cwd/$filename";
my @lines = read_file( "$cwd/$filename" );
my $possibly_bsd;
for my $line ( @lines ) {
$possibly_bsd = 1 if $line =~ /Redistribution and use in source and binary forms/i;
if ( $line =~ /Apache License/i ) {
$possibly_bsd = 0;
last;
}
}
return if not $possibly_bsd;
for my $line ( @lines ) {
my $copy = $line;
next if $line !~ s/copyright\s+\(c\)\s+//i;
$line =~ s/^[\*\\#\s]+//g;
$line =~ s/[\.\s]+$//g;
$line =~ s/Inc$/Inc./;
$line =~ s/B\.V$/B.V./;
chomp $copy;
$copy =~ s/^[\*\\#\s]+//g;
my ( $start, $end ) = ( 0, 9999 );
if ( $line =~ s/(\d\d\d\d\s*,?-?\s*)// ) {
$start = $1;
$start =~ s/[,\s\-]+//g;
}
if ( $line =~ s/(\d\d\d\d\s*,?\s+)// ) {
$end = $1;
$end =~ s/[,\s]+//g;
}
$end = $start if $end == 9999;
say STDERR "Error in $filename: $copy" if $end == 0;
if ( exists $copyrights{$line} ) {
if ( $start > $copyrights{$line}[0] ) {
$start = $copyrights{$line}[0];
}
if ( $copyrights{$line}[1] == 9999 or $end < $copyrights{$line}[1] ) {
$end = $copyrights{$line}[1];
}
}
$copyrights{$line} = [ $start, $end ];
}
}
find( \&process_file, $src );
for ( sort keys %copyrights ) {
my $date = $copyrights{$_}[0];
next if $date == 0;
$date = join '-', @{ $copyrights{$_} } if $copyrights{$_}[1] != $date;
print "Copyright (c) $date $_\n";
}
print $lic;

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2017 Franco Fichtner <franco@opnsense.org>
Copyright (C) 2010 Ermal Luci
Copyright (C) 2010 Ermal Luçi
Copyright (C) 2005-2006 Colin Smith <ethethlay@gmail.com>
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
All rights reserved.

View file

@ -90,7 +90,7 @@
* @version 0.8
* @updated 13 October 05 at 21:02:42 GMT
*
* DNSexit/OpenDNS support and multiwan extension for pfSense by Ermal Luci
* DNSexit/OpenDNS support and multiwan extension for pfSense by Ermal Luçi
* Custom DNS support by Matt Corallo
*/

View file

@ -1,8 +1,8 @@
<?php
/**
*
* Copyright (c) 2011, Dan Myers.
* Parts copyright (c) 2008, Donovan Schonknecht.
* Copyright (c) 2011 Dan Myers
* Copyright (c) 2008 Donovan Schonknecht
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View file

@ -2,7 +2,7 @@
<?php
/*
Copyright (C) 2004 Scott Ullrich
Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2008 Ermal Luci
Copyright (C) 2008 Ermal Luçi
Copyright (C) 2013 Stanley P. Miller \ stan-qaz
All rights reserved.

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2017 Franco Fichtner <franco@opnsense.org>
Copyright (C) 2010 Ermal Luci
Copyright (C) 2010 Ermal Luçi
Copyright (C) 2005-2006 Colin Smith <ethethlay@gmail.com>
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
All rights reserved.

View file

@ -2,7 +2,7 @@
<?php
/*
Copyright (C) 2004 Scott Ullrich
Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -3,7 +3,7 @@
/*
Copyright (C) 2017 Franco Fichtner <franco@opnsense.org>
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2008 Ermal Luci
Copyright (C) 2008 Ermal Luçi
Copyright (C) 2013 Stanley P. Miller \ stan-qaz
All rights reserved.

View file

@ -2,7 +2,7 @@
/*
* Copyright (C) 2014-2017 Franco Fichtner <franco@opnsense.org>
* Copyright (C) 2010 Ermal Luci
* Copyright (C) 2010 Ermal Luçi
* Copyright (C) 2005-2006 Colin Smith <ethethlay@gmail.com>
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
* All rights reserved.

View file

@ -2,7 +2,7 @@
/*
* Copyright (C) 2014-2017 Franco Fichtner <franco@opnsense.org>
* Copyright (C) 2010 Ermal Luci
* Copyright (C) 2010 Ermal Luçi
* Copyright (C) 2005-2006 Colin Smith <ethethlay@gmail.com>
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
* All rights reserved.

View file

@ -3,7 +3,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2009 Ermal Luçi
Copyright (C) 2004 Scott Ullrich
Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.

View file

@ -3,7 +3,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2009 Ermal Luçi
Copyright (C) 2004 Scott Ullrich
Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.

View file

@ -4,7 +4,7 @@
* Coypright (C) 2016-2017 Franco Fichtner <franco@opnsense.org>
* Copyright (C) 2008 Shrew Soft Inc
* Copyright (C) 2008 Ermal Luçi
* Copyright (C) 2004 Scott Ullrich
* Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
* All rights reserved.
*

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
Copyright (C) 2005 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
Copyright (C) 2005 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -4,7 +4,7 @@
* Coypright (C) 2016-2017 Franco Fichtner <franco@opnsense.org>
* Copyright (C) 2008 Shrew Soft Inc
* Copyright (C) 2008 Ermal Luçi
* Copyright (C) 2004 Scott Ullrich
* Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
* All rights reserved.
*

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2010 Ermal Luci
Copyright (C) 2010 Ermal Luçi
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
Copyright (C) 2005 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2010 Ermal Luçi
All rights reserved.

View file

@ -4,7 +4,7 @@
* Coypright (C) 2016-2017 Franco Fichtner <franco@opnsense.org>
* Copyright (C) 2008 Shrew Soft Inc
* Copyright (C) 2008 Ermal Luçi
* Copyright (C) 2004 Scott Ullrich
* Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
* All rights reserved.
*

View file

@ -1,10 +1,10 @@
<?php
/**
* Copyright (C) 2015 - 2017 Deciso B.V.
* Copyright (C) 2015 J. Schellevis - Deciso B.V.
/*
* Copyright (C) 2015-2017 Deciso B.V.
* Copyright (C) 2015 Jos Schellevis
* Copyright (C) 2017 Fabian Franz
* Copyright (C) 2017 Michael Muenz
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -27,7 +27,6 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Quagga\Api;

View file

@ -1,9 +1,9 @@
<?php
/**
* Copyright (C) 2015 - 2017 Deciso B.V.
* Copyright (C) 2015 J. Schellevis - Deciso B.V.
/*
* Copyright (C) 2015-2017 Deciso B.V.
* Copyright (C) 2015 Jos Schellevis
* Copyright (C) 2017 Fabian Franz
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -26,7 +26,6 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Quagga\Api;

View file

@ -2,7 +2,7 @@
/*
Copyright (C) 2016 Franco Fichtner <franco@opnsense.org>
Copyright (C) 2005-2008 Bill Marquette
Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -2,11 +2,12 @@
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Jim Pingle
Copyright (C) 2010 Jim Pingle <jimp@pfsense.org>
Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>
Copyright (C) 2005-2008 Bill Marquette
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
and Jonathan Watt <jwatt@jwatt.org>.
Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>
Copyright (C) 2004-2005 Manuel Kasper <mk@neon1.net>
Copyright (C) 2004-2005 Jonathan Watt <jwatt@jwatt.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -1,7 +1,7 @@
#!/usr/local/bin/python2.7
"""
Copyright (c) 2016 Deciso B.V. - Ad Schellevis
Copyright (c) 2016 Ad Schellevis
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -1,5 +1,5 @@
"""
Copyright (c) 2016 Deciso B.V. - Ad Schellevis
Copyright (c) 2016 Ad Schellevis
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -1,7 +1,7 @@
#!/usr/local/bin/python2.7
"""
Copyright (c) 2016 Deciso B.V. - Ad Schellevis
Copyright (c) 2016 Ad Schellevis
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -1,7 +1,7 @@
#!/usr/local/bin/python2.7
"""
Copyright (c) 2016 Deciso B.V. - Ad Schellevis
Copyright (c) 2016 Ad Schellevis
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -2,9 +2,9 @@
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Jim Pingle
Copyright (C) 2010 Jim Pingle <jimp@pfsense.org>
Copyright (C) 2006 Eric Friesen
All rights reserved
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: