Koha/cpanfile
Julian Maurice a34d086a24
Bug 19735: Move Perl deps definitions into a cpanfile
cpanfile is a format for describing CPAN dependencies for Perl
applications.
It is more concise - thus easier to read and maintain - than
C4::Installer::PerlDependencies, and allows to describe requirements
more accurately (using version ranges or features for instance)
Additionally it can be read by tools such as cpanm or carton for an
easy way to install dependencies on non-Debian-based systems.

For more information on cpanfile, see
http://search.cpan.org/~miyagawa/Module-CPANfile-1.1002/lib/cpanfile.pod

This patch replace C4::Installer::PerlDependencies by an equivalent
cpanfile and update all scripts/modules that were using PerlDependencies
It also removes dead code from C4::Installer::PerlModules (some
subroutines were not used at all, except in unit tests)

Added dependencies:
 - Module::CPANfile
 - CPAN::Meta (dependency of Module::CPANfile, but we need a more recent
   version than the one Module::CPANfile requires)

Test plan:
  1. Go to About page, tab Perl modules and keep this browser tab open
  2. Apply patch
  3. Install Module::CPANfile and CPAN::Meta
    a. On Debian-based systems:
       # will install libcpan-meta-perl as a dependency
       sudo apt install libmodule-cpanfile-perl
    b. Others:
       # will install CPAN::Meta as a dependency
       sudo cpanm Module::CPANfile
  4. In a new browser tab, go to About page, tab Perl modules and compare
     the table with the one in the previous browser tab
     They should be identical, except for newly added dependencies
     (Module::CPANfile and CPAN::Meta)
  5. Do a 'standard' install
    a. perl Makefile.PL (select 'standard')
    b. make
    c. sudo make install
    d. Configure your database, web server, ... and go through the web
       install process
  6. Verify that the cpanfile got copied into PERL_MODULE_DIR (which
     should be /usr/share/koha/lib)
  7. Go to the about page of this fresh install and compare it with your
     dev install
  8. Verify that debian/list-deps still works
     This takes a lot of time and it may not be necessary to wait until
     the end. If you see some Debian package names that correspond to
     modules in cpanfile, it means it still works
     (you need apt-file for this script to work)
  9. Verify that koha_perl_deps.pl still works
 10. prove t/Installer_pm.t t/Installer_PerlModules.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-12 16:33:02 +00:00

184 lines
6.5 KiB
Perl

