opencontainers / image-spec

OCI Image Format
https://www.opencontainers.org/
Apache License 2.0
3.46k stars 636 forks source link

Clarify expected PAX headers for xattrs (LIBARCHIVE.xattr. vs. SCHILY.xattr.) #725

Open wking opened 7 years ago

wking commented 7 years ago

The layer spec requires layer to, “where supported”, include xattrs. But there seem to be two extended header prefixes in use for xattrs: LIBARCHIVE.xattr. and SCHILY.xattr. (libarchive/libarchive#691). GNU tar prefers SCHILY.xattr, and Go reads SCHILY.xattr.* into Header.Xattrs (although that will be deprecated in Go 1.10, golang/go#14472). It's probably worth clarifying in the spec which prefix SHOULD be used in OCI layers, and whether unpackers MUST support one or both prefixes when they support xattrs.

wking commented 7 years ago

@jstarks mentioned these prefixes in moby/moby#20125, but he was looking for a place to store Windows metadata. This issue is just about portably storing the Linux xattr (and other OSes that use those same prefixes, if any).