Debian-Copyright-0.2000755001750001750 012053257477 15302 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/MANIFEST000444001750001750 101212053257477 16562 0ustar00nicholasnicholas000000000000Build.PL Changes ignore.txt lib/Debian/Copyright.pm lib/Debian/Copyright/Stanza.pm lib/Debian/Copyright/Stanza/Files.pm lib/Debian/Copyright/Stanza/Header.pm lib/Debian/Copyright/Stanza/License.pm lib/Debian/Copyright/Stanza/OrSeparated.pm Makefile.PL MANIFEST This list of files MANIFEST.SKIP META.json META.yml README t/00.load.t t/01.basic.t t/02.mysql.t t/data/add1 t/data/copyright t/data/invalid t/data/invalid2 t/data/mysql t/manifest.t t/perlcritic.t t/pod-coverage.t t/pod.t t/podspell.t t/prereq.t t/version.t Debian-Copyright-0.2/META.json000444001750001750 413512053257477 17063 0ustar00nicholasnicholas000000000000{ "abstract" : "manage Debian copyright files", "author" : [ "Nicholas Bamber " ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4001, CPAN::Meta::Converter version 2.110440", "license" : [ "gpl_1" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Debian-Copyright", "prereqs" : { "build" : { "requires" : { "Perl6::Slurp" : 0, "Test::Deep" : 0, "Test::Exception" : 0, "Test::LongString" : 0, "Test::More" : 0, "Test::NoWarnings" : 0 } }, "configure" : { "requires" : { "Module::Build" : "0.38" } }, "runtime" : { "requires" : { "Array::Unique" : 0, "Class::Accessor" : 0, "Parse::DebControl" : 0, "Tie::IxHash" : 0, "perl" : "v5.10.1" } } }, "provides" : { "Debian::Copyright" : { "file" : "lib/Debian/Copyright.pm", "version" : "0.2" }, "Debian::Copyright::Stanza" : { "file" : "lib/Debian/Copyright/Stanza.pm", "version" : "0.2" }, "Debian::Copyright::Stanza::Files" : { "file" : "lib/Debian/Copyright/Stanza/Files.pm", "version" : "0.2" }, "Debian::Copyright::Stanza::Header" : { "file" : "lib/Debian/Copyright/Stanza/Header.pm", "version" : "0.2" }, "Debian::Copyright::Stanza::License" : { "file" : "lib/Debian/Copyright/Stanza/License.pm", "version" : "0.2" }, "Debian::Copyright::Stanza::OrSeparated" : { "file" : "lib/Debian/Copyright/Stanza/OrSeparated.pm", "version" : "0.2" } }, "release_status" : "stable", "resources" : { "license" : [ "http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt" ], "repository" : { "url" : "http://github.com/periapt/Debian-Copyright/tree" } }, "version" : "0.2" } Debian-Copyright-0.2/README000444001750001750 647212053257477 16330 0ustar00nicholasnicholas000000000000NAME Debian::Copyright - manage Debian copyright files VERSION This document describes Debian::Copyright version 0.2 . SYNOPSIS my $c = Debian::Copyright->new(); # construct a new $c->read($file1); # parse debian copyright file $c->read($file2); # parse a second $c->write($ofile); # write to file DESCRIPTION Debian::Copyright can be used for the representation, manipulation and merging of Debian copyright files in an object-oriented way. It provides easy reading and writing of the debian/copyright file found in Debian source packages. Debian has recently started standardising its copyright files around the machine-readable DEP-5/Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ format. note on terminology The term "Stanza" derives from the dh-make-perl tool. The official term would now be "Paragraph". For the purposes of discussing the DEP-5 format the terms are used interchangeably in this documentation. FIELDS header An instance of Debian::Copyright::Stanza::Header class. Contains the the first stanza of the copyright file. If multiple files were parsed only the first will be retained. files A hash reference (actually Tie::IxHash instance) with keys being the values of the `Files' clause and values instances of Debian::Copyright::Stanza::Files class. licenses A hash reference (actually Tie::IxHash instance) with keys being the values of the `License' clause and values instances of Debian::Copyright::Stanza::License class. CONSTRUCTOR new Constructs a new Debian::Copyright instance. The `header' field is initialised with an empty string. The `files_block' and `license_block' fields are initialised with an empty instance of Tie::IxHash. METHODS read *file* Parse debian and accessors. *file* can be either a file name, an opened file handle or a string scalar reference. write *file* Writes a debian/copyright-like file in *file* with the contents defined in the accessor fields. *file* can be either a file name, an opened file handle or a string scalar reference. LIMITATIONS This module is written with one particular version of DEP-5 in mind. Furthermore version 0.1 of this software was for a draft version the standard. The changes in going from draft to standard were such that it was not worth attempting to maintain backwards compatibility. Test coverage is not yet complete. INCOMPATIBILITIES This version is not backwards compatible with version 0.1. ACKNOWLEDGEMENTS Thanks to Charles Plessy for various comments regarding the documentation. COPYRIGHT & LICENSE Copyright (C) 2011-2012 Nicholas Bamber nicholas@periapt.co.uk This module was adapted from Debian::Control. Copyright (C) 2009 Damyan Ivanov dmn@debian.org [Portions] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. Debian-Copyright-0.2/MANIFEST.SKIP000444001750001750 212612053257477 17336 0ustar00nicholasnicholas000000000000 #!start included /usr/share/perl/5.12/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover files. \bcover_db\b #!end included /usr/share/perl/5.12/ExtUtils/MANIFEST.SKIP # Avoid configuration metadata file ^MYMETA\. # Avoid Module::Build generated and utility files. \bBuild$ \bBuild.bat$ \b_build \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # Avoid archives of this distribution \bDebian-Copyright-[\d\.\_]+ Debian-Copyright-0.2/Changes000444001750001750 66212053257477 16716 0ustar00nicholasnicholas000000000000Revision history for Debian-Copyright 0.2 23-07-2012 Added support for full bodies that occur in License clauses in Files stanzas Added some real life copyright tests from mysql Used comments from Charles Plessy, Closes: #70544 Worked through some of the missing test coverage Updated copyright notices 0.1 12-08-2011 First version, released on an unsuspecting world. Debian-Copyright-0.2/Build.PL000444001750001750 204012053257477 16727 0ustar00nicholasnicholas000000000000use 5.006; use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'Debian::Copyright', license => 'gpl', dist_author => q{Nicholas Bamber }, dist_version_from => 'lib/Debian/Copyright.pm', build_requires => { 'Test::More' => 0, 'Perl6::Slurp' => 0, 'Test::LongString' => 0, 'Test::Exception' => 0, 'Test::Deep' => 0, 'Test::NoWarnings' => 0, }, configure_requires => { 'Module::Build' => 0.38 }, requires => { 'perl' => 5.006, 'Parse::DebControl' => 0, 'Tie::IxHash' => 0, 'Array::Unique' => 0, 'Class::Accessor'=> 0, perl=>'5.10.1', }, add_to_cleanup => [ 'Debian-Copyright-*' ], create_makefile_pl => 'traditional', create_readme => 1, meta_merge => { resources => { repository => 'http://github.com/periapt/Debian-Copyright/tree', }, }, ); $builder->create_build_script(); Debian-Copyright-0.2/META.yml000444001750001750 250112053257477 16706 0ustar00nicholasnicholas000000000000--- abstract: 'manage Debian copyright files' author: - 'Nicholas Bamber ' build_requires: Perl6::Slurp: 0 Test::Deep: 0 Test::Exception: 0 Test::LongString: 0 Test::More: 0 Test::NoWarnings: 0 configure_requires: Module::Build: 0.38 dynamic_config: 1 generated_by: 'Module::Build version 0.4001, CPAN::Meta::Converter version 2.110440' license: gpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Debian-Copyright provides: Debian::Copyright: file: lib/Debian/Copyright.pm version: 0.2 Debian::Copyright::Stanza: file: lib/Debian/Copyright/Stanza.pm version: 0.2 Debian::Copyright::Stanza::Files: file: lib/Debian/Copyright/Stanza/Files.pm version: 0.2 Debian::Copyright::Stanza::Header: file: lib/Debian/Copyright/Stanza/Header.pm version: 0.2 Debian::Copyright::Stanza::License: file: lib/Debian/Copyright/Stanza/License.pm version: 0.2 Debian::Copyright::Stanza::OrSeparated: file: lib/Debian/Copyright/Stanza/OrSeparated.pm version: 0.2 requires: Array::Unique: 0 Class::Accessor: 0 Parse::DebControl: 0 Tie::IxHash: 0 perl: v5.10.1 resources: license: http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt repository: http://github.com/periapt/Debian-Copyright/tree version: 0.2 Debian-Copyright-0.2/ignore.txt000444001750001750 17612053257477 17447 0ustar00nicholasnicholas000000000000blib* Makefile Makefile.old Build Build.bat _build* pm_to_blib* *.tar.gz .lwpcookies cover_db pod2htm*.tmp Debian-Copyright-* Debian-Copyright-0.2/Makefile.PL000444001750001750 134412053257477 17413 0ustar00nicholasnicholas000000000000# Note: this file was auto-generated by Module::Build::Compat version 0.4001 require 5.010001; use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'Debian::Copyright', 'VERSION_FROM' => 'lib/Debian/Copyright.pm', 'PREREQ_PM' => { 'Array::Unique' => 0, 'Class::Accessor' => 0, 'Parse::DebControl' => 0, 'Perl6::Slurp' => 0, 'Test::Deep' => 0, 'Test::Exception' => 0, 'Test::LongString' => 0, 'Test::More' => 0, 'Test::NoWarnings' => 0, 'Tie::IxHash' => 0 }, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [], 'PL_FILES' => {} ) ; Debian-Copyright-0.2/t000755001750001750 012053257477 15545 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/t/version.t000444001750001750 56012053257477 17535 0ustar00nicholasnicholas000000000000#!perl use strict; use warnings; use Test::More; # Ensure a recent version of Test::Pod if (not $ENV{TEST_AUTHOR}) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to run.'; plan skip_all => $msg; } eval "use Test::ConsistentVersion"; plan skip_all => "Test::ConsistentVersion required for tests" if $@; Test::ConsistentVersion::check_consistent_versions(); Debian-Copyright-0.2/t/01.basic.t000444001750001750 635712053257477 17402 0ustar00nicholasnicholas000000000000use Test::More tests => 36; use Debian::Copyright; # replace by Test::File::Contents? use Perl6::Slurp; use Test::LongString; use Test::Deep; use Test::Exception; my $copyright = Debian::Copyright->new; isa_ok($copyright, 'Debian::Copyright'); $copyright->read('t/data/copyright'); like($copyright->header, qr{\AFormat:\s}xms, 'Header stanza'); is($copyright->files->Length, 2, 'files length'); is($copyright->files->Keys(0), '*', 'key files(0)'); is($copyright->files->Values(0)->Files, '*', 'files(0)->Files'); is($copyright->files->Values(0)->Copyright, "\n 2010-2011, Nicholas Bamber ", 'files(0)->Copyright'); is($copyright->files->Values(0)->License, 'Artistic or GPL-2+', 'files(0)->License'); is($copyright->files->Keys(1), 'lib/Debian/Copyright*', 'key files(1)'); is($copyright->files->Values(1)->Files, 'lib/Debian/Copyright*', 'files(1)->Files'); is($copyright->files->Values(1)->Copyright."\n", <<'EOF', 2011, Nicholas Bamber 2009, Damyan Ivanov [Portions] EOF 'files(1)->Copyright'); is($copyright->files->Values(1)->License, 'GPL-2+', 'files(1)->License'); is($copyright->licenses->Length, 2, 'licenses length'); is($copyright->licenses->Keys(0), 'Artistic', 'key licenses(0)'); like($copyright->licenses->Values(0)->License, qr/\AArtistic\s+This\sprogram/xms, 'licenses(0)->Files'); my $contents = slurp 't/data/copyright'; my $data = undef; $copyright->write(\$data); is_string($data, $contents, "file contents"); my $copyright2 = Debian::Copyright->new; isa_ok($copyright2, 'Debian::Copyright'); $copyright2->read(\$contents); cmp_deeply($copyright, $copyright2, "file versus string"); $copyright->read('t/data/add1'); $copyright->write(\$data); is($copyright->files->Length, 3, 'files length'); is($copyright->files->Keys(0), '*', 'key files(0)'); is($copyright->files->Values(0)->Files, '*', 'files(0)->Files'); is($copyright->files->Values(0)->Copyright, "\n 2010-2011, Nicholas Bamber ", 'files(0)->Copyright'); is($copyright->files->Values(0)->License, 'Artistic or GPL-2+', 'files(0)->License'); is($copyright->files->Keys(1), 'lib/Debian/Copyright*', 'key files(1)'); is($copyright->files->Values(1)->Files, 'lib/Debian/Copyright*', 'files(1)->Files'); is($copyright->files->Values(1)->Copyright."\n", <<'EOF', 2011, Nicholas Bamber 2009, Damyan Ivanov [Portions] EOF 'files(1)->Copyright'); is($copyright->files->Values(1)->License, 'GPL-2+', 'files(1)->License'); is($copyright->licenses->Length, 3, 'licenses length'); is($copyright->licenses->Keys(0), 'Artistic', 'key licenses(0)'); like($copyright->licenses->Values(0)->License, qr/\AArtistic\s+This\sprogram/xms, 'licenses(0)->Files'); is($copyright->files->Keys(2), 'test/*', 'key files(2)'); is($copyright->files->Values(2)->Files, 'test/*', 'files(2)->Files'); is($copyright->licenses->Keys(2), 'BSD', 'key licenses(2)'); my $copyright3 = Debian::Copyright->new; isa_ok($copyright3, 'Debian::Copyright'); throws_ok { $copyright3->read('t/data/invalid') } qr/Invalid field given \(Blah\)/; my $copyright4 = Debian::Copyright->new; isa_ok($copyright4, 'Debian::Copyright'); throws_ok { $copyright4->read('t/data/invalid2') } qr/Got copyright stanza with unrecognised field/; Debian-Copyright-0.2/t/pod.t000444001750001750 42712053257477 16634 0ustar00nicholasnicholas000000000000#!perl if ( not $ENV{TEST_AUTHOR} ) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; plan( skip_all => $msg ); } use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); Debian-Copyright-0.2/t/perlcritic.t000444001750001750 54412053257477 20212 0ustar00nicholasnicholas000000000000#!perl use Test::More; if ( not $ENV{TEST_AUTHOR} ) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; plan( skip_all => $msg ); } eval {require Test::Perl::Critic}; if ($@) { Test::More::plan( skip_all => "Test::Perl::Critic required for testing PBP compliance" ); } Test::Perl::Critic::all_critic_ok(); Debian-Copyright-0.2/t/prereq.t000444001750001750 77112053257477 17352 0ustar00nicholasnicholas000000000000use strict; use warnings; use Test::More; if ( not $ENV{TEST_PREREQ} ) { my $msg = 'Author test. Set $ENV{TEST_PREREQ} to a true value to run.'; plan( skip_all => $msg ); } eval { require Test::Prereq::Build; }; if ( $@) { my $msg = 'Test::Prereq required to criticise code'; plan( skip_all => $msg ); } Test::Prereq::Build::prereq_ok(undef, 'prereq', ['Test::ConsistentVersion', 'Test::CheckManifest', 'Test::Spelling', 'Test::Prereq', 'Test::Prereq::Build', 'Test::Perl::Critic']); Debian-Copyright-0.2/t/manifest.t000444001750001750 75712053257477 17666 0ustar00nicholasnicholas000000000000use strict; use warnings; use Test::More; if ( not $ENV{TEST_AUTHOR} ) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; plan( skip_all => $msg ); } eval { require Test::CheckManifest; }; if ( $@ ) { my $msg = 'Test::CheckManifest required to check manifest'; plan( skip_all => $msg ); } Test::CheckManifest::ok_manifest({filter=>[qr/\/cover_db/,qr/\/\.git/,qr/\/\.dotest/,qr/\.bak$/,qr/\.old$/,qr/t\/dbfile$/,qr/\.tar\.gz$/,qr/Makefile(?:\.PL)$/]}); Debian-Copyright-0.2/t/podspell.t000444001750001750 342112053257477 17711 0ustar00nicholasnicholas000000000000use strict; use warnings; use Test::More; if ( not $ENV{TEST_AUTHOR} ) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; plan( skip_all => $msg ); } eval { require Test::Spelling; }; if ( $@) { my $msg = 'Test::Spelling required to criticise code'; plan( skip_all => $msg ); } Test::Spelling::add_stopwords(qw( Ivanov Damyan CPAN Bamber github AnnoCPAN RT API crypted HTML TODO URL dh Plessy CAPAUTHTOKEN Hardcode hardcode everytime initialize authen customizations runmode runmodes prerun pre callback DEP checkbox customize customized desaturating detaint URLs)); Test::Spelling::all_pod_files_spelling_ok(); Debian-Copyright-0.2/t/00.load.t000444001750001750 53512053257477 17207 0ustar00nicholasnicholas000000000000use Test::More tests => 6; BEGIN { use_ok( 'Debian::Copyright' ); use_ok( 'Debian::Copyright::Stanza' ); use_ok( 'Debian::Copyright::Stanza::Header' ); use_ok( 'Debian::Copyright::Stanza::Files' ); use_ok( 'Debian::Copyright::Stanza::License' ); use_ok( 'Debian::Copyright::Stanza::OrSeparated' ); } diag( "Testing $Debian::Copyright::VERSION" ); Debian-Copyright-0.2/t/pod-coverage.t000444001750001750 46612053257477 20430 0ustar00nicholasnicholas000000000000#!perl if ( not $ENV{TEST_AUTHOR} ) { my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.'; plan( skip_all => $msg ); } use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); Debian-Copyright-0.2/t/02.mysql.t000444001750001750 3615112053257477 17502 0ustar00nicholasnicholas000000000000use Test::More tests => 62; use Debian::Copyright; use Test::Deep; use Test::LongString; use Test::NoWarnings; my $copyright = Debian::Copyright->new; isa_ok($copyright, 'Debian::Copyright'); $copyright->read('t/data/mysql'); is($copyright->header->Format, 'http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/', 'Format'); is($copyright->header->Upstream_Name, 'MySQL 5.5', 'Upstream-Name'); is($copyright->header->Upstream_Contact, 'http://bugs.mysql.com/', 'Upstream-Contact'); is($copyright->header->Source, 'http://dev.mysql.com/downloads/mysql/5.5.html', 'Source'); my $s =<<'EOS'; The file Docs/mysql.info is removed from the upstream source because it is incompatible with the Debian Free Software Guidelines. See debian/README.source for how this repacking was done. . Originally produced by a modified version of licensecheck2dep5 from CDBS by Clint Byrum . Hand modified to reduce redundancy in the output and add appropriate license text. . Also, MySQL carries the "FOSS License Exception" specified in README . Quoting from README: . MySQL FOSS License Exception We want free and open source software applications under certain licenses to be able to use specified GPL-licensed MySQL client libraries despite the fact that not all such FOSS licenses are compatible with version 2 of the GNU General Public License. Therefore there are special exceptions to the terms and conditions of the GPLv2 as applied to these client libraries, which are identified and described in more detail in the FOSS License Exception at . . The text of the Above URL is quoted below, as of Aug 17, 2011. . > FOSS License Exception > . > Updated July 1, 2010 > . > What is the FOSS License Exception? Oracle's Free and Open Source > Software ("FOSS") License Exception (formerly known as the FLOSS > License Exception) allows developers of FOSS applications to include > Oracle's MySQL Client Libraries (also referred to as "MySQL Drivers" > or "MySQL Connectors") with their FOSS applications. MySQL Client > Libraries are typically licensed pursuant to version 2 of the General > Public License ("GPL"), but this exception permits distribution of > certain MySQL Client Libraries with a developer's FOSS applications > licensed under the terms of another FOSS license listed below, > even though such other FOSS license may be incompatible with the GPL. > . > The following terms and conditions describe the circumstances under > which Oracle's FOSS License Exception applies. > . > Oracle's FOSS License Exception Terms and Conditions Definitions. > "Derivative Work" means a derivative work, as defined under applicable > copyright law, formed entirely from the Program and one or more > FOSS Applications. > . > "FOSS Application" means a free and open source software application > distributed subject to a license listed in the section below titled > "FOSS License List." > . > "FOSS Notice" means a notice placed by Oracle or MySQL in a copy > of the MySQL Client Libraries stating that such copy of the MySQL > Client Libraries may be distributed under Oracle's or MySQL's FOSS > (or FLOSS) License Exception. > . > "Independent Work" means portions of the Derivative Work that are not > derived from the Program and can reasonably be considered independent > and separate works. > . > "Program" means a copy of Oracle's MySQL Client Libraries that > contains a FOSS Notice. > . > A FOSS application developer ("you" or "your") may distribute a > Derivative Work provided that you and the Derivative Work meet all > of the following conditions: You obey the GPL in all respects for > the Program and all portions (including modifications) of the Program > included in the Derivative Work (provided that this condition does not > apply to Independent Works); The Derivative Work does not include any > work licensed under the GPL other than the Program; You distribute > Independent Works subject to a license listed in the section below > titled "FOSS License List"; You distribute Independent Works in > object code or executable form with the complete corresponding > machine-readable source code on the same medium and under the same > FOSS license applying to the object code or executable forms; All > works that are aggregated with the Program or the Derivative Work > on a medium or volume of storage are not derivative works of the > Program, Derivative Work or FOSS Application, and must reasonably > be considered independent and separate works. Oracle reserves all > rights not expressly granted in these terms and conditions. If all > of the above conditions are not met, then this FOSS License Exception > does not apply to you or your Derivative Work. > . > FOSS License List > . > License Name Version(s)/Copyright Date > Release Early Certified Software > Academic Free License 2.0 > Apache Software License 1.0/1.1/2.0 > Apple Public Source License 2.0 > Artistic license From Perl 5.8.0 > BSD license "July 22 1999" > Common Development and Distribution License (CDDL) 1.0 > Common Public License 1.0 > Eclipse Public License 1.0 > European Union Public License (EUPL)[1] 1.1 > GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1/3.0 > GNU General Public License (GPL) 3.0 > IBM Public License 1.0 > Jabber Open Source License 1.0 > MIT License (As listed in file MIT-License.txt) - > Mozilla Public License (MPL) 1.0/1.1 > Open Software License 2.0 > OpenSSL license (with original SSLeay license) "2003" ("1998") > PHP License 3.0/3.01 > Python license (CNRI Python License) - > Python Software Foundation License 2.1.1 > Sleepycat License "1999" > University of Illinois/NCSA Open Source License - > W3C License "2001" > X11 License "2001" > Zlib/libpng License - > Zope Public License 2.0 > [1] When an Independent Work is licensed under a "Compatible License" > pursuant to the EUPL, the Compatible License rather than the EUPL is > the applicable license for purposes of these FOSS License Exception > Terms and Conditions. . The above text is subject to this copyright notice: © 2010, Oracle and/or its affiliates. EOS chomp $s; is_string($copyright->header->Comment, "\n$s", 'Comment'); is($copyright->files->Length, 42, 'no of files'); $s = <<'EOS'; cmd-line-utils/libedit/config.h dbug/example1.c dbug/example2.c dbug/example3.c dbug/factorial.c dbug/main.c dbug/my_main.c dbug/remove_function_from_trace.pl dbug/tests.c dbug/tests-t.pl extra/yassl/src/dummy.cpp include/probes_mysql_nodtrace.h libmysqld/resource.h mysql-test/* regex/* sql-bench/graph-compare-results.sh storage/ndb/bin/* storage/ndb/demos/* support-files/binary-configure.sh support-files/my-huge.cnf.sh support-files/my-innodb-heavy-4G.cnf.sh support-files/my-large.cnf.sh support-files/my-medium.cnf.sh support-files/my-small.cnf.sh support-files/mysqld_multi.server.sh support-files/mysql-log-rotate.sh support-files/mysql.server-sys5.sh EOS is($copyright->files->Keys(0), $s); $s= <<'EOS'; BUILD/* Docs/* client/* client/echo.c client/get_password.c cmake/* dbug/dbug_add_tags.pl extra/* include/* libmysql/* libmysqld/* libservices/* mysql-test/include/have_perfschema.inc mysql-test/include/have_perfschema.inc mysql-test/lib/mtr_cases.pm mysql-test/lib/mtr_gcov.pl mysql-test/lib/mtr_gprof.pl mysql-test/lib/mtr_io.pl mysql-test/lib/mtr_match.pm mysql-test/lib/mtr_misc.pl mysql-test/lib/mtr_process.pl mysql-test/lib/mtr_report.pm mysql-test/lib/mtr_results.pm mysql-test/lib/mtr_stress.pl mysql-test/lib/mtr_unique.pm mysql-test/lib/My/ConfigFactory.pm mysql-test/lib/My/Config.pm mysql-test/lib/My/CoreDump.pm mysql-test/lib/My/File/* mysql-test/lib/My/Find.pm mysql-test/lib/My/Handles.pm mysql-test/lib/My/Options.pm mysql-test/lib/My/Platform.pm mysql-test/lib/My/SafeProcess/Base.pm mysql-test/lib/My/SafeProcess.pm mysql-test/lib/My/SafeProcess/safe_kill_win.cc mysql-test/lib/My/SafeProcess/safe_process.cc mysql-test/lib/My/SafeProcess/safe_process.pl mysql-test/lib/My/SafeProcess/safe_process_win.cc mysql-test/lib/My/SysInfo.pm mysql-test/lib/My/Test.pm mysql-test/lib/t/* mysql-test/lib/v1/mtr_cases.pl mysql-test/lib/v1/mtr_gcov.pl mysql-test/lib/v1/mtr_gprof.pl mysql-test/lib/v1/mtr_im.pl mysql-test/lib/v1/mtr_io.pl mysql-test/lib/v1/mtr_match.pl mysql-test/lib/v1/mtr_misc.pl mysql-test/lib/v1/mtr_process.pl mysql-test/lib/v1/mtr_report.pl mysql-test/lib/v1/mtr_stress.pl mysql-test/lib/v1/mtr_timer.pl mysql-test/lib/v1/mtr_unique.pl mysql-test/lib/v1/My/* mysql-test/lib/v1/My/* mysql-test/lib/v1/mysql-test-run.pl mysql-test/mysql-stress-test.pl mysql-test/mysql-test-run.pl mysql-test/std_data/* mysql-test/suite/perfschema/include/* mysql-test/suite/perfschema_stress/include/* mysql-test/suite/perfschema_stress/include/* mysys/* packaging/WiX/ca/* plugin/audit_null/* plugin/auth/* plugin/daemon_example/* plugin/fulltext/* plugin/semisync/semisync_slave.cc plugin/semisync/semisync_slave.h scripts/* sql/* sql-common/* storage/* strings/* support-files/config.huge.ini.sh support-files/config.medium.ini.sh support-files/config.small.ini.sh support-files/MacOSX/Description.plist.sh support-files/MacOSX/Info.plist.sh support-files/MacOSX/StartupParameters.plist.sh support-files/MySQL-shared-compat.spec.sh support-files/mysql.spec.sh support-files/ndb-config-2-node.ini.sh tests/* unittest/* vio/* EOS is($copyright->files->Keys(1), $s); is($copyright->files->Keys(2), 'storage/innobase/*'); is($copyright->files->Keys(3), 'cmd-line-utils/readline/*'); is($copyright->files->Keys(4), 'cmd-line-utils/libedit/*'); $s = <<'EOS'; cmd-line-utils/libedit/filecomplete.c cmd-line-utils/libedit/filecomplete.h cmd-line-utils/libedit/np/fgetln.c cmd-line-utils/libedit/read.h cmd-line-utils/libedit/readline.c cmd-line-utils/libedit/readline/* EOS is($copyright->files->Keys(5), $s); $s= <<'EOS'; client/completion_hash.h scripts/mysqlaccess.sh scripts/mysql_fix_extensions.sh scripts/mysql_setpermission.sh sql-bench/* storage/myisam/ftbench/ft-test-run.sh storage/myisam/mi_test_all.sh storage/ndb/test/run-test/atrt-analyze-result.sh storage/ndb/test/run-test/atrt-clear-result.sh storage/ndb/test/run-test/atrt-gather-result.sh storage/ndb/test/run-test/atrt-setup.sh storage/ndb/test/run-test/make-config.sh storage/ndb/test/run-test/make-html-reports.sh storage/ndb/test/run-test/make-index.sh storage/ndb/test/run-test/ndb-autotest.sh strings/strxmov.c strings/strxnmov.c support-files/MacOSX/postflight.sh support-files/MacOSX/preflight.sh EOS is($copyright->files->Keys(6), $s); $s= <<'EOS'; storage/archive/azio.c storage/archive/azlib.h zlib/* EOS is($copyright->files->Keys(7), $s); $s= <<'EOS'; sql-bench/innotest1.sh sql-bench/innotest1a.sh sql-bench/innotest1b.sh sql-bench/innotest2.sh sql-bench/innotest2a.sh sql-bench/innotest2b.sh EOS is($copyright->files->Keys(8), $s); $s= <<'EOS'; storage/innobase/btr/btr0sea.c storage/innobase/include/log0log.h storage/innobase/include/os0sync.h storage/innobase/log/log0log.c storage/innobase/row/row0sel.c EOS is($copyright->files->Keys(9), $s); $s= <<'EOS'; storage/innobase/btr/btr0cur.c storage/innobase/buf/buf0buf.c storage/innobase/include/sync0rw.h storage/innobase/include/sync0sync.h storage/innobase/sync/* EOS is($copyright->files->Keys(10), $s); $s= <<'EOS'; storage/myisam/rt_index.h storage/myisam/rt_key.c storage/myisam/rt_mbr.c storage/myisam/rt_mbr.h storage/myisam/sp_defs.h EOS is($copyright->files->Keys(11), $s); $s= <<'EOS'; storage/innobase/include/ut0bh.h storage/innobase/trx/trx0rseg.c storage/innobase/ut/ut0bh.c storage/innobase/ut/ut0ut.c EOS is($copyright->files->Keys(12), $s); $s= <<'EOS'; plugin/semisync/semisync.cc plugin/semisync/semisync.h plugin/semisync/semisync_slave_plugin.cc EOS is($copyright->files->Keys(13), $s); $s= <<'EOS'; strings/ctype-bin.c strings/ctype-eucjpms.c strings/ctype-ujis.c EOS is($copyright->files->Keys(14), $s); $s= <<'EOS'; scripts/mysqld_safe.sh support-files/mysql-multi.server.sh support-files/mysql.server.sh EOS is($copyright->files->Keys(15), $s); $s= <<'EOS'; sql/sql_yacc.cc sql/sql_yacc.h EOS is($copyright->files->Keys(16), $s); $s= <<'EOS'; storage/innobase/include/pars0grm.h storage/innobase/pars/pars0grm.c EOS is($copyright->files->Keys(17), $s); $s= <<'EOS'; storage/innobase/include/srv0srv.h storage/innobase/srv/srv0start.c EOS is($copyright->files->Keys(18), $s); $s= <<'EOS'; plugin/semisync/semisync_master.cc plugin/semisync/semisync_master_plugin.cc EOS is($copyright->files->Keys(19), $s); $s= <<'EOS'; storage/innobase/include/os0file.h storage/innobase/os/os0file.c EOS is($copyright->files->Keys(20), $s); is_string($copyright->files->Keys(21), "include/t_ctype.h\n strings/t_ctype.h\n"); is_string($copyright->files->Keys(22), "cmd-line-utils/libedit/np/strlcat.c\n cmd-line-utils/libedit/np/strlcpy.c\n"); is_string($copyright->files->Keys(23), "sql/nt_servc.cc\n sql/nt_servc.h\n"); is_string($copyright->files->Keys(24), "dbug/dbug.c\n dbug/dbug_long.h\n"); is($copyright->files->Keys(25), 'cmd-line-utils/libedit/np/vis.c'); is($copyright->files->Keys(26), 'scripts/dheadgen.pl'); is($copyright->files->Keys(27), 'storage/ndb/test/src/getarg.c'); is($copyright->files->Keys(28), 'storage/ndb/test/include/getarg.h'); is($copyright->files->Keys(29), 'storage/innobase/handler/ha_innodb.cc'); is($copyright->files->Keys(30), 'plugin/semisync/semisync_master.h'); is($copyright->files->Keys(31), 'storage/innobase/srv/srv0srv.c'); is($copyright->files->Keys(32), 'storage/innobase/ut/ut0rbt.c'); is($copyright->files->Keys(33), 'strings/ctype-win1250ch.c'); is($copyright->files->Keys(34), 'strings/ctype-tis620.c'); is($copyright->files->Keys(35), 'storage/innobase/handler/ha_innodb.h'); is($copyright->files->Keys(36), 'strings/dtoa.c'); is($copyright->files->Keys(37), 'scripts/mysqldumpslow.sh'); is($copyright->files->Keys(38), 'libmysqld/lib_sql.cc'); is($copyright->files->Keys(39), 'tests/mail_to_db.pl'); is($copyright->files->Keys(40), 'dbug/dbug_analyze.c'); is($copyright->files->Values(40)->Files, 'dbug/dbug_analyze.c'); is($copyright->files->Values(40)->Copyright, '1987 June Binayak Banerjee'); is_string($copyright->files->Values(40)->License, "public-domain\n This program may be freely distributed under the same terms and\n conditions as Fred Fish's Dbug package."); is($copyright->files->Keys(41), 'regex/regexp.c'); is($copyright->licenses->Length, 4, 'no of licenses'); is($copyright->licenses->Keys(0), 'GPL-2', 'GPL-2'); is($copyright->licenses->Keys(1), 'GPL-2+', 'GPL-2+'); is($copyright->licenses->Keys(2), 'LGPL', 'LGPL'); is($copyright->licenses->Keys(3), 'BSD (3 clause)', 'BSD (3 clause)'); like_string($copyright->licenses->Values(0), qr/GNU\s+General\s+Public\s+License\s+version\s+2/xms, 'GPL-2'); like_string($copyright->licenses->Values(1), qr/GNU\s+General\s+Public\s+License\s+version\s+2/xms, 'GPL-2+'); like_string($copyright->licenses->Values(2), qr/GNU\s+Library\s+General\s+Public\s+License\s+version\s+2/xms, 'LGPL'); like_string($copyright->licenses->Values(3), qr/THIS\s+SOFTWARE\s+IS\s+PROVIDED\s+BY\s+THE\s+REGENTS\s+AND\s+CONTRIBUTORS/xms, 'BSD'); Debian-Copyright-0.2/t/data000755001750001750 012053257477 16456 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/t/data/add1000444001750001750 352112053257477 17350 0ustar00nicholasnicholas000000000000Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Nicholas Bamber Upstream-Name: pkg-components Source: http://github.com/periapt/pkg-components X-Comment: This is a test. Files: test/* Copyright: 2007-2011, Nicholas Bamber License: BSD License: BSD Copyright (c) The Regents of the University of California. 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. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. Debian-Copyright-0.2/t/data/invalid2000444001750001750 46412053257477 20232 0ustar00nicholasnicholas000000000000Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Upstream-Contact: Nicholas Bamber Source: http://github.com/periapt/pkg-components Upstream-Name: pkg-components Blah: * Blah2: 2010-2011, Nicholas Bamber Blah3: Artistic or GPL-2+ Debian-Copyright-0.2/t/data/invalid000444001750001750 27712053257477 20152 0ustar00nicholasnicholas000000000000Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Blah: Nicholas Bamber Blah2: http://github.com/periapt/pkg-components Blah3: pkg-components Debian-Copyright-0.2/t/data/copyright000444001750001750 215312053257477 20547 0ustar00nicholasnicholas000000000000Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pkg-components Upstream-Contact: Nicholas Bamber Source: http://github.com/periapt/pkg-components Files: * Copyright: 2010-2011, Nicholas Bamber License: Artistic or GPL-2+ Files: lib/Debian/Copyright* Copyright: 2011, Nicholas Bamber 2009, Damyan Ivanov [Portions] License: GPL-2+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the complete text of version 2 of the General Public License can be found in `/usr/share/common-licenses/GPL-2'. Debian-Copyright-0.2/t/data/mysql000444001750001750 7373512053257477 17742 0ustar00nicholasnicholas000000000000Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: MySQL 5.5 Upstream-Contact: http://bugs.mysql.com/ Source: http://dev.mysql.com/downloads/mysql/5.5.html Comment: The file Docs/mysql.info is removed from the upstream source because it is incompatible with the Debian Free Software Guidelines. See debian/README.source for how this repacking was done. . Originally produced by a modified version of licensecheck2dep5 from CDBS by Clint Byrum . Hand modified to reduce redundancy in the output and add appropriate license text. . Also, MySQL carries the "FOSS License Exception" specified in README . Quoting from README: . MySQL FOSS License Exception We want free and open source software applications under certain licenses to be able to use specified GPL-licensed MySQL client libraries despite the fact that not all such FOSS licenses are compatible with version 2 of the GNU General Public License. Therefore there are special exceptions to the terms and conditions of the GPLv2 as applied to these client libraries, which are identified and described in more detail in the FOSS License Exception at . . The text of the Above URL is quoted below, as of Aug 17, 2011. . > FOSS License Exception > . > Updated July 1, 2010 > . > What is the FOSS License Exception? Oracle's Free and Open Source > Software ("FOSS") License Exception (formerly known as the FLOSS > License Exception) allows developers of FOSS applications to include > Oracle's MySQL Client Libraries (also referred to as "MySQL Drivers" > or "MySQL Connectors") with their FOSS applications. MySQL Client > Libraries are typically licensed pursuant to version 2 of the General > Public License ("GPL"), but this exception permits distribution of > certain MySQL Client Libraries with a developer's FOSS applications > licensed under the terms of another FOSS license listed below, > even though such other FOSS license may be incompatible with the GPL. > . > The following terms and conditions describe the circumstances under > which Oracle's FOSS License Exception applies. > . > Oracle's FOSS License Exception Terms and Conditions Definitions. > "Derivative Work" means a derivative work, as defined under applicable > copyright law, formed entirely from the Program and one or more > FOSS Applications. > . > "FOSS Application" means a free and open source software application > distributed subject to a license listed in the section below titled > "FOSS License List." > . > "FOSS Notice" means a notice placed by Oracle or MySQL in a copy > of the MySQL Client Libraries stating that such copy of the MySQL > Client Libraries may be distributed under Oracle's or MySQL's FOSS > (or FLOSS) License Exception. > . > "Independent Work" means portions of the Derivative Work that are not > derived from the Program and can reasonably be considered independent > and separate works. > . > "Program" means a copy of Oracle's MySQL Client Libraries that > contains a FOSS Notice. > . > A FOSS application developer ("you" or "your") may distribute a > Derivative Work provided that you and the Derivative Work meet all > of the following conditions: You obey the GPL in all respects for > the Program and all portions (including modifications) of the Program > included in the Derivative Work (provided that this condition does not > apply to Independent Works); The Derivative Work does not include any > work licensed under the GPL other than the Program; You distribute > Independent Works subject to a license listed in the section below > titled "FOSS License List"; You distribute Independent Works in > object code or executable form with the complete corresponding > machine-readable source code on the same medium and under the same > FOSS license applying to the object code or executable forms; All > works that are aggregated with the Program or the Derivative Work > on a medium or volume of storage are not derivative works of the > Program, Derivative Work or FOSS Application, and must reasonably > be considered independent and separate works. Oracle reserves all > rights not expressly granted in these terms and conditions. If all > of the above conditions are not met, then this FOSS License Exception > does not apply to you or your Derivative Work. > . > FOSS License List > . > License Name Version(s)/Copyright Date > Release Early Certified Software > Academic Free License 2.0 > Apache Software License 1.0/1.1/2.0 > Apple Public Source License 2.0 > Artistic license From Perl 5.8.0 > BSD license "July 22 1999" > Common Development and Distribution License (CDDL) 1.0 > Common Public License 1.0 > Eclipse Public License 1.0 > European Union Public License (EUPL)[1] 1.1 > GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1/3.0 > GNU General Public License (GPL) 3.0 > IBM Public License 1.0 > Jabber Open Source License 1.0 > MIT License (As listed in file MIT-License.txt) - > Mozilla Public License (MPL) 1.0/1.1 > Open Software License 2.0 > OpenSSL license (with original SSLeay license) "2003" ("1998") > PHP License 3.0/3.01 > Python license (CNRI Python License) - > Python Software Foundation License 2.1.1 > Sleepycat License "1999" > University of Illinois/NCSA Open Source License - > W3C License "2001" > X11 License "2001" > Zlib/libpng License - > Zope Public License 2.0 > [1] When an Independent Work is licensed under a "Compatible License" > pursuant to the EUPL, the Compatible License rather than the EUPL is > the applicable license for purposes of these FOSS License Exception > Terms and Conditions. . The above text is subject to this copyright notice: © 2010, Oracle and/or its affiliates. Files: cmd-line-utils/libedit/config.h dbug/example1.c dbug/example2.c dbug/example3.c dbug/factorial.c dbug/main.c dbug/my_main.c dbug/remove_function_from_trace.pl dbug/tests.c dbug/tests-t.pl extra/yassl/src/dummy.cpp include/probes_mysql_nodtrace.h libmysqld/resource.h mysql-test/* regex/* sql-bench/graph-compare-results.sh storage/ndb/bin/* storage/ndb/demos/* support-files/binary-configure.sh support-files/my-huge.cnf.sh support-files/my-innodb-heavy-4G.cnf.sh support-files/my-large.cnf.sh support-files/my-medium.cnf.sh support-files/my-small.cnf.sh support-files/mysqld_multi.server.sh support-files/mysql-log-rotate.sh support-files/mysql.server-sys5.sh Copyright: UNKNOWN Comment: These files fall under the blanket license specified in the file COPYING and README License: GPL-2 GPLv2 Disclaimer For the avoidance of doubt, except that if any license choice other than GPL or LGPL is available it will apply instead, Oracle elects to use only the General Public License version 2 (GPLv2) at this time for any software where a choice of GPL license versions is made available with the language indicating that GPLv2 or any later version may be used, or where a choice of which version of the GPL is applied is otherwise unspecified. Files: BUILD/* Docs/* client/* client/echo.c client/get_password.c cmake/* dbug/dbug_add_tags.pl extra/* include/* libmysql/* libmysqld/* libservices/* mysql-test/include/have_perfschema.inc mysql-test/include/have_perfschema.inc mysql-test/lib/mtr_cases.pm mysql-test/lib/mtr_gcov.pl mysql-test/lib/mtr_gprof.pl mysql-test/lib/mtr_io.pl mysql-test/lib/mtr_match.pm mysql-test/lib/mtr_misc.pl mysql-test/lib/mtr_process.pl mysql-test/lib/mtr_report.pm mysql-test/lib/mtr_results.pm mysql-test/lib/mtr_stress.pl mysql-test/lib/mtr_unique.pm mysql-test/lib/My/ConfigFactory.pm mysql-test/lib/My/Config.pm mysql-test/lib/My/CoreDump.pm mysql-test/lib/My/File/* mysql-test/lib/My/Find.pm mysql-test/lib/My/Handles.pm mysql-test/lib/My/Options.pm mysql-test/lib/My/Platform.pm mysql-test/lib/My/SafeProcess/Base.pm mysql-test/lib/My/SafeProcess.pm mysql-test/lib/My/SafeProcess/safe_kill_win.cc mysql-test/lib/My/SafeProcess/safe_process.cc mysql-test/lib/My/SafeProcess/safe_process.pl mysql-test/lib/My/SafeProcess/safe_process_win.cc mysql-test/lib/My/SysInfo.pm mysql-test/lib/My/Test.pm mysql-test/lib/t/* mysql-test/lib/v1/mtr_cases.pl mysql-test/lib/v1/mtr_gcov.pl mysql-test/lib/v1/mtr_gprof.pl mysql-test/lib/v1/mtr_im.pl mysql-test/lib/v1/mtr_io.pl mysql-test/lib/v1/mtr_match.pl mysql-test/lib/v1/mtr_misc.pl mysql-test/lib/v1/mtr_process.pl mysql-test/lib/v1/mtr_report.pl mysql-test/lib/v1/mtr_stress.pl mysql-test/lib/v1/mtr_timer.pl mysql-test/lib/v1/mtr_unique.pl mysql-test/lib/v1/My/* mysql-test/lib/v1/My/* mysql-test/lib/v1/mysql-test-run.pl mysql-test/mysql-stress-test.pl mysql-test/mysql-test-run.pl mysql-test/std_data/* mysql-test/suite/perfschema/include/* mysql-test/suite/perfschema_stress/include/* mysql-test/suite/perfschema_stress/include/* mysys/* packaging/WiX/ca/* plugin/audit_null/* plugin/auth/* plugin/daemon_example/* plugin/fulltext/* plugin/semisync/semisync_slave.cc plugin/semisync/semisync_slave.h scripts/* sql/* sql-common/* storage/* strings/* support-files/config.huge.ini.sh support-files/config.medium.ini.sh support-files/config.small.ini.sh support-files/MacOSX/Description.plist.sh support-files/MacOSX/Info.plist.sh support-files/MacOSX/StartupParameters.plist.sh support-files/MySQL-shared-compat.spec.sh support-files/mysql.spec.sh support-files/ndb-config-2-node.ini.sh tests/* unittest/* vio/* Copyright: 1979-2008 MySQL AB 1995-2010 MySQL AB Sun Microsystems Inc 1994-1997,2000-2011 Oracle and/or its affiliates. License: GPL-2 Files: storage/innobase/* Copyright: 1994-2011 Innobase Oy. License: GPL-2 Files: cmd-line-utils/readline/* Copyright: 1987-2006 Free Software Foundation Inc License: GPL-2+ Files: cmd-line-utils/libedit/* Copyright: 1989-1990,1992-1993 The Regents of the University of California. License: BSD (3 clause) Files: cmd-line-utils/libedit/filecomplete.c cmd-line-utils/libedit/filecomplete.h cmd-line-utils/libedit/np/fgetln.c cmd-line-utils/libedit/read.h cmd-line-utils/libedit/readline.c cmd-line-utils/libedit/readline/* Copyright: 1997-2001 The NetBSD Foundation Inc License: BSD (2 clause) This code is derived from software contributed to The NetBSD Foundation by Jaromir Dolecek. . 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. Files: client/completion_hash.h scripts/mysqlaccess.sh scripts/mysql_fix_extensions.sh scripts/mysql_setpermission.sh sql-bench/* storage/myisam/ftbench/ft-test-run.sh storage/myisam/mi_test_all.sh storage/ndb/test/run-test/atrt-analyze-result.sh storage/ndb/test/run-test/atrt-clear-result.sh storage/ndb/test/run-test/atrt-gather-result.sh storage/ndb/test/run-test/atrt-setup.sh storage/ndb/test/run-test/make-config.sh storage/ndb/test/run-test/make-html-reports.sh storage/ndb/test/run-test/make-index.sh storage/ndb/test/run-test/ndb-autotest.sh strings/strxmov.c strings/strxnmov.c support-files/MacOSX/postflight.sh support-files/MacOSX/preflight.sh Copyright: 2000-2009 MySQL AB Sun Microsystems Inc 2000-2007 MySQL AB License: LGPL Files: storage/archive/azio.c storage/archive/azlib.h zlib/* Copyright: 1995-2005 Jean-loup Gailly and Mark Adler License: zlib/libpng This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. . Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: . 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Files: sql-bench/innotest1.sh sql-bench/innotest1a.sh sql-bench/innotest1b.sh sql-bench/innotest2.sh sql-bench/innotest2a.sh sql-bench/innotest2b.sh Copyright: 2000-2002 Innobase Oy & MySQL AB Comment: These files fall under the blanket license specified in the file COPYING License: GPL-2 Files: storage/innobase/btr/btr0sea.c storage/innobase/include/log0log.h storage/innobase/include/os0sync.h storage/innobase/log/log0log.c storage/innobase/row/row0sel.c Copyright: 1995-1997,2009-2010 Innobase Oy. 2008-2009 Google Inc License: GPL-2 Files: storage/innobase/btr/btr0cur.c storage/innobase/buf/buf0buf.c storage/innobase/include/sync0rw.h storage/innobase/include/sync0sync.h storage/innobase/sync/* Copyright: 1994-2011 Oracle and/or its affiliates. 2008 Google Inc License: GPL-2 Files: storage/myisam/rt_index.h storage/myisam/rt_key.c storage/myisam/rt_mbr.c storage/myisam/rt_mbr.h storage/myisam/sp_defs.h Copyright: 2000,2002-2006 MySQL AB & Ramil Kalimullin License: GPL-2 Files: storage/innobase/include/ut0bh.h storage/innobase/trx/trx0rseg.c storage/innobase/ut/ut0bh.c storage/innobase/ut/ut0ut.c Copyright: 1996,2010-2011 Oracle Corpn. License: GPL-2 Files: plugin/semisync/semisync.cc plugin/semisync/semisync.h plugin/semisync/semisync_slave_plugin.cc Copyright: 2008 MySQL AB 2007 Google Inc License: GPL-2 Files: strings/ctype-bin.c strings/ctype-eucjpms.c strings/ctype-ujis.c Copyright: 2000,2002,2005-2011 Oracle and/or its affiliates. & tommy@valley.ne.jp License: LGPL On Debian and systems the full text of the GNU Library General Public License version 2 can be found in the file `/usr/share/common-licenses/LGPL-2` Files: scripts/mysqld_safe.sh support-files/mysql-multi.server.sh support-files/mysql.server.sh Copyright: 1996 Abandoned TCX DataKonsult AB & Monty Program KB & Detron HB License: public-domain This file is public domain and comes with NO WARRANTY of any kind Files: sql/sql_yacc.cc sql/sql_yacc.h Copyright: 1984,1989-1990,2000-2006 Free Software Foundation, Inc. License: GPL-2+ Files: storage/innobase/include/pars0grm.h storage/innobase/pars/pars0grm.c Copyright: 1995-2009 Innobase Oy. 1984,1989-1990,2000-2004 Free Software Foundation Inc. License: GPL-2 As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. . 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Files: storage/innobase/include/srv0srv.h storage/innobase/srv/srv0start.c Copyright: 1995-1996,2010-2011 Innobase Oy. 2008-2009 Google Inc 2009 Percona Inc License: GPL-2 Files: plugin/semisync/semisync_master.cc plugin/semisync/semisync_master_plugin.cc Copyright: 2008-2009 MySQL AB Sun Microsystems Inc 2007 Google Inc License: GPL-2 Files: storage/innobase/include/os0file.h storage/innobase/os/os0file.c Copyright: 1995-2010 Innobase Oy. 2009 Percona Inc License: GPL-2 Files: include/t_ctype.h strings/t_ctype.h Copyright: 2000 MySQL AB 1998 Theppitak Karoonboonyanan 1998-1999 Pruet Boonma License: GPL-2 Files: cmd-line-utils/libedit/np/strlcat.c cmd-line-utils/libedit/np/strlcpy.c Copyright: 1998 Todd C. Miller License: ISC 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" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER 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. Files: sql/nt_servc.cc sql/nt_servc.h Copyright: 1998 Abandoned Irena Pancirov - Irnet Snc License: public-domain This file is public domain and comes with NO WARRANTY of any kind Files: dbug/dbug.c dbug/dbug_long.h Copyright: 1987 Abandoned Fred Fish License: public-domain N O T I C E . Copyright Abandoned, 1987, Fred Fish . . This previously copyrighted work has been placed into the public domain by the author and may be freely used for any purpose, private or commercial. . Because of the number of inquiries I was receiving about the use of this product in commercially developed works I have decided to simply make it public domain to further its unrestricted use. I specifically would be most happy to see this material become a part of the standard Unix distributions by AT&T and the Berkeley Computer Science Research Group, and a standard part of the GNU system from the Free Software Foundation. . I would appreciate it, as a courtesy, if this notice is left in all copies and derivative works. Thank you. . The author makes no warranty of any kind with respect to this product and explicitly disclaims any implied warranties of mer- chantability or fitness for any particular purpose. Files: cmd-line-utils/libedit/np/vis.c Copyright: 1989-1993 The Regents of the University of California. 1999-2005 The NetBSD Foundation Inc License: BSD (3 clause) 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. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. Files: scripts/dheadgen.pl Copyright: 2008-2009 Sun Microsystems Inc License: BSD (3 clause) Files: storage/ndb/test/src/getarg.c Copyright: 1997-2000 - Kungliga Tekniska Högskolan License: BSD (3 clause) Files: storage/ndb/test/include/getarg.h Copyright: 2003 MySQL AB 1997-1999 Kungliga Tekniska Högskolan License: BSD (3 clause) GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. . 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . Copyright (c) 1997, 1999 Kungliga Tekniska Högskolan (Royal Institute of Technology, Stockholm, Sweden). 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. . 3. Neither the name of the Institute nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE 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. Files: storage/innobase/handler/ha_innodb.cc Copyright: 2008-2009 Google Inc 2009 Percona Inc 2000-2011 MySQL AB & Innobase Oy. License: GPL-2 Files: plugin/semisync/semisync_master.h Copyright: 2008-2009 MySQL AB Sun Microsystems Inc 2007 Google Inc License: GPL-2 Files: storage/innobase/srv/srv0srv.c Copyright: 2008-2009 Google Inc 1995-2011 Oracle and/or its affiliates. 2009 Percona Inc License: GPL-2 Files: storage/innobase/ut/ut0rbt.c Copyright: 2007-2010 Innobase Oy. 2007 Oracle/Innobase Oy License: GPL-2 Files: strings/ctype-win1250ch.c Copyright: 2002-2010 Oracle and/or its affiliates. 2001 Jan Pazdziora License: GPL-2 Files: strings/ctype-tis620.c Copyright: 1998 Theppitak Karoonboonyanan 1989-1991 Samphan Raruenrom 2000-2010 Oracle and/or its affiliates. 2003 Sathit Jittanupat 2001 Korakot Chaovavanich and 1998-1999 Pruet Boonma License: GPL-2 Files: storage/innobase/handler/ha_innodb.h Copyright: 2000-2010 MySQL AB & Innobase Oy. License: GPL-2 Files: strings/dtoa.c Copyright: 2007-2010 Oracle and/or its affiliates. 1991,2000-2001 Lucent Technologies License: LGPL Files: scripts/mysqldumpslow.sh Copyright: 2000-2002,2005-2009 MySQL AB Sun Microsystems Inc License: LGPL Files: libmysqld/lib_sql.cc Copyright: 2000 SWsoft company License: SWsoft This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk. . Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. Files: tests/mail_to_db.pl Copyright: 1998 Abandoned TCX DataKonsult AB & Monty Program KB & Detron HB License: public-domain This file is public domain and comes with NO WARRANTY of any kind Files: dbug/dbug_analyze.c Copyright: 1987 June Binayak Banerjee License: public-domain This program may be freely distributed under the same terms and conditions as Fred Fish's Dbug package. Files: regex/regexp.c Copyright: 1986 University of Toronto License: BSD-like Permission is granted to anyone to use this software for any purpose on any computer system, and to redistribute it freely, subject to the following restrictions: . 1. The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from defects in it. . 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. . 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. . 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian and systems the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2` License: GPL-2+ This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. . Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . Readline 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ . On Debian and systems the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2` License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2 of the License. . This library 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 Library General Public License for more details. . You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA . On Debian and systems the full text of the GNU Library General Public License version 2 can be found in the file `/usr/share/common-licenses/LGPL-2` License: BSD (3 clause) 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. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. Debian-Copyright-0.2/lib000755001750001750 012053257477 16050 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/lib/Debian000755001750001750 012053257477 17232 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/lib/Debian/Copyright.pm000444001750001750 1331212053257477 21715 0ustar00nicholasnicholas000000000000=head1 NAME Debian::Copyright - manage Debian copyright files =head1 VERSION This document describes Debian::Copyright version 0.2 . =head1 SYNOPSIS my $c = Debian::Copyright->new(); # construct a new $c->read($file1); # parse debian copyright file $c->read($file2); # parse a second $c->write($ofile); # write to file =head1 DESCRIPTION Debian::Copyright can be used for the representation, manipulation and merging of Debian copyright files in an object-oriented way. It provides easy reading and writing of the F file found in Debian source packages. Debian has recently started standardising its copyright files around the machine-readable L format. =head2 note on terminology The term "Stanza" derives from the L tool. The official term would now be "Paragraph". For the purposes of discussing the DEP-5 format the terms are used interchangeably in this documentation. =head1 FIELDS =head2 header An instance of L class. Contains the the first stanza of the copyright file. If multiple files were parsed only the first will be retained. =head2 files A hash reference (actually L instance) with keys being the values of the C clause and values instances of L class. =head2 licenses A hash reference (actually L instance) with keys being the values of the C clause and values instances of L class. =cut package Debian::Copyright; require v5.10.1; use base 'Class::Accessor'; use strict; use Carp; our $VERSION = '0.2'; __PACKAGE__->mk_accessors(qw( _parser header files licenses )); use Parse::DebControl; use Debian::Copyright::Stanza::Header; use Debian::Copyright::Stanza::Files; use Debian::Copyright::Stanza::License; use Tie::IxHash; =head1 CONSTRUCTOR =head2 new Constructs a new L instance. The C
field is initialised with an empty string. The C and C fields are initialised with an empty instance of L. =cut sub new { my $class = shift; my $self = $class->SUPER::new(); $self->_parser( Parse::DebControl->new ); $self->header(undef); $self->files( Tie::IxHash->new ); $self->licenses( Tie::IxHash->new ); return $self; } =head1 METHODS =head2 read I Parse L and accessors. I can be either a file name, an opened file handle or a string scalar reference. =cut sub read { my ( $self, $file ) = @_; my $parser_method = 'parse_file'; if ( ref($file) ) { $file = $$file; $parser_method = 'parse_mem'; } my $stanzas = $self->_parser->$parser_method( $file, { useTieIxHash => 1, verbMultiLine => 1 } ); if (exists $stanzas->[0]->{Format}) { my $header = shift @$stanzas; if (! $self->header) { $self->header( Debian::Copyright::Stanza::Header->new($header) ); } } for (@$stanzas) { next if $_->{Format}; if ( $_->{Files} ) { $self->files->Push( $_->{Files} => Debian::Copyright::Stanza::Files->new($_) ); next; } if ( $_->{License} ) { my $license = $_->{License}; if ($license =~ m{\A([^\n]+)$}xms) { $license = $1; } else { croak "License stanza does not make sense"; } $self->licenses->Push( $license => Debian::Copyright::Stanza::License->new($_) ); next; } die "Got copyright stanza with unrecognised field\n"; } return; } =head2 write I Writes a debian/copyright-like file in I with the contents defined in the accessor fields. I can be either a file name, an opened file handle or a string scalar reference. =cut sub write { my ( $self, $file ) = @_; my @stanzas = ( $self->header, $self->files->Values, $self->licenses->Values ); my $string = join "\n", @stanzas; if ( ref($file) and ref($file) eq 'SCALAR' ) { $$file = $string; } elsif ( ref($file) and ref($file) eq 'GLOB' ) { $file->print($string); } else { my $fh; open $fh, '>', $file or die "Unable to open '$file' for writing: $!"; print $fh $string; } } =head1 LIMITATIONS =over =item This module is written with one particular version of L in mind. Furthermore version 0.1 of this software was for a draft version the standard. The changes in going from draft to standard were such that it was not worth attempting to maintain backwards compatibility. =item Test coverage is not yet complete. =back =head1 INCOMPATIBILITIES This version is not backwards compatible with version 0.1. =head1 ACKNOWLEDGEMENTS Thanks to Charles Plessy for various comments regarding the documentation. =head1 COPYRIGHT & LICENSE Copyright (C) 2011-2012 Nicholas Bamber L This module was adapted from L. Copyright (C) 2009 Damyan Ivanov L [Portions] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. =cut 1; Debian-Copyright-0.2/lib/Debian/Copyright000755001750001750 012053257477 21202 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/lib/Debian/Copyright/Stanza.pm000444001750001750 1010712053257477 23154 0ustar00nicholasnicholas000000000000=head1 NAME Debian::Copyright::Stanza - single stanza of Debian copyright file =head1 VERSION This document describes Debian::Copyright::Stanza version 0.2 . =head1 SYNOPSIS package Header; use base 'Debian::Copyright::Stanza'; use constant fields => qw( Format_Specification Name Source Maintainer X_Comment ); 1; =head1 DESCRIPTION Debian::Copyright::Stanza is the base class for L, L and L classes. =cut package Debian::Copyright::Stanza; require v5.10.1; use strict; use base qw( Class::Accessor Tie::IxHash ); use Carp qw(croak); use Debian::Copyright::Stanza::OrSeparated; our $VERSION = '0.2'; =head1 FIELDS Stanza fields are to be defined in the class method I. Typically this can be done like: use constant fields => qw( Foo Bar Baz ); Fields that are to contain dependency lists (as per L method below) are automatically converted to instances of the L class. =cut use constant fields => (); sub import { my( $class ) = @_; $class->mk_accessors( $class->fields ); } use overload '""' => \&as_string; =head1 CONSTRUCTOR =head2 new( { field => value, ... } ) Creates a new L object and optionally initialises it with the supplied data. The object is hashref based and tied to L. You may use dashes for initial field names, but these will be converted to underscores: my $s = Debian::Copyright::Stanza::Header( {Name => "Blah"} ); print $s->Name; =cut sub new { my $class = shift; my $init = shift || {}; my $self = Tie::IxHash->new; bless $self, $class; while( my($k,$v) = each %$init ) { $k =~ s/-/_/g; $self->can($k) or croak "Invalid field given ($k)"; if ( $self->is_or_separated($k) ) { $self->$k( Debian::Copyright::Stanza::OrSeparated->new( $v ) ); } else { $self->$k($v); } } return $self; } =head1 METHODS =head2 is_or_separated($field) Returns true if the given field is to contain a 'or'-separated list of values. This is used in stringification, when considering where to wrap long lines. =cut sub is_or_separated { my( $self, $field ) = @_; return 0; } =head2 get($field) Overrides the default get method from L with L's FETCH. =cut sub get { my( $self, $field ) = @_; $field =~ s/_/-/g; return $self->FETCH($field); } =head2 set( $field, $value ) Overrides the default set method from L with L's STORE. =cut sub set { my( $self, $field, $value ) = @_; chomp($value); $field =~ s/_/-/g; return $self->STORE( $field, $value ); } =head2 as_string([$width]) Returns a string representation of the object. Ready to be printed into a real F file. Used as a stringification operator. =cut sub as_string { my ( $self, $width ) = @_; $width //= 80; my @lines; $self->Reorder( map{ ( my $s = $_ ) =~ s/_/-/g; $s } $self->fields ); for my $k ( $self->Keys ) { # We don't' want the internal fields showing in the output next if $k =~ /^-/; # _ in field names is replaced with dashes my $v = $self->FETCH($k); next unless defined($v); my $line = "$k: $v"; push @lines, $line if $line; } return join( "\n", @lines ) . "\n"; } =head1 COPYRIGHT & LICENSE Copyright (C) 2011 Nicholas Bamber This module is substantially based upon L. Copyright (C) 2009 Damyan Ivanov L [Portions] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. =cut 1; Debian-Copyright-0.2/lib/Debian/Copyright/Stanza000755001750001750 012053257477 22442 5ustar00nicholasnicholas000000000000Debian-Copyright-0.2/lib/Debian/Copyright/Stanza/Header.pm000444001750001750 406712053257477 24334 0ustar00nicholasnicholas000000000000=head1 NAME Debian::Copyright::Stanza::Header - header stanza of Debian copyright file =head1 VERSION This document describes Debian::Copyright::Stanza::Header version 0.2 . =head1 SYNOPSIS my $copy = Debian::Copyright::Stanza::Header->new(\%data); print $copy; # auto-stringification =head1 DESCRIPTION Debian::Copyright::Stanza::Header can be used for representation and manipulation of the header stanza of Debian copyright files in an object-oriented way. Converts itself to a textual representation in string context. =head1 FIELDS The supported fields for header stanzas are listed below. Note that real copyright fields may contain dashes in their names. These are replaced with underscores. =over =item Format =item Upstream_Name =item Comment =item Upstream_Contact =item Source =item Disclaimer =item License =item Copyright =back =cut package Debian::Copyright::Stanza::Header; require v5.10.1; use strict; use warnings; use base qw(Debian::Copyright::Stanza); use constant fields => qw ( Format Upstream_Name Upstream_Contact Source Disclaimer Comment License Copyright ); our $VERSION = '0.2'; =head1 CONSTRUCTOR =over =item new =item new( { field => value, ... } ) Creates a new L object and optionally initialises it with the supplied data. =back =head1 SEE ALSO Debian::Copyright::Stanza::Header inherits most of its functionality from L =head1 COPYRIGHT & LICENSE Copyright (C) 2011-12 Nicholas Bamber L This module is substantially based upon L. Copyright (C) 2009 Damyan Ivanov L This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. =cut 1; Debian-Copyright-0.2/lib/Debian/Copyright/Stanza/Files.pm000444001750001750 406012053257477 24177 0ustar00nicholasnicholas000000000000=head1 NAME Debian::Copyright::Stanza::Files - Files stanza of Debian copyright file =head1 VERSION This document describes Debian::Copyright::Stanza::Files version 0.2 . =head1 SYNOPSIS my $copy = Debian::Copyright::Stanza::Files->new(\%data); print $copy; # auto-stringification =head1 DESCRIPTION Debian::Copyright::Stanza::Files can be used for representation and manipulation of a C stanza of Debian copyright files in an object-oriented way. Converts itself to a textual representation in string context. =head1 FIELDS The supported fields for Files stanzas are listed below. Note that real copyright fields may contain dashes in their names. These are replaced with underscores. =over =item Files =item License =item Copyright =item Comment =back =cut package Debian::Copyright::Stanza::Files; require v5.10.1; use strict; use warnings; use base qw(Debian::Copyright::Stanza); use constant fields => qw ( Files Copyright License Comment ); our $VERSION = '0.2'; =head1 CONSTRUCTOR =head2 new( { field => value, ... } ) Creates a new L object and optionally initialises it with the supplied data. =head1 METHODS =head2 is_or_separated($field) Returns true for the C field. =cut sub is_or_separated { my( $self, $field ) = @_; return $field eq 'License'; } =head1 SEE ALSO Debian::Copyright::Stanza::Files inherits most of its functionality from L =head1 COPYRIGHT & LICENSE Copyright (C) 2011-12 Nicholas Bamber L This module is substantially based upon L. Copyright (C) 2009 Damyan Ivanov L This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. =cut 1; Debian-Copyright-0.2/lib/Debian/Copyright/Stanza/OrSeparated.pm000444001750001750 607312053257477 25354 0ustar00nicholasnicholas000000000000package Debian::Copyright::Stanza::OrSeparated; require v5.10.1; use strict; use warnings; use Array::Unique; use Text::ParseWords qw(quotewords); use overload '""' => \&as_string, 'eq' => \= our $VERSION = '0.2'; =head1 NAME Debian::Copyright::Stanza::OrSeparated - 'or' separated field abstraction =head1 VERSION This document describes Debian::Copyright::Stanza::OrSeparated version 0.2 . =cut =head1 SYNOPSIS my $f = Debian::Copyright::Stanza::OrSeparated->new('Artistic'); $f->add('GPL-1+ or BSD'); print $f->as_string; # 'Artistic or GPL-1+ or BSD' print "$f"; # the same $f->sort; =head1 DESCRIPTION Debian::Copyright::Stanza::OrSeparated abstracts handling of the License fields in Files blocks, which are lists separated by 'or'. It also supports a body field representing the optional extended description of a License field. =head1 CONSTRUCTOR =head2 new (initial values) The initial values list is parsed and may contain strings that are in fact 'or'-separated lists. These are split appropriately using L' C routine. =cut sub new { my $self = bless {list=>[],body=>""}, shift; tie @{$self->{list}}, 'Array::Unique'; my $body = exists $self->{body} ? $self->{body} : ""; my @list = (); foreach my $e (@_) { if ($e =~ m{\A([^\n]+)\n(.+)\z}xms) { push @list, $1; $body .= $2; } else { push @list, $e; } } $self->add(@list) if @list; $self->{body} = $body if $body; $self; } =head1 METHODS =head2 as_string Returns text representation of the list. A simple join of the elements by C< or >. The same function is used for overloading the stringification operation. =cut sub as_string { my $self = shift; my $body = exists $self->{body} ? "\n$self->{body}" : ""; return join( ' or ', @{ $self->{list} } ).$body; } =head2 equals Natural implementation of the equality function. =cut sub equals { my @args = map { ref $_ ? $_->as_string : $_ } @_; return $args[0] eq $args[1]; } sub _parse { my $self = shift; my @output; for (@_) { my @items = quotewords( qr/\s+or\s+/, 1, $_ ); push @output, @items; } return @output; } =head2 add I<@items> Adds the given items to the list. Items that are already present are not added, keeping the list unique. =cut sub add { my ( $self, @items) = @_; push @{$self->{list}}, $self->_parse(@items); } =head2 sort A handy method for sorting the list. =cut sub sort { my $self = shift; @{$self->{list}} = sort @{$self->{list}}; } =head1 COPYRIGHT & LICENSE Copyright (C) 2011-12 Nicholas Bamber L This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. =cut 1; 1; Debian-Copyright-0.2/lib/Debian/Copyright/Stanza/License.pm000444001750001750 357112053257477 24525 0ustar00nicholasnicholas000000000000=head1 NAME Debian::Copyright::Stanza::License - License stanza of Debian copyright file =head1 VERSION This document describes Debian::Copyright::Stanza::License version 0.2 . =head1 SYNOPSIS my $copy = Debian::Copyright::Stanza::License->new(\%data); print $copy; # auto-stringification =head1 DESCRIPTION Debian::Copyright::Stanza::License can be used for representation and manipulation of a C stanza of Debian copyright files in an object-oriented way. Converts itself to a textual representation in string context. =head1 FIELDS The supported fields for License stanzas are listed below. Note that real copyright fields may contain dashes in their names. These are replaced with underscores. =over =item License =item Comment =back =cut package Debian::Copyright::Stanza::License; require v5.10.1; use strict; use warnings; use base qw(Debian::Copyright::Stanza); use constant fields => qw ( License Comment ); our $VERSION = '0.2'; =head1 CONSTRUCTOR =over =item new =item new( { field => value, ... } ) Creates a new L object and optionally initialises it with the supplied data. =back =head1 SEE ALSO Debian::Copyright::Stanza::License inherits most of its functionality from L =head1 COPYRIGHT & LICENSE Copyright (C) 2011-12 Nicholas Bamber L This module is substantially based upon L. Copyright (C) 2009 Damyan Ivanov L This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. 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. =cut 1;