repos
Some checks failed
/ job (push) Failing after 13s

This commit is contained in:
Marc Beninca 2024-05-03 19:02:51 +02:00
parent 7c10bf634d
commit 3f8fbe877f
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 20 additions and 12 deletions

21
cd.sh
View file

@ -4,8 +4,8 @@
CD_DEFAULT_DNS="\ CD_DEFAULT_DNS="\
9.9.9.9 \ 9.9.9.9 \
" "
CD_DEFAULT_MIRROR_ALMA="https://repo.almalinux.org/almalinux" CD_DEFAULT_REPO_ALMA="https://repo.almalinux.org/almalinux"
CD_DEFAULT_MIRROR_DEBIAN="https://deb.debian.org/debian" CD_DEFAULT_REPO_DEBIAN="https://deb.debian.org/debian"
CD_PYTHON_MODULES="\ CD_PYTHON_MODULES="\
cd \ cd \
@ -66,6 +66,8 @@ local text
# #
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_DEBIAN}") "${CD_OS_DEBIAN}")
CD_OS_REPO="${CD_DEFAULT_REPO_DEBIAN}"
[ "${CD_REPO_DEBIAN}" ] && CD_OS_REPO="${CD_REPO_DEBIAN}"
case "${CD_OS_VERSION}" in case "${CD_OS_VERSION}" in
"bookworm"|"bullseye") cd_nop ;; "bookworm"|"bullseye") cd_nop ;;
*) cd_error_os "CD_OS_VERSION" ;; *) cd_error_os "CD_OS_VERSION" ;;
@ -76,6 +78,8 @@ local text
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
;; ;;
"${CD_OS_ALMA}") "${CD_OS_ALMA}")
CD_OS_REPO="${CD_DEFAULT_REPO_ALMA}"
[ "${CD_REPO_ALMA}" ] && CD_OS_REPO="${CD_REPO_ALMA}"
case "${CD_OS_VERSION}" in case "${CD_OS_VERSION}" in
"8."*|"9."*) cd_nop ;; "8."*|"9."*) cd_nop ;;
*) cd_error_os "CD_OS_VERSION" ;; *) cd_error_os "CD_OS_VERSION" ;;
@ -147,15 +151,18 @@ local file
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_DEBIAN}") "${CD_OS_DEBIAN}")
cd_write "/etc/apt/sources.list" "\ cd_write "/etc/apt/sources.list" "\
deb https://deb.debian.org/debian ${CD_OS_VERSION} main deb ${CD_OS_REPO} ${CD_OS_VERSION} main
deb https://deb.debian.org/debian ${CD_OS_VERSION}-backports main deb ${CD_OS_REPO} ${CD_OS_VERSION}-backports main
deb https://deb.debian.org/debian ${CD_OS_VERSION}-updates main deb ${CD_OS_REPO} ${CD_OS_VERSION}-updates main
deb https://deb.debian.org/debian-security ${CD_OS_VERSION}-security main deb ${CD_OS_REPO}-security ${CD_OS_VERSION}-security main
" "
;; ;;
"${CD_OS_ALMA}") "${CD_OS_ALMA}")
file="/etc/yum.repos.d/almalinux.repo" file="/etc/yum.repos.d/almalinux.repo"
cd_sed "${file}" "|^m|# m|" "|^# b|b|" cd_sed "${file}" \
"|^mirrorlist|# mirrorlist|" \
"|${CD_DEFAULT_REPO_ALMA}|${CD_OS_REPO}|" \
"|^# baseurl|baseurl|"
cd_cat "${file}" cd_cat "${file}"
;; ;;
esac esac

View file

@ -21,13 +21,14 @@ from various CA, CI, OCI / OS.
## How ## How
| Variable | Description | | Variable | Description |
|----------|-------------------------| |----------------|-------------------------|
| CD_CA_n | Numbered CA certificate | | CD_CA_n | Numbered CA certificate |
| CD_DNS | Space separated servers | | CD_DNS | Space separated servers |
| CD_REPO_ALMA | Alma repository URL |
| CD_REPO_DEBIAN | Debian repository URL |
## Tasks ## Tasks
* integrate project repository cloning * integrate project repository cloning
* override repository and framework locations * override repository and framework locations
* redefine package repositories mirror locations
* write Python bootstrap * write Python bootstrap