From 01b26f6e78c8f2aaa7b6f4fcc878176846719a71 Mon Sep 17 00:00:00 2001 From: Arthur Outhenin-Chalandre Date: Mon, 11 Mar 2024 15:00:08 +0100 Subject: [PATCH 1/3] scripts: ignore download_hash download failures Binary names on github releases often change and this script might break because of that, this commit allow to ignore these failures as a mean to be able to run the script anyway. Signed-off-by: Arthur Outhenin-Chalandre --- scripts/download_hash.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/download_hash.sh b/scripts/download_hash.sh index 8ea8edc520d..eb9dd7aa6c8 100755 --- a/scripts/download_hash.sh +++ b/scripts/download_hash.sh @@ -287,6 +287,11 @@ function _get_checksum() { mkdir -p "$(dirname $target)" [ -f "$target" ] || curl -LfSs -o "${target}" "${urls[$binary]}" + if [ ! -f "$target" ]; then + echo "$target can't be downloaded" >&2 + echo 0 + return + fi if echo "${urls[$binary]}" | grep -qi sha256sum; then local hashes="$(cat "${target}")" if [ "$(echo "${hashes}" | wc -l)" -gt 1 ]; then From 87ea89f5a4f73f4d865f271e81285da9cfbc9569 Mon Sep 17 00:00:00 2001 From: Arthur Outhenin-Chalandre Date: Mon, 11 Mar 2024 15:14:00 +0100 Subject: [PATCH 2/3] scripts: use sha256sums for crio as well Signed-off-by: Arthur Outhenin-Chalandre --- scripts/download_hash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download_hash.sh b/scripts/download_hash.sh index eb9dd7aa6c8..69fd755b67c 100755 --- a/scripts/download_hash.sh +++ b/scripts/download_hash.sh @@ -261,7 +261,7 @@ function _get_checksum() { # Download URLs declare -A urls=( ["crictl"]="$(printf "$github_releases_url" "kubernetes-sigs/cri-tools" "crictl-$version-$os-$arch.tar.gz.sha256")" -["crio_archive"]="$google_url/cri-o/artifacts/cri-o.$arch.$version.tar.gz" +["crio_archive"]="$google_url/cri-o/artifacts/cri-o.$arch.$version.tar.gz.sha256sum" ["kubelet"]="$(printf "$k8s_url" "kubelet")" ["kubectl"]="$(printf "$k8s_url" "kubectl")" ["kubeadm"]="$(printf "$k8s_url" "kubeadm")" From e755c14aa13da56a6786bc154b4d62f8db456d95 Mon Sep 17 00:00:00 2001 From: Arthur Outhenin-Chalandre Date: Mon, 11 Mar 2024 15:38:07 +0100 Subject: [PATCH 3/3] scripts: add ppc64le support for crio Signed-off-by: Arthur Outhenin-Chalandre --- scripts/download_hash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download_hash.sh b/scripts/download_hash.sh index 69fd755b67c..6bd47cb02b8 100755 --- a/scripts/download_hash.sh +++ b/scripts/download_hash.sh @@ -127,7 +127,7 @@ function get_checksums() { local binary="$1" local version_exceptions="cri_dockerd_archive nerdctl_archive containerd_archive youki" declare -A skip_archs=( -["crio_archive"]="arm ppc64le" +["crio_archive"]="arm" ["calicoctl_binary"]="arm" ["ciliumcli_binary"]="arm ppc64le" ["etcd_binary"]="arm"