]> git.ipfire.org Git - thirdparty/tar.git/commit
POSIX extended format headers do not include PID by default
authorZachary Vance <za3k@za3k.com>
Mon, 11 Mar 2019 02:12:19 +0000 (19:12 -0700)
committerSergey Poznyakoff <gray@gnu.org>
Thu, 28 Mar 2019 11:37:07 +0000 (13:37 +0200)
commitef0f882382f6faac51aa343193f8d740dff91512
tree033ce1f884495740c6050a4d07d9b4125253865f
parent66162927ebdfe9dd4ef570a132663fd76217952f
POSIX extended format headers do not include PID by default

The intent is to make binary-equivalent PAX archives easy to create.  If
POSIXLY_CORRECT is set, the POSIX standard default is used, which embeds
the pid.

* src/common.h (posixly_correct): New global.
* src/tar.c (decode_options): Detect the POSIXLY_CORRECT environment
variable.
* src/buffer.c (add_chunk_header): Change filenames of multipart files to
omit the pid.
* src/xheader.c (HEADER_TEMPLATE): New macro.
(xheader_xhdr_name, xheader_ghdr_name): Use HEADER_TEMPLATE to select
the template for the POSIX extended header name.
* doc/tar.texi: Document the change.

Signed-off-by: Zachary Vance <za3k@za3k.com>
doc/tar.texi
src/buffer.c
src/common.h
src/tar.c
src/xheader.c