Drop macOS sandbox Unix socket workaround - #982
Merged
Merged
Conversation
- `dotnet` and `dotnet@9` now patch MSBuild's `NamedPipeUtil` to honour `TMPDIR`, so its task host pipes land in the sandbox's own temporary directory, which brew already allows - verified with a local source build of `officecli-bundled` on brew `14c54f7c76` with the sandbox untouched: no `MSB4216`
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.
tests.ymlhad a macOS-only step that inserted an extra(allow network* network-outbound (subpath "/private/tmp"))rule intobrew's seatbelt profile before
brew test-bot --only-formulae.It worked around Homebrew/brew#23934: brew's sandbox only allows
Unix-domain sockets under each build's private
TMPDIR, while MSBuildhard-coded its task host pipes to
/tmp/MSBuild<pid>, so everydotnet publishwithPublishTrimmed=true(officecli-bundled,seqcli,marksman-bundled) died withMSB4216.homebrew-core has since patched MSBuild's
NamedPipeUtilin bothdotnet(10.0.401) anddotnet@9(9.0.121) to useTMPDIRwhen it isshort enough, and both have rebuilt bottles for
arm64_tahoeandarm64_golden_gate. The sandbox's ownTMPDIRis/private/tmp/s-XXXXXXXX, which is both short enough for that check andalready covered by brew's
allow_network path: tmpdir, type: :subpathrule, so the workaround is no longer needed.
Verified with a local source build of
officecli-bundledon brew14c54f7c76, whose sandbox still denies Unix sockets, with nomodification to
sandbox.rb: the build succeeded with noMSB4216, all.NET sockets stayed inside
/private/tmp/s-VhGQvFkq/, and trimming stillapplied (33.7 MB).
marksman-bundledwas not rebuilt locally, but itsdotnet@9carriesthe same patch in a bottle built after it.