How to write a "from Unix" gzip file in Rust?

⚓ Rust    📅 2026-01-22    👤 surdeus    👁️ 1      

surdeus

Hi,

Background: I am prototyping a portable tool to quickly generate installers, for a variety of operating systems, including macOS. However, the .pkg file that I am generating, is currently triggering installer validation errors in /var/log/install.log. I am trying my best to follow the structure of other installers, so that mine will eventually pass.

One of the interesting differences between my broken .PKG package file, versus other macOS packages in the wild, is how the file CLI utility remarks from Unix for their gzip'ed Payload [cpio] entries, whereas my Payload omits those two words.

Is it possible to coerce flate2 into writing a gzip archive like that? I get the impression that some formal tar wrapper is necessary. Or perhaps some other archive library emits from Unix gzip files by default.

2 posts - 2 participants

Read full topic

🏷️ Rust_feed