From 56dc0a2c31636a5665cab7a1b8d89c61af0ca96f Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 25 Mar 2020 16:06:04 +1100 Subject: [PATCH] centos 8 image build: fix mirror We're ending up with "centoscentos" in the mirror location and the build fails; strip out the $contentdir from the original too. Change-Id: If09dbbd8028ea510d2ab0d3d8afe484cea611df5 --- .../elements/centos/pre-install.d/01-set-centos-mirror | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/diskimage_builder/elements/centos/pre-install.d/01-set-centos-mirror b/diskimage_builder/elements/centos/pre-install.d/01-set-centos-mirror index dffb1705..9abb9613 100755 --- a/diskimage_builder/elements/centos/pre-install.d/01-set-centos-mirror +++ b/diskimage_builder/elements/centos/pre-install.d/01-set-centos-mirror @@ -15,9 +15,9 @@ DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-} if [[ ${DIB_RELEASE} == '7' ]]; then sed -e "s|^#baseurl=http[s]*://mirror.centos.org/centos|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo elif [[ ${DIB_RELEASE} == '8' ]]; then - sed -e "s|^#baseurl=http[s]*://mirror.centos.org/|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo - sed -e "s|^#baseurl=http[s]*://mirror.centos.org/|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-AppStream.repo - sed -e "s|^#baseurl=http[s]*://mirror.centos.org/|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-centosplus.repo - sed -e "s|^#baseurl=http[s]*://mirror.centos.org/|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Extras.repo - sed -e "s|^#baseurl=http[s]*://mirror.centos.org/|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-PowerTools.repo + sed -e "s|^#baseurl=http[s]*://mirror.centos.org/\$contentdir/|baseurl=$DIB_DISTRIBUTION_MIRROR/|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo + sed -e "s|^#baseurl=http[s]*://mirror.centos.org/\$contentdir/|baseurl=$DIB_DISTRIBUTION_MIRROR/|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-AppStream.repo + sed -e "s|^#baseurl=http[s]*://mirror.centos.org/\$contentdir/|baseurl=$DIB_DISTRIBUTION_MIRROR/|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-centosplus.repo + sed -e "s|^#baseurl=http[s]*://mirror.centos.org/\$contentdir/|baseurl=$DIB_DISTRIBUTION_MIRROR/|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Extras.repo + sed -e "s|^#baseurl=http[s]*://mirror.centos.org/\$contentdir/|baseurl=$DIB_DISTRIBUTION_MIRROR/|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-PowerTools.repo fi