Skip to content

Bootstrap: environmental sanitisation, package install robustness - #26433

Merged
tzarc merged 9 commits into
qmk:masterfrom
tzarc:bootstrap-sanitise
Sep 2, 2026
Merged

Bootstrap: environmental sanitisation, package install robustness#26433
tzarc merged 9 commits into
qmk:masterfrom
tzarc:bootstrap-sanitise

Conversation

@tzarc

@tzarc tzarc commented Aug 31, 2026

Copy link
Copy Markdown
Member

Description

Bootstrap script:

  • Sanitise the inherited environment on startup: force LC_ALL=C, drop out of any active Python venv, wipe PYTHON* variables (keeping PYTHON_TARGET_VERSION), and clear conda/pip/uv overrides that would affect dependency resolution or builds. Proxy, TLS, and index/mirror variables survive, since corporate networks need them.
  • Pass --no-project to uv run when determining QMK_DISTRIB_DIR, so uv ignores any pyproject.toml in the invoking directory.
  • Homebrew has dropped Intel macOS to tier 3 and no longer builds bottles for it (see Intel macOS bottles missing Homebrew/homebrew-core#301207). brew install/brew upgrade now run per-formula and retry with --build-from-source when no bottle exists. Intel machines get a warning before the pre-install countdown that source builds can take a long time.

CI workflow:

  • Gentoo containers fall back through emaint sync -a || emerge --sync --quiet || emerge-webrsync -q, since rsync-based sync is unreliable from GitHub runners (no IPv6 routing, flaky mirrors) and webrsync has been solid.
  • The Linux prerequisite retry loop now &&-chains each distro's metadata sync and package install, so a failed sync no longer counts as a successful attempt, and the step fails outright after 10 failed attempts.
  • macOS runners retry brew update up to 10 times (with brew update-reset between attempts) before running the bootstrap script, and stop at the first success.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@tzarc
tzarc requested review from a team and a lite review from Copilot August 31, 2026 23:13
@github-actions github-actions Bot added the core label Aug 31, 2026

This comment was marked as outdated.

@github-actions github-actions Bot added the CI label Aug 31, 2026
@tzarc tzarc changed the title Bootstrap: perform more environmental sanitisation Bootstrap: environmental sanitisation, package install robustness Sep 1, 2026
@tzarc

tzarc commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

@tzarc
tzarc merged commit 3c73e92 into qmk:master Sep 2, 2026
31 checks passed
@tzarc
tzarc deleted the bootstrap-sanitise branch September 2, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants