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

Custom Arch mirror list #16

Open
dumbasPL opened this issue Jan 1, 2025 · 2 comments
Open

Custom Arch mirror list #16

dumbasPL opened this issue Jan 1, 2025 · 2 comments

Comments

@dumbasPL
Copy link
Contributor

dumbasPL commented Jan 1, 2025

It would be nice to have the ability to override the mirror list in the runner (or maybe even add custom ones outside of serene?).

This would allow using a local reverse proxy with a cache. Many builds use the same dependencies, so installing/updating them over and over again from the internet can be quite slow and puts unnecessary strain on the mirrors.

Another good option would be to allow containers to use a common /var/cache/pacman/pkg (but this might have issues with concurrency, not sure if pacman has any lock files for the cache)

https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Network_shared_pacman_cache

@VirtCode
Copy link
Owner

VirtCode commented Jan 1, 2025

I was also thinking of this for some time, mainly for adding extra custom repositories (for example for people wanting to use this to "extend" the chaotic aur). Most of the infra for extra repos is already present anyways (currently used for OWN_REPOSITORY), so this shouldn't be too difficult.

But yeah, adding support for custom mirror lists is also very a good idea, as I can confirm that the vast majority of bandwidth used by my server is caused by containers downloading dependencies and updating their packages. Additionally, using the default mirrorlist isn't desirable anyways because one might want to optimize it based on the server location.

Sharing the pacman package cache would be a really cool solution too. From what I gather from the wiki (mainly the Read-Write Section) it might work, but we'll have to do some testing.

Thanks for the suggestion, will try to experiment a bit with this after the dependency stuff is merged.

@dumbasPL
Copy link
Contributor Author

dumbasPL commented Jan 1, 2025

Additionally, using the default mirrorlist isn't desirable anyways because one might want to optimize it based on the server location.

The default mirrors in the current archlinux:base-devel base image are already optimized by location using anycast or geo DNS. But that doesn't help much when your connection to anything sucks.

Another cool option would be global prepare commands that run before the per-package ones. This would allow for all sorts of customizations. proxy servers, compiler flags, changing configuration files, you name it. If they existed this issue wouldn't have been made.

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