From 881be6e780b258e98d1ecba4777ba3e171d5760d Mon Sep 17 00:00:00 2001 From: Paride Legovini Date: Tue, 13 Jul 2021 21:23:19 +0200 Subject: run-container: fixup the centos repos baseurls when using http_proxy (#944) The EPEL repo file used to have download.fedoraproject.org as its baseurl. That has now been replaced by `download.example`, which we need to replace with dl.fedoraproject.org, the actual mirror we want to download from. We can't use download.fedoraproject.org or the mirrorlist (which is the default way for finding mirrors) because of our internal proxy rules. This change only applies if http_proxy is set, otherwise the mirrors are reached in the default way. --- tools/read-dependencies | 1 + tools/run-container | 1 + 2 files changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/read-dependencies b/tools/read-dependencies index a2577e87..e52720d4 100755 --- a/tools/read-dependencies +++ b/tools/read-dependencies @@ -40,6 +40,7 @@ MAYBE_RELIABLE_YUM_INSTALL = [ error ":: http proxy in use => forcing the use of fixed URLs in /etc/yum.repos.d/*.repo" sed -i --regexp-extended '/^#baseurl=/s/#// ; /^(mirrorlist|metalink)=/s/^/#/' /etc/yum.repos.d/*.repo sed -i 's/download\.fedoraproject\.org/dl.fedoraproject.org/g' /etc/yum.repos.d/*.repo + sed -i 's/download\.example/dl.fedoraproject.org/g' /etc/yum.repos.d/*.repo } configure_repos_for_proxy_use n=0; max=10; diff --git a/tools/run-container b/tools/run-container index 1bd10971..e049dfdc 100755 --- a/tools/run-container +++ b/tools/run-container @@ -353,6 +353,7 @@ wait_for_boot() { inside "$name" sh -c "echo proxy=$http_proxy >> /etc/yum.conf" inside "$name" sh -c "sed -i --regexp-extended '/^#baseurl=/s/#// ; /^(mirrorlist|metalink)=/s/^/#/' /etc/yum.repos.d/*.repo" inside "$name" sh -c "sed -i 's/download\.fedoraproject\.org/dl.fedoraproject.org/g' /etc/yum.repos.d/*.repo" + inside "$name" sh -c "sed -i 's/download\.example/dl.fedoraproject.org/g' /etc/yum.repos.d/*.repo" else debug 1 "do not know how to configure proxy on $OS_NAME" fi -- cgit v1.2.3