From d4e7ff9d2877bbd795c7b42bd3a6ca44ce88d1c3 Mon Sep 17 00:00:00 2001 From: MichaƂ Nasiadka Date: Thu, 1 Jul 2021 09:19:01 +0200 Subject: CI: Fix epel url override epel-release now installs epel*.repos with following baseurl: baseurl=https://download.example/pub/epel/$releasever/Everything/$basearch This backport has been adapted to continue to work on CentOS 7. Change-Id: I19f57d258021ff660df6b6b95e8205b69f3bea85 (cherry picked from commit acc8cb9903aa2a97342d1ca76bc9e274361194c1) --- tests/templates/template_overrides.j2 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/templates/template_overrides.j2 b/tests/templates/template_overrides.j2 index e7c98bf47..8eff0b181 100644 --- a/tests/templates/template_overrides.j2 +++ b/tests/templates/template_overrides.j2 @@ -45,7 +45,11 @@ RUN sed -i \ {% raw %} {% endblock %} +{% endraw %} + +{% set epel_host_path = 'download.example/pub' if ansible_pkg_mgr == 'dnf' else 'download.fedoraproject.org/pub' %} +{% raw %} {% block base_centos_repo_overrides_post_yum %} {% endraw %} && sed -i \ @@ -57,8 +61,8 @@ RUN sed -i \ /etc/yum.repos.d/CentOS-*.repo \ && sed -i \ -e "s|^\(metalink.*\)|#\1|" \ - -e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \ - -e "s|^#baseurl=https://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \ + -e "s|^#baseurl=http://{{ epel_host_path }}|baseurl=http://{{ nodepool_mirror_host }}|" \ + -e "s|^#baseurl=https://{{ epel_host_path }}|baseurl=http://{{ nodepool_mirror_host }}|" \ /etc/yum.repos.d/epel*.repo \ {% raw %} {% endblock %} @@ -109,7 +113,7 @@ RUN sed -i \ /etc/yum.repos.d/CentOS-*.repo \ && sed -i \ -e "s|^#\(metalink.*\)|\1|" \ - -e "s|^baseurl=http://{{ nodepool_mirror_host }}|baseurl=http://download.fedoraproject.org/pub|" \ + -e "s|^baseurl=http://{{ nodepool_mirror_host }}|#baseurl=http://{{ epel_host_path }}|" \ /etc/yum.repos.d/epel*.repo {% raw %} {% if distro_package_manager == 'yum' %} -- cgit v1.2.3