Skip to content

Commit

Permalink
change to centos-vault and centos-stream (#72)
Browse files Browse the repository at this point in the history
Co-authored-by: whh4git <[email protected]>
  • Loading branch information
whh4git and whh4git authored Oct 23, 2024
1 parent 54a54cb commit 291b0eb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
31 changes: 31 additions & 0 deletions common/libc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,37 @@ requirements_centos() {
return 0
}

# ===== CentOS-Stream ===== #

get_from_fullfiletimelist() {
local info=$1
local website=$2
local pkg=$3
local arch=$4
echo "Getting package $pkg locations"
local url=""
for i in $(seq 1 3); do
urls=$(wget "$website/fullfiletimelist" -O - 2>/dev/null \
| grep -h "$pkg-[0-9]" \
| grep -h "$arch\.rpm" \
| awk '{print $4}')
[[ -z "$urls" ]] || break
echo "Retrying..."
sleep 1
done
[[ -n "$urls" ]] || die "Failed to get package version"
for url in $urls
do
get_rpm "$website/$url" "$info" "$pkg"
sleep .1
done
}

requirements_centos_stream() {
which awk 1>/dev/null 2>&1 || return
requirements_centos || return
return 0
}

# ===== Arch ===== #

Expand Down
19 changes: 17 additions & 2 deletions get
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@ categories[cntr_category]="centos"
requirements["centos"]="requirements_centos"
cntr_category=$((cntr_category + 1))
centos() {
get_from_filelistgz centos-glibc http://mirror.centos.org/centos/ glibc i686
get_from_filelistgz centos-glibc http://mirror.centos.org/centos/ glibc x86_64
get_from_filelistgz centos-glibc https://vault.centos.org/ glibc i686
get_from_filelistgz centos-glibc https://vault.centos.org/ glibc x86_64
}

categories[cntr_category]="centos_stream"
requirements["centos_stream"]="requirements_centos_stream"
cntr_category=$((cntr_category + 1))
centos_stream() {
get_from_fullfiletimelist centos-glibc https://mirror.stream.centos.org/ glibc i686
get_from_fullfiletimelist centos-glibc https://mirror.stream.centos.org/ glibc x86_64
}

categories[cntr_category]="arch"
Expand Down Expand Up @@ -82,6 +90,13 @@ alpine() {
v3.10
v3.11
v3.12
v3.13
v3.14
v3.15
v3.16
v3.17
v3.18
v3.19
)

for version in "${alpine_versions[@]}"; do
Expand Down

0 comments on commit 291b0eb

Please sign in to comment.