chore: Accumulated ports to next - #25187
Open
AztecBot wants to merge 3 commits into
Open
Conversation
…1656) (#25148) Fix A-1656
Collaborator
Author
|
🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass. |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 12, 2026
…roposals (#25207) Fix A-1703
AztecBot
enabled auto-merge
August 14, 2026 18:16
Collaborator
Author
|
🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass. |
## Problem
foundryup changed where it puts binaries. `foundryup -i <version>` now
unpacks the real executables into
`$FOUNDRY_DIR/versions/foundry-rs/foundry/v<version>/` and leaves
`$FOUNDRY_DIR/bin/{forge,cast,anvil,chisel}` as absolute symlinks
pointing at them. Nothing in this repo changed to trigger it: the
installer is fetched unpinned from `foundry.paradigm.xyz` at runtime, so
every toolchain install picked the new layout up at once.
Our install scripts relocated those `bin/` entries with `mv` and then
deleted the tree they came from — `rm -rf` on the mktemp directory in
the CLI installer, on `$HOME/.foundry` in the container setup script.
`mv` moves the symlink itself rather than its target, and the link
stores an absolute path, so deleting the source left four dangling links
behind. Every existence check that follows dereferences, so they all saw
nothing: the CLI installer aborted with `Error: expected bundled binary
'forge' missing from ~/.aztec/versions/<version>/internal-bin`, which is
what broke `aztec-up` for users and failed the release acceptance job on
both Linux and macOS.
## Fix
Copy instead of move. Copying resolves the link and writes the real
executable at the destination, so the result no longer depends on the
source tree outliving it — the property the old code silently relied on.
`-L` states the dereference explicitly (it is already the default for a
plain file copy, but flips to preserving links under `-r`/`-a`), and
`-p` keeps the source's mode, since a freshly created `cp` destination
otherwise takes its permissions from the caller's umask and can land
non-executable for other users.
The CLI installer also unlinks each destination before copying, because
`cp` refuses to write through a path that is currently executing or is
itself a dangling symlink — the two states a re-install can legitimately
encounter, and both of which a rename handled for free.
The same move-then-delete pattern existed in four places: the `aztec-up`
CLI installer, the dev container setup script, the CI build image, and
the spartan dependency installer. All four are fixed together since they
consume the same foundryup output. The spartan one copies without `-p`,
as it is the only site crossing a `sudo` boundary and preserving
ownership there would leave a user-writable binary in `/usr/local/bin`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport staging PR. Body will be updated with commit list.