Skip to content

feat: allow overriding mirrors via environment variables#287

Open
WoozyMasta wants to merge 2 commits into
canonical:mainfrom
WoozyMasta:feat/override-repo-url
Open

feat: allow overriding mirrors via environment variables#287
WoozyMasta wants to merge 2 commits into
canonical:mainfrom
WoozyMasta:feat/override-repo-url

Conversation

@WoozyMasta
Copy link
Copy Markdown

@WoozyMasta WoozyMasta commented Apr 17, 2026

  • Have you signed the CLA?

Summary

This PR adds environment variable overrides for non-Pro Ubuntu archive URLs.

By default, behavior is unchanged. If no env vars are set, Chisel still uses:

  • http://archive.ubuntu.com/ubuntu/
  • http://old-releases.ubuntu.com/ubuntu/
  • http://ports.ubuntu.com/ubuntu-ports/

Why

In some regions, access to default Ubuntu archive endpoints is unstable or slow.
Using nearby mirrors often improves reliability and speed (for example, selecting a mirror from http://mirrors.ubuntu.com/UA.txt).

Changes

  • Added runtime URL overrides in archiveURL(...):
    • CHISEL_UBUNTU_REPO_ARCHIVE_URL
    • CHISEL_UBUNTU_REPO_OLD_RELEASES_URL
    • CHISEL_UBUNTU_REPO_PORTS_URL
  • Added TestArchiveURLFromEnv.
  • Documented the new env vars in README.md.

Issues

Closes #265.
Potentially addresses #135.

@WoozyMasta WoozyMasta changed the title Feat/override repo url feat: override repo url Apr 17, 2026
@WoozyMasta WoozyMasta changed the title feat: override repo url feat: allow overriding Ubuntu archive mirrors via environment variables Apr 17, 2026
@WoozyMasta WoozyMasta changed the title feat: allow overriding Ubuntu archive mirrors via environment variables feat: allow overriding mirrors via environment variables Apr 17, 2026
@upils
Copy link
Copy Markdown
Collaborator

upils commented Apr 23, 2026

@WoozyMasta Thanks for your interest in the project and your proposition.

As mentioned in #265 (comment), we still have to have the conversation internally regarding the approach we want to adopt to make this configurable before implementing anything. We would like to make sure it fits in a consistent approach.

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

Successfully merging this pull request may close these issues.

Timeout ports.ubuntu.com

2 participants