Repository navigation
Conversation
…k build) xtool sdk build downloads darwin-tools-linux-llvm's toolset and the OpenAppleMacrosServer binary from GitHub releases. Builds without network (Nix and other sandboxed package builds, air-gapped machines) cannot do that. Two optional environment variables point at local copies instead: - XTOOL_TOOLSET_TARBALL: a toolset-<arch>.tar.gz, unpacked with tar - XTOOL_OAM_SERVER: an OpenAppleMacrosServer executable, copied (written as a new file, so a read-only source does not make the SDK copy read-only) Without them, nothing changes.
Owner
Author
|
Review copy. Opened upstream: xtool-org#319 |
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.
What
xtool sdk builddownloads two files from GitHub releases:darwin-tools-linux-llvm,toolset-<arch>.tar.gz)OpenAppleMacrosServer-<arch>This PR adds two optional environment variables that point at local copies:
XTOOL_TOOLSET_TARBALLXTOOL_OAM_SERVERWithout the variables,
xtool sdk buildbehaves as before.Why
Builds without network cannot download: Nix builds (the sandbox has no network), other sandboxed package builds, and air-gapped machines. With this change, a package can fetch both files by pinned hash and give them to xtool.
Details:
tarruns through/bin/sh(it findstaronPATH). The Nix build sandbox has no/usr/bin/env.0755. A copy of a read-only source (for example from/nix/store) would keep the read-only mode, and the next step would fail with "You don't have permission".Tested
On this branch (
6b1ad8f, based onmainatd802c71), on NixOS x86_64:swift build -c release --product xtoolwith Swift 6.4.0 (swift.org): builds.xtool sdk build Xcode_27.xipin a network namespace with no network at all (unshare --net), with both variables set: builds the full SDK (iPhoneOS, iPhoneSimulator and MacOSX 27.0).OpenAppleMacrosServerin the result is writable (0755), and the source was a read-only file in/nix/store.Network is unreachable, so nothing else downloads.The same change (on the joshuaswarren/xtool fork) is in daily use in nix-apple-dev: the SDK builds in the Nix sandbox, and apps built with it run on an iPhone 12 mini (iOS 27.0).