You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/04/17 17:09:45 UTC
[3/9] incubator-trafficcontrol git commit: remove BuildPerlDeps --
done by carton in wrapper
remove BuildPerlDeps -- done by carton in wrapper
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/296d3b50
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/296d3b50
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/296d3b50
Branch: refs/heads/master
Commit: 296d3b5033ec0ca68e209f911459c88c7c0886c9
Parents: 72d1084
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Apr 13 14:01:17 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Apr 17 11:09:07 2017 -0600
----------------------------------------------------------------------
traffic_ops/install/bin/_postinstall | 11 ----
traffic_ops/install/lib/BuildPerlDeps.pm | 86 ---------------------------
2 files changed, 97 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/296d3b50/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index fd442ea..edaf5b4 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -33,7 +33,6 @@ use Scalar::Util qw(looks_like_number);
use Getopt::Long;
use InstallUtils qw{ :all };
-use BuildPerlDeps qw{ :all };
use GenerateCert qw{ :all };
use ProfileCleanup qw{ :all };
@@ -739,11 +738,6 @@ sub main {
# if reconfigure is set then rebuild the perl deps
if ($reconfigure) {
- my $rc = BuildPerlDeps::build( 1, $cpanLogFile );
- if ( $rc != 0 ) {
- errorOut("Failed to install perl dependencies, check the console output and rerun postinstall once you've resolved the error");
- }
-
chdir("/opt/traffic_ops/install/bin");
$rc = InstallUtils::execCommand( "./download_web_deps", "-i" );
if ( $rc != 0 ) {
@@ -751,11 +745,6 @@ sub main {
}
}
else {
- my $rc = BuildPerlDeps::build();
- if ( $rc != 0 ) {
- errorOut("Failed to install perl dependencies, check the console output and rerun postinstall once you've resolved the error");
- }
-
chdir("/opt/traffic_ops/install/bin");
$rc = InstallUtils::execCommand( "./download_web_deps", "-i" );
if ( $rc != 0 ) {
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/296d3b50/traffic_ops/install/lib/BuildPerlDeps.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/install/lib/BuildPerlDeps.pm b/traffic_ops/install/lib/BuildPerlDeps.pm
deleted file mode 100644
index 90ff1eb..0000000
--- a/traffic_ops/install/lib/BuildPerlDeps.pm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/perl
-#
-# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-package BuildPerlDeps;
-
-use strict;
-use warnings;
-
-use InstallUtils qw{ :all };
-
-use base qw{ Exporter };
-our @EXPORT_OK = qw{ build };
-our %EXPORT_TAGS = ( all => \@EXPORT_OK );
-
-sub build {
- my $opt_i = shift;
- my $cpanLogFile = shift;
-
- my @dependencies = ( "expat-devel", "mod_ssl", "mkisofs", "libpcap", "libpcap-devel", "libcurl", "libcurl-devel", "openssl", "openssl-devel", "cpan", "gcc", "make", "pkgconfig", "automake", "autoconf", "libtool", "gettext", "libidn-devel" );
-
- my $msg = << 'EOF';
-
-This script will build and package the required Traffic Ops perl modules.
-In order to complete this operation, Development tools such as the gcc
-compiler will be installed on this machine.
-
-EOF
-
- $ENV{PERL_MM_USE_DEFAULT} = 1;
- $ENV{PERL_MM_NONINTERACTIVE} = 1;
- $ENV{AUTOMATED_TESTING} = 1;
-
- my $result;
-
- if ( $ENV{USER} ne "root" ) {
- errorOut("You must run this script as the root user");
- }
-
- InstallUtils::logger( $msg, "info" );
-
- chdir("/opt/traffic_ops/app");
-
- if ( defined $opt_i && $opt_i == 1 ) {
- if ( !-x "/usr/bin/yum" ) {
- errorOut("You must install 'yum'");
- }
-
- InstallUtils::logger( "Installing dependencies", "info" );
- $result = InstallUtils::execCommand( "/usr/bin/yum", "-y", "install", @dependencies );
- if ( $result != 0 ) {
- errorOut("Dependency installation failed, look through the output and correct the problem");
- }
- InstallUtils::logger( "Building perl modules", "info" );
-
- $result = InstallUtils::execCommand( "/usr/bin/cpan", "pi_custom_log=" . $cpanLogFile, "-if", "YAML" );
- if ( $result != 0 ) {
- errorOut("Failed to install YAML, look through the output and correct the problem");
- }
-
- $result = InstallUtils::execCommand( "/usr/bin/cpan", "pi_custom_log=" . $cpanLogFile, "-if", "MIYAGAWA/Carton-v1.0.15.tar.gz" );
- if ( $result != 0 ) {
- errorOut("Failed to install Carton, look through the output and correct the problem");
- }
- }
-
- $result = InstallUtils::execCommand( "/usr/local/bin/carton", "install" );
- if ( $result != 0 ) {
- errorOut("Failure to build required perl modules, check the output and correct the problem");
- }
-
- return 0;
-}
-
-1;