From b09fb3fef0896e812ca9ce3e6dc74f297494203a Mon Sep 17 00:00:00 2001 From: "Chandan Kumar (raukadah)" Date: Tue, 18 Jan 2022 11:20:07 +0530 Subject: [PATCH] Reinstall centos-stream-release from centos repos In CentOS Stream 8 and 9 container image, centos-stream-release package is already available in the container image. But in UBI, it is not available. It can be installed from the base OS repo. It removes the logic of downloading the centos-stream-release rpm and installing it. As it was added earlier when we were adding the initial support for EL9. since redhat-release is a part of centos-stream-release In UBI 8, redhat-release is a seperate package, so it's rpm needs to be removed otherwise it will end up with skip broken package. On removing redhat-release, /etc/os-release file also gets deleted. So we need to first remove redhat-release rpm if present and then install centos-stream-release package. It also removes dnf-core-plugins package installation as we donot need to download the centos-stream-release rpm. Closes-Bug: #1958202 Related-Bug: #1958240 Signed-off-by: Chandan Kumar (raukadah) Change-Id: Ia06c6770ea567656b5ce380826bdb120ca32a1a8 --- container-images/tcib/base/base.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/container-images/tcib/base/base.yaml b/container-images/tcib/base/base.yaml index 859828372..207309c57 100644 --- a/container-images/tcib/base/base.yaml +++ b/container-images/tcib/base/base.yaml @@ -48,11 +48,9 @@ tcib_actions: dnf -y install tzdata; fi - run: mkdir -p /openstack - run: >- - if [ '{{ tcib_distro }}' == 'centos' ];then dnf -y install dnf-plugins-core && - dnf download centos*release && - rpm -ivh --nodeps --replacepkgs --replacefiles *.rpm && - if [ -n "$(rpm -qa redhat-release)" ];then rpm -e --nodeps redhat-release; fi && - rm -rf *.rpm; fi + if [ '{{ tcib_distro }}' == 'centos' ];then + if [ -n "$(rpm -qa redhat-release)" ];then rpm -e --nodeps redhat-release; fi ; + dnf -y install centos-stream-release; fi - run: dnf update --excludepkgs redhat-release -y && dnf clean all && rm -rf /var/cache/dnf tcib_cmd: kolla_start tcib_entrypoint: dumb-init --single-child --