A problem, though, is that the compatibility level is not considered, and in our writer we don't check the compatibility level before writing the extended header. This means we can set compatibility level to V7 but still get PAX extended headers. There is as well a discrepancy how we handle this for GNU compatibility level -- there we synthesize the GNU LongLink in the writer instead.
The
Tar.Header.make
function checks the size required for the file size, uid and gid and creates an extended header if needed. This could as well check the file name size and other fields. https://github.com/mirage/ocaml-tar/blob/ef66a98a5630c23a70a1ec2a4cb07c9b50182fa6/lib/tar.ml#L466-L489A problem, though, is that the compatibility level is not considered, and in our writer we don't check the compatibility level before writing the extended header. This means we can set compatibility level to
V7
but still get PAX extended headers. There is as well a discrepancy how we handle this forGNU
compatibility level -- there we synthesize the GNU LongLink in the writer instead.