Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.16 KB

configurable-apt-mirror.org

File metadata and controls

37 lines (22 loc) · 1.16 KB

Configurable APT Mirrors

Goal

Enable users to override default mirrors used by Snapcraft-created build environments, allowing them to choose more performant / localized mirrors.

Scope

Configuration and behavior of APT mirror configuration.

Background

Default primary/main mirrors configured by snapcraft:

Default security mirrors configured by snapcraft:

Currently Snapcraft supports configuring this on creation with

SNAPCRAFT_BUILD_ENVIRONMENT_PRIMARY_MIRROR=<url>

  • This environment variable is undocumented and has no known usage.

Implementation

Enable users to configure mirror URL with fully supported arguments:

  • Modify Snapcraft to support the command-line option --apt-mirror <url> with corresponding environment variable SNAPCRAFT_APT_MIRROR=<url>.
  • Replace SNAPCRAFT_BUILD_ENVIRONMENT_PRIMARY_MIRROR variable with introduced SNAPCRAFT_APT_MIRROR.