Summary
Formulas whose url points to a raw, uncompressed binary (using: :nounzip) cannot be installed. The downloaded file is saved as source.tar.gz and unconditionally run through tar/gzip extraction, producing a misleading store-corruption error:
==> Installing can1357/tap/omp...
==> Resolving dependencies (1 packages)...
• omp 18.8.6
==> Downloading and installing formulas...
Note: This package can't be installed with zerobrew.
Error: store corruption: failed to read archive entry: invalid gzip header
Try installing with Homebrew instead:
brew install can1357/tap/omp
Environment
- zerobrew 0.4.0, macOS arm64
zb doctor reports ✓ No issues found — the store is not actually corrupted
Reproduction
zb install can1357/tap/omp -v
omp 18.8.6 from can1357/tap declares:
on_macos do
on_arm do
url "https://github.com/can1357/oh-my-pi/releases/download/v#{version}/omp-darwin-arm64",
using: :nounzip
sha256 "31faa0ee8420a13a783f4ca56d98f974e4a9f9081d269057a099f7eb618d1133"
end
end
Evidence that the download itself is fine
/opt/zerobrew/tmp/build/omp/source.tar.gz is 203 MB and is a Mach-O 64-bit arm64 executable (magic bytes cf fa ed fe), not an archive
- Its sha256 (
31faa0ee…d1133) exactly matches the formula's declared checksum
- Every attempt fails identically after ~1m20s (the download time), i.e. it deterministically fails at extraction, after a successful download
Root cause
zb_io/src/build/source.rs — non-bottle formulas always download the URL to source.tar.gz and call extract_tarball; the formula's using: annotation is ignored (there is no nounzip handling anywhere in the codebase).
zb_io/src/extraction/extract.rs — detect_compression() only recognises gzip/xz/zstd/zip magic bytes; anything else falls into CompressionFormat::Unknown, whose handler is // Try gzip as fallback → GzDecoder::new(reader) on a non-gzip stream → invalid gzip header.
- The
store corruption: prefix makes a supported-format gap look like data corruption.
Expected behavior
Either:
- Support
using: :nounzip: skip archive extraction, place the downloaded file directly into the source dir / keg and mark it executable; or
- Fail clearly: detect the non-archive case and return an explicit "unsupported raw binary download; install with Homebrew" message instead of a store-corruption error.
Scope
Not specific to this tap: any formula that downloads a bare executable via using: :nounzip (increasingly common for tools shipping single-file release binaries) will hit the same failure. Related prior art: #250 (unsupported cask binary artifact shape).
Summary
Formulas whose
urlpoints to a raw, uncompressed binary (using: :nounzip) cannot be installed. The downloaded file is saved assource.tar.gzand unconditionally run through tar/gzip extraction, producing a misleading store-corruption error:Environment
zb doctorreports✓ No issues found— the store is not actually corruptedReproduction
omp 18.8.6fromcan1357/tapdeclares:Evidence that the download itself is fine
/opt/zerobrew/tmp/build/omp/source.tar.gzis 203 MB and is a Mach-O 64-bit arm64 executable (magic bytescf fa ed fe), not an archive31faa0ee…d1133) exactly matches the formula's declared checksumRoot cause
zb_io/src/build/source.rs— non-bottle formulas always download the URL tosource.tar.gzand callextract_tarball; the formula'susing:annotation is ignored (there is nonounziphandling anywhere in the codebase).zb_io/src/extraction/extract.rs—detect_compression()only recognises gzip/xz/zstd/zip magic bytes; anything else falls intoCompressionFormat::Unknown, whose handler is// Try gzip as fallback→GzDecoder::new(reader)on a non-gzip stream →invalid gzip header.store corruption:prefix makes a supported-format gap look like data corruption.Expected behavior
Either:
using: :nounzip: skip archive extraction, place the downloaded file directly into the source dir / keg and mark it executable; orScope
Not specific to this tap: any formula that downloads a bare executable via
using: :nounzip(increasingly common for tools shipping single-file release binaries) will hit the same failure. Related prior art: #250 (unsupported cask binary artifact shape).