feat: repack - #29
Merged
Merged
Conversation
macOS tar stamps an AppleDouble ._* sidecar next to every member (com.apple.provenance is set on effectively all files), and they unpack as real files on the remote. The exclude list cannot suppress them -- tar synthesises them in the copyfile path, below its own glob filter -- so the only lever inside a spread.yaml is repack, which extracts and re-tars with COPYFILE_DISABLE=1. Non-Darwin hosts get an identity pass-through, but declaring repack at all switches spread's local pack from tar cz to tar c plus its own gzip writer, so the linux path changes too.
Keeps the why-not-exclude note so the repack block does not get simplified away later.
the detail about AppleDouble sidecars and the COPYFILE_DISABLE workaround is implementation-specific to spread's internal yaml hooks. it's not actionable for users and belongs in spread's own docs, not the README.
move the macOS tar repack logic into a standalone script and reference it from templates via `source scripts/spread_repack_bread.sh`. this deduplicates the logic across all bread variants, simplifies template maintenance, and adds better inline documentation for the tar glob workaround.
The comments were overly detailed about internal mechanics (fd handling, glob workarounds) that don't belong in this script's header. Trimmed to just the essential why: macOS tar creates sidecar files that need removing.
explain what happens, not the implementation details of how to work around it.
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.
spread packs the project with the host tar, and macOS tar stamps an AppleDouble ._* sidecar next to every member ("com.apple.provenance"). those land as real files on the remote and break anything e.g. scanning for *.yaml. until now the README just told you to export COPYFILE_DISABLE=1 and hope you remembered.
this PR repacks files on darwin to elliminate these files