| 1 | NEWS for rsync 2.6.4 (UNRELEASED) |
| 2 | Protocol: 29 (changed) |
| 3 | Changes since 2.6.3: |
| 4 | |
| 5 | OUTPUT CHANGES: |
| 6 | |
| 7 | - When rsync deletes a directory and outputs a verbose message about |
| 8 | it, it now appends a trailing slash to the name instead of (only |
| 9 | sometimes) outputting a preceding "directory " string. |
| 10 | |
| 11 | - The --stats output will contain file-list time-statistics if both |
| 12 | sides are 2.6.4, or if the local side is 2.6.4 and the files are |
| 13 | being pushed (since the stats come from the sending side). |
| 14 | (Requires protocol 29 for a pull.) |
| 15 | |
| 16 | - The "%o" (operation) value now has a third value besides "send" and |
| 17 | "recv": "del." (with trailing dot to make it 4 chars). This changes |
| 18 | the way deletions are logged in the daemon's log file. |
| 19 | |
| 20 | BUG FIXES: |
| 21 | |
| 22 | - Restore the list-clearing behavior of "!" in a .cvsignore file (2.6.3 |
| 23 | was only treating it as a special token in an rsync include/exclude |
| 24 | file). |
| 25 | |
| 26 | - The combination of --verbose and --dry-run now mentions the full list |
| 27 | of changes that would be output without --dry-run. |
| 28 | |
| 29 | - Avoid a mkdir warning when removing a directory in the destination |
| 30 | that already exists in the --backup-dir. |
| 31 | |
| 32 | - An OS that has a binary mode for its files (such as cygwin0 needed |
| 33 | setmode(fd, O_BINARY) called on the temp-file we opened with |
| 34 | mkstemp(). (Fix derived from the Cygwin's 2.6.3 rsync package.) |
| 35 | |
| 36 | - Fixed a potential hang when verbosity is high, the client side is |
| 37 | the sender, and the file-list is large. |
| 38 | |
| 39 | - We now check if the OS doesn't support using mknod() for creating |
| 40 | FIFOs and sockets, and compile-in using mkfifo() and socket() when |
| 41 | necessary. |
| 42 | |
| 43 | - Fixed an off-by-one error in the handling of --max-delete=N. |
| 44 | |
| 45 | - One place in the code wasn't checking if fork() failed. |
| 46 | |
| 47 | - The "ignore nonreadable" daemon parameter used to erroneously affect |
| 48 | symlinks that pointed to a non-existent file. This has been fixed. |
| 49 | |
| 50 | - If the OS does not have lchown() and its chown() tries to set the |
| 51 | referent of a symlink (as it should), we no longer try to set the |
| 52 | user and group of a symlink. |
| 53 | |
| 54 | - The generator now properly runs the hard-link loop and the dir-time |
| 55 | rewriting loop after we're sure that the redo phase is complete. |
| 56 | |
| 57 | - When --backup was specified with --partial-dir=DIR (where DIR is a |
| 58 | relative path), the backup code was erroneously trying to backup a |
| 59 | file that was put into the partial-dir. |
| 60 | |
| 61 | - One call to flush_write_file() was not being checked for an error. |
| 62 | |
| 63 | - The --no-relative option was not being sent from the client to a |
| 64 | server sender. |
| 65 | |
| 66 | - If an rsync daemon specified "dont compress = ..." for a file and the |
| 67 | client tried to specify --compress, the libz code was not handling a |
| 68 | compression level of 0 properly. This could cause a transfer failure |
| 69 | if the block-size for a file was large enough (i.e. rsync might have |
| 70 | exited with an error for large files). |
| 71 | |
| 72 | - Fixed a bug that would sometimes surface when using --compress and |
| 73 | sending a file with a block-size larger than 64K (either manually |
| 74 | specified, or computed due to the file being really large). Prior |
| 75 | versions of rsync would sometimes fail to to decompress the data |
| 76 | properly, and thus the transferred file would fail its verification. |
| 77 | |
| 78 | - If a daemon can't open the specified log file (i.e. syslog is not |
| 79 | being used), die without crashing. We also output an error about |
| 80 | the failure on stderr (which will only be seen if --no-detach was |
| 81 | specified). |
| 82 | |
| 83 | - A local transfer no longer duplicates all its include/exclude options |
| 84 | (since the forked process already has a copy of the exclude list, |
| 85 | there's no need to send them a set of duplicates). |
| 86 | |
| 87 | - When --progress is specified, the output of items that the generator |
| 88 | is creating (e.g. dirs, symlinks) is now integrated into the progress |
| 89 | output without overlapping it. |
| 90 | |
| 91 | ENHANCEMENTS: |
| 92 | |
| 93 | - Rsync now supports popt's option aliases, which means that you can |
| 94 | use /etc/popt and/or ~/.popt to create your own option aliases. |
| 95 | |
| 96 | - Added the --delete-during (--del) option which will delete files |
| 97 | from on the receiving side incrementally as each directory in the |
| 98 | transfer is being processed. This makes it more efficient than the |
| 99 | default, before-the-transfer behavior, which is now available as |
| 100 | --delete-before (this is the default --delete-WHEN option that will |
| 101 | be chosen if --delete or --delete-excluded is specified without a |
| 102 | --delete-WHEN choice). All the --del* options infer --delete, so an |
| 103 | rsync daemon that refuses "delete" will still refuse to allow any |
| 104 | file-deleting options. |
| 105 | |
| 106 | - All the --delete-WHEN options are now more memory efficient: |
| 107 | Previously an entire duplicate set of file-list objects was created |
| 108 | on the receiving side for the entire destination hierarchy. The new |
| 109 | algorithm only creates one directory of objects at a time. |
| 110 | |
| 111 | - Added the --copy-dest option, which works like --link-dest except |
| 112 | that it includes copies of identical files. |
| 113 | |
| 114 | - Added support for specifying multiple --compare-dest, --copy-dest, or |
| 115 | --link-dest options, but only of a single type. (Promoted from the |
| 116 | patches dir and enhanced.) |
| 117 | |
| 118 | - Added the --max-size option. (Promoted from the patches dir.) |
| 119 | |
| 120 | - The daemon-mode options were separated from the normal rsync options |
| 121 | so that they can't be mixed together. This makes it impossible to |
| 122 | start a daemon that had improper default option values that could |
| 123 | cause problems (e.g. a hang or an abort) when a client connects. |
| 124 | |
| 125 | - The --bwlimit option may now be used in combination with --daemon |
| 126 | to specify both a default value for the daemon side and a value |
| 127 | that cannot be exceeded by a user-specified --bwlimit option. |
| 128 | |
| 129 | - Added the "port" parameter to the rsyncd.conf file. (Promoted from |
| 130 | the patches dir.) Also added "address". A command-line option |
| 131 | will take precedence over a config-file option, as expected. |
| 132 | |
| 133 | - In _exit_cleanup(): when we are exiting with a partially-received |
| 134 | file, we now flush any data in the write-cache before closing the |
| 135 | partial file. |
| 136 | |
| 137 | - The --inplace support was enhanced to work with --compare-dest, |
| 138 | --link-dest, and (the new) --copy-dest options. (Requires protocol |
| 139 | 29.) |
| 140 | |
| 141 | - Added the --dirs (-d) option for an easier way to copy directories |
| 142 | without recursion. |
| 143 | |
| 144 | - Added the --list-only option which is mainly a way for the client to |
| 145 | put the server into listing mode without needing to resort to any |
| 146 | internal option kluges (e.g. the age-old use of "-r --exclude="/*/*" |
| 147 | for a non-recursive listing). This option is used automatically |
| 148 | (behind the scenes) when a modern rsync speaks to a modern daemon, |
| 149 | but may also be specified manually if you want to force the use of |
| 150 | the --list-only option over a remote-shell connection. |
| 151 | |
| 152 | - Added the --omit-dir-times (-O) option which will avoid updating the |
| 153 | modified time for directories when --times was specified. This |
| 154 | option will avoid an extra pass through the file-list at the end of |
| 155 | the transfer (to tweak all the directory times), which can result in |
| 156 | an appreciable speedup for a really large transfer. (Promoted from |
| 157 | the patches dir.) |
| 158 | |
| 159 | - Added the --filter (-f) option and its helper option, -F. Filter |
| 160 | rules are an extension to the existing include/exclude handling |
| 161 | that also supports nested filter files as well as per-directory |
| 162 | filter files (like .cvsignore, but with full filter-rule parsing). |
| 163 | This new option was chosen in order to ensure that all existing |
| 164 | include/exclude processing remained 100% compatible with older |
| 165 | versions. Protocol 29 is needed for full filter-rule support, but |
| 166 | backward-compatible rules work with earlier protocol versions. |
| 167 | (Promoted from the patches dir and enhanced.) |
| 168 | |
| 169 | - Added the --delay-updates option that puts all updated files into |
| 170 | a temporary directory (by default ".~tmp~", but settable via the |
| 171 | --partial-dir=DIR option) until the end of the transfer. This |
| 172 | makes the updates a little more atomic for a large transfer. |
| 173 | |
| 174 | - If rsync is put into the background, any output from --progress is |
| 175 | reduced. |
| 176 | |
| 177 | - Documented the "max verbosity" setting for rsyncd.conf. (This |
| 178 | setting was added a couple releases ago, but left undocumented.) |
| 179 | |
| 180 | - The sender and the generator now double-check the file-list index |
| 181 | they are given, and refuse to try to do a file transfer on a |
| 182 | non-file index (since that would indicate that something had gone |
| 183 | very wrong). |
| 184 | |
| 185 | - Added the --itemize-changes (-i) option, which is a way to output a |
| 186 | more detailed list of what files changed in any way and how they |
| 187 | changed. The effect is the same as specifying a --log-format of |
| 188 | "%i %n%L" (see the rsyncd.conf manpage). Works with --dry-run too. |
| 189 | |
| 190 | - Added the --fuzzy option, which attempts to find a basis file for a |
| 191 | file that is being created from scratch. The current algorithm |
| 192 | only looks in the destination directory for the created file, but |
| 193 | it does attempt to find a match based on size/mod-time (in case the |
| 194 | file was renamed with no other changes) as well as based on a fuzzy |
| 195 | name-matching algorithm. This option requires protocol 29 because |
| 196 | it needs the new file-sorting order. (Promoted from patches dir |
| 197 | and enhanced.) |
| 198 | |
| 199 | - Added the --remove-sent-files option, which lets you move files |
| 200 | between systems. |
| 201 | |
| 202 | - When building under windows, the default for --daemon is now to |
| 203 | avoid detaching, requiring the new --detach option to force rsync |
| 204 | to detach. |
| 205 | |
| 206 | - Improved the option descriptions in the --help text. |
| 207 | |
| 208 | SUPPORT FILES: |
| 209 | |
| 210 | - Added atomic-rsync to the support dir: a perl script that will |
| 211 | transfer some files using rsync, and then move the updated files into |
| 212 | place all at once at the end of the transfer. Only works when |
| 213 | pulling, and uses --link-dest and a parallel hierarchy of files to |
| 214 | effect its update. |
| 215 | |
| 216 | - Added mnt-excl to the support dir: a perl script that takes the |
| 217 | /proc/mounts file and translates it into a set of excludes that will |
| 218 | exclude all mount points (even mapped mounts to the same disk). The |
| 219 | excludes are made relative to the specified source dir and properly |
| 220 | anchored. |
| 221 | |
| 222 | - Added savetransfer.c to the support dir: a C program that can make |
| 223 | a copy of all the data that flows over the wire. This lets you test |
| 224 | for data corruption (by saving the data on both the sending side and |
| 225 | the receiving side) or provides a way to help debug a protocol error. |
| 226 | |
| 227 | - Added rrsync to the support dir: this is my version of Joe Smith's |
| 228 | restricted rsync perl script. This helps to ensure that only certain |
| 229 | rsync commands can be run by an ssh invocation. |
| 230 | |
| 231 | INTERNAL: |
| 232 | |
| 233 | - Added better checking of the checksum-header values that come over |
| 234 | the socket. |
| 235 | |
| 236 | - Merged a variety of file-deleting functions into a single function so |
| 237 | that it is easier to maintain. |
| 238 | |
| 239 | - Improved the type of some variables (particularly blocksize vars) for |
| 240 | consistency and proper size. |
| 241 | |
| 242 | - Got rid of the uint64 type (which we didn't need). |
| 243 | |
| 244 | - Use a slightly more compatible set of core #include directives. |
| 245 | |
| 246 | - Defined int32 in a way that ensures that the build dies if we can't |
| 247 | find a variable with at least 32 bits. |
| 248 | |
| 249 | - The daemon's "read only" config item now sets an internal read_only |
| 250 | variable that makes extra sure that no write/delete calls on the |
| 251 | read-only side can succeed. |
| 252 | |
| 253 | PROTOCOL DIFFERENCES FOR VERSION 29: |
| 254 | |
| 255 | - A 16-bit flag-word is transmitted after every file-list index. This |
| 256 | indicates what is changing between the sender and the receiver. The |
| 257 | generator now transmits an index and a flag-word to indicate when |
| 258 | dirs and symlinks have changed (resorting to the old-style outputting |
| 259 | of local change-messages for older protocols). |
| 260 | |
| 261 | - If --inplace is specified, the generator sends an extra byte after |
| 262 | the flag-word indicating what kind of basis file is being used for |
| 263 | the transfer (see the FNAMECMP_* defines). This information is used |
| 264 | to optimize the transfer when the basis file is not the destination. |
| 265 | |
| 266 | - The sending of exclude names is done using filter-rule syntax. This |
| 267 | means that all names have a prefixed rule indicator, even excludes |
| 268 | (which used to be sent as a bare pattern, when possible). The -C |
| 269 | option will include the per-dir .cvsignore merge file in the list of |
| 270 | filter rules so it is positioned correctly (unlike in some older |
| 271 | transfer scenarios). |
| 272 | |
| 273 | - Rsync sorts the filename list in a different way: it sorts the subdir |
| 274 | names after the non-subdir names for each dir's contents, and it |
| 275 | always puts a dir's contents immediately after the dir's name in the |
| 276 | list. (Previously an item named "foo.txt" would sort in between |
| 277 | directory "foo/" and "foo/bar".) |
| 278 | |
| 279 | - When talking to a protocol 29 rsync daemon, a list-only request |
| 280 | is able to note this before the options are sent over the wire, and |
| 281 | the new --list-only option is encluded in the options sent over the |
| 282 | socket. |
| 283 | |
| 284 | - When the --stats bytes are sent over the wire (or stored in a batch), |
| 285 | they now include two elapsed-time values: one for how long it took to |
| 286 | build the file-list, and one for how long it took to send it over the |
| 287 | wire (each expressed in thousandths of a second). |
| 288 | |
| 289 | - When --delete-excluded is specified with some filter rules (AKA |
| 290 | excludes), a client sender will now initiate a send of the filter |
| 291 | rules to the receiver (older protocols used to omit the sending of |
| 292 | excludes in this situation since there were no receiver-specific |
| 293 | rules that survived --delete-excluded back then). Note that, as with |
| 294 | all the filter-list sending, only items that are significant to the |
| 295 | other side will actually be sent over the wire, so the filter-rule |
| 296 | list is often empty in this scenario. |
| 297 | |
| 298 | - A protocol-29 batch file includes a bit for the setting of the --dirs |
| 299 | option. Also, the shell script created by --write-batch will use the |
| 300 | --filter option instead of --exclude-from to capture any filter rules. |
| 301 | |
| 302 | BUILD CHANGES: |
| 303 | |
| 304 | - Handle an operating system that use mkdev() in place of makedev(). |
| 305 | |
| 306 | - Improved configure to better handle cross-compiling. |