Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to fill in variables in mirrorlist #581

Open
andreasdijkman opened this issue Jul 12, 2022 · 6 comments
Open

Option to fill in variables in mirrorlist #581

andreasdijkman opened this issue Jul 12, 2022 · 6 comments

Comments

@andreasdijkman
Copy link

Is there an option to fill in the variables that the mirrorlist returns? We have Spacewalk running and the mirrorlist returns a list of URL's that have the variable $basearch in them. Spacewalk can't resolve or change that variable.

It would be nice to have the option to generate that URL without those variables so it returns static URL's.

Now

The URL https://mirrors.almalinux.org/mirrorlist/8/baseos returns the following:

http://mirror.nl.altushost.com/almalinux/8/BaseOS/$basearch/os/
http://mirror.nforce.com/pub/linux/almalinux/8/BaseOS/$basearch/os/
http://mirror.previder.nl/almalinux/8/BaseOS/$basearch/os/
http://mirrors.evoluso.com/almalinux/8/BaseOS/$basearch/os/
http://mirror.wd6.net/almalinux/8/BaseOS/$basearch/os/
http://almalinux.mirror.wearetriple.com/8/BaseOS/$basearch/os/
http://mirror.mijn.host/almalinux/8/BaseOS/$basearch/os/
http://mirrors.mvps.net/almalinux/8/BaseOS/$basearch/os/
http://almalinux.mirror.liteserver.nl/8/BaseOS/$basearch/os/
http://mirror.almalinux.ams01.readydedis.com/almalinux/8/BaseOS/$basearch/os/

Suggestion

Adding a parameter to the URL will fill in those variables, simething like <url>?basearch=x86_64
The following URL would return the below URL's: https://mirrors.almalinux.org/mirrorlist/8/baseos?basearch=x86_64

http://mirror.nl.altushost.com/almalinux/8/BaseOS/x86_64/os/
http://mirror.nforce.com/pub/linux/almalinux/8/BaseOS/x86_64/os/
http://mirror.previder.nl/almalinux/8/BaseOS/x86_64/os/
http://mirrors.evoluso.com/almalinux/8/BaseOS/x86_64/os/
http://mirror.wd6.net/almalinux/8/BaseOS/x86_64/os/
http://almalinux.mirror.wearetriple.com/8/BaseOS/x86_64/os/
http://mirror.mijn.host/almalinux/8/BaseOS/x86_64/os/
http://mirrors.mvps.net/almalinux/8/BaseOS/x86_64/os/
http://almalinux.mirror.liteserver.nl/8/BaseOS/x86_64/os/
http://mirror.almalinux.ams01.readydedis.com/almalinux/8/BaseOS/x86_64/os/
@jonathanspw
Copy link
Member

Are you trying to use spacewalk with our mirrorlist instead of locally-hosted mirrors with direct URLs?

@andreasdijkman
Copy link
Author

The Spacewalk-server will be the locally hosted mirror for AlmaLinux. Clients will connect to Spacewalk, which in turn fetches the content from the mirrorlist.

@jonathanspw
Copy link
Member

So spacewalk is a proxy/cache of sorts?

I've not used spacewalk before so I'm trying to understand what the actual problem is here that you're trying to overcome.

If spacewalk is a mirror anyway why not just rsync it like any other mirror?

@andreasdijkman
Copy link
Author

Spacewalk is a local repository management tool. It is deprecated now but it is/was the upstream version of Red Hat Satellite 5 but still works OK. Our local servers don't download the RPM's from upstream but from the Spacewalk-server. Spacewalk is pointed to upstream servers with a yum-config but (unfortunately) without all the $basearch and other variables, because the server is OS and arch independent. It mirrors the upstream repositories for internal use. We can have multiple versions and multiple archs in Spacewalk so we need to declare the sources by OS-version and by arch.

@jonathanspw
Copy link
Member

So spacewalk only caches what's needed, ie what's requested by clients, basically?

@andreasdijkman
Copy link
Author

Spacewalk downloads the entire repository or only the latest packages of each repository you tell it to sync. It serves as an offline and controllable repository server for clients on internal networks, that can't connect to the internet by firewall/policy/CSO/whatever reason. But it needs to specifically download each repository that is needed by clients, it's not a caching proxy server of some sorts. It's an offline copy of upstream repositories so client's don't need to connect to internet-based repositories to use or download packages. (Saves a lot of bandwidth too...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants