From owner-freebsd-current@FreeBSD.ORG Thu Jan 22 06:10:41 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0DD9106566B for ; Thu, 22 Jan 2009 06:10:41 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id C62A08FC14 for ; Thu, 22 Jan 2009 06:10:41 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (h-66-166-149-52.snvacaid.covad.net [66.166.149.52]) by kientzle.com (8.12.9/8.12.9) with ESMTP id n0M6AeC1083441; Wed, 21 Jan 2009 22:10:41 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <49780DDE.2090800@freebsd.org> Date: Wed, 21 Jan 2009 22:10:38 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: a134qaed@gmail.com References: <4965927D.1060507@freebsd.org> <4968EF7E.5040002@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Extattr portability? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 06:10:42 -0000 a134qaed@gmail.com wrote: > On 1/10/09, Tim Kientzle 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. 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