Making rsync compile under Mac OS X 10.3.9 with extended attributes

Matt McCutchen matt at mattmccutchen.net
Mon Jan 28 04:44:36 GMT 2008


On Sun, 2008-01-27 at 15:38 +0100, Vitorio Machado wrote:
> So I've started trying to put some code on sysxattrs.c. I've created  
> another case as suggested by Matt:
> 
> #elif HAVE_PRE_TIGER_OSX_ATTRS

I would suggest creating a subcase inside HAVE_OSX_XATTRS instead of a
completely separate case because both 10.3 and 10.4+ need the creation
time exposure code that is currently in osx-create-time.diff .

> Well, should I put in this list all the attributes or only ressource  
> fork related?
> I also see attributes like creation, modification, access date that  
> can be retrieved by a stat call.
> Do rsync do this stat call for other attributes or do I have to copy  
> this data to?
> In other words, which extended attributes are important to preserve?
> 
> My preoccupation is with doing 2 times the same job, but also with  
> compatibility with newer versions. I would like to patch it the best  
> way possible (if there is no significant coding difference).

For now, I suggest that you focus on the creation time, the resource
fork, and the finder info; those seem to be the major things people care
about that rsync doesn't already preserve other ways.  For now, let's do
it the dumb way and use a separate getattrlist call for each.  In the
future, for improved performance, we could look into using a single
getattrlist per file to get both the stat data and all the Mac-specific
stuff at once, or even getdirentriesattr to get names and attributes for
everything in a directory at once.

Matt



More information about the rsync mailing list