Skip to content

Commit 6c455ca

Browse files
committed
rockylinux: disable mirrors and use vault repos
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 1ff8587 commit 6c455ca

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

hack/scripts/rpm-init.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ EOF
3434
chmod +x /usr/local/bin/git
3535
}
3636

37+
if [ "$pkgrelease" = rockylinux* ]; then
38+
# disable mirrors and use vault repos for better stability
39+
find /etc/yum.repos.d/ -name '*.repo' -exec sed -i \
40+
-e 's/^mirrorlist=.*$/#mirrorlist=disabled/' \
41+
-e "s|^#baseurl=.*$|baseurl=https://dl.rockylinux.org/vault/rocky/$(rpm -E %{rhel})/BaseOS/\$basearch/os/|" {} \;
42+
fi
43+
3744
case "$pkgrelease" in
3845
centos9)
3946
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

hack/scripts/verify-rpm-init.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ fi
2323

2424
set -e
2525

26+
if [ "$pkgrelease" = rockylinux* ]; then
27+
# disable mirrors and use vault repos for better stability
28+
find /etc/yum.repos.d/ -name '*.repo' -exec sed -i \
29+
-e 's/^mirrorlist=.*$/#mirrorlist=disabled/' \
30+
-e "s|^#baseurl=.*$|baseurl=https://dl.rockylinux.org/vault/rocky/$(rpm -E %{rhel})/BaseOS/\$basearch/os/|" {} \;
31+
fi
32+
2633
case "$pkgrelease" in
2734
centos9)
2835
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

0 commit comments

Comments
 (0)