-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Feature request: archive/tar should support reading and writing arbitrary pax vendor extensions. This could be done either with additions to tar.Header, or with new functions on tar.Reader and tar.Writer. This would allow go code to work with metadata that archive/tar does not yet support.
Here's the motivation: Docker (written in go) uses tar as the archive format for container images in Linux. We'd like to make sure this works for Windows, too, but doing so requires extending the tar format to include some non-POSIX Windows metadata (security descriptor, creation time, etc.).
The natural way to extend the tar format is to encode this additional metadata in pax vendor extensions, e.g. "MSWINDOWS.sd" for the security descriptor. Currently, however, archive/tar does not expose pax vendor extensions other than those that start with SCHILY.xattr (used for POSIX extended attributes), which are exposed in Header.Xattrs. It's probably not reasonable to ask archive/tar to support these specific "MSWINDOWS" extensions that are neither formally defined nor used anywhere today, but archive/tar could expose the ability to read and write arbitrary vendor extensions.
This seems like it would be useful outside of this use case as well, e.g. to support POSIX ACLs (SCHILY.acl.*).