Wayne Davison [Sat, 22 Mar 2008 19:30:43 +0000 (12:30 -0700)]
A couple fixes in add_rule() for XFLG_ABS_IF_SLASH:
- Remove the trailing slash earlier, so that it doesn't
affect the XFLG_ABS_IF_SLASH check.
- Count the slashes earlier so that the XFLG_ABS_IF_SLASH
can use it instead of using a strchr() all that could
scan past the end of the input.
Wayne Davison [Fri, 21 Mar 2008 23:28:20 +0000 (16:28 -0700)]
Some RPM spec file improvements:
- Added installation of new /etc/xinetd.d/rsync config file.
- Added commented-out lines to demonstrate how to use rsync-patches.
Wayne Davison [Fri, 21 Mar 2008 14:11:37 +0000 (07:11 -0700)]
A couple improvements to the new arg-globbing code:
- Put all the state variables into a single struct.
- Reuse the buffer memory for each glob_expand() call until a final
call with a NULL pointer tells us to free it.
Wayne Davison [Fri, 21 Mar 2008 05:51:03 +0000 (22:51 -0700)]
Changed the arg-globbing routine to use a custom arg-globbing algorithm
that does not include any daemon-excluded items in the matches. It is
also not subverted by the presence of one or more dot-dir elements in
an arg.
Wayne Davison [Thu, 20 Mar 2008 18:59:54 +0000 (11:59 -0700)]
Some improvements to the file-name cleaning code:
- Removed the CFN_KEEP_LEADING_DOT_DIR flag for clean_fname().
- Explicitly add an implied dot-dir to the transfer rather than keeping
a leading a "./" prefix as a part of a relative pathname.
- Added the CFN_KEEP_DOT_DIRS flag for clean_fname().
- Added the SP_KEEP_DOT_DIRS flag for sanitize_path().
- Call clean_fname() a couple more times.
Matt McCutchen [Wed, 19 Mar 2008 02:16:41 +0000 (22:16 -0400)]
Unsnarl missing_below/dry_run logic.
The generator can skip a directory's contents altogether due to
--ignore-non-existing, a daemon exclude, or a mkdir failure. On a
--dry-run, the generator can also note the missingness of a directory
while still scanning its contents. These two scenarios were conflated
using a single set of missing_below/missing_dir variables in combination
with transient increments in dry_run; this caused at least three bugs.
Now recv_generator has separate variables for the two scenarios, called
skip_dir and dry_missing_dir, respectively. For simplicity, we take the
F_DEPTH instead of having separate *_below variables. We mark both
kinds of missing dirs with FLAG_MISSING_DIR. (dry_run > 1) iff the
*root* of the destination does not exist; it is no longer incremented
for missing subdirs. I added tests for the three fixed bugs in
missing.test.
Wayne Davison [Mon, 17 Mar 2008 01:06:47 +0000 (18:06 -0700)]
Fixed hard-linking when some of the files can get skipped. This adds
the FLAG_SKIP_HLINK flag, which gets set on any hard-linked file that
the user wants to skip (e.g. via --ignore-existing, --append, etc.).
The code in hlink.c now deals with the skipped files instead of
triggering an assert() error.
Wayne Davison [Mon, 17 Mar 2008 00:50:28 +0000 (17:50 -0700)]
Moved the --append check so that files that don't need to be transferred
still get their non-content attributes updated, and combining --append
with --hard-links will not prevent the discovery of unchanged files.
Wayne Davison [Mon, 17 Mar 2008 00:06:52 +0000 (17:06 -0700)]
Make the --ignore-existing option not overwrite a regular file with
a dir/symlink/device/special-file, just like it already refuses to
overwrite a non-regular file with a regular file.
Wayne Davison [Sat, 15 Mar 2008 15:51:07 +0000 (08:51 -0700)]
Generate a helpful message when we get an option-error from a daemon
while requesting a file-listing and we suspect that the remote rsync
is complaining about the -d option.
Wayne Davison [Sat, 15 Mar 2008 07:43:31 +0000 (00:43 -0700)]
- Fixed a crash bug when backing up files with ACLs enabled and we
create a directory in the backup-path area.
- Fixed a bug where make_file() was setting F_PATHNAME() on the
receiving side.
- A non-pool (temp-memory) file structure now stores the size of
its extra_cnt value in the F_DEPTH() int so that unmake_file()
can always be sure of how to free() the memory.
- The ACL-preserving code no longer allocates 4 more bytes per
file entry than it needs.
- Got rid of a useless adding of the symlink length to "bp".
Wayne Davison [Sat, 15 Mar 2008 05:55:59 +0000 (22:55 -0700)]
Have configure check to see if /usr/include/popt/popt.h is around
(rather than /usr/include/popt.h), and use the included popt lib
if it is (to avoid a potential conflict due to our use of -I.).
Wayne Davison [Tue, 11 Mar 2008 04:15:37 +0000 (21:15 -0700)]
Fixed some itemized logging failures:
- If a symlink/device/special-file changes its value without any
attribute changes, the itemized event no longer gets dropped.
- We put a 'c' into the checksum/change field now to indicate when
a symlink/device/special-file changes its value without changing
its type. This lets us properly interpret the --copy-links output
to know which items are getting copied without changes and which
are getting created with new content.
- Fixed the 'T' itemized output for a symlink when rsync tries to
set the right time but fails due to lack of OS/disk support.
Wayne Davison [Sat, 8 Mar 2008 18:54:17 +0000 (10:54 -0800)]
Some popt improvements:
- Fixed a bug in short-opt parsing when an abutting arg has an '='.
- Allow a short-opt to be separated from its arg by an '='.
- Avoid an IBM-checker warning about an impossible case in a switch
and a warning about a potential NULL-pointer dereference.
- Fixed a memory leak.
Wayne Davison [Sat, 8 Mar 2008 00:16:29 +0000 (16:16 -0800)]
Fixed the interaction of --fake-super with --link-dest & --xattrs.
Fixed the munging of non-user namespace xattrs w/--fake-super.
Fixed the sorting of received xattrs when name-munging occurs.
Added xattr tests to verify that these things stay fixed.
Wayne Davison [Wed, 5 Mar 2008 05:46:00 +0000 (21:46 -0800)]
- Made the itemize test check for CAN_HARDLINK_SYMLINK define instead
of running its own test using ln.
- Made the merge test call checkit with absolute paths so that some
folk's cd command won't foul things up with extra output.
Wayne Davison [Tue, 4 Mar 2008 02:33:11 +0000 (18:33 -0800)]
Fixing a problem with a NULL config_file pointer when accessing
a single-use daemon without no --config option specified. Added
a test to ensure that this doesn't break in the future.
Wayne Davison [Mon, 3 Mar 2008 16:46:30 +0000 (08:46 -0800)]
Updated copyright year in --version output and improved the release
script to look for year changes in options.c and to get the version
defaults totally right in the prompts.
Wayne Davison [Thu, 28 Feb 2008 00:19:05 +0000 (16:19 -0800)]
Temporarily set uid_ndx in the delete code if the transfer is not
preserving ownership, but we want to know what the UIDs are on the
files we're deleting. Changed the DEL_OWNED_BY_US flag to be
DEL_NO_UID_WRITE, which is only set when a file is owned by us and
we can't write to it. Fixed a glitch in the error handling of the
--delete-delay code where it might try to enable delete-after in
incremental-transfer mode. Made a simple (well tested) optimization
in the --delete-delay code and a few other readability changes.
Wayne Davison [Thu, 28 Feb 2008 00:15:14 +0000 (16:15 -0800)]
Use preserve_[ug]id values for send/recv checking, which will
allow the delete code to temporarily set [ug]id_ndx during
delete processing, as needed. Got rid of a couple duplicate
tests.
Wayne Davison [Mon, 18 Feb 2008 22:10:13 +0000 (14:10 -0800)]
Extended the protocol-30 info-passing code at startup, and use it to
tell the client if the server can set the times on a symlink (both
the server->client byte and the client->server use of -e). Make use
of this info to allow the proper output of the 't' flag when rsync
can set the time on a symlink (and we're talking protocol >= 30).
Added output of "[no] symtimes" info in the --version message.
Fixed the itemize.test so that it works when rsync believes that it
can set the time of a symlink, but it can't really do it.
Wayne Davison [Mon, 18 Feb 2008 18:02:35 +0000 (10:02 -0800)]
Some permssion fixes:
- Changed itemized output to only report 'p' with -p or -E.
- Fixed a duplicate output of a link-dest file with -vv but no -i.
- Improved unchanged_attrs() to handle -E.