From 2bfa132264a76801b24dae45b0d469d97e2938b7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 7 Aug 2023 14:37:39 +0200 Subject: [PATCH] Fix baseurl for Fedora versions before 36 Fedora has moved their old images (prior to 37) to archives, so default URIs are adjusted to reflect that. Change-Id: I81dc6df4e4372149cffe448708ac2416d3528394 --- .../elements/fedora/root.d/10-fedora-cloud-image | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image b/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image index 4cf69b6b..4bd880b1 100755 --- a/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image +++ b/diskimage_builder/elements/fedora/root.d/10-fedora-cloud-image @@ -29,17 +29,21 @@ else # note default DIB_RELEASE set in environment setup case ${ARCH} in x86_64|aarch64) - if [[ ${DIB_RELEASE} -ge 28 ]]; then + if [[ ${DIB_RELEASE} -ge 37 ]]; then DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://download.fedoraproject.org/pub/fedora/linux/releases/${DIB_RELEASE}/Cloud/${ARCH}/images} + elif [[ ${DIB_RELEASE} -ge 28 ]] && [[ ${DIB_RELEASE} -le 36 ]]; then + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/${DIB_RELEASE}/Cloud/${ARCH}/images} else - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://download.fedoraproject.org/pub/fedora/linux/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} fi ;; ppc64|ppc64le) - if [[ ${DIB_RELEASE} -ge 28 ]]; then + if [[ ${DIB_RELEASE} -ge 37 ]]; then DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://dl.fedoraproject.org/pub/fedora-secondary/releases/${DIB_RELEASE}/Cloud/${ARCH}/images} + elif [[ ${DIB_RELEASE} -ge 28 ]] && [[ ${DIB_RELEASE} -le 36 ]]; then + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/${DIB_RELEASE}/Cloud/${ARCH}/images} else - DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-https://dl.fedoraproject.org/pub/fedora-secondary/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} + DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/${DIB_RELEASE}/CloudImages/${ARCH}/images} fi ;; *)