oracle / centos2ol

Script and documentation to switch CentOS/Rocky Linux to Oracle Linux
https://linux.oracle.com/switch/centos/
Universal Permissive License v1.0
344 stars 81 forks source link

Migration will fail if packages in ol8_baseos_latest are required #169

Open mizuki-maeshima opened 9 months ago

mizuki-maeshima commented 9 months ago

Hello,

I'm trying to migrate from CentOS8 to OL8.

Problem

It may fail if certain packages are not installed beforehand. In my environment, script execution fails due to the absence of "libsubid.so.3" (shadow-utils-subid package).

[root@centos8-mae /]# rpm -qa | grep shadow-utils-subid

[root@centos8-mae lib]# ls /lib64/libsubid* /lib64/libsubid_sss.so

[root@centos8-mae ~]# bash centos2ol.sh : : Error: Problem 1: cannot install the best update candidate for package podman-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64

“dnf update” in the script was failing. Running "dnf update" gives the same error.

[root@centos8-mae /]# dnf --assumeyes --disablerepo '*' --enablerepo ol8_appstream update Last metadata expiration check: 1:04:04 ago on Wed Nov 29 13:07:45 2023. Error: Problem 1: cannot install the best update candidate for package podman-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64

Possible Solution

The "shadow-utils-subid" package isn't available in "ol8_appstream", but it exists in "ol8_baseos_latest". However, the script only enables "ol8_appstream".

Modifying the "ol8appstream" part in the script to "ol8*" will resolve this issue. I would appreciate it if you would consider making changes.

8*)
    # There are a few dnf modules that are named after the distribution
    #  for each steam named 'rhel' or 'rhel8' perform a module reset and enable
        :
        :
        dnf --assumeyes --disablerepo "*" --enablerepo "ol8_appstream" update
        ** Modify ** dnf --assumeyes --disablerepo "*" --enablerepo "ol8_*" update
    fi