mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-13 18:00:38 +00:00
Merge pull request #804 from whowutwut/ubuntu1604
Changes to support installing xCAT on Ubuntu 16.04 to unblock #790
This commit is contained in:
@ -45,11 +45,16 @@ if [[ ! -f /etc/lsb-release ]]; then
|
||||
fi
|
||||
. /etc/lsb-release
|
||||
|
||||
REPREPRO=`which reprepro >> /dev/null 2>&1; echo $?`
|
||||
if [[ ${REPREPRO} != 0 ]]; then
|
||||
echo "ERROR: Could not find reprepro, verify that reprepro is installed on this machine. Cannot continue!"
|
||||
exit 1
|
||||
fi
|
||||
# Check the necessary packages before starting the build
|
||||
declare -a packages=( "reprepro" "devscripts" "debhelper" "libsoap-lite-perl" "libdbi-perl" "quilt" )
|
||||
|
||||
for package in ${packages[@]}; do
|
||||
RC=`dpkg -l | grep $package >> /dev/null 2>&1; echo $?`
|
||||
if [[ ${RC} != 0 ]]; then
|
||||
echo "ERROR: Could not find $package, install using 'apt-get install $package' to continue"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name
|
||||
for i in $*; do
|
||||
@ -63,7 +68,7 @@ for i in $*; do
|
||||
done
|
||||
|
||||
# Supported distributions
|
||||
dists="saucy trusty utopic"
|
||||
dists="saucy trusty utopic xenial"
|
||||
|
||||
c_flag= # xcat-core (trunk-delvel) path
|
||||
d_flag= # xcat-dep (trunk) path
|
||||
@ -287,12 +292,13 @@ then
|
||||
mkdir conf
|
||||
|
||||
for dist in $dists; do
|
||||
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
|
||||
tmp_out_arch="amd64 ppc64el"
|
||||
else
|
||||
tmp_out_arch="amd64"
|
||||
fi
|
||||
cat << __EOF__ >> conf/distributions
|
||||
# for all releases moving forward, support amd64 and ppc64el
|
||||
tmp_out_arch="amd64 ppc64el"
|
||||
if [ "$dist" = "saucy" ]; then
|
||||
# for older releases of Ubuntu that does not support ppc64el
|
||||
tmp_out_arch="amd64"
|
||||
fi
|
||||
cat << __EOF__ >> conf/distributions
|
||||
Origin: xCAT internal repository
|
||||
Label: xcat-core bazaar repository
|
||||
Codename: $dist
|
||||
@ -314,14 +320,14 @@ __EOF__
|
||||
amd_files=`ls ../$package_dir_name/*.deb | grep -v "ppc64el"`
|
||||
all_files=`ls ../$package_dir_name/*.deb`
|
||||
for dist in $dists; do
|
||||
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
|
||||
deb_files=$all_files
|
||||
else
|
||||
deb_files=$amd_files
|
||||
fi
|
||||
for file in $deb_files; do
|
||||
reprepro -b ./ includedeb $dist $file;
|
||||
done
|
||||
deb_files=$all_files
|
||||
if [ "$dist" = "saucy" ]; then
|
||||
# for older releases of Ubuntu that does not support ppc64el
|
||||
deb_files=$amd_files
|
||||
fi
|
||||
for file in $deb_files; do
|
||||
reprepro -b ./ includedeb $dist $file;
|
||||
done
|
||||
done
|
||||
#create the mklocalrepo script
|
||||
cat << '__EOF__' > mklocalrepo.sh
|
||||
@ -416,11 +422,11 @@ then
|
||||
|
||||
#create the conf/distributions file
|
||||
for dist in $dists; do
|
||||
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
|
||||
tmp_out_arch="amd64 ppc64el"
|
||||
else
|
||||
tmp_out_arch="amd64"
|
||||
fi
|
||||
tmp_out_arch="amd64 ppc64el"
|
||||
if [ "$dist" = "saucy" ]; then
|
||||
# for older releases of Ubuntu that does not support ppc64el
|
||||
tmp_out_arch="amd64"
|
||||
fi
|
||||
cat << __EOF__ >> conf/distributions
|
||||
Origin: xCAT internal repository
|
||||
Label: xcat-dep bazaar repository
|
||||
@ -443,14 +449,14 @@ __EOF__
|
||||
amd_files=`ls ../debs/*.deb | grep -v "ppc64el"`
|
||||
all_files=`ls ../debs/*.deb`
|
||||
for dist in $dists; do
|
||||
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
|
||||
deb_files=$all_files
|
||||
else
|
||||
deb_files=$amd_files
|
||||
fi
|
||||
for file in $deb_files; do
|
||||
reprepro -b ./ includedeb $dist $file;
|
||||
done
|
||||
deb_files=$all_files
|
||||
if [ "$dist" = "saucy" ]; then
|
||||
# for older releases of Ubuntu that does not support ppc64el
|
||||
deb_files=$amd_files
|
||||
fi
|
||||
for file in $deb_files; do
|
||||
reprepro -b ./ includedeb $dist $file;
|
||||
done
|
||||
done
|
||||
|
||||
cat << '__EOF__' > mklocalrepo.sh
|
||||
@ -478,7 +484,7 @@ __EOF__
|
||||
chmod -R g+w xcat-dep
|
||||
|
||||
#create the tar ball
|
||||
dep_tar_name=xcat-dep-ubuntu-`date +%Y%m%d%H%M`.tar.bz
|
||||
dep_tar_name=xcat-dep-ubuntu-`date +%Y%m%d%H%M`.tar.bz2
|
||||
tar -hjcf $dep_tar_name xcat-dep
|
||||
chgrp root $dep_tar_name
|
||||
chmod g+w $dep_tar_name
|
||||
|
@ -22,10 +22,12 @@ Add the necessary apt-repositories to the management node ::
|
||||
add-apt-repository "deb http://ports.ubuntu.com/ubuntu-ports $(lsb_release -sc) universe"
|
||||
add-apt-repository "deb http://ports.ubuntu.com/ubuntu-ports $(lsb_release -sc)-updates universe"
|
||||
|
||||
Install xCAT with the following command: ::
|
||||
Install xCAT [#]_ with the following command: ::
|
||||
|
||||
apt-get clean all
|
||||
apt-get update
|
||||
apt-get install xCAT
|
||||
apt-get install xcat
|
||||
|
||||
.. [#] Starting with Ubuntu 16.04, the package name 'xCAT' is required to be all lowercase
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@ if ($^O =~ /^aix/i) {
|
||||
}
|
||||
use IO::Handle;
|
||||
use MIME::Base64 qw(decode_base64);
|
||||
use IO::Socket::SSL;
|
||||
|
||||
my $inet6support;
|
||||
if ($^O =~ /^aix/i) { # disable AIX IPV6 TODO fix
|
||||
|
@ -35,7 +35,6 @@ use xCAT::MsgUtils;
|
||||
use Cwd;
|
||||
use xCAT::Usage;
|
||||
use JSON;
|
||||
#use Data::Dumper;
|
||||
|
||||
my $verbose;
|
||||
my $global_callback;
|
||||
@ -1003,7 +1002,7 @@ sub init_async {
|
||||
$async = HTTP::Async->new(
|
||||
slots => $args{slots},
|
||||
ssl_options => {
|
||||
SSL_verify_mode => "SSL_VERIFY_PEER",
|
||||
SSL_verify_mode => SSL_VERIFY_PEER,
|
||||
SSL_ca_file => $ssl_ca_file,
|
||||
SSL_cert_file => $ssl_cert_file,
|
||||
SSL_key_file => $key_file,
|
||||
|
Reference in New Issue
Block a user