Re: Extattr portability?

From: Tim Kientzle <kientzle_at_freebsd.org>
Date: Wed, 21 Jan 2009 22:10:38 -0800
a134qaed_at_gmail.com wrote:
> On 1/10/09, Tim Kientzle <kientzle_at_freebsd.org> wrote:
>>Dylan Cochran wrote:
>>
>>Wonderful!  Care to help test?
> 
> Absolutely.

First draft of this is available on Googlecode
right now:  http://libarchive.googlecode.com/

The FreeBSD support only archives/restores attributes
in the user namespace right now.  They get stored
in the archive as PAX attributes with the name
LIBARCHIVE.xattr.user.<name> with the actual value
base-64 encoded for portability.  Non-ASCII characters
in the name are encoded using URL-style %XX hex encoding.
All attributes are always recorded when you create the
archive; the extended attributes are only restored with
the -p flag.

I haven't tested this yet, but bsdtar should now be
able to move user extended attributes between Linux and
FreeBSD portably.  I've started reading up on the MacOS
extended attribute support but doubt I'll have time to
try implementing the OS-specific parts of that.  If anyone
else wants to take a shot, it's a pretty well isolated piece
of code that shouldn't take long at all to implement.
The tedious part will be the testing.  Ditto for Solaris.

Tim
Received on Thu Jan 22 2009 - 05:10:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:40 UTC