From 5da3ec0f06e05d2c0244e00c09d7d61157d71396 Mon Sep 17 00:00:00 2001 From: Daniel Pawlik Date: Wed, 27 Jan 2021 12:13:44 +0100 Subject: [PATCH] Install epel-release from URL The epel-release is not available for RHEL 7, so the package python3-PyYAML was not installed. Change-Id: Id81ab9d668fce46349d1abd4fb19cf51a9c1ee17 --- .../elements/yum/pre-install.d/01-00-centos-python3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/yum/pre-install.d/01-00-centos-python3 b/diskimage_builder/elements/yum/pre-install.d/01-00-centos-python3 index f39d2542..58de4ceb 100755 --- a/diskimage_builder/elements/yum/pre-install.d/01-00-centos-python3 +++ b/diskimage_builder/elements/yum/pre-install.d/01-00-centos-python3 @@ -15,7 +15,9 @@ if [[ ${DISTRO_NAME} =~ (centos|rhel) && ${DIB_RELEASE} == 7 ]]; then # "install this from EPEL". So we hack in an install of it here # from EPEL. Nothing else should have installed EPEL at this # early stage. - yum install -y python3 epel-release + yum install -y python3 + # NOTE(dpawlik) The epel-release package is not available in RHEL. + yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install -y python36-PyYAML yum remove -y epel-release elif [[ ${DISTRO_NAME} =~ (centos|rhel) && ${DIB_RELEASE} > 7 ]]; then