Re: non-recursive remote listing breakage in 3.0.0pre1

2008-01-14 Thread Matt McCutchen
On Sun, 2007-10-07 at 01:31 -0400, Matt McCutchen wrote:
 In the process of investigating this, I ran across another oddity with
 --dirs and --relative that appears to be present in both rsync 2.6.9
 and the current CVS rsync.  When a source argument ends in a ./ but
 isn't ./ itself, rsync skips the subdirectories.

I noticed that this bug is no longer present in the current development
rsync.

Matt

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-07 Thread Wayne Davison
 On Sun, Oct 07, 2007 at 01:18:46AM -0400, Matt McCutchen wrote:
  That fix misses the point.

On Sat, Oct 06, 2007 at 10:27:38PM -0700, Wayne Davison wrote:
 No, it's just incomplete.

Actually, you were right.  Turned out I just needed to limit the check
to when inc_recurse was active, as that is the only time that the
--no-implied-dirs code needs to include implied directories in the
recursion sequence, and thus the only time they need to be ignored (the
inc_recurse mode can't have non-implied dirs w/o FLAG_XFER_DIR, since
we know that --recursive is active).

Sorry for the terse response.  I was in the middle of debugging that
very thing due to the problems brought to light by your earlier report,
but you had no way of knowing that I was still working on the deeper
problems at the time...

The latest CVS code has fixes for the incomplete listing bug(s), the
case where too many dirs were getting marked with FLAG_XFER_DIR when
--recursive wasn't set (which could cause the dir's contents to be
deleted erroneously), and for the incomplete detecting of certain dot
dirs when --relative was set (as noted in your last report).

A big thanks to everyone for the testing and bug reporting!  Please
keep it up!

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Erik Jan Tromp
It would appear something snuck in that breaks non-recursive remote
listings when talking to a non-3.0.0pre1 version of rsync. The symptom
itself is simple enough to see; rather than displaying member
directories/regular files/symlinks/etc as one would expect, only
non-directories (with the exception of '.') are listed.

Other tidbits.. some obvious, some maybe not:
- not limited to just the toplevel directory within a module.
  sub-directories show the same symptom.
- local listings (rsync --list-only /pub/mirrors/slackware/) behave
  properly with 2.6.9  3.0.0pre1.
- listings with 2.6.9  3.0.0pre1 clients behave properly with 3.0.0pre1
  daemon.

For clarity, I've deliberately named the rsync binaries as
'rsync-$VERSION' for the following sample tests:

$ rsync-2.6.9 rsync://ftp.slackware.com/slackware/
drwxr-xr-x 640 2007/10/03 03:47:44 .
-rw-r--r-- 5422821 2007/10/06 15:47:21 ls-lR
-rw-r--r--  716648 2007/10/06 15:47:25 ls-lR.gz
lrwxrwxrwx  14 2007/07/02 16:08:13 slackware
drwxr-xr-x 912 2007/09/12 16:27:34 slackware-10.0
drwxr-xr-x 912 2007/09/12 16:29:38 slackware-10.1
drwxr-xr-x 944 2007/09/12 16:31:34 slackware-10.2
drwxr-xr-x 496 2005/09/14 16:39:02 slackware-10.2-iso
drwxr-xr-x 984 2007/09/12 16:33:39 slackware-11.0
drwxr-xr-x 816 2006/10/02 22:14:52 slackware-11.0-iso
drwxr-xr-x 968 2007/10/02 23:32:08 slackware-12.0
drwxr-xr-x 816 2007/07/02 15:30:05 slackware-12.0-iso
drwxr-xr-x 800 1997/10/03 03:00:00 slackware-3.3
drwxr-xr-x 856 2007/09/12 16:22:24 slackware-8.1
drwxr-xr-x 888 2007/09/12 16:24:16 slackware-9.0
drwxr-xr-x 912 2007/09/12 16:25:50 slackware-9.1
drwxr-xr-x 968 2007/07/01 23:40:38 slackware-current
lrwxrwxrwx  16 2003/05/06 17:08:21 slackware_source
drwxr-xr-x 256 2007/05/30 22:07:36 unsupported

$ rsync-3.0.0pre1 rsync://ftp.slackware.com/slackware/
drwxr-xr-x 640 2007/10/03 03:47:44 .
-rw-r--r-- 5422821 2007/10/06 15:47:21 ls-lR
-rw-r--r--  716648 2007/10/06 15:47:25 ls-lR.gz
lrwxrwxrwx  14 2007/07/02 16:08:13 slackware
lrwxrwxrwx  16 2003/05/06 17:08:21 slackware_source

It's safe to assume ftp.slackware.com is not using 3.0.0pre1, btw.
Production environment  all that.. :)

For the moment, that's all the info I can think of to provide. If
additional info is needed, let me know.

Erik

-- 
Failure is not an option. (It comes bundled with Windows.)
If at first you don't succeed, redefine success.

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Matt McCutchen
On 10/6/07, Erik Jan Tromp [EMAIL PROTECTED] wrote:
 It would appear something snuck in that breaks non-recursive remote
 listings when talking to a non-3.0.0pre1 version of rsync. The symptom
 itself is simple enough to see; rather than displaying member
 directories/regular files/symlinks/etc as one would expect, only
 non-directories (with the exception of '.') are listed.

