Extattr portability?

Tim Kientzle kientzle at freebsd.org
Wed Jan 21 22:10:42 PST 2009


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


More information about the freebsd-current mailing list