Skip to content

feat: repack - #29

Merged
lczyk merged 8 commits into
mainfrom
feat/repack
Jul 28, 2026
Merged

feat: repack#29
lczyk merged 8 commits into
mainfrom
feat/repack

Conversation

@lczyk

@lczyk lczyk commented Jul 28, 2026

Copy link
Copy Markdown
Owner

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

lczyk added 8 commits July 28, 2026 10:30
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.
@lczyk
lczyk merged commit efb61e4 into main Jul 28, 2026
6 checks passed
@lczyk
lczyk deleted the feat/repack branch July 28, 2026 10:23
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