I've searched the archive for references to FreeBSD's file flags and rsync but only found one reference to it dated back in 2002. It refers to a --flags patch that I don't see available anywhere: http://www.mail-archive.com/rsync@lists.samba.org/msg03878.html Is there a patch for preserving FreeBSD's flags like schg? (i.e. immutable) My current configuration: Two FreeBSD 4.11 systems running rsync 2.6.3 Command being run: /usr/local/bin/rsync -cavzHS --include-from=include-list.txt --exclude-from=exclude-list.txt root@thisserver.mycompany.net:/ /
On Mon, Mar 20, 2006 at 04:51:56PM -0500, Jonathan Call wrote:> It refers to a --flags patch that I don't see available anywhere:I used the link to the patch in the email you cited to find it. It's quite old though, and I saw one bug (namely that the SAME_FLAG value was too big to actually be transmitted as a flag bit). I did a quick update of the patch so that it applies to the CVS version: http://rsync.samba.org/ftp/unpacked/rsync/patches/flags.diff It builds, but is otherwise untested. ..wayne..
I applied the patch (patch < flags.diff) and compiled the binary.(./configure, make all HAVE_CHFLAGS="yes", make install) However, it will not let me use --flags: rsync: file flags are not supported on this client. I have the new binary on both ends. I even tried it without the -a (substituting -rlptgoD instead) given that old conversation had debates that it would even work. Thanks, Jonathan> -----Original Message----- > From: Wayne Davison [mailto:wayned@samba.org] > Sent: Monday, March 20, 2006 5:00 PM > To: Jonathan Call > Cc: rsync@lists.samba.org > Subject: Re: rsync and BSD file flags. > > On Mon, Mar 20, 2006 at 04:51:56PM -0500, Jonathan Call wrote: > > It refers to a --flags patch that I don't see available anywhere: > > I used the link to the patch in the email you cited to find it. It's > quite old though, and I saw one bug (namely that the SAME_FLAG valuewas> too big to actually be transmitted as a flag bit). I did a quickupdate> of the patch so that it applies to the CVS version: > > http://rsync.samba.org/ftp/unpacked/rsync/patches/flags.diff > > It builds, but is otherwise untested. > > ..wayne..
Just an update for you: I did not have autoconf on my test box, so I just stuck HAVE_CHFLAGS into config.h. It appears to work. Rsync seems to immediately recognize the schg flag on files on the local system and then won't write the file from the remote side. ;) Running it once without the --flags option and then running it with the --flags option seems to be a workaround in that respect. Jonathan> -----Original Message----- > From: Wayne Davison [mailto:wayned@samba.org] > Sent: Tuesday, March 21, 2006 3:08 PM > To: Jonathan Call > Cc: rsync@lists.samba.org > Subject: Re: rsync and BSD file flags. > > On Tue, Mar 21, 2006 at 03:59:45PM -0500, Jonathan Call wrote: > > rsync: file flags are not supported on this client. > > This means that the source was patched (since that message is notaround> without the patch) but that it was not configured with chflagssupport.> Did you run ./prepare_source after applying the patch? Without that, > configure would not have been updated (you'll need autoconf for that > command to work). > > If configure finds the chflags function, it should automaticallydefine> HAVE_CHFLAGS in your config.h. If not, you could try manuallychanging> the HAVE_CHFLAGS line in config.h to be "#define HAVE_CHFLAGS 1" and > recompiling (but that shouldn't be necessary). If you don't have > autoconf around, you could manually add that line to config.h (themake> command you cited would not have been enough to define this for the > programs being compiled). > > Also: I noticed a problem with the definition of SUPPORT_FLAGS in the > first patch: the define wasn't being set early enough in the file.You> should grab an updated flags.diff patch or manually move the 3 lines > that conditionally define SUPPORT_FLAGS to a spot earlier in rsync.h > (prior to the one spot that checks the define in the file). > > ..wayne..