fedora/wip

This commit is contained in:
Marc Beninca 2024-05-06 11:36:27 +02:00
parent b399eeaf71
commit 2bf74aab11
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 25 additions and 4 deletions

26
cd.sh
View file

@ -45,12 +45,13 @@ cd_set_environment_variables () {
"alpine") CD_OS_ID="${CD_OS_ALPINE}" ;; "alpine") CD_OS_ID="${CD_OS_ALPINE}" ;;
"arch") CD_OS_ID="${CD_OS_ARCH}" ;; "arch") CD_OS_ID="${CD_OS_ARCH}" ;;
"debian") CD_OS_ID="${CD_OS_DEBIAN}" ;; "debian") CD_OS_ID="${CD_OS_DEBIAN}" ;;
"fedora") CD_OS_ID="${CD_OS_FEDORA}" ;;
"rocky") CD_OS_ID="${CD_OS_ROCKY}" ;; "rocky") CD_OS_ID="${CD_OS_ROCKY}" ;;
"ubuntu") CD_OS_ID="${CD_OS_UBUNTU}" ;; "ubuntu") CD_OS_ID="${CD_OS_UBUNTU}" ;;
*) cd_error_os "CD_OS_ID" ;; *) cd_error_os "CD_OS_ID" ;;
esac esac
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_ARCH}"|"${CD_OS_ROCKY}") "${CD_OS_ALMA}"|"${CD_OS_ARCH}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
CD_OS_VERSION=$(cd_grep_os VERSION_ID \ CD_OS_VERSION=$(cd_grep_os VERSION_ID \
| sed "s|^\([0-9]\+\)\..*|\1|") | sed "s|^\([0-9]\+\)\..*|\1|")
;; ;;
@ -87,6 +88,12 @@ cd_set_environment_variables () {
*) cd_error_os "CD_OS_VERSION" ;; *) cd_error_os "CD_OS_VERSION" ;;
esac esac
;; ;;
"${CD_OS_FEDORA}")
case "${CD_OS_VERSION}" in
"39"|"40") ;;
*) cd_error_os "CD_OS_VERSION" ;;
esac
;;
"${CD_OS_UBUNTU}") "${CD_OS_UBUNTU}")
case "${CD_OS_VERSION}" in case "${CD_OS_VERSION}" in
"mantic"|"noble") ;; "mantic"|"noble") ;;
@ -102,7 +109,7 @@ cd_set_environment_variables () {
cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT" cd_echo "CD_DNS_FILE" "CD_PKG_CA" "CD_PKG_GIT"
# shared # shared
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}") "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors" CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
CD_CMD_CA="update-ca-trust" CD_CMD_CA="update-ca-trust"
;; ;;
@ -119,7 +126,7 @@ cd_set_environment_variables () {
cd_echo "CD_CA_ROOT" "CD_CMD_CA" cd_echo "CD_CA_ROOT" "CD_CMD_CA"
# common # common
case "${CD_OS_ID}" in case "${CD_OS_ID}" in
"${CD_OS_ALMA}"|"${CD_OS_ROCKY}") "${CD_OS_ALMA}"|"${CD_OS_FEDORA}"|"${CD_OS_ROCKY}")
CD_CMD_CLEAN="dnf clean all" CD_CMD_CLEAN="dnf clean all"
CD_CMD_INSTALL="dnf install --assumeyes" CD_CMD_INSTALL="dnf install --assumeyes"
CD_CMD_QUERY="rpm --query" CD_CMD_QUERY="rpm --query"
@ -201,6 +208,9 @@ Dir::Etc::SourceParts \"\";
"${CD_OS_DEBIAN}") "${CD_OS_DEBIAN}")
CD_URL_DEFAULT="http://deb.debian.org/debian" CD_URL_DEFAULT="http://deb.debian.org/debian"
;; ;;
"${CD_OS_FEDORA}")
CD_URL_DEFAULT="http://download.example/pub/fedora/linux/releases"
;;
"${CD_OS_ROCKY}") "${CD_OS_ROCKY}")
CD_URL_DEFAULT="http://dl.rockylinux.org/\$contentdir" CD_URL_DEFAULT="http://dl.rockylinux.org/\$contentdir"
;; ;;
@ -220,6 +230,10 @@ Dir::Etc::SourceParts \"\";
[ "${CD_URL_DEBIAN}" ] && CD_URL_CHOSEN="${CD_URL_DEBIAN}" \ [ "${CD_URL_DEBIAN}" ] && CD_URL_CHOSEN="${CD_URL_DEBIAN}" \
|| CD_URL_CHOSEN="https://deb.debian.org/debian" || CD_URL_CHOSEN="https://deb.debian.org/debian"
;; ;;
"${CD_OS_FEDORA}")
[ "${CD_URL_FEDORA}" ] && CD_URL_CHOSEN="${CD_URL_FEDORA}" \
|| CD_URL_CHOSEN="https://rpmfind.net/linux/fedora/linux/releases"
;;
"${CD_OS_ROCKY}") "${CD_OS_ROCKY}")
[ "${CD_URL_ROCKY}" ] && CD_URL_CHOSEN="${CD_URL_ROCKY}" \ [ "${CD_URL_ROCKY}" ] && CD_URL_CHOSEN="${CD_URL_ROCKY}" \
|| CD_URL_CHOSEN="https://dl.rockylinux.org/\$contentdir" || CD_URL_CHOSEN="https://dl.rockylinux.org/\$contentdir"
@ -256,6 +270,11 @@ Dir::Etc::SourceParts \"\";
CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGE="python3"
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
;; ;;
"${CD_OS_FEDORA}")
CD_PYTHON_COMMAND="python3.12"
CD_PYTHON_PACKAGE="python3"
CD_PYTHON_PACKAGES="/usr/lib64/python3.12/site-packages"
;;
"${CD_OS_UBUNTU}") "${CD_OS_UBUNTU}")
case "${CD_OS_VERSION}" in case "${CD_OS_VERSION}" in
"noble") CD_PYTHON_COMMAND="python3.12" ;; "noble") CD_PYTHON_COMMAND="python3.12" ;;
@ -634,6 +653,7 @@ CD_OS_ALMA="alma"
CD_OS_ALPINE="alpine" CD_OS_ALPINE="alpine"
CD_OS_ARCH="arch" CD_OS_ARCH="arch"
CD_OS_DEBIAN="debian" CD_OS_DEBIAN="debian"
CD_OS_FEDORA="fedora"
CD_OS_ROCKY="rocky" CD_OS_ROCKY="rocky"
CD_OS_UBUNTU="ubuntu" CD_OS_UBUNTU="ubuntu"

