Skip to main content

write_bom

Function write_bom 

Source
pub fn write_bom(root: &Path, uid: u32, gid: u32) -> Result<Vec<u8>>
Expand description

Build a BOM over the file tree rooted at root, recording uid:gid as the owner of every entry (pkgbuild’s convention is 0:0, root:wheel).

Files record their on-disk permission bits (plus S_IFREG), size, and CRC32; directories are derived from file paths and recorded as 40755. Output is deterministic: a fixed mtime is used and entries are sorted.

Unix-only: it reads mode bits off the filesystem, which is exactly what makes it a faithful oracle against mkbom and exactly what no other host can supply. build uses [bom_from_nodes] instead.