From 6bae9896b35ec5be0a856fc818c5962d4d49b623 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Wed, 8 Jan 2025 14:06:06 +0530 Subject: [PATCH] images/server: Do not hardcode architecture for devbuilds Dynamically determine the host architecture instead of hardcoded value 'x86_64'. Signed-off-by: Anoop C S --- images/server/install-packages.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/server/install-packages.sh b/images/server/install-packages.sh index 2e01759..00023d7 100755 --- a/images/server/install-packages.sh +++ b/images/server/install-packages.sh @@ -60,7 +60,8 @@ get_epel_repo_if_needed() { get_ceph_shaman_repo() { ceph_ref="${CEPH_REPO_REF:-main}" ceph_sha="${CEPH_REPO_SHA:-latest}" - url="https://shaman.ceph.com/api/search/?project=ceph&distros=${OS_BASE}/9/x86_64&flavor=default&ref=${ceph_ref}&sha1=${ceph_sha}" + ceph_arch=$( ([[ "$(arch)" = "aarch64" ]] && echo "arm64") || arch ) + url="https://shaman.ceph.com/api/search/?project=ceph&distros=${OS_BASE}/9/${ceph_arch}&flavor=default&ref=${ceph_ref}&sha1=${ceph_sha}" generate_repo_from_shaman "${url}" "ceph-${ceph_ref}.repo" cat "/etc/yum.repos.d/ceph-${ceph_ref}.repo" }