You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by fr...@apache.org on 2017/04/20 18:40:19 UTC

[30/44] incubator-trafficcontrol git commit: remove BuildPerlDeps -- done by carton in wrapper

remove BuildPerlDeps -- done by carton in wrapper

(cherry picked from commit 296d3b5033ec0ca68e209f911459c88c7c0886c9)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a30c5e8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a30c5e8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a30c5e8a

Branch: refs/heads/2.0.x
Commit: a30c5e8abd5976294f513b4efad07d0383241935
Parents: d578a49
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Apr 13 14:01:17 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Wed Apr 19 15:36:19 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/a30c5e8a/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/a30c5e8a/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;