Hi Jason, Here's rsync10.3xattr_supportv0.6.diff. You can find fileflags.diff and crtimes.diff (that are not from me, but I strongly recommend you to install) here: http://samba.anu.edu.au/ftp/rsync/src/rsync-patches-3.0.5.tar.gz As you could see in the mail from the mail-list, this version have a bug with filenames containing slashes ("/"). They are converted to colons (":") in the filesystem and we need to reconvert them to slashes in order to pass them correctly as argument for the FSMakeFSRefUnicode function. As you can see, we are looking for the most efficient way to do it. If you want to be sure it works, modify /lib/sysxattrs.c including this code on fsreffrompath function: = if(verbose > 3) = fprintf(stderr, "name=%s\n",startOfName); + nameLength=strlen(startOfName); + strcpy(name, startOfName); + while(index<nameLength) + { + if(name[index]==':') + name[index]='/'; + index++; + } = cfStringName=CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8); = if(cfStringName==NULL) Putting this initialisation: = char parentPath[MAXPATHLEN+1], name[MAXNAMLEN+1]; + unsigned int index=0, nameLength; = means code that already exist on file. + means new code to be inserted in this context. Other ways to make the colon to slash conversion are unsure and need testing. If you would like to test it, let me know. I can't test as I haven't a Mac OS X.3 anymore. Let me know as well if this works for you (This patch have no guarantee, using it is by your only responsibility). Best regards, Vitorio PS: CC me if you reply on the mailing list as I don't systematically subscribe to it. Le 21 janv. 09 ? 07:47, Jason a ?crit :> Hi Vitorio, > I read your posting from Jan 20th 2009 regarding the email from > Tim. I'm not sure if you have the time but I have 2 computers > running 10.3 right now that I would love to have rsync 3 running on. > > I'm running a mixed environment of 10.4 and 10.3 so right now I have > RsyncX installed on all the machines but it appears rsync 3 handles > things a bit better. > > If you have the time send me the 10.3 diff file and I can try > compling with 10.3. My programming is primarily in ancient C > development for back end processing so I'm a bit rusty. > > Cheers, > Jason > > --- > JOS > > > > __________________________________________________________________ > Instant Messaging, free SMS, sharing photos and more... Try the new > Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ >-------------- next part -------------- A non-text attachment was scrubbed... Name: rsync10.3xattr_supportv0.6.diff Type: application/octet-stream Size: 18513 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20090121/1e967428/rsync10.3xattr_supportv0.6.obj -------------- next part --------------
Hi folks, I've made a Unicode test here and it seem safe to patch my Panther patch in this way: + unsigned int index=0; = CFStringGetCharacters(cfStringName, range, unicharName); while(index<range.length) { if(unicharName[index]==0x003B) /* == ':' */ unicharName[index]=0x002F; /* == '/' */ index++; } = carbon_error=FSMakeFSRefUnicode(&parentRef, range.length, unicharName, kTextEncodingUnknown, ref); Because the length doesn't mean the number of printable characters, but the number of Unicode signs. (A character can take more than one Unicode sign.) So, it seem OK for me to scan the Unicode array on this way. If you patch your rsync with this modification on y patch, please let me know if it works for you as I can't test it. Best regards, Vitorio
Alright here is an update. Using v0.6 + standard OS X patches + code below I have compiled rsync 3.0.5 on a OS X 10.3 box. No errors were thrown during the compile. In order to test this build I created the Src and Dst volumes using the Backup Bouncer test suit. This was performed on a 10.4 system. The disk images where transfered to the 10.3 system. The results of the test are: Verifying: basic-permissions ... ok (Critical) Verifying: timestamps ... ok (Critical) Verifying: symlinks ... ok (Critical) Verifying: symlink-ownership ... ok Verifying: hardlinks ... FAIL (Important) Verifying: resource-forks ... Sub-test: on files ... FAIL (Critical) Sub-test: on hardlinked files ... FAIL (Important) Verifying: finder-flags ... FAIL (Critical) Verifying: finder-locks ... FAIL Verifying: creation-date ... FAIL Verifying: bsd-flags ... FAIL Verifying: extended-attrs ... Sub-test: on files ... FAIL (Important) Sub-test: on directories ... FAIL (Important) Sub-test: on symlinks ... FAIL Verifying: access-control-lists ... Sub-test: on files ... FAIL (Important) Sub-test: on dirs ... FAIL (Important) Verifying: fifo ... ok Verifying: devices ... ok Verifying: combo-tests ... Sub-test: xattrs + rsrc forks ... FAIL Sub-test: lots of metadata ... FAIL I'm a little surprised by the hardlinks and resource-forks but otherwise this is what we got. When transferring both files and directories with '/' in their filename they were transfered over without any difficulties. Thoughts on how we can proceed? Or is testing this copy not a valid method. Cheers, Jason --- On Wed, 1/21/09, macuserfr <macuserfr@free.fr> wrote:> From: macuserfr <macuserfr@free.fr> > Subject: Re: Rsync with OS X 10.3 > To: dualusbibook@yahoo.ca > Cc: rsync@lists.samba.org > Received: Wednesday, January 21, 2009, 4:03 AM > Hi Jason, > > Here's rsync10.3xattr_supportv0.6.diff. > > You can find fileflags.diff and crtimes.diff (that are not > from me, but I strongly recommend you to install) here: > http://samba.anu.edu.au/ftp/rsync/src/rsync-patches-3.0.5.tar.gz > > As you could see in the mail from the mail-list, this > version have a bug with filenames containing slashes > ("/"). They are converted to colons > (":") in the filesystem and we need to reconvert > them to slashes in order to pass them correctly as argument > for the FSMakeFSRefUnicode function. As you can see, we are > looking for the most efficient way to do it. > > If you want to be sure it works, modify /lib/sysxattrs.c > including this code on fsreffrompath function: > = if(verbose > 3) > = fprintf(stderr, "name=%s\n",startOfName); > + nameLength=strlen(startOfName); > + strcpy(name, startOfName); > + while(index<nameLength) > + { > + if(name[index]==':') > + name[index]='/'; > + index++; > + } > = cfStringName=CFStringCreateWithCString(NULL, name, > kCFStringEncodingUTF8); > = if(cfStringName==NULL) > > Putting this initialisation: > = char parentPath[MAXPATHLEN+1], name[MAXNAMLEN+1]; > + unsigned int index=0, nameLength; > > = means code that already exist on file. > + means new code to be inserted in this context. > > Other ways to make the colon to slash conversion are unsure > and need testing. If you would like to test it, let me know. > > I can't test as I haven't a Mac OS X.3 anymore. Let > me know as well if this works for you (This patch have no > guarantee, using it is by your only responsibility). > > Best regards, > > Vitorio > > PS: CC me if you reply on the mailing list as I don't > systematically subscribe to it. > > Le 21 janv. 09 ? 07:47, Jason a ?crit : > > > Hi Vitorio, > > I read your posting from Jan 20th 2009 regarding the > email from Tim. I'm not sure if you have the time but I > have 2 computers running 10.3 right now that I would love to > have rsync 3 running on. > > > > I'm running a mixed environment of 10.4 and 10.3 > so right now I have RsyncX installed on all the machines but > it appears rsync 3 handles things a bit better. > > > > If you have the time send me the 10.3 diff file and I > can try compling with 10.3. My programming is primarily in > ancient C development for back end processing so I'm a > bit rusty. > > > > Cheers, > > Jason > > > > --- > > JOS > > > > > > > __________________________________________________________________ > > Instant Messaging, free SMS, sharing photos and > more... Try the new Yahoo! Canada Messenger at > http://ca.beta.messenger.yahoo.com/ > >__________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com.
Le 24 janv. 09 ? 08:46, Jason a ?crit :> Hi Again, > I may have spoke too soon regarding the second :/ patch. Using the > first patch (non-unicode version) I am able to deal with the :/ > issue. However, I've recompiled using the second fix and I am now > getting the error: > > rsync: get_xattr_names: llistxattr("Src/test : one",1024) failed: > Invalid argument (22) > rsync error: some files/attrs were not transferred (see previous > errors) (code 23) at main.c(1040) [sender=3.0.5] > > The folder I'm trying to copy is "Test / one". > > I've separated my different tests now so I won't be able to confuse > which patch has been applied where. I may have gotten my folders > mixed before. I'm not actually working on the 10.3 but rather > through the terminal. > > Any idea on what went wrong with the unicode patch? > > Jason >Hmmm, I have no clue of what's wrong. You may try a debug output like this: + unsigned int index=0; = CFStringGetCharacters(cfStringName, range, unicharName); while(index<range.length) { if(unicharName[index]==0x003B) /* == ':' */ { fprintf(stderr, "index=%u\tcharacter=%c\t replaced by=%c\n", index, (char)unicharName[index], 0x2F); unicharName[index]=0x002F; /* == '/' */ } index++; } = carbon_error=FSMakeFSRefUnicode(&parentRef, range.length, unicharName, kTextEncodingUnknown, ref); It should show you which character is replaced. For your folder "Test / one" it should output (index starts from 0): index=5 character=: replaced by=/ If it output another thing, I'm curious to know what. For debugging you may use -vvvv to enable more (maybe useful) debug messages. Vitorio