diff --git a/build-ubunturepo b/build-ubunturepo index dd8a36f23..3678dc71e 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -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 diff --git a/docs/source/guides/install-guides/apt/install_xcat.rst b/docs/source/guides/install-guides/apt/install_xcat.rst index 34368c778..a832b063f 100644 --- a/docs/source/guides/install-guides/apt/install_xcat.rst +++ b/docs/source/guides/install-guides/apt/install_xcat.rst @@ -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 diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index bc3171fa5..c6966e978 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/docker.pm b/xCAT-server/lib/xcat/plugins/docker.pm index 148f0c60d..00291f8a8 100755 --- a/xCAT-server/lib/xcat/plugins/docker.pm +++ b/xCAT-server/lib/xcat/plugins/docker.pm @@ -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,