David Dykstra [Mon, 27 Jan 2003 04:41:30 +0000 (04:41 +0000)]
Move the sleep to workaround the default modify-window of 1 on Cygwin to
the beginning of "checkit" rather than the end of "hands_setup" because
sometimes files are modified just before checkit is called and the copy
finishes within one second so they're considered to be the same time.
I don't think this would be a problem in real life, so just change the
test.
David Dykstra [Mon, 27 Jan 2003 03:52:42 +0000 (03:52 +0000)]
Insert a 100ms sleep just before sending the USR2 signal to the
child receiver process to prevent some hangs on Cygwin. Anthony
Heading discovered the workaround first and suggested 30ms, and
Greger Cronquist had better luck with 100ms.
David Dykstra [Mon, 27 Jan 2003 03:35:08 +0000 (03:35 +0000)]
Prevent the "Connection reset by peer" messages often seen from Cygwin.
Result of a lot of discussion over the last year and a half. Based on
a patch from Randy O'Meara, cleaned up a bit by Max Bowsher.
David Dykstra [Sun, 26 Jan 2003 03:53:34 +0000 (03:53 +0000)]
Better fix for infinite recursion; don't return from exit_cleanup
unless the nesting is already pretty deep, because there are normal
cases where exit_cleanup is nested shallowly. Patch from Marc Espie,
posted by Brian Poole.
David Dykstra [Sun, 26 Jan 2003 03:46:54 +0000 (03:46 +0000)]
Open config files in text mode when O_TEXT is defined. This helps on
Cygwin when the config files are on a filesystem that is mounted in
binary mode. Patch from Ville Herva.
David Dykstra [Sun, 26 Jan 2003 03:34:19 +0000 (03:34 +0000)]
Tests that use hands_setup to make a test file directory and right
afterward make a copy were failing on cygwin because the default
--modify-windows now 1 on Cygwin. Adding a 2 second sleep at the end of
hands_setup so that hopefully the tests will succeed because the copy
will be made more than 1 second away from the original.
David Dykstra [Fri, 24 Jan 2003 22:07:22 +0000 (22:07 +0000)]
Change default of --modify-window on Cygwin from 2 to 1 because that's all
that's needed on FAT filesystems. NTFS filesystems can do with a window of
0, but it shouldn't hurt because it's highly unlikely that any given file
will be modified within one second of the time that rsync last copied it.
Wayne Davison [Tue, 21 Jan 2003 19:27:11 +0000 (19:27 +0000)]
Separated a `cat "..."` command out from inside a double-quoted string
so that we don't run afoul of some shells quoting quirks. (As Brian
Poole suggested.)
David Dykstra [Mon, 20 Jan 2003 23:32:17 +0000 (23:32 +0000)]
Re-activate the piece of code that creates intervening directories
when --relative-paths is used. The code was accidentally skipped starting
in CVS version 1.32 of receiver.c. Noticed by Craig Barratt.
David Dykstra [Thu, 16 Jan 2003 21:02:43 +0000 (21:02 +0000)]
Change rsync help for -a to show that it is equivalent to -rlptgoD.
I've had to go to the man page many times for that information and I
finally got sick of it.
David Dykstra [Wed, 15 Jan 2003 16:14:07 +0000 (16:14 +0000)]
Fix bug in --copy-unsafe that made it totally broken, and re-enable
the tests that tested it. As far as I can tell, it was always broken
since the day I put it in years ago. In my investigation into this I
was unable to figure out what in the world I was thinking back then,
to introduce a global variable with the wrong information in it rather
than using a parameter that was already available in readlink_stat
function. That still bothers me a bit but I decided to stop worrying
about it.
David Dykstra [Sun, 12 Jan 2003 04:02:25 +0000 (04:02 +0000)]
Reduced the severity of the warning about missing alloca to a warning, and
changed the test to the common form of prefixing an x to both sides of
an equivalence because it didn't even notice a problem on the cray when
it was instead using test -n.
Also noticed an error in the test for ANSI c, doing a "$xac..." = xno"
when it should have been "x$ac..." = xno, so I fixed that too.
David Dykstra [Sun, 12 Jan 2003 03:11:38 +0000 (03:11 +0000)]
Make configure bomb if the included popt is needed but alloca is not
available, as apparently is the case on Cray UNICOS. The AC_FUNC_ALLOCA
autoconf documentation talks about having an included alloca.c and
periodically calling alloca(0) to garbage collect when C_ALLOCA is defined,
but I don't know where to get the code or if there's anybody that cares
enough about the UNICOS port for it to be worth the trouble.
Wayne Davison [Sat, 11 Jan 2003 02:05:56 +0000 (02:05 +0000)]
The inet_pton() man page says we need to pass in a pointer to a
struct in_addr, which means passing &sin.sin_addr instead of
&sin.sin_addr.s_addr. Also changed the AF_INET6 version to pass
&sin6.sin6_addr. Hopefully this will fix UNICOS and not break
anyone else.
David Dykstra [Fri, 10 Jan 2003 18:32:59 +0000 (18:32 +0000)]
The call to test_skipped if makepath failed didn't work, presumably because
makepath is builtin and there's some problem with it causing /bin/sh to
exit on cygwin. Parens around the call to makepath should help.
Wayne Davison [Fri, 10 Jan 2003 08:32:09 +0000 (08:32 +0000)]
Reset the io_error_fd right before the generator kills off the receiver
(because the death of the receiver will close the fd and cause the
generator to fail in any subsequent IO).
David Dykstra [Thu, 9 Jan 2003 19:04:06 +0000 (19:04 +0000)]
Fixed bug that caused rsync to lose exit status of its child processes.
Based on patch submited by David R. Staples. Todd Vander Does contributed
the following test which showed the problem:
> mkdir /tmp/nowrite
> chmod -w /tmp/nowrite
> rsync /etc/group /tmp/nowrite || echo $status
mkstemp .group.cUaaeY failed
rsync error: partial transfer (code 23) at main.c(518)
23
> rsync -e ssh loki:/etc/group /tmp/nowrite || echo $status
mkstemp .group.1rayeY failed
> rsync -e ssh loki:/etc/group /tmp/nowrite && echo $status
mkstemp .group.fbaGiY failed
0
The remote copy should have returned non-zero exit code like the local copy.
Jos Backus [Tue, 24 Dec 2002 07:42:04 +0000 (07:42 +0000)]
Add "void" to some function definitions so that all declarations in proto.h
have full parameter lists. This helps unbreaking compilation on SCO UNIXWare.
Jos Backus [Tue, 24 Dec 2002 07:25:25 +0000 (07:25 +0000)]
Change all relevant occurrences of ``rsync'' and ``$rsync_bin'' to the
canonical form ``$RSYNC'' (set in testsuite/rsync.fns). This prevents any
stray rsync binaries in the user's PATH from being picked up by the test
scripts and ensures that the newly built rsync binary is used always.
David Dykstra [Wed, 11 Dec 2002 18:48:27 +0000 (18:48 +0000)]
When a file shows up as not existent during an rsync run, always check
to see if it excluded before reporting an error. Previously it was only
checking for the exclusion if copy_links was enabled, but the error can
also occur if a file disappears during an rsync run. Suggested by Eugene
V. Chupriyanov and Bo Kersey.
Jos Backus [Tue, 5 Nov 2002 18:35:59 +0000 (18:35 +0000)]
Fix the chgrp and hardlinks tests by running $RSYNC instead of relying on the
new rsync being in $PATH; it may pick up an old version, invalidating the
result of the tests. This is what the other tests do already.
David Dykstra [Fri, 30 Aug 2002 23:27:26 +0000 (23:27 +0000)]
When using daemon mode over a remote shell program and not running as root,
default the config file to just "rsyncd.conf" in the current directory
instead of /etc/rsyncd.conf. Also, fix problems with logging messages when
running daemon mode over a remote shell program: it was pretty much doing
the opposite of what it should have, sending early error messages to the
log and later messages to the client. Switched it around so the very early
error messages go to the client and the later ones go to the log.