Skip to content

Fix 2379 - Mirror and region definitions#3223

Merged
svartkanin merged 3 commits intoarchlinux:masterfrom
svartkanin:fix-2379-modify-mirrorlist-region
Mar 5, 2025
Merged

Fix 2379 - Mirror and region definitions#3223
svartkanin merged 3 commits intoarchlinux:masterfrom
svartkanin:fix-2379-modify-mirrorlist-region

Conversation

@svartkanin
Copy link
Copy Markdown
Collaborator

@svartkanin svartkanin commented Mar 5, 2025

This fixes #2379
To fix the reported problem and addressing the comment from @Torxed #2379 (comment) the mirror and region configuration has been reworked.
The major changes

  • There are new configuration options for mirror servers and repositories and the menu entries have been renamed to make it clearer
    • Select regions -> Select the mirror regions (Same as currently)
    • Add custom servers -> NEW allows to define custom mirror servers
    • Add custom repositories -> Has been renamed to avoid confusion
  • The Additional repositories menu entry has been moved from the global menu into the Mirrors and repositories submenu to keep them all together and also renamed to Optional repositories
  • The mirror_config entry has been adjusted in the user_configuration.json to reflect the configuration changes but it is backwards compatible so that existing configurations will not break
  "mirror_config": {
    "custom_servers": [
        {
          "url": "https://mymirror.com/$repo/os/$arch"
        }
    ],
    "mirror_regions": {
      "Australia": [
        "http://archlinux.mirror.digitalpacific.com.au/$repo/os/$arch"
      ]
    },
    "optional_repositories": [
      "testing"
    ],
    "custom_repositories": [
      {
        "name": "myrepo",
        "url": "https://myrepo.com/$repo/os/$arch",
        "sign_check": "Required",
        "sign_option": "TrustAll"
      }
    ]
  },

The custom_servers and mirror_regions configurations will only modify the /etc/pacman.d/mirrorlist configuration file, whereas the optional_repositories and custom_repositories will modify the /etc/pacman.conf accordingly.

@svartkanin svartkanin requested a review from Torxed as a code owner March 5, 2025 10:49
@Torxed
Copy link
Copy Markdown
Member

Torxed commented Mar 5, 2025

Looks good, and once we have libalpm implemented we can (in the future) make sure that archinstall works against a local instance of pacman to not conflict/modify the distro settings.

Since archinstall is intended to be used in a live ISO, it's not a huge issue. But it will be cleaner in the future to make sure we use our own instance/config for pacman.

But this is a welcome PR!

@svartkanin
Copy link
Copy Markdown
Collaborator Author

Yes that'd be great, during testing my config obviously got modified all the time which wasn't the best hehe

@svartkanin svartkanin merged commit 697ccd1 into archlinux:master Mar 5, 2025
@neitsab
Copy link
Copy Markdown

neitsab commented Mar 5, 2025

Thanks, this is a great addition! 🙏🏻

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.

bug: changing mirros within prompt/json of archinstall should not change live-cd /etc/pacman.* files

3 participants