View file

@ -37,7 +37,7 @@ from various CA, CI, OCI / OS.
* [X] Python * [X] Python
* [X] 3.9 (Debian Bullseye) * [X] 3.9 (Debian Bullseye)
* [X] 3.11 (Alma, Alpine, Debian Bookworm, Rocky, Ubuntu Mantic) * [X] 3.11 (Alma, Alpine, Debian Bookworm, Rocky, Ubuntu Mantic)
* [X] 3.12 (Arch, Ubuntu Noble) * [X] 3.12 (Arch, Fedora, Ubuntu Noble)
## How ## How
@ -49,6 +49,7 @@ from various CA, CI, OCI / OS.
| CD_URL_ALPINE | Alpine repository URL | | CD_URL_ALPINE | Alpine repository URL |
| CD_URL_ARCH | Arch repository URL | | CD_URL_ARCH | Arch repository URL |
| CD_URL_DEBIAN | Debian repository URL | | CD_URL_DEBIAN | Debian repository URL |
| CD_URL_FEDORA | Fedora repository URL |
| CD_URL_ROCKY | Rocky repository URL | | CD_URL_ROCKY | Rocky repository URL |
| CD_URL_UBUNTU | Ubuntu repository URL | | CD_URL_UBUNTU | Ubuntu repository URL |