Skip to content

Fix seeded archives: seeds never made it into .xcarchive builds#24

Merged
cypherair merged 1 commit into
mainfrom
m23-seeded-archive-fix
Jun 12, 2026
Merged

Fix seeded archives: seeds never made it into .xcarchive builds#24
cypherair merged 1 commit into
mainfrom
m23-seeded-archive-fix

Conversation

@cypherair

Copy link
Copy Markdown
Owner

Bug

Archiving with the cubeone-seeded scheme produced a ~10 MB archive with no PDB seeds. The phase ran with INCLUDE_PDB_SEEDS=YES, but every copy failed:

cp: .../BuildProductsPath/Release-Seeded/cubeone.app/Contents/Resources/optimal-corners.pdb.lzfse: Operation not permitted

In archive builds, BUILT_PRODUCTS_DIR/cubeone.app is only a symlink to the real app in InstallationBuildProductsLocation. Xcode's user-script sandbox allows writes to the literal declared output paths, so a cp resolving through that symlink to a different real path is denied. The script then ended with exit 0, swallowing the failure — hence a "successful" seedless archive. Regular builds were unaffected because there TARGET_BUILD_DIR == BUILT_PRODUCTS_DIR, which is why the original build-based verification passed.

Fix

  • Copy destination and the declared outputPaths now use $(TARGET_BUILD_DIR) — the real app location in both regular and archive builds.
  • set -e after the opt-in gate: a failed copy now fails the build instead of silently shipping an app without tables.

Verification

  • CLI archive with cubeone-seeded: all five .lzfse seeds present in Products/Applications/cubeone.app/Contents/Resources (archive 2.3 GB), and codesign --verify --deep --strict passes on the archived app (seeds sealed into the signature).
  • Regular cubeone build still logs "Skipping PDB seeds (INCLUDE_PDB_SEEDS is not YES)".

🤖 Generated with Claude Code

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>
@cypherair cypherair merged commit 63c23f9 into main Jun 12, 2026
@cypherair cypherair deleted the m23-seeded-archive-fix branch June 12, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant