From fae699ffa0d0abecbcdf94e37ee751f36e464c2b Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 28 Mar 2019 13:04:07 +0800 Subject: [PATCH 1/4] [go-xcat] Change the year of copyright message --- xCAT-server/share/xcat/tools/go-xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 3a1c74191..106147062 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -4,7 +4,7 @@ # # Version 1.0.38 # -# Copyright (C) 2016, 2017, 2018 International Business Machines +# Copyright (C) 2016 - 2019 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) # # From 897e0a60595974e87fe7f6d871ff2e489946d752 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Tue, 14 May 2019 16:52:36 +0800 Subject: [PATCH 2/4] [go-xcat] Fix get_package_list_apt() problem when multiple list files exist --- xCAT-server/share/xcat/tools/go-xcat | 39 ++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 106147062..0937f1168 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -748,19 +748,36 @@ function get_package_list_apt() local repo_id="$1" [[ -z "${repo_id}" ]] && return 1 local -i rc=0 - awk '/^Package: / { print $2 }' \ - "/var/lib/apt/lists/"*"_${repo_id}_dists"*"_main_binary-"*"_Packages" \ - 2>/dev/null - # This is a dirty hack, and use recursion. + local -a lists=() + local -a packages=() + local p + local q + + for p in \ + "/var/lib/apt/lists/"*"_${repo_id}_dists"*"_main_binary-"*"_Packages" + do + [[ -f "${p}" && -r "${p}" ]] && lists+=("${p}") + done # For the `devel' branch of the online repo for apt, it has the # subdirectory name of `core-snap' instead of `xcat-core'. - rc="$?" - if [[ "${rc}" -ne "0" && "${repo_id}" = "xcat-core" ]] - then - "${FUNCNAME}" "core-snap" - rc="$?" - fi - return "${rc}" + [[ "${repo_id}" == "xcat-core" ]] && + for p in \ + "/var/lib/apt/lists/"*"_core-snap_dists"*"_main_binary-"*"_Packages" + do + [[ -f "${p}" && -r "${p}" ]] && lists+=("${p}") + done + [[ "${#lists[@]}" -eq "0" ]] && return 1 + + while read -r q + do + for p in "${packages[@]}" + do + [[ "${q}" == "${p}" ]] && continue 2 + done + packages+=("${q}") + done < <(awk '/^Package: / { print $2 }' "${lists[@]}" 2>/dev/null) + + echo "${packages[@]}" } # $1 repo id From 88a435f928eea11789bd1993d2308515adf09b31 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 18:50:12 +0800 Subject: [PATCH 3/4] [go-xcat] Bump version number --- xCAT-server/share/xcat/tools/go-xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 0937f1168..fc94c8555 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.38 +# Version 1.0.40 # # Copyright (C) 2016 - 2019 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) From c07688635de595fa5b3f26d5ba88fabdefb04719 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Wed, 15 May 2019 19:28:24 +0800 Subject: [PATCH 4/4] [go-xcat] Enhance curl exit code parsing --- xCAT-server/share/xcat/tools/go-xcat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index fc94c8555..75b15ea98 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -883,6 +883,8 @@ function download_file_curl() 88) echo -n "FTP chunk callback reported error" ;; 89) echo -n "no connection available, the session will be queued" ;; 90) echo -n "SSL public key does not matched pinned public key" ;; + 91) echo -n "invalid SSL certificate status" ;; + 92) echo -n "stream error in HTTP/2 framing layer" ;; *) echo -n "unknown error" ;; esac echo ")"