Fix seeded archives: seeds never made it into .xcarchive builds#24
Merged
Conversation
In archive builds BUILT_PRODUCTS_DIR holds only a symlink to the real app in InstallationBuildProductsLocation, and the user-script sandbox denies writes that resolve through it - so every seed cp failed with "Operation not permitted" and the script's exit 0 swallowed it, producing a 10 MB "seeded" archive. Regular builds were unaffected (there the two directories coincide), which is why the original verification passed. - Destination and declared outputs now use TARGET_BUILD_DIR, the real app location in both regular and archive builds - set -e after the opt-in gate so a failed copy fails the build instead of silently shipping without tables Verified: cubeone-seeded archive now contains all five .lzfse seeds (2.3 GB), codesign --verify passes on the archived app, and the regular cubeone scheme still logs the skip message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Bug
Archiving with the
cubeone-seededscheme produced a ~10 MB archive with no PDB seeds. The phase ran withINCLUDE_PDB_SEEDS=YES, but every copy failed:In archive builds,
BUILT_PRODUCTS_DIR/cubeone.appis only a symlink to the real app inInstallationBuildProductsLocation. Xcode's user-script sandbox allows writes to the literal declared output paths, so acpresolving through that symlink to a different real path is denied. The script then ended withexit 0, swallowing the failure — hence a "successful" seedless archive. Regular builds were unaffected because thereTARGET_BUILD_DIR == BUILT_PRODUCTS_DIR, which is why the original build-based verification passed.Fix
outputPathsnow use$(TARGET_BUILD_DIR)— the real app location in both regular and archive builds.set -eafter the opt-in gate: a failed copy now fails the build instead of silently shipping an app without tables.Verification
cubeone-seeded: all five.lzfseseeds present inProducts/Applications/cubeone.app/Contents/Resources(archive 2.3 GB), andcodesign --verify --deep --strictpasses on the archived app (seeds sealed into the signature).cubeonebuild still logs "Skipping PDB seeds (INCLUDE_PDB_SEEDS is not YES)".🤖 Generated with Claude Code