← Back to issue list

Feature Request for custom software mirror

View original Github issue

Metadata

Project
craft-providers
Number
#942
Type
issue
State
open
Author
Kxuan
Labels
Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Requests a craft-providers env var (like legacy SNAPCRAFT_BUILD_ENVIRONMENT_PRIMARY_MIRROR) to point Ubuntu build instances at a custom APT mirror; unimplemented, 0 comments, no maintainer response, still untriaged.

Suggested action: keep open

Reason: Verified at HEAD that no mirror-override support exists: grep for 'mirror' in craft-providers only hits the prettier pre-commit mirror, and the only sources manipulation is craft_providers/util/sources.sh, which hardcodes old-releases.ubuntu.com for EOL bases. The request is a valid, clearly-motivated enhancement (builds blocked behind slow/unreachable archive.ubuntu.com), so it must stay open; however, with 0 comments, no assignee, and no maintainer reply after 163 days it still needs maintainer prioritization — the scope is ambiguous (Ubuntu-only vs CentOS/AlmaLinux bases, deb822 ubuntu.sources format, env var naming, interaction with _update_eol_sources and its CRAFT_PROVIDERS_DISABLE_EOL_SOURCES_CHECK escape hatch).

Evaluated by: mr-cal-bot

Impact: 38 Quick Win: 13 Complexity: 42 Confidence: 80 Actionability: 58

Issue body

### What needs to get done It would be nice to have a global environment variable in craft-providers (similar to the legacy SNAPCRAFT_BUILD_ENVIRONMENT_PRIMARY_MIRROR in Snapcraft [[source code](https://github.com/canonical/snapcraft/blob/c4a7740477c95ca6722975237170522cf4f369a6/snapcraft_legacy/internal/build_providers/_base_provider.py#L369)]). This variable should allow users to specify an APT mirror URL that will be automatically configured within the build instance. When set, the build environment should prioritize this mirror over the default archive.ubuntu.com and security.ubuntu.com entries in the sources.list. ### Why it needs to get done Currently, users in specific geographical regions or restricted network environments face significant hurdles: Network Reliability: In many scenarios, the default Ubuntu archives are either extremely slow or completely unreachable due to firewalls or routing issues. Build Efficiency: Being able to point to a local or internal enterprise mirror significantly reduces latency and increases build speeds.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 38
Quick Win: 13
Complexity: 42
Confidence: 80
Actionability: 58
keep open Requests a craft-providers env var (like legacy SNAPCRAFT_BUILD_ENVIRONMENT_PRIMARY_MIRROR) to point Ubuntu build instances at a custom APT mirror; unimplemented, 0 comments, no maintainer response, still untriaged.
stealth/space-bunny-alpha
Impact: 52
Quick Win: 18
Complexity: 47
Confidence: 92
Actionability: 66
needs triage Requested global APT mirror override for Ubuntu build instances remains open and untriaged, with no maintainer feedback; current source handling only covers EOL archives.
qwen3.6-35b-a3b-mtp-q6
Impact: 40
Quick Win: 20
Staleness: 70
Complexity: 50
Confidence: 60
Support Request: 0
needs triage Feature request to add a global environment variable for custom APT mirrors in craft-providers build instances. No maintainer response or implementation yet.
qwen/qwen3.6-35b-a3b
Staleness: 50
Complexity: 30
Confidence: 90
Support Request: 5
needs triage Feature request to add a global environment variable for custom APT mirrors in craft-providers build instances. Currently awaiting maintainer review with zero comments and no active development.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Feature request to add a global environment variable in craft-providers for custom APT mirrors in build instances. Aims to improve network reliability and build speed in restricted regions. Currently awaiting maintainer triage with no activity in 81 days.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-providers#772 (confidence 72%)

    Commit bef0f12 'feat: update sources for EOL bases (#772)' added _update_eol_sources plus craft_providers/util/sources.sh, the natural extension point for a primary-mirror override; its sibling CRAFT_PROVIDERS_DISABLE_EOL_SOURCES_CHECK (changelog 3.5.0) sets the precedent for opt-in env-var-driven source rewriting.

Related issues

No related issues found above the similarity threshold.