requires 'Algorithm::CheckDigits', '0.5';
requires 'Authen::CAS::Client', '0.05';
requires 'Biblio::EndnoteStyle', '0.05';
requires 'Business::ISBN', '2.05';
requires 'Business::ISSN', '0.91';
requires 'Bytes::Random::Secure', '0.28';
requires 'CGI', '3.15';
requires 'CGI::Carp', '1.29';
requires 'CGI::Compile', '0.17';
requires 'CGI::Emulate::PSGI', '0.20';
requires 'CGI::Session', '4.2';
requires 'CGI::Session::Serialize::yaml', '4.2';
requires 'CPAN::Meta', '2.150006';
requires 'Cache::Memcached', '1.30';
requires 'Class::Accessor', '0.3';
requires 'Class::Factory::Util', '1.6';
requires 'Class::Inspector', '1.31';
requires 'Clone', '0.37';
requires 'Crypt::Eksblowfish::Bcrypt', '0.008';
requires 'DBD::Mock', '1.39';
requires 'DBD::mysql', '4.004';
requires 'DBI', '1.53';
requires 'DBIx::Class::Schema::Loader', '0.07039';
requires 'DBIx::RunSQL', '0.14';
requires 'Data::Dumper', '2.121';
requires 'Data::ICal', '0.13';
requires 'Date::Calc', '5.4';
requires 'Date::Manip', '5.44';
requires 'DateTime', '0.58';
requires 'DateTime::Event::ICal', '0.08';
requires 'DateTime::Format::ICal', '0.09';
requires 'DateTime::Format::MySQL', '0.04';
requires 'DateTime::Set', '0.28';
requires 'DateTime::TimeZone', '1.20';
requires 'Digest::MD5', '2.36';
requires 'Digest::SHA', '5.43';
requires 'Email::Date', '1.103';
requires 'Email::Valid', '0.190';
requires 'Exception::Class', '1.38';
requires 'File::Slurp', '9999.13';
requires 'Font::TTF', '0.45';
requires 'GD::Barcode::UPCE', '1.1';
requires 'Getopt::Long', '2.35';
requires 'Getopt::Std', '1.05';
requires 'HTML::Entities', '3.69';
requires 'HTML::FormatText', '1.23';
requires 'HTML::Scrubber', '0.08';
requires 'HTTP::Cookies', '1.39';
requires 'HTTP::OAI', '3.2';
requires 'HTTP::Request::Common', '1.26';
requires 'IPC::Cmd', '0.46';
requires 'JSON', '2.07';
requires 'JSON::Validator', '0.97';
requires 'LWP::Simple', '1.41';
requires 'LWP::UserAgent', '2.033';
requires 'Library::CallNumber::LC', '0.22';
requires 'Lingua::Stem', '0.82';
requires 'Lingua::Stem::Snowball', '0.952';
requires 'List::MoreUtils', '0.21';
requires 'List::Util', '1.18';
requires 'Locale::Currency::Format', '1.28';
requires 'Locale::Language', '2.07';
requires 'Locale::Messages', '1.20';
requires 'Locale::PO', '0.17';
requires 'Log::Log4perl', '1.29';
requires 'MARC::Charset', '0.98';
requires 'MARC::File::XML', 'v1.0.1';
requires 'MARC::Record', 'v2.0.6';
requires 'MARC::Record::MiJ', '0.04';
requires 'MIME::Base64', '3.07';
requires 'MIME::Lite', '3';
requires 'MIME::QuotedPrint', '3.07';
requires 'Mail::Sendmail', '0.79';
requires 'Modern::Perl', '1.03';
requires 'Module::CPANfile', '1.1000';
requires 'Mojolicious', '7.21';
requires 'Mojolicious::Plugin::OpenAPI', '1.15';
requires 'Net::CIDR', '0.17';
requires 'Net::Netmask', '1.9022';
requires 'Net::Z3950::ZOOM', '1.16';
requires 'Number::Format', '1.52';
requires 'OpenOffice::OODoc', '2.125';
requires 'PDF::API2', '2';
requires 'PDF::API2::Page', '2';
requires 'PDF::API2::Simple', '1';
requires 'PDF::API2::Util', '2';
requires 'PDF::Reuse', '0.36';
requires 'PDF::Reuse::Barcode', '0.05';
requires 'PDF::Table', 'v0.9.3';
requires 'POSIX', '1.09';
requires 'Plack::Middleware::ReverseProxy', '0.14';
requires 'Schedule::At', '1.06';
requires 'Search::Elasticsearch', '5.01';
requires 'Sereal::Decoder', '3.0';
requires 'Sereal::Encoder', '3.0';
requires 'Storable', '2.20';
requires 'String::Random', '0.22';
requires 'Template', '2.22';
requires 'Template::Plugin::HtmlToText', '0.03';
requires 'Template::Plugin::JSON::Escape', '0.02';
requires 'Term::ANSIColor', '1.1';
requires 'Test', '1.25';
requires 'Test::Harness', '2.56';
requires 'Test::MockModule', '0.05';
requires 'Test::More', '1.302073';
requires 'Text::Bidi', '0.03';
requires 'Text::CSV', '0.01';
requires 'Text::CSV::Encoded', '0.09';
requires 'Text::CSV_XS', '0.32';
requires 'Text::Iconv', '1.7';
requires 'Text::PDF', '0.29';
requires 'Text::Wrap', '2005.082401';
requires 'Time::HiRes', '1.86';
requires 'Time::localtime', '1.02';
requires 'Try::Tiny', '0.22';
requires 'UNIVERSAL::can', '1.10';
requires 'URI::Escape', '3.31';
requires 'UUID', '0.05';
requires 'Unicode::Normalize', '0.32';
requires 'WWW::CSRF', '1.00';
requires 'XML::Dumper', '0.81';
requires 'XML::LibXML', '1.59';
requires 'XML::LibXSLT', '1.59';
requires 'XML::RSS', '1.31';
requires 'XML::SAX::ParserFactory', '1.01';
requires 'XML::SAX::Writer', '0.44';
requires 'XML::Simple', '2.14';
requires 'YAML', '0.71';
requires 'YAML::Syck', '0.71';
recommends 'AnyEvent', '5.0';
recommends 'AnyEvent::HTTP', '2.13';
recommends 'Archive::Extract', '0.60';
recommends 'Archive::Zip', '1.30';
recommends 'Array::Utils', '0.5';
recommends 'CGI::Session::Driver::memcached', '0.04';
recommends 'Cache::FastMmap', '1.34';
recommends 'Cache::Memcached::Fast', '0.19';
recommends 'Cache::Memcached::Fast::Safe', '0.06';
recommends 'DBD::SQLite2', '0.33';
recommends 'Devel::Cover', '0.89';
recommends 'File::Copy', '2.08';
recommends 'File::Path', '2.07';
recommends 'File::Temp', '0.22';
recommends 'GD', '2.39';
recommends 'Graphics::Magick', 'v1.3.5';
recommends 'Gravatar::URL', '1.03';
recommends 'HTTPD::Bench::ApacheBench', '0.73';
recommends 'LWP::Protocol::https', '5.836';
recommends 'Lingua::Ispell', '0.07';
recommends 'Module::Bundled::Files', '0.03';
recommends 'Module::Load::Conditional', '0.38';
recommends 'Module::Pluggable', '3.9';
recommends 'Moo', '1';
recommends 'Net::LDAP', '0.33';
recommends 'Net::LDAP::Filter', '0.14';
recommends 'Net::OAuth2::AuthorizationServer', '0.16';
recommends 'Net::SFTP::Foreign', '1.73';
recommends 'Net::Server', '0.97';
recommends 'Net::Z3950::SimpleServer', '1.15';
recommends 'PDF::FromHTML', '0.31';
recommends 'PPI', '1.215';
recommends 'Parallel::ForkManager', '0.75';
recommends 'Readonly', '0.01';
recommends 'Readonly::XS', '0.01';
recommends 'SMS::Send', '0.05';
recommends 'Selenium::Remote::Driver', '1.27';
recommends 'Sys::CPU', '0.52';
recommends 'Template::Plugin::Stash', '1.006';
recommends 'Test::DBIx::Class', '0.42';
recommends 'Test::Deep', '0.106';
recommends 'Test::Exception', '0.35';
recommends 'Test::MockObject', '1.09';
recommends 'Test::MockTime', '0.13';
recommends 'Test::Strict', '0.14';
recommends 'Test::WWW::Mechanize', '1.42';
recommends 'Test::Warn', '0.21';
recommends 'Test::YAML::Valid', '0.04';
recommends 'Text::CSV::Unicode', '0.40';
recommends 'Text::Unidecode', '0.04';
recommends 'Time::Fake', '0.11';
recommends 'UNIVERSAL::require', '0.13';
recommends 'WWW::YouTube::Download', '0.56';
recommends 'WebService::ILS', '0.17';
recommends 'XML::Writer', '0.614';