summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2015-08-24 20:45:49 +0200
committerDylan William Hardison <dylan@hardison.net>2015-08-24 20:45:49 +0200
commit77fbf1e1cd0bf2dec70577caa750d191fd717795 (patch)
tree3b8b5a8f4cc995a5c351a26501f9157ee8092c78
parentd03b432557e0422d5b0dbd32e82d36d3f9a5b68a (diff)
downloadbugzilla-77fbf1e1cd0bf2dec70577caa750d191fd717795.tar.gz
bugzilla-77fbf1e1cd0bf2dec70577caa750d191fd717795.tar.xz
Bug 1195836 - Remove install-module.pl from bmo
-rw-r--r--Bugzilla/Install/Filesystem.pm1
-rw-r--r--Bugzilla/Install/Requirements.pm2
-rwxr-xr-xinstall-module.pl174
-rw-r--r--template/en/default/setup/strings.txt.pl6
4 files changed, 5 insertions, 178 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index 41aaaa54d..addad918b 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -164,7 +164,6 @@ sub FILESYSTEM {
'migrate.pl' => { perms => OWNER_EXECUTE },
'sentry.pl' => { perms => WS_EXECUTE },
'metrics.pl' => { perms => WS_EXECUTE },
- 'install-module.pl' => { perms => OWNER_EXECUTE },
'clean-bug-user-last-visit.pl' => { perms => WS_EXECUTE },
'Bugzilla.pm' => { perms => CGI_READ },
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index 4b3e8aa76..41a4b04e1 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -784,7 +784,7 @@ sub install_command {
$package = $module->{package};
}
else {
- $command = "$^X install-module.pl \%s";
+ $command = 'cpanm %s';
# Non-Windows installations need to use module names, because
# CPAN doesn't understand package names.
$package = $module->{module};
diff --git a/install-module.pl b/install-module.pl
deleted file mode 100755
index a78d7ceff..000000000
--- a/install-module.pl
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/perl -w
-# -*- Mode: perl; indent-tabs-mode: nil -*-
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is the Bugzilla Bug Tracking System.
-#
-# The Initial Developer of the Original Code is Everything Solved, Inc.
-# Portions created by Everything Solved are Copyright (C) 2007
-# Everything Solved, Inc. All Rights Reserved.
-#
-# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
-
-use strict;
-use warnings;
-
-# Have to abs_path('.') or calls to Bugzilla modules won't work once
-# CPAN has chdir'ed around. We do all of this in this funny order to
-# make sure that we use the lib/ modules instead of the base Perl modules,
-# in case the lib/ modules are newer.
-use Cwd qw(abs_path cwd);
-use lib abs_path('.');
-use Bugzilla::Constants;
-use lib abs_path(bz_locations()->{ext_libpath});
-
-use Bugzilla::Install::CPAN;
-
-use Bugzilla::Constants;
-use Bugzilla::Install::Requirements;
-use Bugzilla::Install::Util qw(bin_loc init_console vers_cmp);
-
-use Data::Dumper;
-use Getopt::Long;
-use Pod::Usage;
-
-init_console();
-
-my @original_args = @ARGV;
-my $original_dir = cwd();
-our %switch;
-GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g',
- 'shell', 'help|h');
-
-pod2usage({ -verbose => 1 }) if $switch{'help'};
-
-if (ON_ACTIVESTATE) {
- print <<END;
-You cannot run this script when using ActiveState Perl. Please follow
-the instructions given by checksetup.pl to install missing Perl modules.
-
-END
- exit;
-}
-
-pod2usage({ -verbose => 0 }) if (!%switch && !@ARGV);
-
-set_cpan_config($switch{'global'});
-
-if ($switch{'show-config'}) {
- print Dumper($CPAN::Config);
- exit;
-}
-
-check_cpan_requirements($original_dir, \@original_args);
-
-if ($switch{'shell'}) {
- CPAN::shell();
- exit;
-}
-
-if ($switch{'all'} || $switch{'upgrade-all'}) {
- my @modules;
- if ($switch{'upgrade-all'}) {
- @modules = (@{REQUIRED_MODULES()}, @{OPTIONAL_MODULES()});
- push(@modules, DB_MODULE->{$_}->{dbd}) foreach (keys %{DB_MODULE()});
- }
- else {
- # This is the only time we need a Bugzilla-related module, so
- # we require them down here. Otherwise this script can be run from
- # any directory, even outside of Bugzilla itself.
- my $reqs = check_requirements(0);
- @modules = (@{$reqs->{missing}}, @{$reqs->{optional}});
- my $dbs = DB_MODULE;
- foreach my $db (keys %$dbs) {
- push(@modules, $dbs->{$db}->{dbd})
- if !have_vers($dbs->{$db}->{dbd}, 0);
- }
- }
- foreach my $module (@modules) {
- my $cpan_name = $module->{module};
- # --all shouldn't include mod_perl2, because it can have some complex
- # configuration, and really should be installed on its own.
- next if $cpan_name eq 'mod_perl2';
- next if $cpan_name eq 'DBD::Oracle' and !$ENV{ORACLE_HOME};
- next if $cpan_name eq 'DBD::Pg' and !bin_loc('pg_config');
- install_module($cpan_name);
- }
-}
-
-foreach my $module (@ARGV) {
- install_module($module);
-}
-
-__END__
-
-=head1 NAME
-
-install-module.pl - Installs or upgrades modules from CPAN.
-This script does not run on Windows.
-
-=head1 SYNOPSIS
-
- ./install-module.pl Module::Name [--global]
- ./install-module.pl --all [--global]
- ./install-module.pl --upgrade-all [--global]
- ./install-module.pl --show-config
- ./install-module.pl --shell
-
- Do "./install-module.pl --help" for more information.
-
-=head1 OPTIONS
-
-=over
-
-=item B<Module::Name>
-
-The name of a module that you want to install from CPAN. This is the
-same thing that you'd give to the C<install> command in the CPAN shell.
-
-You can specify multiple module names separated by a space to install
-multiple modules.
-
-=item B<--global>
-
-This makes install-module install modules globally for all applications,
-instead of just for Bugzilla.
-
-On most systems, you have to be root for C<--global> to work.
-
-=item B<--all>
-
-This will make install-module do its best to install every required
-and optional module that is not installed that Bugzilla can use.
-
-Some modules may fail to install. You can run checksetup.pl to see
-which installed properly.
-
-=item B<--upgrade-all>
-
-This is like C<--all>, except it forcibly installs the very latest
-version of every Bugzilla prerequisite, whether or not you already
-have them installed.
-
-=item B<--show-config>
-
-Prints out the CPAN configuration in raw Perl format. Useful for debugging.
-
-=item B<--shell>
-
-Starts a CPAN shell using the configuration of F<install-module.pl>.
-
-=item B<--help>
-
-Shows this help.
-
-=back
diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl
index aab9b11f5..f8a2920d0 100644
--- a/template/en/default/setup/strings.txt.pl
+++ b/template/en/default/setup/strings.txt.pl
@@ -124,8 +124,10 @@ END
To attempt an automatic install of every required and optional module
with one command, do:
- ##perl## install-module.pl --all
-
+ ##perl## checksetup.pl --cpanfile
+ cpanm --installdeps --with-recommends --with-all-features \\
+ --without-feature oracle --without-feature sqlite \\
+ --without-feature pg.
EOT
install_data_too_long => <<EOT,
WARNING: Some of the data in the ##table##.##column## column is longer than