Add mirror variables

Easy to use mirror address for operation
This commit is contained in:
Seaton Jiang 2021-11-07 16:20:37 +08:00 committed by GitHub
parent d7e4c072a2
commit 16ab5e6fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,9 @@ SUPPORTED_MAJOR="8"
SUPPORTED_PLATFORM="platform:el$SUPPORTED_MAJOR"
ARCH=$(arch)
gpg_key_url="https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-rockyofficial"
ROCKY_MIRROR_URL="https://dl.rockylinux.org/pub/rocky"
gpg_key_url="${ROCKY_MIRROR_URL}/RPM-GPG-KEY-rockyofficial"
gpg_key_sha512="88fe66cf0a68648c2371120d56eb509835266d9efdf7c8b9ac8fc101bdf1f0e0197030d3ea65f4b5be89dc9d1ef08581adb068815c88d7b1dc40aa1c32990f6a"
sm_ca_dir=/etc/rhsm/ca
@ -123,8 +125,8 @@ unset tmp_sm_ca_dir
# all repos must be signed with the same key given in $gpg_key_url
declare -A repo_urls
repo_urls=(
[rockybaseos]="https://dl.rockylinux.org/pub/rocky/${SUPPORTED_MAJOR}/BaseOS/$ARCH/os/"
[rockyappstream]="https://dl.rockylinux.org/pub/rocky/${SUPPORTED_MAJOR}/AppStream/$ARCH/os/"
[rockybaseos]="${ROCKY_MIRROR_URL}/${SUPPORTED_MAJOR}/BaseOS/$ARCH/os/"
[rockyappstream]="${ROCKY_MIRROR_URL}/${SUPPORTED_MAJOR}/AppStream/$ARCH/os/"
)
# The repos package for CentOS stream requires special handling.