From e8cd0ca9b2ee557685557ef9b747dea3bc310dd4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 27 Aug 2024 15:21:50 +0200 Subject: [PATCH 1/6] alma --- spcd/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index bea2cbc..7d7bb7f 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -17,6 +17,8 @@ [ -n "${SPCD_REF_RELEASE}" ] || SPCD_REF_RELEASE="main" [ -n "${SPCD_REF_STAGING}" ] || SPCD_REF_STAGING="dev" +[ -n "${SPCD_URL_ALMA}" ] || + SPCD_URL_ALMA="https://repo.almalinux.org/almalinux" [ -n "${SPCD_URL_ALPINE}" ] || SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine" [ -n "${SPCD_URL_ARCH}" ] || From 57543f20d534379efc8d388261960b3d9b487951 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 27 Aug 2024 15:43:19 +0200 Subject: [PATCH 2/6] repos/fixes --- spcd/bootstrap.sh | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 7d7bb7f..ff0b43f 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -834,23 +834,20 @@ spcd_step__packages_set_repositories() { esac spcd_os_sed "${spcd_spr__file}" \ "|^mirrorlist|# mirrorlist|" \ - "|${SPCD_URL_DEFAULT}|${SPCD_URL_CHOSEN}|" \ "|^# baseurl|baseurl|" ;; "${SPCD_OS_ALPINE}") - spcd_spr__file="/etc/apk/repositories" - spcd_os_write "${spcd_spr__file}" "\ -${SPCD_URL_CHOSEN}/v${SPCD_OS_VERSION}/main -${SPCD_URL_CHOSEN}/v${SPCD_OS_VERSION}/community + spcd_os_write "/etc/apk/repositories" "\ +${SPCD_URL_ALPINE}/v${SPCD_OS_VERSION}/main +${SPCD_URL_ALPINE}/v${SPCD_OS_VERSION}/community " ;; "${SPCD_OS_DEBIAN}") - spcd_spr__file="/etc/apt/sources.list" - spcd_os_write "${spcd_spr__file}" "\ -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION} main -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-backports main -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-updates main -deb ${SPCD_URL_CHOSEN}-security ${SPCD_OS_VERSION}-security main + spcd_os_write "/etc/apt/sources.list" "\ +deb ${SPCD_URL_DEBIAN} ${SPCD_OS_VERSION} main +deb ${SPCD_URL_DEBIAN} ${SPCD_OS_VERSION}-backports main +deb ${SPCD_URL_DEBIAN} ${SPCD_OS_VERSION}-updates main +deb ${SPCD_URL_DEBIAN}-security ${SPCD_OS_VERSION}-security main " ;; "${SPCD_OS_OPENSUSE}") @@ -863,7 +860,7 @@ deb ${SPCD_URL_CHOSEN}-security ${SPCD_OS_VERSION}-security main "update" \ "openh264"; do spcd_os_sed "/etc/zypp/repos.d/repo-${spcd_spr__file}.repo" \ - "|${SPCD_URL_DEFAULT}|${SPCD_URL_CHOSEN}|" + "|http://download.opensuse.org|${SPCD_URL_OPENSUSE}|" done ;; "${SPCD_OS_ROCKY}") @@ -874,16 +871,15 @@ deb ${SPCD_URL_CHOSEN}-security ${SPCD_OS_VERSION}-security main esac spcd_os_sed "${spcd_spr__file}" \ "|^mirrorlist|# mirrorlist|" \ - "|${SPCD_URL_DEFAULT}|${SPCD_URL_CHOSEN}|" \ + "|http://dl.rockylinux.org/\$contentdir|${SPCD_URL_ROCKY}|" \ "|^#baseurl|baseurl|" ;; "${SPCD_OS_UBUNTU}") - spcd_spr__file="/etc/apt/sources.list" - spcd_os_write "${spcd_spr__file}" "\ -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION} main universe -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-backports main universe -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-updates main universe -deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-security main universe + spcd_os_write "/etc/apt/sources.list" "\ +deb ${SPCD_URL_UBUNTU} ${SPCD_OS_VERSION} main universe +deb ${SPCD_URL_UBUNTU} ${SPCD_OS_VERSION}-backports main universe +deb ${SPCD_URL_UBUNTU} ${SPCD_OS_VERSION}-updates main universe +deb ${SPCD_URL_UBUNTU} ${SPCD_OS_VERSION}-security main universe " ;; *) ;; From 99eef56d40da5f51bb560373ad74c176f2537cf6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 27 Aug 2024 16:08:00 +0200 Subject: [PATCH 3/6] repos/arch,fedora --- spcd/bootstrap.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index ff0b43f..7acfe6b 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -22,7 +22,7 @@ [ -n "${SPCD_URL_ALPINE}" ] || SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine" [ -n "${SPCD_URL_ARCH}" ] || - SPCD_URL_ARCH="https://geo.mirror.pkgbuild.com" + SPCD_URL_ARCH="https://geo.mirror.pkgbuild.com/\$repo/os/\$arch" [ -n "${SPCD_URL_DEBIAN}" ] || SPCD_URL_DEBIAN="https://deb.debian.org/debian" [ -n "${SPCD_URL_EPEL}" ] || @@ -840,6 +840,11 @@ spcd_step__packages_set_repositories() { spcd_os_write "/etc/apk/repositories" "\ ${SPCD_URL_ALPINE}/v${SPCD_OS_VERSION}/main ${SPCD_URL_ALPINE}/v${SPCD_OS_VERSION}/community +" + ;; + "${SPCD_OS_ARCH}") + spcd_os_write "/etc/pacman.d/mirrorlist" "\ +Server = ${SPCD_URL_ARCH} " ;; "${SPCD_OS_DEBIAN}") @@ -850,6 +855,19 @@ deb ${SPCD_URL_DEBIAN} ${SPCD_OS_VERSION}-updates main deb ${SPCD_URL_DEBIAN}-security ${SPCD_OS_VERSION}-security main " ;; + "${SPCD_OS_FEDORA}") + for spcd_spr__file in \ + "fedora" \ + "fedora-updates" \ + "fedora-updates-testing"; do + spcd_os_sed "/etc/yum.repos.d/${spcd_spr__file}.repo" \ + "|^metalink|# metalink|" \ + "|http://download.example|${SPCD_URL_FEDORA}|" \ + "|^#baseurl|baseurl|" + done + spcd_os_sed "/etc/yum.repos.d/fedora-cisco-openh264.repo" \ + "|^enabled=1|# enabled=0|" + ;; "${SPCD_OS_OPENSUSE}") for spcd_spr__file in \ "backports-update" \ From 54ba6c2bdb5bf1d6656cef56580ae4e1c71159c7 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 27 Aug 2024 16:53:05 +0200 Subject: [PATCH 4/6] repos/alma --- spcd/bootstrap.sh | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 7acfe6b..4013fbd 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -18,7 +18,7 @@ [ -n "${SPCD_REF_STAGING}" ] || SPCD_REF_STAGING="dev" [ -n "${SPCD_URL_ALMA}" ] || - SPCD_URL_ALMA="https://repo.almalinux.org/almalinux" + SPCD_URL_ALMA="https://repo.almalinux.org" [ -n "${SPCD_URL_ALPINE}" ] || SPCD_URL_ALPINE="https://dl-cdn.alpinelinux.org/alpine" [ -n "${SPCD_URL_ARCH}" ] || @@ -828,13 +828,40 @@ spcd_step__packages_set_repositories() { case "${SPCD_OS_ID}" in "${SPCD_OS_ALMA}") case "${SPCD_OS_VERSION}" in - "8") spcd_spr__file="/etc/yum.repos.d/almalinux.repo" ;; - "9") spcd_spr__file="/etc/yum.repos.d/almalinux-baseos.repo" ;; + "9") + set -- \ + "-appstream" \ + "-baseos" \ + "-crb" \ + "-extras" \ + "-highavailability" \ + "-nfv" \ + "-plus" \ + "-resilientstorage" \ + "-rt" \ + "-sap" \ + "-saphana" + ;; + "8") + set -- \ + "" \ + "-ha" \ + "-nfv" \ + "-plus" \ + "-powertools" \ + "-resilientstorage" \ + "-rt" \ + "-sap" \ + "-saphana" + ;; *) ;; esac - spcd_os_sed "${spcd_spr__file}" \ - "|^mirrorlist|# mirrorlist|" \ - "|^# baseurl|baseurl|" + for spcd_spr__file in "${@}"; do + spcd_os_sed "/etc/yum.repos.d/almalinux${spcd_spr__file}.repo" \ + "|^mirrorlist|# mirrorlist|" \ + "|https://repo.almalinux.org|${SPCD_URL_ALMA}|" \ + "|^# baseurl|baseurl|" + done ;; "${SPCD_OS_ALPINE}") spcd_os_write "/etc/apk/repositories" "\ From eab857625b40a11b425b20f1ab095bbeebf709b0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 27 Aug 2024 17:44:44 +0200 Subject: [PATCH 5/6] repos/rocky --- spcd/bootstrap.sh | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 4013fbd..506b610 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -34,7 +34,7 @@ [ -n "${SPCD_URL_PYTHON}" ] || SPCD_URL_PYTHON="https://pypi.org/simple" [ -n "${SPCD_URL_ROCKY}" ] || - SPCD_URL_ROCKY="https://dl.rockylinux.org/\$contentdir" + SPCD_URL_ROCKY="https://dl.rockylinux.org" [ -n "${SPCD_URL_UBUNTU}" ] || SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net/ubuntu" @@ -910,14 +910,36 @@ deb ${SPCD_URL_DEBIAN}-security ${SPCD_OS_VERSION}-security main ;; "${SPCD_OS_ROCKY}") case "${SPCD_OS_VERSION}" in - "8") spcd_spr__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;; - "9") spcd_spr__file="/etc/yum.repos.d/rocky.repo" ;; + "9") + set -- \ + "rocky" \ + "rocky-addons" \ + "rocky-devel" \ + "rocky-extras" + ;; + "8") + set -- \ + "Rocky-AppStream" \ + "Rocky-BaseOS" \ + "Rocky-Debuginfo" \ + "Rocky-Devel" \ + "Rocky-Extras" \ + "Rocky-HighAvailability" \ + "Rocky-NFV" \ + "Rocky-Plus" \ + "Rocky-PowerTools" \ + "Rocky-RT" \ + "Rocky-ResilientStorage" \ + "Rocky-Sources" + ;; *) ;; esac - spcd_os_sed "${spcd_spr__file}" \ - "|^mirrorlist|# mirrorlist|" \ - "|http://dl.rockylinux.org/\$contentdir|${SPCD_URL_ROCKY}|" \ - "|^#baseurl|baseurl|" + for spcd_spr__file in "${@}"; do + spcd_os_sed "/etc/yum.repos.d/${spcd_spr__file}.repo" \ + "|^mirrorlist|# mirrorlist|" \ + "|http://dl.rockylinux.org|${SPCD_URL_ROCKY}|" \ + "|^#baseurl|baseurl|" + done ;; "${SPCD_OS_UBUNTU}") spcd_os_write "/etc/apt/sources.list" "\ From 00fa4ff5e93786c9f37da7f2eb2623e7811493ca Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 27 Aug 2024 17:51:25 +0200 Subject: [PATCH 6/6] repos/purge --- spcd/bootstrap.sh | 64 ----------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 506b610..efa6438 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -557,70 +557,6 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")" esac spcd_split spcd_os_printenv "SPCD_PM" - # specific - case "${SPCD_OS_ID}" in - "${SPCD_OS_ALMA}") - SPCD_URL_DEFAULT="https://repo.almalinux.org/almalinux" - ;; - "${SPCD_OS_ALPINE}") - SPCD_URL_DEFAULT="https://dl-cdn.alpinelinux.org/alpine" - ;; - "${SPCD_OS_ARCH}") - SPCD_URL_DEFAULT="https://geo.mirror.pkgbuild.com" - ;; - "${SPCD_OS_DEBIAN}") - SPCD_URL_DEFAULT="http://deb.debian.org/debian" - ;; - "${SPCD_OS_FEDORA}") - SPCD_URL_DEFAULT="http://download.example/pub/fedora/linux/releases" - ;; - "${SPCD_OS_OPENSUSE}") - SPCD_URL_DEFAULT="http://download.opensuse.org" - ;; - "${SPCD_OS_ROCKY}") - SPCD_URL_DEFAULT="http://dl.rockylinux.org/\$contentdir" - ;; - "${SPCD_OS_UBUNTU}") - SPCD_URL_DEFAULT="http://archive.ubuntu.com/ubuntu" - ;; - *) ;; - esac - SPCD_URL_CHOSEN="${SPCD_URL_DEFAULT}" - case "${SPCD_OS_ID}" in - "${SPCD_OS_ALMA}") - [ -n "${SPCD_URL_ALMA}" ] && SPCD_URL_CHOSEN="${SPCD_URL_ALMA}" - ;; - "${SPCD_OS_ALPINE}") - [ -n "${SPCD_URL_ALPINE}" ] && SPCD_URL_CHOSEN="${SPCD_URL_ALPINE}" - ;; - "${SPCD_OS_ARCH}") - [ -n "${SPCD_URL_ARCH}" ] && SPCD_URL_CHOSEN="${SPCD_URL_ARCH}" - ;; - "${SPCD_OS_DEBIAN}") - [ -n "${SPCD_URL_DEBIAN}" ] && SPCD_URL_CHOSEN="${SPCD_URL_DEBIAN}" || - SPCD_URL_CHOSEN="https://deb.debian.org/debian" - ;; - "${SPCD_OS_FEDORA}") - [ -n "${SPCD_URL_FEDORA}" ] && SPCD_URL_CHOSEN="${SPCD_URL_FEDORA}" || - SPCD_URL_CHOSEN="https://rpmfind.net/linux/fedora/linux/releases" - ;; - "${SPCD_OS_OPENSUSE}") - [ -n "${SPCD_URL_OPENSUSE}" ] && - SPCD_URL_CHOSEN="${SPCD_URL_OPENSUSE}" || - SPCD_URL_CHOSEN="https://download.opensuse.org" - ;; - "${SPCD_OS_ROCKY}") - [ -n "${SPCD_URL_ROCKY}" ] && SPCD_URL_CHOSEN="${SPCD_URL_ROCKY}" || - SPCD_URL_CHOSEN="https://dl.rockylinux.org/\$contentdir" - ;; - "${SPCD_OS_UBUNTU}") - [ -n "${SPCD_URL_UBUNTU}" ] && SPCD_URL_CHOSEN="${SPCD_URL_UBUNTU}" || - SPCD_URL_CHOSEN="https://ubuntu.mirrors.ovh.net/ubuntu" - ;; - *) ;; - esac - spcd_split - spcd_os_printenv "SPCD_URL_DEFAULT" "SPCD_URL_CHOSEN" # set python alias SPCD_PYTHON_ALIAS="python3" spcd_split