Skip to content

Build AUR packages against the system toolchain, not mise's - #21600

Open
yaitseric wants to merge 3 commits into
omacom:quattrofrom
yaitseric:aur-builds-without-mise
Open

yaitseric wants to merge 3 commits into
omacom:quattrofrom
yaitseric:aur-builds-without-mise

Conversation

@yaitseric

@yaitseric yaitseric commented Dec 4, 2026 •

Copy link
Copy Markdown

What changes

Installing a runtime from Install > Development pins it with mise use --global, so mise's python comes before /usr/bin in every shell. omarchy-update-aur-pkgs, omarchy-pkg-aur-add and omarchy-pkg-aur-install hand that PATH to yay. A Python PKGBUILD then runs mise's interpreter, which has none of the system's modules, and fails with No module named build in build() or No module named installer in package(). Since #17000 removed the PATH reset from omarchy-update, a full omarchy update hits this as well as menu installs. It comes back every time mise moves to a new Python version.

This PR adds omarchy-cmd-system-toolchain <command...> (hidden), which removes mise from PATH (everything under mise's data dir and the default ~/.local/share/mise that login shells add, plus MISE_SHIMS_DIR), unsets GOROOT and GOBIN as the updater already did, unsets JAVA_HOME when it points into mise, and then execs the command. All three yay calls go through it. It replaces the Go-only unset GOROOT GOBIN in omarchy-update-aur-pkgs (#16387) with one fix that also covers Python and Java, and it applies to aur-add and aur-install, which that fix didn't reach.

This is not instead of #11435; the two work together. #11435 stops Omarchy from pinning mise's Python globally. This PR keeps AUR builds working for anyone who pins it on purpose, or in a project .mise.toml in the directory yay runs from. That's the scoping @csfh asked for on #11435. Users' mise config is left alone.

Fixes #3528

Verification

  • Reproduced on 4.0.0.alpha with python = "latest" (3.15) in ~/.config/mise/config.toml and system Python 3.14. A full omarchy update failed rebuilding python-eduvpn_common 5.0.4-1: .../mise/installs/python/latest/bin/python3: No module named build.
  • In the downloaded PKGBUILD (yay -G python-eduvpn_common), I ran makepkg -f from the same shell, with XDG_CONFIG_HOME pointed at an empty dir so no user makepkg.conf could mask the result. Without the helper it exits 4 with the same error. With bin/omarchy-cmd-system-toolchain makepkg -f it exits 0 and builds the package.
  • New test/shell.d/cmd-system-toolchain-test.sh: PATH loses every mise entry (including a moved MISE_SHIMS_DIR and the default shims dir after MISE_DATA_DIR moves) and keeps the rest in order; GOROOT/GOBIN are unset wherever they point; a JAVA_HOME outside mise is kept. It fails on the base branch, where the command doesn't exist.
  • update-hook-security-test.sh copies the real omarchy-update-aur-pkgs into its sandbox, so it now copies the helper too.
  • Passed: ./test/cli, and the cmd-system-toolchain, update-hook-security, command-operand-boundaries, update-sequence, update-lock, update-disk-space and update-boot-verify shell tests.
  • Not checked: a Go or Java AUR package built through the helper. GOROOT/GOBIN are unset unconditionally, exactly as omarchy-update-aur-pkgs did before.
  • Follow-up to the omarchybot review: GOROOT/GOBIN are cleared whatever they point to again, and the default shims dir is dropped even when MISE_DATA_DIR moves. The test covers both and fails on the previous helper. Rebased on current quattro; the eduvpn build above passes again with the updated helper.

Screenshots

No visible change: only the environment AUR builds run in.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

AUR installs and updates now run through omarchy-cmd-system-toolchain, which removes mise paths before starting yay.

  • AUR package builds now use system tools instead of mise runtimes.

Reviews (3) · Last reviewed commit: "Keep clearing GOROOT and GOBIN, and drop..." · Reviewed by Greptile

Comment thread bin/omarchy-cmd-system-toolchain Resolved
@omarchybot omarchybot added the bug Something isn't working label Dec 4, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — both GitHub workflows need maintainer approval, and the fix still needs worker verification.

This covers user-pinned Mise Python in AUR builds, which #11435 leaves exposed. The wrapper can pass a foreign GOROOT to Arch’s Go during the quattro upgrade. It can also leave old shims ahead of system tools when MISE_DATA_DIR moves, because Omarchy’s login setup still adds the default shim directory.

GPT-6 High in Codex, Opus 5.5 High and muse-wonder via pi, thinking high reviewed the build paths against quattro. Worker security preflight blocked the reproduction and test suite.

yaitseric and others added 3 commits December 5, 2026 00:03
A runtime installed from Install > Development is pinned with
`mise use --global`, which puts mise's python ahead of /usr/bin. yay hands
that PATH to makepkg, so Python PKGBUILDs fail with "No module named build"
or "No module named installer". Run every yay build through a new
omarchy-cmd-system-toolchain, which drops mise from PATH and unsets the
GOROOT, GOBIN and JAVA_HOME it points into its installs. This replaces the
Go-only `unset GOROOT GOBIN` in omarchy-update-aur-pkgs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The session puts MISE_SHIMS_DIR ahead of /usr/bin wherever it points, so a
shims dir moved out of the data dir still put mise's python first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GOROOT and GOBIN were cleared only when they pointed into mise, but the
updater cleared them unconditionally before: any GOROOT steers Arch's go to
another toolchain. Login shells also add ~/.local/share/mise/shims whatever
MISE_DATA_DIR says, so drop that dir and anything under it as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yaitseric
yaitseric force-pushed the aur-builds-without-mise branch from 11a25dc to 5bf3129 Compare December 4, 2026 23:08
@yaitseric

Copy link
Copy Markdown
Author

Both points are addressed in 5bf3129: GOROOT/GOBIN are unset unconditionally again, as before, and the default ~/.local/share/mise (including its shims) is dropped from PATH even when MISE_DATA_DIR moves. cmd-system-toolchain-test.sh covers both, and the moved-data-dir case fails on the previous helper. The eduvpn build from the description, for example, still passes with the updated helper.

@omarchybot omarchybot added enhancement New feature or request and removed bug Something isn't working labels Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mise enviroment interfering with some YAY Packages

2 participants