Repository navigation
Conversation
Collaborator
|
We do not support homebrew builds here. The official macos mosh PKG statically links protobuf for this reason. We also don't support "users built against the homebrew dependencies without using a homebrew packaged mosh". We also are not accepting LLM contributions at this time. |
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.
Problem and resulting behavior
A native macOS Mosh build can stop launching after a Homebrew upgrade removes a versioned Protobuf or Abseil dynamic library against which it was linked. Changing PATH or unlinking Homebrew's Mosh formula does not repair those missing runtime dependencies.
This PR adds an optional packaging helper that takes an already compiled Mosh build and creates a relocatable directory containing the client, server, launcher, and private copies of their Homebrew runtime libraries. The packaged launcher explicitly selects its sibling client, so another
mosh-clienton PATH cannot silently replace it.Implementation
brew --prefix, with an explicit--brew-prefixoverride. There are no hard-coded user directories, hostnames, network addresses, Homebrew versions, or CPU architecture selections.@rpathand@loader_pathdependencies. Rewrite bundled references to loader-relative paths and remove absolute Homebrew runtime search paths. Apple system libraries remain system dependencies.--version.The documentation is linked from the main README, the new files are included in source distributions, and the macOS CI job runs the packaging tests and packages the real build.
Validation
Local validation was performed on macOS arm64:
ocb-aes,encrypt-decrypt,base64,nonce-incr, andlocal.test.git diff --checkwere checked.Intel macOS has not been tested locally; prefix and path handling are discovered rather than architecture-specific. The full tmux-dependent terminal test suite was not run locally.
Scope and maintenance
This is an optional helper for native macOS/Homebrew builds, not a universal-architecture installer or a cross-platform packaging system. It does not replace the existing macOS installer script, notarize artifacts, modify shell or Homebrew configuration, or change Mosh's terminal protocol and clipboard implementation.
Private dependencies intentionally survive Homebrew upgrades. Users must rebuild their bundles to incorporate dependency security fixes; this tradeoff is documented. No generated binaries, machine configuration, or local diagnostic logs are included in this PR.