How do repos actually work?

Apologies for the vague topic, but I have some issues with a self-hosted repo…

Let me explain… I have a packer script that creates a 9.2 or 9.3 template on VMware and I use these templates to deploy VMs. In my self-hosted repo, I have lots of releases, including 9.2, 9.3, 9.4 as well as a whole bunch of previous releases.

In /etc/yum.repos.d I have edited the repos to include my self-hosted repo so that it looks like:

baseurl=https://my.repo.local/repos/almalinux/$releasever/BaseOs/$basearch/os

… in line with what’s already there.

However, when I do a yum update on 9.2 or 9.3, it just does not find the 9.4 release.
If I change the URL to:

baseurl=https://my.repo.local/repos/almalinux/9.4/BaseOs/$basearch/os

… yum update finds the 9.4 release and offers to download.

yum-debug-dump correctly identifies releasever as 9, so I am not sure why the first URL doesn’t work?

I’m beginning to think I might have something missing from my repo, but I’m not sure what.

How does the OS go to the repo and “find” the latest (9.4) version?

Thanks for any help you can suggest.

The value of $releasever is 9. Official mirrors do have a symlink 9 that currently points to 9.4. Does yours?


The default is to use mirrorlist. The server at the URL does return mirror URLs that now contain “9.4” when the request has “9” (in $releasever).
If you request with “9.4”, the server gives same URLs. (And a “9.3” in request returns URL to the vault.)

jlehtone, that makes sense, no, I don’t have a symlink. Do you think that’s all I need?
I need to use my own repo, as I have no Internet access.

Yes. Make a link on the repo server:

ln -s 9.4 9

and you should see a difference.