Net-FullAuto
view release on metacpan or search on metacpan
lib/Net/FullAuto/ISets/Amazon/Chaining_is.pm view on Meta::CPAN
package Net::FullAuto::ISets::Local::Chaining_is;
### OPEN SOURCE LICENSE - GNU AFFERO PUBLIC LICENSE Version 3.0 #######
#
# Net::FullAuto - Distributed Workload Automation Software
# Copyright © 2000-2025 Brian M. Kelly
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or any later version.
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see:
# <http://www.gnu.org/licenses/agpl.html>.
#
#######################################################################
our $VERSION='0.01';
our $DISPLAY='FullAuto Proxy Chaining & RESTful Access';
our $CONNECT='secure';
our $defaultInstanceType='t2.small';
use 5.005;
use strict;
use warnings;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw($select_chaining_setup);
use Net::FullAuto::Cloud::fa_amazon;
use Net::FullAuto::FA_Core qw[cmd_raw $localhost];
use File::HomeDir;
my $home_dir=File::HomeDir->my_home.'/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;
my $configure_chaining=sub {
my $selection=$_[0]||'';
my ($stdout,$stderr)=('','');
my $handle=$localhost;my $connect_error='';
$localhost->cwd('~');
my $sudo=($^O eq 'cygwin')?'':'sudo ';
$do=1;
if ($do==1) {
unless ($^O eq 'cygwin') {
($stdout,$stderr)=$handle->cmd("sudo yum clean all");
($stdout,$stderr)=$handle->cmd("sudo yum grouplist hidden");
($stdout,$stderr)=$handle->cmd("sudo yum groups mark convert");
($stdout,$stderr)=$handle->cmd(
"sudo yum -y groupinstall 'Development tools'",'__display__');
($stdout,$stderr)=$handle->cmd(
'sudo yum -y install openssl-devel icu cyrus-sasl'.
' libicu cyrus-sasl-devel libtool-ltdl-devel libxml2-devel'.
' freetype-devel libpng-devel java-1.7.0-openjdk-devel'.
' unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel'.
' ncurses-devel xmlto git-all','__display__');
} else {
my $cygcheck=`/bin/cygcheck -c` || die $!;
my $uname=`/bin/uname` || die $!;
my $uname_all=`/bin/uname -a` || die $!;
$uname_all.=$uname;
my %need_packages=();
if ($uname_all=~/x86_64/) {
foreach my $package ('libxml2','libxml2-devel','libtool',
'autoconf','autobuild','automake','pkg-config',
'libuuid-devel','wget','git') {
unless (-1<index $cygcheck, "$package ") {
$need_packages{$package}='';
}
}
} else {
foreach my $package ('libxml2','libxml2-devel','libtool',
'autoconf','autobuild','automake','pkg-config',
'libuuid-devel','wget','git') {
unless (-1<index $cygcheck, "$package ") {
$need_packages{$package}='';
}
}
}
my $packs='';
foreach my $pack (sort keys %need_packages) {
$packs.="$pack ";
}
if ($packs) {
print "\n\n Fatal Error!: The following Cygwin",
"\n packages are missing from",
"\n your installation:",
"\n\n $packs",
"\n\n Please report any bugs and send any",
"\n questions, thoughts or feedback to:",
"\n\n Brian.Kelly\@FullAuto.com.",
"\n\n";
&Net::FullAuto::FA_Core::cleanup;
( run in 0.716 second using v1.01-cache-2.11-cpan-39bf76dae61 )