centos2ol icon indicating copy to clipboard operation
centos2ol copied to clipboard

Migration from CentOS 7 creates wrong Oracle repos

Open johndoe4567 opened this issue 3 years ago • 1 comments

After running

wget https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
bash centos2ol.sh -V

and rebooting, repos in /etc/yum.repos.d/ are like so:

baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL7/latest/$basearch/

dnf makecache then fails with:

Failed to synchronize cache for repo 'ol7_developer_EPEL', ignoring this repo.
Failed to synchronize cache for repo 'ol7_optional_latest', ignoring this repo.
Failed to synchronize cache for repo 'ol7_UEKR6', ignoring this repo.
Failed to synchronize cache for repo 'ol7_latest', ignoring this repo.

Running the following:

sed -i 's/\$ociregion\.\$ocidomain/\.oracle\.com/g' /etc/yum.repos.d/*.repo

fixes the problem.

johndoe4567 avatar Mar 03 '22 10:03 johndoe4567

That sounds like the files /etc/yum/vars/ociregion and /etc/yum/vars/ociregion are missing? Those contain an empty line, and oracle.com, respectively, for me. That's odd. My OL7 and OL8 installs have this, but I don't know from where.

They don't appear to be from any package: rpm -qa --filesbypkg | rg ocidomain returns nothing. But with the files present, this works just fine for me.

But... I'm using yum, not dnf. Maybe that's the difference?

ChristianGfK avatar Jul 05 '22 15:07 ChristianGfK