44# Prepare env vars
55ENGINE=${ENGINE:= " podman" }
66OS=${OS:= " centos" }
7- OS_VERSION=${OS_VERSION:= " 8 " }
7+ OS_VERSION=${OS_VERSION:= " 7 " }
88PYTHON_VERSION=${PYTHON_VERSION:= " 3" }
99ACTION=${ACTION:= " test" }
1010IMAGE=" $OS :$OS_VERSION "
@@ -33,19 +33,22 @@ function setup_charon() {
3333 PKG_EXTRA=(dnf-plugins-core git " $PYTHON " -pylint)
3434 BUILDDEP=(dnf builddep)
3535 if [[ $OS == " centos" ]]; then
36+ PKG=" yum"
37+ PKG_EXTRA=(yum-utils git " $PYTHON " -pylint)
38+ BUILDDEP=(yum-builddep)
3639 ENABLE_REPO=
3740 else
3841 ENABLE_REPO=" --enablerepo=updates-testing"
3942 fi
43+
4044
4145 PIP_INST=(" $PIP " install --index-url " ${PYPI_INDEX:- https:// pypi.org/ simple} " )
4246
4347 if [[ $OS == " centos" ]]; then
4448 # Don't let builddep enable *-source repos since they give 404 errors
4549 $RUN rm -f /etc/yum.repos.d/CentOS-Sources.repo
46- # Resolve "Failed to download metadata for repo: Cannot prepare internal mirrorlist: No URLs in mirrorlist" problem
47- $RUN sed -i ' s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-AppStream.repo
48- $RUN sed -i ' s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
50+ # $RUN rm -f /etc/yum.repos.d/CentOS-Linux-AppStream.repo
51+ # $RUN rm -f /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
4952 # This has to run *before* we try installing anything from EPEL
5053 $RUN $PKG $ENABLE_REPO install -y epel-release
5154 fi
@@ -69,7 +72,7 @@ function setup_charon() {
6972 fi
7073
7174 # install with RPM_PY_SYS=true to avoid error caused by installing on system python
72- $RUN sh -c " RPM_PY_SYS=true ${PIP_INST[*]} rpm-py-installer"
75+ # $RUN sh -c "RPM_PY_SYS=true ${PIP_INST[*]} rpm-py-installer"
7376 # Setuptools install charon from source
7477 $RUN $PYTHON setup.py install
7578
0 commit comments