Rocky Linux pin repository files to specific version

Must be done before running an updated.

In the /etc/yum/vars directory, add file named releasever containing the requested version.

i.e.

echo 7.8.2023 > /etc/yum/vars/releasever

 

preinstall epel repo config

dnf install epel-release

Add repository config variables

echo [VERSION] > /etc/yum/vars/releasever echo [CONTENTDIR] > /etc/yum/vars/contentdir # i.e. # echo 9.1 > /etc/yum/vars/releasever # echo vault/rocky > /etc/yum/vars/contentdir

Script to pin Rocky repository urls to specific release version

  • run with privledges

 

  • Need to update the EPEL repository URL as well

    • comment out metalink property

       

    • set baseurl property

      • image-20240423-223809.png
        basurl should look something like this.

         

      • Can use this or another mirror property
        Index of /pub/archive/epel

References

  • Output variables