Add support for CentOS Stream (#464)

* Add support for CentOS Stream

Supports CentOS Stream releases 8 and 9, editions 'dvd1' and 'boot'.

* Rename 'centos' to 'centos-stream' for clarity
This commit is contained in:
Scott Travis 2022-07-23 20:13:00 -04:00 committed by GitHub
parent 4f3f5f2b58
commit 790c626993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,7 @@ function pretty_name() {
archlinux) PRETTY_NAME="Arch Linux";;
arcolinux) PRETTY_NAME="Arco Linux";;
cachyos) PRETTY_NAME="CachyOS";;
centos-stream) PRETTY_NAME="CentOS Stream";;
dragonflybsd) PRETTY_NAME="DragonFlyBSD";;
elementary) PRETTY_NAME="elementary OS";;
endeavouros) PRETTY_NAME="EndeavourOS";;
@ -163,6 +164,7 @@ function os_support() {
arcolinux \
batocera \
cachyos \
centos-stream \
debian \
devuan \
dragonflybsd \
@ -243,6 +245,14 @@ function releases_cachyos() {
echo 2022.01.09 2022.02.11
}
function releases_centos-stream() {
echo 8 9
}
function editions_centos-stream() {
echo dvd1 boot
}
function releases_debian() {
echo 10.11.0 11.2.0 11.3.0
}
@ -721,7 +731,7 @@ EOF
# OS specific tweaks
case ${OS} in
alma|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
alma|centos-stream|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
dragonflybsd|haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";;
freedos)
echo "boot=\"legacy\"" >> "${CONF_FILE}"
@ -834,6 +844,25 @@ function get_cachyos() {
echo "${URL}/${ISO} ${HASH}"
}
function get_centos-stream() {
local HASH=""
local ISO=""
case ${RELEASE} in
8)
ISO="CentOS-Stream-${RELEASE}-x86_64-latest-${EDITION}.iso"
URL="https://mirrors.ocf.berkeley.edu/centos/8-stream/isos/x86_64"
HASH=$(wget -q -O- ${URL}/CHECKSUM | grep "SHA256 (${ISO}" | cut -d' ' -f4)
;;
9)
ISO="CentOS-Stream-${RELEASE}-latest-x86_64-${EDITION}.iso"
URL="https://mirrors.ocf.berkeley.edu/centos-stream/9-stream/BaseOS/x86_64/iso"
HASH=$(wget -q -O- ${URL}/${ISO}.SHA256SUM | grep "SHA256 (${ISO}" | cut -d' ' -f4)
;;
esac
echo "${URL}/${ISO} ${HASH}"
}
function get_debian() {
local EDITION="${1:-}"
local HASH=""