From 294b658cd2fe8e9d89ef00a840076851195add91 Mon Sep 17 00:00:00 2001 From: Nitesh Konkar Date: Fri, 5 Oct 2018 13:35:05 +0530 Subject: [PATCH] obs-packaging: Make golang hash dependency arch-specific Fixes: #212 Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com --- obs-packaging/gen_versions_txt.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/obs-packaging/gen_versions_txt.sh b/obs-packaging/gen_versions_txt.sh index 0db4678..3acef59 100755 --- a/obs-packaging/gen_versions_txt.sh +++ b/obs-packaging/gen_versions_txt.sh @@ -12,6 +12,7 @@ set -o pipefail readonly script_name="$(basename "${BASH_SOURCE[0]}")" readonly script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" project="kata-containers" +ARCH=${ARCH:-$(go env GOARCH)} source "${script_dir}/../scripts/lib.sh" @@ -40,7 +41,7 @@ gen_version_file() { golang_version=$(get_from_kata_deps "languages.golang.meta.newest-version" "${kata_version}") golang_version="1.10.2" - golang_x84_64_sha256=$(curl -s -L "https://storage.googleapis.com/golang/go${golang_version}.linux-amd64.tar.gz.sha256") + golang_sha256=$(curl -s -L "https://storage.googleapis.com/golang/go${golang_version}.linux-${ARCH}.tar.gz.sha256") # - is not a valid char for rpmbuild # see https://github.com/semver/semver/issues/145 @@ -77,7 +78,7 @@ kernel_version=${kernel_version} # Golang go_version=${golang_version} -go_checksum=${golang_x84_64_sha256} +go_checksum=${golang_sha256} EOT }