I can reproduce this.  Pulling from an older version of rsync with
--dirs is similarly broken:

$ mkdir src src/D dest
$ rsync-2.6.9 --rsync-path=rsync-2.6.9 -ni --dirs localhost:`pwd`/src/ dest/
cd+++ D/
$ rsync   --rsync-path=rsync-2.6.9 -ni --dirs localhost:`pwd`/src/ dest/
[No output]

The underlying problem is that FLAG_XFER_DIR is being used
inconsistently to mean two different things: I'm not an implied dir
and delete in me.  recv_file_entry is using the delete in me
meaning, and D shouldn't be deleted in because its contents were not
sent, so recv_file_entry doesn't set FLAG_XFER_DIR on D.
recv_generator wants to skip implied dirs unless unless --relative is
given without --no-implied-dirs, so it sees that D lacks FLAG_XFER_DIR
and skips it.

There's a flip side to this.  An rsync 3.0.0 sender *does* set
FLAG_XFER_DIR on dirs like D, so if deletion is enabled, the generator
incorrectly deletes all their contents!

Matt
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Wayne Davison
On Sat, Oct 06, 2007 at 04:52:38PM -0400, Erik Jan Tromp wrote:
 It would appear something snuck in that breaks non-recursive remote
 listings when talking to a non-3.0.0pre1 version of rsync.

This was a simple problem with the code that was trying to skip implied
directories failing to check if the relative flag was set.  The latest
CVS version has this fixed.  It also fixes a bug with a non-recursive
listing between two 3.0.0 rsyncs.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Wayne Davison
On Sat, Oct 06, 2007 at 05:50:41PM -0400, Matt McCutchen wrote:
 There's a flip side to this.  An rsync 3.0.0 sender *does* set
 FLAG_XFER_DIR on dirs like D, so if deletion is enabled, the generator
 incorrectly deletes all their contents!

Yeah, that's bad.  I'm looking into a fix.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Matt McCutchen
On 10/7/07, Wayne Davison [EMAIL PROTECTED] wrote:
 This was a simple problem with the code that was trying to skip implied
 directories failing to check if the relative flag was set.  The latest
 CVS version has this fixed.

That fix misses the point.  If I pass --relative --no-implied-dirs,
the subdirectories disappear again:

$ rm -r *
$ mkdir src
$ rsync-dev   --rsync-path='rsync-2.6.9' --list-only
   localhost:`pwd`/
drwx--  72 2007/10/07 01:15:41 .
drwx--  48 2007/10/07 01:15:41 src
$ rsync-dev   --rsync-path='rsync-2.6.9' --list-only --relative
--no-implied-dirs localhost:`pwd`/
drwx--  72 2007/10/07 01:15:41 home/matt/test/dirs-breakage

IIUC, src/ is not an implied dir and thus should be listed in the
last case.  Rsync 2.6.9 gets this right:

$ rsync-2.6.9 --rsync-path='rsync-2.6.9' --list-only --relative
--no-implied-dirs localhost:`pwd`/
drwx--  72 2007/10/07 01:15:41 home/matt/test/dirs-breakage
drwx--  48 2007/10/07 01:15:41 home/matt/test/dirs-breakage/src

Matt
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Wayne Davison
On Sun, Oct 07, 2007 at 01:18:46AM -0400, Matt McCutchen wrote:
 That fix misses the point.

No, it's just incomplete.  Patience.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Matt McCutchen
In the process of investigating this, I ran across another oddity with
--dirs and --relative that appears to be present in both rsync 2.6.9
and the current CVS rsync.  When a source argument ends in a ./ but
isn't ./ itself, rsync skips the subdirectories.  Continuing the
previous example:

$ rsync-dev --list-only --relative ./
drwx--  72 2007/10/07 01:15:41 .
drwx--  48 2007/10/07 01:15:41 src
$ rsync-dev --list-only --relative ././
drwx--  72 2007/10/07 01:15:41 .
$ rsync-dev --list-only --relative `pwd`/./
drwx--  72 2007/10/07 01:15:41 .
$ rsync-dev --list-only --relative ../dirs-breakage/./
drwx--  72 2007/10/07 01:15:41 .

Matt
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: non-recursive remote listing breakage in 3.0.0pre1

2007-10-06 Thread Matt McCutchen
On 10/7/07, Wayne Davison [EMAIL PROTECTED] wrote:
 On Sun, Oct 07, 2007 at 01:18:46AM -0400, Matt McCutchen wrote:
  That fix misses the point.

 No, it's just incomplete.  Patience.

Sorry.  What I meant was that, once impliedness of directories is
represented properly (which is necessary to handle the most general
case of --relative --no-implied-dirs), it is not clear to me how
checking the relative flag would be helpful; but of course you know
the code better than I do.

In the future, when you make an incomplete fix, would you please
indicate that you know it is incomplete?  Otherwise I feel it is my
duty to make sure you know, and I may come across as impatient.

Matt
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html