bsdtar and PaxHeader directories

From: Tim Kientzle <kientzle_at_freebsd.org>
Date: Sat, 21 Aug 2004 15:58:46 -0700
Kris Kennaway wrote:
>>Michiel Boland wrote:
>>
>>>Hi. Last week I did a rebuild from scratch by doing a make release and 
>>>using the resulting cdrom. I notice that sysinstall creates several 
>>>directories called 'PaxHeader'.
> 
> FYI, I'm seeing this in package builds too, when running
>      ssh client bsdtar c | gtar x

This will no doubt soon be an FAQ, so just
for the record:

  * These directories only appear if the archive
    contains "pax extended attributes" and the program
    reading the archive doesn't understand this extension.

  * In particular, FreeBSD's cpio and pax programs do
    not understand this extension, nor does gtar 1.13.

  * Programs that do understand this extension include:
    bsdtar, star, gtar 1.14, and any pax
    implementation that complies with POSIX.1-2001.

  * You can specify --format=ustar or -o when creating
    the archive to suppress all extended attributes.
    Conversely, you can specify --format=pax to force
    the use of extended attributes.

  * By default, extended attribute entries are only created
    if there are file properties that can't be stored in the
    regular ustar header.

    The list of triggers includes: file flags, long link names,
    long file names, non-ASCII characters, extended ACLs,
    and timestamps prior to 1970 or after 2037.

  * bsdtar is opportunistic.  If it's going to write extended
    attributes anyway, it will include some additional information,
    including:  inode number, device number, link count, ctime, atime,
    high-resolution mtime.  None of these by themselves will trigger
    an extended attribute entry, however.

  * If you're seeing "PaxHeader" directories when you don't
    expect them, check the corresponding files to see why
    the attributes are being triggered.  The PaxHeader files
    are themselves text files, so you can just read them to
    get some clues about what's going on.  File flags, long file
    names, and long link names are likely culprits.

Tim
Received on Sat Aug 21 2004 - 20:58:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:07 UTC