Compare commits

...

19 Commits

Author SHA1 Message Date
Wayne Davison
cc83294316 Preparing for release of 3.2.4pre3 2022-01-18 23:47:45 -08:00
Wayne Davison
08c8375acb Tweak rrsync rules in the Makefile. 2022-01-18 23:13:22 -08:00
Wayne Davison
824a057935 Add some arg-escaping tests. 2022-01-18 22:47:05 -08:00
Wayne Davison
d91ddb97d1 Don't backslash-escape args for a local transfer. 2022-01-18 22:47:05 -08:00
Wayne Davison
5bb637ca04 Add missing ">". 2022-01-18 22:47:03 -08:00
Wayne Davison
142aba00d5 Silence some symlink mode-change failures. 2022-01-17 22:23:31 -08:00
Wayne Davison
8687e44d10 Fix a broken link & make a tweak. 2022-01-17 20:44:16 -08:00
Wayne Davison
0bd8e85185 Facilitate the next release. 2022-01-17 19:43:43 -08:00
Wayne Davison
00a5ab2364 Tweak some rrsync rules for cleanup & release. 2022-01-17 18:52:49 -08:00
Wayne Davison
f44e76b65c Handle html link targets in a better way. 2022-01-17 18:11:45 -08:00
Wayne Davison
1174d97072 Fix --old-args interaction with a daemon
Ensure that a remote rsync daemon will not split a filename arg unless
the user asked for `--old-args`.
2022-01-17 18:11:03 -08:00
Wayne Davison
d9eaffe564 Complain about --old-args with --protect-args. 2022-01-17 18:09:36 -08:00
Wayne Davison
6197385d1f More man & NEWS enhancements, including linking to env vars. 2022-01-17 18:09:34 -08:00
Wayne Davison
d07272d631 More man page and NEWS improvements.
- Add link targets for all option choices, not just the first one.
- Tweak cross-link arg format.
- Add more links, including some in the latest NEWS.
- Split out a few numbered lists.
2022-01-16 10:47:36 -08:00
Wayne Davison
e2a011d9d0 Fix some typos mentioned in the fossies report. 2022-01-16 10:33:22 -08:00
Wayne Davison
76dc7d0a76 It's OK to capitalize rsync at the start of a sentence. 2022-01-15 21:44:26 -08:00
Wayne Davison
7e94e52144 Some NEWS.html improvements.
- Improve NEWS heading's link targets using version info.
- Optimize regex compilation.
- Make sure every link target is unique.
- Allow link targets to start with a number.
2022-01-15 21:07:34 -08:00
Wayne Davison
5ef7e3c9c5 Remove <a name=...> tags. 2022-01-15 20:55:54 -08:00
Wayne Davison
d2cc1149b3 Get md-convert to output the release html files in the right dir. 2022-01-15 19:12:03 -08:00
20 changed files with 696 additions and 455 deletions

View File

@@ -34,7 +34,8 @@ SIMD_x86_64=simd-checksum-x86_64.o simd-checksum-avx2.o
ASM_x86_64=lib/md5-asm-x86_64.o
GENFILES=configure.sh aclocal.m4 config.h.in rsync.1 rsync.1.html \
rsync-ssl.1 rsync-ssl.1.html rsyncd.conf.5 rsyncd.conf.5.html
rsync-ssl.1 rsync-ssl.1.html rsyncd.conf.5 rsyncd.conf.5.html \
@GEN_RRSYNC@
HEADERS=byteorder.h config.h errcode.h proto.h rsync.h ifuncs.h itypes.h inums.h \
lib/pool_alloc.h lib/mdigest.h lib/md-defines.h
LIBOBJ=lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o \
@@ -271,9 +272,9 @@ rrsync.1: support/rrsync.1.md md-convert Makefile
.PHONY: clean
clean: cleantests
rm -f *~ $(OBJS) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) \
git-version.h rounding rounding.h *.old rsync*.1 rsync*.5 rsync*.html \
daemon-parm.h help-*.h default-*.h proto.h proto.h-tstamp
rm -f *~ $(OBJS) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) @MAKE_RRSYNC@ \
git-version.h rounding rounding.h *.old rsync*.1 rsync*.5 @MAKE_RRSYNC_1@ \
*.html daemon-parm.h help-*.h default-*.h proto.h proto.h-tstamp
.PHONY: cleantests
cleantests:

244
NEWS.md
View File

@@ -1,5 +1,3 @@
<a name="3.2.4"></a>
# NEWS for rsync 3.2.4 (UNRELEASED)
## Changes in this version:
@@ -7,20 +5,22 @@
### BEHAVIOR CHANGES:
- A new form of arg protection was added that works similarly to the older
`--protect-args` (`-s`) option but in a way that avoids breaking things like
rrsync (the restricted rsync script): rsync now uses backslash escaping for
sending "shell-active" characters to the remote shell. This includes spaces,
so fetching a remote file via a simple quoted filename value now works by
default without any extra quoting:
[`--protect-args`](rsync.1#opt) (`-s`) option but in a way that avoids
breaking things like rrsync (the restricted rsync script): rsync now uses
backslash escaping for sending "shell-active" characters to the remote
shell. This includes spaces, so fetching a remote file via a simple quoted
filename value now works by default without any extra quoting:
```shell
rsync -aiv host:'a simple file.pdf' .
```
Wildcards are not escaped in filename args, but they are escaped in options
like the `--suffix` and `--usermap` values. If your rsync script depends on
the old arg-splitting behavior, either run it with the `--old-args` option
or `export RSYNC_OLD_ARGS=1` in the script's environment.
like the [`--suffix`](rsync.1#opt) and [`--usermap`](rsync.1#opt) values.
If your rsync script depends on the old arg-splitting behavior, either run
it with the [`--old-args`](rsync.1#opt) option or `export RSYNC_OLD_ARGS=1`
in the script's environment. See also the [ADVANCED USAGE](rsync.1#)
section of rsync's man page.
- A long-standing bug was preventing rsync from figuring out the current
locale's decimal point character, which made rsync always output numbers
@@ -46,62 +46,69 @@
### BUG FIXES:
- Fixed a bug with `--inplace` + `--sparse` (and a lack of `--whole-file`)
where the destination file could get reconstructed with bogus data. Since
the bug can also be avoided by using (the seemingly redundant) `--no-W` on
the receiving side, the latest rsync will now send `--no-W` to a remote
receiver when this option combination occurs. If your client rsync is not
new enough to do this for you (or if you're just paranoid), you can manually
specify `--no-W -M--no-W` (when not using `--whole-file`) to make sure the
- Fixed a bug with [`--inplace`](rsync.1#opt) + [`--sparse`](rsync.1#opt) (and
a lack of [`--whole-file`](rsync.1#opt)) where the destination file could
get reconstructed with bogus data. Since the bug can also be avoided by
using (the seemingly redundant) [`--no-W`](rsync.1#opt) on the receiving
side, the latest rsync will now send `--no-W` to a remote receiver when this
option combination occurs. If your client rsync is not new enough to do
this for you (or if you're just paranoid), you can manually specify `--no-W
-M--no-W` (when not using [`--whole-file`](rsync.1#opt)) to make sure the
bug is avoided.
- Fixed a bug with `--mkpath` if a single-file copy specifies an existing
destination dir with a non-existing destination filename.
- Fixed a bug with [`--mkpath`](rsync.1#opt) if a single-file copy specifies
an existing destination dir with a non-existing destination filename.
- Fixed `--update -vv` to output "is uptodate" instead of "is newer" messages
for files that are being skipped due to an identical modify time. (This
was a new output quirk in 3.2.3.)
for files that are being skipped due to an identical modify time. (This was
a new output quirk in 3.2.3.)
- When doing an append transfer, the sending side's file must not get shorter
or it is skipped. Fixes a crash that could occur when the size changes to 0
in the middle of the send negotiations.
- When dealing with special files (see `--specials`) in an alt-dest hierarchy,
rsync now checks the non-permission mode bits to ensure that the 2 special
files are really the same before hard-linking them together.
- When dealing with special files (see [`--specials`](rsync.1#opt)) in an
alt-dest hierarchy, rsync now checks the non-permission mode bits to ensure
that the 2 special files are really the same before hard-linking them
together.
- Fixed a bug where `--delay-updates` with stale partial data could cause a
file to fail to update.
- Fixed a bug where [`--delay-updates`](rsync.1#opt) with stale partial data
could cause a file to fail to update.
- Fixed a few places that would output an INFO message with `--info=NAME` that
should only have been output given `--verbose` or `--itemize-changes`.
- Fixed a few places that would output an INFO message with
[`--info=NAME`](rsync.1#opt) that should only have been output given
[`--verbose`](rsync.1#opt) or [`--itemize-changes`](rsync.1#opt).
- Avoid a weird failure if you run a local copy with a (useless) `--rsh`
option that contains a `V` in the command.
- Avoid a weird failure if you run a local copy with a (useless)
[`--rsh`](rsync.1#opt) option that contains a `V` in the command.
- Fixed a long-standing compression bug where the compression level of the
first file transferred affected the level for all future files. Also, the
per-file compression skipping has apparently never worked, so it is now
documented as being ineffective.
- Improved how the `--stop-at`, `--stop-after`, and `--time-limit` options
check to see if the allowed time is over, which should make rsync exit more
consistently.
- Improved how the [`--stop-at`](rsync.1#opt), [`--stop-after`](rsync.1#opt),
and (the deprecated) [`--time-limit`](rsync.1#opt) options check to see if
the allowed time is over, which should make rsync exit more consistently.
- Tweak --progress to display "??:??:??" when the time-remaining value is
so large as to be meaningless.
- Tweak --progress to display "`??:??:??`" when the time-remaining value is so
large as to be meaningless.
- Silence some chmod warnings about symlinks when it looks like we have a
function to set their permissions but they can't really be set.
### ENHANCEMENTS:
- Use openssl's `-verify_hostname` option in the rsync-ssl script.
- Added extra info to the "FILENAME exists" output of `--ignore-existing` when
`--info=skip2` is used. The skip message becomes "FILENAME exists (INFO)"
where the INFO is one of "type change", "sum change" (requires `-c`), "file
change" (based on the quick check), "attr change", or "uptodate". Prior
versions only supported `--info=skip1`.
- Added extra info to the "FILENAME exists" output of
[`--ignore-existing`](rsync.1#opt) when [`--info=skip2`](rsync.1#opt) is
used. The skip message becomes "FILENAME exists (INFO)" where the INFO is
one of "type change", "sum change" (requires [`--checksum`](rsync.1#opt)),
"file change" (based on the quick check), "attr change", or "uptodate".
Prior versions only supported `--info=skip1`.
- Added the `--fsync` option (promoted from the patches repo).
- Added the [`--fsync`](rsync.1#opt) option (promoted from the patches repo).
- Reduced memory usage for an incremental transfer that has a bunch of small
directories.
@@ -109,37 +116,42 @@
- The rsync daemon can now handle a client address with an implied "%scope"
suffix.
- Added support for `--atimes` on macOS and fixed a bug where it wouldn't work
without `--times`.
- Added support for [`--atimes`](rsync.1#opt) on macOS and fixed a bug where
it wouldn't work without [`--times`](rsync.1#opt).
- Rsync can now update the xattrs on a read-only file when your user can
temporarily add user-write permission to the file. (It always worked for a
root transfer.)
- Rsync can now work around an `--inplace` update of a file that is being
refused due to the Linux fs.protected_regular sysctl setting.
- Rsync can now work around an [`--inplace`](rsync.1#opt) update of a file
that is being refused due to the Linux fs.protected_regular sysctl setting.
- When `--chown`, `--usermap`, or `--groupmap` is specified, rsync now makes
sure that the appropriate `--owner` and/or `--group` option is enabled.
- When [`--chown`](rsync.1#opt), [`--usermap`](rsync.1#opt), or
[`--groupmap`](rsync.1#opt), is specified, rsync now makes sure that the
appropriate [`--owner`](rsync.1#opt) and/or [`--group`](rsync.1#opt) options
are enabled.
- Added the `--info=NONREG` setting to control if rsync should warn about
non-regular files in the transfer. This is enabled by default (keeping the
behavior the same as before), so specifying `--info=nonreg0` can be used to
turn the warnings off.
- Added the [`--info=NONREG`](rsync.1#opt) setting to control if rsync should
warn about non-regular files in the transfer. This is enabled by default
(keeping the behavior the same as before), so specifying `--info=nonreg0`
can be used to turn the warnings off.
- More ASM optimizations from Shark64.
- Transformed rrsync into a python script with improvements:
- Security has been beefed up.
- The known rsync options were updated to include recent additions.
- Make rrsync reject `-L`, `-K`, & `-k` by default to make it harder to
- Make rrsync reject [`--copy-links`](rsync.1#opt) (`-L`),
[`--copy-dirlinks`](rsync.1#opt) (`-k`), &
[`--keep-dirlinks`](rsync.1#opt) (`-K`) by default to make it harder to
exploit any out-of-subdir symlinks.
- A new rrsync option of `-munge` tells rrsync to always enable rsync's
`--munge-links` option on the server side.
- A new rrsync option of `-no-lock` disables a new single-use locking idiom
that is the default when `-ro` is not used (useful with `-munge`).
- A new rrsync option of `-no-del` disables all `--remove*` and `--delete*`
options on the server side.
- A new rrsync option of [`-munge`](rrsync.1#opt) tells rrsync to always
enable rsync's [`--munge-links`](rsync.1#opt) option on the server side.
- A new rrsync option of [`-no-lock`](rrsync.1#opt) disables a new
single-use locking idiom that is the default when [`-ro`](rrsync.1#opt) is
not used (useful with [`-munge`](rrsync.1#opt)).
- A new rrsync option of [`-no-del`](rrsync.1#opt) disables all `--remove*`
and `--delete*` rsync options on the server side.
- The log format has been tweaked slightly to add seconds to the timestamp
and to output the command executed as a tuple (making the args clearer).
- An rrsync.1 man page was added (in the support dir with rrsync).
@@ -161,7 +173,7 @@
- Try to support a client that sent a remote rsync a wacko stderr file handle
(such as an older File::RsyncP perl library used by BackupPC).
- Some man page improvements.
- Lots of man page improvements, including better html versions.
### PACKAGING RELATED:
@@ -212,9 +224,7 @@
- Use mallinfo2() instead of mallinfo(), when available.
------------------------------------------------------------------------------
<a name="3.2.3"></a>
# NEWS for rsync 3.2.3 (6 Aug 2020)
@@ -228,65 +238,70 @@
- Fixed a bug in the xattr code that was not leaving room for the "rsync."
prefix in some instances where it needed to be added.
- Restored the ability to use `--bwlimit=0` to specify no bandwidth limit. (It
was accidentally broken in 3.2.2.)
- Restored the ability to use [`--bwlimit=0`](rsync.1#opt) to specify no
bandwidth limit. (It was accidentally broken in 3.2.2.)
- Fixed a bug when combining `--delete-missing-args` with `--no-implied-dirs` &
`-R` where rsync might create the destination path of a missing arg. The
code also avoids some superfluous warnings for nested paths of removed args.
- Fixed a bug when combining [`--delete-missing-args`](rsync.1#opt) with
[`--no-implied-dirs`](rsync.1#opt) & [`-R`](rsync.1#opt) where rsync might
create the destination path of a missing arg. The code also avoids some
superfluous warnings for nested paths of removed args.
- Fixed an issue where hard-linked devices could cause the rdev_major value to
get out of sync between the sender and the receiver, which could cause a
device to get created with the wrong major value in its major,minor pair.
- Rsync now complains about a missing `--temp-dir` before starting any file
transfers.
- Rsync now complains about a missing [`--temp-dir`](rsync.1#opt) before
starting any file transfers.
- A completely empty source arg is now a fatal error. This doesn't change
the handling of implied dot-dir args such as "localhost:" and such.
### ENHANCEMENTS:
- Allow `--max-alloc=0` to specify no limit to the alloc sanity check.
- Allow [`--max-alloc=0`](rsync.1#opt) to specify no limit to the alloc sanity
check.
- Allow `--block-size=SIZE` to specify the size using units (e.g. "100K").
- Allow [`--block-size=SIZE`](rsync.1#opt) to specify the size using units
(e.g. "100K").
- The name of the id-0 user & group are now sent to the receiver along with
the other user/group names in the transfer (instead of assuming that both
sides have the same id-0 names).
- Added the `--stop-after=MINS` and `--stop-at=DATE_TIME` options (with the
`--time-limit=MINS` option accepted as an alias for `--stop-after`). This
is an enhanced version of the time-limit patch from the patches repo.
- Added the [`--stop-after`](rsync.1#opt) and [`--stop-at`](rsync.1#opt)
options (with a [`--time-limit`](rsync.1#opt) alias for `--stop-after`).
This is an enhanced version of the time-limit patch from the patches repo.
- Added the `name converter` daemon parameter to make it easier to convert
user & group names inside a chrooted daemon module. This is based on the
nameconverter patch with some improvements, including a tweak to the request
protocol (so if you used this patch in the past, be sure to update your
converter script to use newlines instead of null chars).
- Added the [`name converter`](rsyncd.conf.5#opt) daemon parameter to make it
easier to convert user & group names inside a chrooted daemon module. This
is based on the nameconverter patch with some improvements, including a
tweak to the request protocol (so if you used this patch in the past, be
sure to update your converter script to use newlines instead of null chars).
- Added `--crtimes` (`-N`) option for preserving the file's create time (I
believe that this is macOS only at the moment).
- Added [`--crtimes`](rsync.1#opt) (`-N`) option for preserving the file's
create time (I believe that this is macOS only at the moment).
- Added `--mkpath` option to tell rsync that it should create a non-existing
path component of the destination arg.
- Added [`--mkpath`](rsync.1#opt) option to tell rsync that it should create a
non-existing path component of the destination arg.
- Added `--stderr=errors|all|client` to replace the `--msgs2stderr` and
`--no-msgs2stderr` options (which are still accepted). The default use of
stderr was changed to be `--stderr=errors` where all the processes that have
stderr available output directly to stderr, which should help error messages
get to the user more quickly, especially when doing a push (which includes
local copying). This also allows rsync to exit quickly when a receiver
failure occurs, since rsync doesn't need to try to keep the connection alive
long enough for the fatal error to go from the receiver to the generator to
the sender. The old default can be requested via `--stderr=client`. Also
changed is that a non-default stderr mode is conveyed to the remote rsync
(using the older option names) instead of requiring the user to use
`--remote-option` (`-M`) to tell the remote rsync what to do.
- Added [`--stderr=errors|all|client`](rsync.1#opt) to replace the
`--msgs2stderr` and `--no-msgs2stderr` options (which are still accepted).
The default use of stderr was changed to be `--stderr=errors` where all the
processes that have stderr available output directly to stderr, which should
help error messages get to the user more quickly, especially when doing a
push (which includes local copying). This also allows rsync to exit quickly
when a receiver failure occurs, since rsync doesn't need to try to keep the
connection alive long enough for the fatal error to go from the receiver to
the generator to the sender. The old default can be requested via
`--stderr=client`. Also changed is that a non-default stderr mode is
conveyed to the remote rsync (using the older option names) instead of
requiring the user to use [`--remote-option`](rsync.1#opt) (`-M`) to tell
the remote rsync what to do.
- Added the ability to specify "@netgroup" names to the `hosts allow` and
`hosts deny` daemon parameters. This is a finalized version of the
netgroup-auth patch from the patches repo.
- Added the ability to specify "@netgroup" names to the [`hosts
allow`](rsyncd.conf.5#opt) and [`hosts deny`](rsyncd.conf.5#opt) daemon
parameters. This is a finalized version of the netgroup-auth patch from the
patches repo.
- Rsync can now hard-link symlinks on FreeBSD due to it making use of the
linkat() function when it is available.
@@ -315,7 +330,6 @@
(with a fallback to the old 1-char string kluge for older compilers).
------------------------------------------------------------------------------
<a name="3.2.2"></a>
# NEWS for rsync 3.2.2 (4 Jul 2020)
@@ -391,7 +405,6 @@
can create the interrelated structs and accessors that loadparm.c needs.
------------------------------------------------------------------------------
<a name="3.2.1"></a>
# NEWS for rsync 3.2.1 (22 Jun 2020)
@@ -454,7 +467,6 @@
- Merged the OLDNEWS.md file into NEWS.md.
------------------------------------------------------------------------------
<a name="3.2.0"></a>
# NEWS for rsync 3.2.0 (19 Jun 2020)
@@ -666,7 +678,6 @@
- Some code typos were fixed (as pointed out by a Fossies run).
------------------------------------------------------------------------------
<a name="3.1.3"></a>
# NEWS for rsync 3.1.3 (28 Jan 2018)
@@ -737,7 +748,6 @@
- Support newer yodl versions when converting man pages.
------------------------------------------------------------------------------
<a name="3.1.2"></a>
# NEWS for rsync 3.1.2 (21 Dec 2015)
@@ -803,7 +813,6 @@
- Improved the m4 generation rules and some autoconf idioms.
------------------------------------------------------------------------------
<a name="3.1.1"></a>
# NEWS for rsync 3.1.1 (22 Jun 2014)
@@ -923,7 +932,6 @@
and/or zlib code is put early in the CFLAGS.
------------------------------------------------------------------------------
<a name="3.1.0"></a>
# NEWS for rsync 3.1.0 (28 Sep 2013)
@@ -1174,7 +1182,6 @@
- Fixed some build issues for Android and Minix.
------------------------------------------------------------------------------
<a name="3.0.9"></a>
# NEWS for rsync 3.0.9 (23 Sep 2011)
@@ -1234,7 +1241,6 @@
- Some minor manpage improvements.
------------------------------------------------------------------------------
<a name="3.0.8"></a>
# NEWS for rsync 3.0.8 (26 Mar 2011)
@@ -1373,7 +1379,6 @@
- Fixed the testsuite/xattrs.test script on OS X.
------------------------------------------------------------------------------
<a name="3.0.7"></a>
# NEWS for rsync 3.0.7 (31 Dec 2009)
@@ -1441,7 +1446,6 @@
- The testsuite no longer uses `id -u`, so it works better on Solaris.
------------------------------------------------------------------------------
<a name="3.0.6"></a>
# NEWS for rsync 3.0.6 (8 May 2009)
@@ -1500,7 +1504,6 @@
- Fixed an failure transferring special files from Solaris to Linux.
------------------------------------------------------------------------------
<a name="3.0.5"></a>
# NEWS for rsync 3.0.5 (28 Dec 2008)
@@ -1565,7 +1568,6 @@
idiom. (See the support dir.)
------------------------------------------------------------------------------
<a name="3.0.4"></a>
# NEWS for rsync 3.0.4 (6 Sep 2008)
@@ -1633,7 +1635,6 @@
even more consistency checks on the files.
------------------------------------------------------------------------------
<a name="3.0.3"></a>
# NEWS for rsync 3.0.3 (29 Jun 2008)
@@ -1724,7 +1725,6 @@
bleed-over into patches that follow.
------------------------------------------------------------------------------
<a name="3.0.2"></a>
# NEWS for rsync 3.0.2 (8 Apr 2008)
@@ -1746,7 +1746,6 @@
packaging dir.
------------------------------------------------------------------------------
<a name="3.0.1"></a>
# NEWS for rsync 3.0.1 (3 Apr 2008)
@@ -1885,7 +1884,6 @@
- Updated the build scripts to work with a revised FTP directory structure.
------------------------------------------------------------------------------
<a name="3.0.0"></a>
# NEWS for rsync 3.0.0 (1 Mar 2008)
@@ -2236,7 +2234,6 @@
the 3.0.0 release.
------------------------------------------------------------------------------
<a name="2.6.9"></a>
# NEWS for rsync 2.6.9 (6 Nov 2006)
@@ -2396,7 +2393,6 @@
consistent opening comments.
------------------------------------------------------------------------------
<a name="2.6.8"></a>
# NEWS for rsync 2.6.8 (22 Apr 2006)
@@ -2466,7 +2462,6 @@
actions to a file (something that only a daemon supports at present).
------------------------------------------------------------------------------
<a name="2.6.7"></a>
# NEWS for rsync 2.6.7 (11 Mar 2006)
@@ -2790,7 +2785,6 @@
~/.popt.
------------------------------------------------------------------------------
<a name="2.6.6"></a>
# NEWS for rsync 2.6.6 (28 Jul 2005)
@@ -2856,7 +2850,6 @@
(log-format w/%i) and some double-verbose messages.
------------------------------------------------------------------------------
<a name="2.6.5"></a>
# NEWS for rsync 2.6.5 (1 Jun 2005)
@@ -3037,7 +3030,6 @@
enables the optional copying of extended attributes.
------------------------------------------------------------------------------
<a name="2.6.4"></a>
# NEWS for rsync 2.6.4 (30 March 2005)
@@ -3419,7 +3411,6 @@
- Improved configure to better handle cross-compiling.
------------------------------------------------------------------------------
<a name="2.6.3"></a>
# NEWS for rsync 2.6.3 (30 Sep 2004)
@@ -3663,7 +3654,6 @@
removed.
------------------------------------------------------------------------------
<a name="2.6.2"></a>
# NEWS for rsync 2.6.2 (30 Apr 2004)
@@ -3705,7 +3695,6 @@
- Two new diffs were added to the patches dir.
------------------------------------------------------------------------------
<a name="2.6.1"></a>
# NEWS for rsync 2.6.1 (26 Apr 2004)
@@ -3897,7 +3886,6 @@
applied, and rebuilt the rest.
------------------------------------------------------------------------------
<a name="2.6.0"></a>
# NEWS for rsync 2.6.0 (1 Jan 2004)
@@ -4037,7 +4025,6 @@
other side (primarily for testing purposes). (Wayne Davison)
------------------------------------------------------------------------------
<a name="2.5.7"></a>
# NEWS for rsync 2.5.7 (4 Dec 2003)
@@ -4049,7 +4036,6 @@
Andrea Barisani)
------------------------------------------------------------------------------
<a name="2.5.6"></a>
# NEWS for rsync 2.5.6, aka "the dwd-between-jobs release" (26 Jan 2003)
@@ -4144,7 +4130,6 @@
should build on more platforms. (Paul Green)
------------------------------------------------------------------------------
<a name="2.5.5"></a>
# NEWS for rsync 2.5.5, aka Snowy River (2 Apr 2002)
@@ -4183,7 +4168,6 @@
- Improved network error handling. (Greg A. Woods)
------------------------------------------------------------------------------
<a name="2.5.4"></a>
# NEWS for rsync 2.5.4, aka "Imitation lizard skin" (13 Mar 2002)
@@ -4203,7 +4187,6 @@
- Additional test cases for `--compress`. (Martin Pool)
------------------------------------------------------------------------------
<a name="2.5.3"></a>
# NEWS for rsync 2.5.3, aka "Happy 26" (11 Mar 2002)
@@ -4252,7 +4235,6 @@
error message. (Colin Walters)
------------------------------------------------------------------------------
<a name="2.5.2"></a>
# NEWS for rsync 2.5.2 (26 Jan 2002)
@@ -4301,7 +4283,6 @@
Razor. (Debian #124286)
------------------------------------------------------------------------------
<a name="2.5.1"></a>
# NEWS for rsync 2.5.1 (3 Jan 2002)
@@ -4336,7 +4317,6 @@
- Clearer error messages for some conditions.
------------------------------------------------------------------------------
<a name="2.5.0"></a>
# NEWS for rsync 2.5.0 (30 Nov 2001)

View File

@@ -47,6 +47,7 @@ extern int protocol_version;
extern int io_timeout;
extern int no_detach;
extern int write_batch;
extern int old_style_args;
extern int default_af_hint;
extern int logfile_format_has_i;
extern int logfile_format_has_o_or_i;
@@ -288,20 +289,45 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
sargs[sargc++] = ".";
if (!old_style_args)
snprintf(line, sizeof line, " %.*s/", modlen, modname);
while (argc > 0) {
if (sargc >= MAX_ARGS - 1) {
arg_overflow:
rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n");
exit_cleanup(RERR_SYNTAX);
}
if (strncmp(*argv, modname, modlen) == 0
&& argv[0][modlen] == '\0')
if (strncmp(*argv, modname, modlen) == 0 && argv[0][modlen] == '\0')
sargs[sargc++] = modname; /* we send "modname/" */
else if (**argv == '-') {
if (asprintf(sargs + sargc++, "./%s", *argv) < 0)
out_of_memory("start_inband_exchange");
} else
sargs[sargc++] = *argv;
else {
char *arg = *argv;
int extra_chars = *arg == '-' ? 2 : 0; /* a leading dash needs a "./" prefix. */
/* If --old-args was not specified, make sure that the arg won't split at a mod name! */
if (!old_style_args && (p = strstr(arg, line)) != NULL) {
do {
extra_chars += 2;
} while ((p = strstr(p+1, line)) != NULL);
}
if (extra_chars) {
char *f = arg;
char *t = arg = new_array(char, strlen(arg) + extra_chars + 1);
if (*f == '-') {
*t++ = '.';
*t++ = '/';
}
while (*f) {
if (*f == ' ' && strncmp(f, line, modlen+2) == 0) {
*t++ = '[';
*t++ = *f++;
*t++ = ']';
} else
*t++ = *f++;
}
*t = '\0';
}
sargs[sargc++] = arg;
}
argv++;
argc--;
}

View File

@@ -142,6 +142,7 @@ if test x"$with_rrsync" != x"yes"; then
else
MAKE_RRSYNC='rrsync'
MAKE_RRSYNC_1='rrsync.1'
GEN_RRSYNC='rrsync.1 rrsync.1.html'
fi
AC_SUBST(with_rrsync)
@@ -411,7 +412,7 @@ AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]),
;;
esac ],
AC_TRY_RUN([ /* AF_INET6 avalable check */
AC_TRY_RUN([ /* AF_INET6 availability check */
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -1257,6 +1258,7 @@ AC_SUBST(BUILD_POPT)
AC_SUBST(BUILD_ZLIB)
AC_SUBST(MAKE_RRSYNC)
AC_SUBST(MAKE_RRSYNC_1)
AC_SUBST(GEN_RRSYNC)
AC_SUBST(MAKE_MAN)
AC_CHECK_FUNCS(_acl __acl _facl __facl)

View File

@@ -532,7 +532,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
iflags |= ITEM_REPORT_CRTIME;
}
#endif
#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
#ifndef CAN_CHMOD_SYMLINK
if (S_ISLNK(file->mode)) {
;
} else

View File

@@ -20,7 +20,7 @@
* for string length. This covers a nasty loophole.
*
* The other functions are there to prevent NULL pointers from
* causing nast effects.
* causing nasty effects.
*
* More Recently:
* Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43

7
main.c
View File

@@ -48,6 +48,7 @@ extern int called_from_signal_handler;
extern int need_messages_from_generator;
extern int kluge_around_eof;
extern int got_xfer_error;
extern int old_style_args;
extern int msgs2stderr;
extern int module_id;
extern int read_only;
@@ -477,7 +478,7 @@ static void show_malloc_stats(void)
#define PRINT_ALLOC_NUM(title, descr, num) \
rprintf(FINFO, " %-11s%10" SIZE_T_FMT_MOD "d (" descr ")\n", \
title ":", (SIZE_T_FMT_CAST)(num));
title ":", (SIZE_T_FMT_CAST)(num));
PRINT_ALLOC_NUM("arena", "bytes from sbrk", mi.arena);
PRINT_ALLOC_NUM("ordblks", "chunks not in use", mi.ordblks);
@@ -1470,6 +1471,10 @@ static int start_client(int argc, char *argv[])
rsync_port = 0;
}
/* A local transfer doesn't unbackslash anything, so leave the args alone. */
if (local_server)
old_style_args = 2;
if (!rsync_port && remote_argc && !**remote_argv) /* Turn an empty arg into a dot dir. */
*remote_argv = ".";

View File

@@ -32,6 +32,8 @@
import os, sys, re, argparse, subprocess, time
from html.parser import HTMLParser
VALID_PAGES = 'README INSTALL COPYING rsync.1 rrsync.1 rsync-ssl.1 rsyncd.conf.5'.split()
CONSUMES_TXT = set('h1 h2 h3 p li pre'.split())
HTML_START = """\
@@ -47,7 +49,7 @@ body {
body, b, strong, u {
font-family: 'Roboto', sans-serif;
}
a.tgt { font-face: symbol; font-weight: 400; font-size: 70%; visibility: hidden; text-decoration: none; color: #ddd; padding: 0 4px; border: 0; vertical-align: top; }
a.tgt { font-face: symbol; font-weight: 400; font-size: 70%; visibility: hidden; text-decoration: none; color: #ddd; padding: 0 4px; border: 0; }
a.tgt:after { content: '🔗'; }
a.tgt:hover { color: #444; background-color: #eaeaea; }
h1:hover > a.tgt, h2:hover > a.tgt, h3:hover > a.tgt, dt:hover > a.tgt { visibility: visible; }
@@ -111,6 +113,21 @@ UNDR_FONT = ('\3', r"\fI")
NBR_DASH = ('\4', r"\-")
NBR_SPACE = ('\xa0', r"\ ")
FILENAME_RE = re.compile(r'^(?P<fn>(?P<srcdir>.+/)?(?P<name>(?P<prog>[^/]+?)(\.(?P<sect>\d+))?)\.md)$')
ASSIGNMENT_RE = re.compile(r'^(\w+)=(.+)')
QUOTED_RE = re.compile(r'"(.+?)"')
VAR_REF_RE = re.compile(r'\$\{(\w+)\}')
VERSION_RE = re.compile(r' (\d[.\d]+)[, ]')
BIN_CHARS_RE = re.compile(r'[\1-\7]+')
SPACE_DOUBLE_DASH_RE = re.compile(r'\s--(\s)')
NON_SPACE_SINGLE_DASH_RE = re.compile(r'(^|\W)-')
WHITESPACE_RE = re.compile(r'\s')
CODE_BLOCK_RE = re.compile(r'[%s]([^=%s]+)[=%s]' % (BOLD_FONT[0], NORM_FONT[0], NORM_FONT[0]))
NBR_DASH_RE = re.compile(r'[%s]' % NBR_DASH[0])
INVALID_TARGET_CHARS_RE = re.compile(r'[^-A-Za-z0-9._]')
INVALID_START_CHAR_RE = re.compile(r'^([^A-Za-z0-9])')
MANIFY_LINESTART_RE = re.compile(r"^(['.])", flags=re.M)
md_parser = None
env_subs = { }
@@ -125,7 +142,7 @@ def main():
def parse_md_file(mdfn):
fi = re.match(r'^(?P<fn>(?P<srcdir>.+/)?(?P<name>(?P<prog>[^/]+?)(\.(?P<sect>\d+))?)\.md)$', mdfn)
fi = FILENAME_RE.match(mdfn)
if not fi:
die('Failed to parse a md input file name:', mdfn)
fi = argparse.Namespace(**fi.groupdict())
@@ -133,7 +150,7 @@ def parse_md_file(mdfn):
if fi.want_manpage:
fi.title = fi.prog + '(' + fi.sect + ') man page'
else:
fi.title = fi.prog
fi.title = fi.prog + ' for rsync'
if fi.want_manpage:
if not env_subs:
@@ -172,6 +189,8 @@ def parse_md_file(mdfn):
if fi.want_manpage:
output_list += [ (fi.name, fi.man_out) ]
for fn, txt in output_list:
if args.dest and args.dest != '.':
fn = os.path.join(args.dest, fn)
if os.path.lexists(fn):
os.unlink(fn)
print("Wrote:", fn)
@@ -205,19 +224,19 @@ def find_man_substitutions():
with open(srcdir + 'version.h', 'r', encoding='utf-8') as fh:
txt = fh.read()
m = re.search(r'"(.+?)"', txt)
m = QUOTED_RE.search(txt)
env_subs['VERSION'] = m.group(1)
with open('Makefile', 'r', encoding='utf-8') as fh:
for line in fh:
m = re.match(r'^(\w+)=(.+)', line)
m = ASSIGNMENT_RE.match(line)
if not m:
continue
var, val = (m.group(1), m.group(2))
if var == 'prefix' and env_subs[var] is not None:
continue
while re.search(r'\$\{', val):
val = re.sub(r'\$\{(\w+)\}', lambda m: env_subs[m.group(1)], val)
while VAR_REF_RE.search(val):
val = VAR_REF_RE.sub(lambda m: env_subs[m.group(1)], val)
env_subs[var] = val
if var == 'srcdir':
break
@@ -251,9 +270,10 @@ class TransformHtml(HTMLParser):
derived_hashtags = set(),
referenced_hashtags = set(),
bad_hashtags = set(),
prior_target = None,
latest_targets = [ ],
opt_prefix = 'opt',
a_txt_start = None,
target_suf = '',
)
if st.want_manpage:
@@ -276,11 +296,11 @@ class TransformHtml(HTMLParser):
fi.man_out = ''.join(st.man_out)
st.man_out = None
for href, txt in st.derived_hashtags:
derived = txt2target(txt, href[1:])
for tgt, txt in st.derived_hashtags:
derived = txt2target(txt, tgt)
if derived not in st.created_hashtags:
txt = re.sub(r'[\1-\7]+', '', txt.replace(NBR_DASH[0], '-').replace(NBR_SPACE[0], ' '))
warn('Unknown derived hashtag link in', self.fn, 'based on:', (href, txt))
txt = BIN_CHARS_RE.sub('', txt.replace(NBR_DASH[0], '-').replace(NBR_SPACE[0], ' '))
warn('Unknown derived hashtag link in', self.fn, 'based on:', (tgt, txt))
for bad in st.bad_hashtags:
if bad in st.created_hashtags:
@@ -362,13 +382,19 @@ class TransformHtml(HTMLParser):
st.a_href = None
for var, val in attrs_list:
if var == 'href':
if val in ('#', '#opt', '#daemon-opt'):
st.a_href = val
elif val.startswith('#'):
st.referenced_hashtags.add(val[1:])
if val[1:] == st.prior_target:
warn('Found link to the current section in', self.fn + ':', val)
elif not val.startswith(('https://', 'http://', 'mailto:', 'ftp:', './')):
if val.startswith(('https://', 'http://', 'mailto:', 'ftp:')):
pass # nothing to check
elif '#' in val:
pg, tgt = val.split('#', 2)
if pg and pg not in VALID_PAGES or '#' in tgt:
st.bad_hashtags.add(val)
elif tgt in ('', 'opt', 'dopt'):
st.a_href = val
elif pg == '':
st.referenced_hashtags.add(tgt)
if tgt in st.latest_targets:
warn('Found link to the current section in', self.fn + ':', val)
elif val not in VALID_PAGES:
st.bad_hashtags.add(val)
st.a_txt_start = len(st.txt)
st.html_out.append('<' + tag + ''.join(' ' + var + '="' + htmlify(val) + '"' for var, val in attrs_list) + '>')
@@ -385,19 +411,28 @@ class TransformHtml(HTMLParser):
else:
txt = None
add_to_txt = None
if tag == 'h1' or tag == 'h2':
if tag == 'h1':
tgt = txt
target_suf = ''
if tgt.startswith('NEWS for '):
m = VERSION_RE.search(tgt)
if m:
tgt = m.group(1)
st.target_suf = '-' + tgt
self.add_targets(tag, tgt)
elif tag == 'h2':
st.man_out.append(st.p_macro + '.SH "' + manify(txt) + '"\n')
self.add_target(txt)
st.opt_prefix = 'daemon-opt' if txt == 'DAEMON OPTIONS' else 'opt'
self.add_targets(tag, txt, st.target_suf)
st.opt_prefix = 'dopt' if txt == 'DAEMON OPTIONS' else 'opt'
elif tag == 'h3':
st.man_out.append(st.p_macro + '.SS "' + manify(txt) + '"\n')
self.add_target(txt)
self.add_targets(tag, txt, st.target_suf)
elif tag == 'p':
if st.dt_from == 'p':
tag = 'dt'
st.man_out.append('.IP "' + manify(txt) + '"\n')
if txt.startswith(BOLD_FONT[0]):
self.add_target(txt)
self.add_targets(tag, txt)
st.dt_from = None
elif txt != '':
st.man_out.append(manify(txt) + "\n")
@@ -439,11 +474,13 @@ class TransformHtml(HTMLParser):
find = 'href="' + st.a_href + '"'
for j in range(len(st.html_out)-1, 0, -1):
if find in st.html_out[j]:
derived = txt2target(atxt, st.a_href[1:])
if derived == st.prior_target:
warn('Found link to the current section in', self.fn + ':', derived)
st.derived_hashtags.add((st.a_href, atxt))
st.html_out[j] = st.html_out[j].replace(find, 'href="#' + derived + '"')
pg, tgt = st.a_href.split('#', 2)
derived = txt2target(atxt, tgt)
if pg == '':
if derived in st.latest_targets:
warn('Found link to the current section in', self.fn + ':', st.a_href)
st.derived_hashtags.add((tgt, atxt))
st.html_out[j] = st.html_out[j].replace(find, 'href="' + pg + '#' + derived + '"')
break
else:
die('INTERNAL ERROR: failed to find href in html data:', find)
@@ -472,23 +509,47 @@ class TransformHtml(HTMLParser):
if st.in_pre:
html = htmlify(txt)
else:
txt = re.sub(r'\s--(\s)', NBR_SPACE[0] + r'--\1', txt).replace('--', NBR_DASH[0]*2)
txt = re.sub(r'(^|\W)-', r'\1' + NBR_DASH[0], txt)
txt = SPACE_DOUBLE_DASH_RE.sub(NBR_SPACE[0] + r'--\1', txt).replace('--', NBR_DASH[0]*2)
txt = NON_SPACE_SINGLE_DASH_RE.sub(r'\1' + NBR_DASH[0], txt)
html = htmlify(txt)
if st.in_code:
txt = re.sub(r'\s', NBR_SPACE[0], txt)
txt = WHITESPACE_RE.sub(NBR_SPACE[0], txt)
html = html.replace(NBR_DASH[0], '-').replace(NBR_SPACE[0], ' ') # <code> is non-breaking in CSS
st.html_out.append(html.replace(NBR_SPACE[0], '&nbsp;').replace(NBR_DASH[0], '-&#8288;'))
st.txt += txt
def add_target(self, txt):
def add_targets(self, tag, txt, suf=None):
st = self.state
txt = txt2target(txt, st.opt_prefix)
if txt:
st.html_out.append('<a id="' + txt + '" href="#' + txt + '" class="tgt"></a>')
tag = '<' + tag + '>'
targets = CODE_BLOCK_RE.findall(txt)
if not targets:
targets = [ txt ]
tag_pos = 0
for txt in targets:
txt = txt2target(txt, st.opt_prefix)
if not txt:
continue
if suf:
txt += suf
if txt in st.created_hashtags:
for j in range(2, 1000):
chk = txt + '-' + str(j)
if chk not in st.created_hashtags:
print('Made link target unique:', chk)
txt = chk
break
if tag_pos == 0:
tag_pos -= 1
while st.html_out[tag_pos] != tag:
tag_pos -= 1
st.html_out[tag_pos] = tag[:-1] + ' id="' + txt + '">'
st.html_out.append('<a href="#' + txt + '" class="tgt"></a>')
tag_pos -= 1 # take into account the append
else:
st.html_out[tag_pos] = '<span id="' + txt + '"></span>' + st.html_out[tag_pos]
st.created_hashtags.add(txt)
st.prior_target = txt
st.latest_targets = targets
def output_debug(self, event, extra):
@@ -505,24 +566,27 @@ class TransformHtml(HTMLParser):
def txt2target(txt, opt_prefix):
txt = re.sub(r'[%s](.+?)[=%s].*' % (BOLD_FONT[0], NORM_FONT[0]), r'\1', txt.strip())
txt = re.sub(r'[%s]' % NBR_DASH[0], '-', txt)
txt = re.sub(r'[\1-\7]+', '', txt)
txt = re.sub(r'[^-A-Za-z0-9._]', '_', txt)
txt = txt.strip().rstrip(':')
m = CODE_BLOCK_RE.search(txt)
if m:
txt = m.group(1)
txt = NBR_DASH_RE.sub('-', txt)
txt = BIN_CHARS_RE.sub('', txt)
txt = INVALID_TARGET_CHARS_RE.sub('_', txt)
if opt_prefix and txt.startswith('-'):
txt = opt_prefix + txt
else:
txt = re.sub(r'^([^A-Za-z])', r't\1', txt)
txt = INVALID_START_CHAR_RE.sub(r't\1', txt)
return txt
def manify(txt):
return re.sub(r"^(['.])", r'\&\1', txt.replace('\\', '\\\\')
return MANIFY_LINESTART_RE.sub(r'\&\1', txt.replace('\\', '\\\\')
.replace(NBR_SPACE[0], NBR_SPACE[1])
.replace(NBR_DASH[0], NBR_DASH[1])
.replace(NORM_FONT[0], NORM_FONT[1])
.replace(BOLD_FONT[0], BOLD_FONT[1])
.replace(UNDR_FONT[0], UNDR_FONT[1]), flags=re.M)
.replace(UNDR_FONT[0], UNDR_FONT[1]))
def htmlify(txt):
@@ -543,6 +607,7 @@ def die(*msg):
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Output html and (optionally) nroff for markdown pages.", add_help=False)
parser.add_argument('--test', action='store_true', help="Just test the parsing without outputting any files.")
parser.add_argument('--dest', metavar='DIR', help="Put files into DIR instead of the current directory.")
parser.add_argument('--debug', '-D', action='count', default=0, help='Output copious info on the html parsing. Repeat for even more.')
parser.add_argument("--help", "-h", action="help", help="Output this help message and exit.")
parser.add_argument("mdfiles", nargs='+', help="The source .md files to convert.")

View File

@@ -1933,10 +1933,18 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
if (old_style_args < 0) {
if (!am_server && (arg = getenv("RSYNC_OLD_ARGS")) != NULL && *arg)
if (!am_server && protect_args <= 0 && (arg = getenv("RSYNC_OLD_ARGS")) != NULL && *arg) {
protect_args = 0;
old_style_args = atoi(arg);
else
} else
old_style_args = 0;
} else if (old_style_args) {
if (protect_args > 0) {
snprintf(err_buf, sizeof err_buf,
"--protect-args conflicts with --old-args.\n");
return 0;
}
protect_args = 0;
}
if (protect_args < 0) {

View File

@@ -1,8 +1,8 @@
Summary: A fast, versatile, remote (and local) file-copying tool
Name: rsync
Version: 3.2.4
%define fullversion %{version}pre2
Release: 0.1.pre2
%define fullversion %{version}pre3
Release: 0.1.pre3
%define srcdir src-previews
Group: Applications/Internet
License: GPL
@@ -79,8 +79,8 @@ rm -rf $RPM_BUILD_ROOT
%dir /etc/rsync-ssl/certs
%changelog
* Sat Jan 15 2022 Wayne Davison <wayne@opencoder.net>
Released 3.2.4pre2.
* Tue Jan 18 2022 Wayne Davison <wayne@opencoder.net>
Released 3.2.4pre3.
* Fri Mar 21 2008 Wayne Davison <wayne@opencoder.net>
Added installation of /etc/xinetd.d/rsync file and some commented-out

View File

@@ -181,7 +181,7 @@ def mandate_gensend_hook():
die('Please add a "make gensend" into your', hook, 'script.')
# Snag the GENFILES values out of the Makefile.in file and return them as a list.
# Snag the GENFILES values out of the Makefile file and return them as a list.
def get_gen_files(want_dir_plus_list=False):
cont_re = re.compile(r'\\\n')
@@ -189,7 +189,7 @@ def get_gen_files(want_dir_plus_list=False):
auto_dir = os.path.join('auto-build-save', cmd_txt('git rev-parse --abbrev-ref HEAD').out.strip().replace('/', '%'))
with open('Makefile.in', 'r', encoding='utf-8') as fh:
with open(auto_dir + '/Makefile', 'r', encoding='utf-8') as fh:
for line in fh:
if not gen_files:
chk = re.sub(r'^GENFILES=', '', line)

View File

@@ -206,10 +206,10 @@ About to:
txt = replace_or_die(x_re, repl, txt, f"Unable to find SUBPROTOCOL_VERSION define in {fn}")
elif fn == 'NEWS.md':
efv = re.escape(finalversion)
x_re = re.compile(r'^<.+>\s+# NEWS for rsync %s \(UNRELEASED\)\s+## Changes in this version:\n' % efv
x_re = re.compile(r'^# NEWS for rsync %s \(UNRELEASED\)\s+## Changes in this version:\n' % efv
+ r'(\n### PROTOCOL NUMBER:\s+- The protocol number was changed to \d+\.\n)?')
rel_day = 'UNRELEASED' if pre else today
repl = (f'<a name="{finalversion}"></a>\n\n# NEWS for rsync {finalversion} ({rel_day})\n\n'
repl = (f'# NEWS for rsync {finalversion} ({rel_day})\n\n'
+ '## Changes in this version:\n')
if proto_changed:
repl += f'\n### PROTOCOL NUMBER:\n\n - The protocol number was changed to {protocol_version}.\n'
@@ -341,7 +341,7 @@ About to:
md_files = 'README.md NEWS.md INSTALL.md'.split()
html_files = [ fn for fn in gen_pathnames if fn.endswith('.html') ]
cmd_chk(['rsync', '-a', *md_files, *html_files, dest])
cmd_chk(["./md-convert"] + [ dest +'/'+ fn for fn in md_files ])
cmd_chk(["./md-convert", "--dest", dest, *md_files])
cmd_chk(f"git log --name-status | gzip -9 >{dest}/ChangeLog.gz")

View File

@@ -9,7 +9,7 @@ rsync-ssl [--type=SSL_TYPE] RSYNC_ARGS
```
The online version of this man page (that includes cross-linking of topics)
is available at <https://download.samba.org/pub/rsync/rsync.1>.
is available at <https://download.samba.org/pub/rsync/rsync-ssl.1>.
## DESCRIPTION
@@ -96,7 +96,7 @@ The ssl helper scripts are affected by the following environment variables:
## SEE ALSO
[**rsync**(1)](./rsync.1), [**rsyncd.conf**(5)](./rsyncd.conf.5)
[**rsync**(1)](rsync.1), [**rsyncd.conf**(5)](rsyncd.conf.5)
## CAVEATS
@@ -121,8 +121,8 @@ This man page is current for version @VERSION@ of rsync.
## CREDITS
rsync is distributed under the GNU General Public License. See the file
[COPYING](./COPYING) for details.
Rsync is distributed under the GNU General Public License. See the file
[COPYING](COPYING) for details.
A web site is available at <https://rsync.samba.org/>. The site includes an
FAQ-O-Matic which may cover questions unanswered by this manual page.

View File

@@ -92,8 +92,8 @@ protocol). For remote transfers, a modern rsync uses ssh for its
communications, but it may have been configured to use a different remote shell
by default, such as rsh or remsh.
You can also specify any remote shell you like, either by using the [`-e`](#opt--rsh)
command line option, or by setting the RSYNC_RSH environment variable.
You can also specify any remote shell you like, either by using the [`-e`](#opt)
command line option, or by setting the [`RSYNC_RSH`](#) environment variable.
Note that rsync must be installed on both the source and destination machines.
@@ -160,19 +160,24 @@ The syntax for requesting multiple files from a remote host is done by
specifying additional remote-host args in the same style as the first, or with
the hostname omitted. For instance, all these work:
> rsync -av host:file1 :file2 host:file{3,4} /dest/
> rsync -av host::modname/file{1,2} host::modname/file3 /dest/
> rsync -av host::modname/file1 ::modname/file{3,4} /dest/
> rsync -aiv host:file1 :file2 host:file{3,4} /dest/
> rsync -aiv host::modname/file{1,2} host::modname/extra /dest/
> rsync -aiv host::modname/first ::modname/extra{1,2} /dest/
**Older versions of rsync** required using quoted spaces in the SRC, like these
examples:
In a modern rsync, you only need to quote or backslash-escape things like
spaces from the local shell but not also from the remote shell:
> rsync -av host:'dir1/file1 dir2/file2' /dest
> rsync host::'modname/dir1/file1 modname/dir2/file2' /dest
> rsync -aiv host:'a simple file.pdf' /dest/
This word-splitting only works in a modern rsync by using [`--old-args`](#opt)
(or its environment variable) and making sure that [`--protect-args`](#opt) is
not enabled.
Really old versions of rsync only allowed specifying one remote-source arg, so
it required the remote side to split the args at a space. You can still get
this old-style arg splitting by using the [`--old-args`](#opt) option:
> rsync -ai --old-args host:'dir1/file1 dir2/file2' /dest
> rsync -ai --old-args host::'modname/dir1/file1 modname/dir2/file2' /dest
See that option's section for an [environment variable](#RSYNC_OLD_ARGS) that
can be exported to help old scripts.
## CONNECTING TO AN RSYNC DAEMON
@@ -203,22 +208,23 @@ An example that copies all the files in a remote module named "src":
Some modules on the remote daemon may require authentication. If so, you will
receive a password prompt when you connect. You can avoid the password prompt
by setting the environment variable RSYNC_PASSWORD to the password you want to
use or using the [`--password-file`](#opt) option. This may be useful when
scripting rsync.
by setting the environment variable [`RSYNC_PASSWORD`](#) to the password you
want to use or using the [`--password-file`](#opt) option. This may be useful
when scripting rsync.
WARNING: On some systems environment variables are visible to all users. On
those systems using [`--password-file`](#opt) is recommended.
You may establish the connection via a web proxy by setting the environment
variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy. Note
that your web proxy's configuration must support proxy connections to port 873.
variable [`RSYNC_PROXY`](#) to a hostname:port pair pointing to your web proxy.
Note that your web proxy's configuration must support proxy connections to port
873.
You may also establish a daemon connection using a program as a proxy by
setting the environment variable RSYNC_CONNECT_PROG to the commands you wish to
run in place of making a direct socket connection. The string may contain the
escape "%H" to represent the hostname specified in the rsync command (so use
"%%" if you need a single "%" in your string). For example:
setting the environment variable [`RSYNC_CONNECT_PROG`](#) to the commands you
wish to run in place of making a direct socket connection. The string may
contain the escape "%H" to represent the hostname specified in the rsync
command (so use "%%" if you need a single "%" in your string). For example:
> export RSYNC_CONNECT_PROG='ssh proxyhost nc %H 873'
> rsync -av targethost1::module/src/ /dest/
@@ -227,9 +233,9 @@ escape "%H" to represent the hostname specified in the rsync command (so use
The command specified above uses ssh to run nc (netcat) on a proxyhost, which
forwards all data to port 873 (the rsync daemon) on the targethost (%H).
Note also that if the RSYNC_SHELL environment variable is set, that program
will be used to run the RSYNC_CONNECT_PROG command instead of using the default
shell of the **system()** call.
Note also that if the [`RSYNC_SHELL`](#) environment variable is set, that
program will be used to run the `RSYNC_CONNECT_PROG` command instead of using
the default shell of the **system()** call.
## USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION
@@ -270,7 +276,7 @@ In order to connect to an rsync daemon, the remote system needs to have a
daemon already running (or it needs to have configured something like inetd to
spawn an rsync daemon for incoming connections on a particular port). For full
information on how to start a daemon that will handling incoming socket
connections, see the [**rsyncd.conf**(5)](./rsyncd.conf.5) man page -- that is
connections, see the [**rsyncd.conf**(5)](rsyncd.conf.5) man page -- that is
the config file for the daemon, and it contains the full details for how to run
the daemon (including stand-alone and inetd configurations).
@@ -512,11 +518,11 @@ your home directory (remove the '=' for that).
[comment]: # (An OL starting at 0 is converted into a DL by the parser.)
0. `--help`, `-h` `(*)`
0. `--help`
Print a short help page describing the options available in rsync and exit.
(*) The `-h` short option will only invoke `--help` when used without other
options since it normally means [`--human-readable`](#opt).
You can also use `-h` for `--help` when it is used without any other
options (since it normally means [`--human-readable`](#opt)).
0. `--version`, `-V`
@@ -734,28 +740,28 @@ your home directory (remove the '=' for that).
crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
The only exception to the above equivalence is when [`--files-from`](#opt)
is specified, in which case [`-r`](#opt--recursive) is not implied.
is specified, in which case [`-r`](#opt) is not implied.
0. `--no-OPTION`
You may turn off one or more implied options by prefixing the option name
with "no-". Not all options may be prefixed with a "no-": only options that
are implied by other options (e.g. `--no-D`, `--no-perms`) or have
different defaults in various circumstances (e.g. `--no-whole-file`,
`--no-blocking-io`, `--no-dirs`). You may specify either the short or the
long option name after the "no-" prefix (e.g. `--no-R` is the same as
`--no-relative`).
with "no-". Not all positive options have a negated opposite, but a lot
do, including those that can be used to disable an implied option (e.g.
`--no-D`, `--no-perms`) or have different defaults in various circumstances
(e.g. [`--no-whole-file`](#opt), `--no-blocking-io`, `--no-dirs`). Every
valid negated option accepts both the short and the long option name after
the "no-" prefix (e.g. `--no-R` is the same as `--no-relative`).
For example: if you want to use [`--archive`](#opt) (`-a`) but don't want
As an example, if you want to use [`--archive`](#opt) (`-a`) but don't want
[`--owner`](#opt) (`-o`), instead of converting `-a` into `-rlptgD`, you
could specify `-a --no-o` (or `-a --no-owner`).
can specify `-a --no-o` (aka `--archive --no-owner`).
The order of the options is important: if you specify `--no-r -a`, the `-r`
option would end up being turned on, the opposite of `-a --no-r`. Note
also that the side-effects of the [`--files-from`](#opt) option are NOT
positional, as it affects the default state of several options and slightly
changes the meaning of [`-a`](#opt--archive) (see the
[`--files-from`](#opt) option for more details).
changes the meaning of [`-a`](#opt) (see the [`--files-from`](#opt) option
for more details).
0. `--recursive`, `-r`
@@ -892,16 +898,20 @@ your home directory (remove the '=' for that).
what (if any) suffix gets appended using the [`--backup-dir`](#opt) and
[`--suffix`](#opt) options.
Note that if you don't specify [`--backup-dir`](#opt), (1) the
[`--omit-dir-times`](#opt) option will be forced on, and (2) if
[`--delete`](#opt) is also in effect (without [`--delete-excluded`](#opt)),
rsync will add a "protect" filter-rule for the backup suffix to the end of
all your existing excludes (e.g. `-f "P *~"`). This will prevent
previously backed-up files from being deleted. Note that if you are
supplying your own filter rules, you may need to manually insert your own
exclude/protect rule somewhere higher up in the list so that it has a high
enough priority to be effective (e.g., if your rules specify a trailing
inclusion/exclusion of `*`, the auto-added rule would never be reached).
If you don't specify [`--backup-dir`](#opt):
1. the [`--omit-dir-times`](#opt) option will be forced on
2. the use of [`--delete`](#opt) (without [`--delete-excluded`](#opt)),
causes rsync to add a "protect" [filter-rule](#FILTER_RULES) for the
backup suffix to the end of all your existing filters that looks like
this: `-f "P *~"`. This rule prevents previously backed-up files from
being deleted.
Note that if you are supplying your own filter rules, you may need to
manually insert your own exclude/protect rule somewhere higher up in the
list so that it has a high enough priority to be effective (e.g. if your
rules specify a trailing inclusion/exclusion of `*`, the auto-added rule
would never be reached).
0. `--backup-dir=DIR`
@@ -1480,11 +1490,11 @@ your home directory (remove the '=' for that).
This tells rsync to transfer modification times along with the files and
update them on the remote system. Note that if this option is not used,
the optimization that excludes files that have not been modified cannot be
effective; in other words, a missing `-t` (or [`-a`](#opt--archive)) will
cause the next transfer to behave as if it used [`--ignore-times`](#opt)
(`-I`), causing all files to be updated (though rsync's delta-transfer
algorithm will make the update fairly efficient if the files haven't
actually changed, you're much better off using `-t`).
effective; in other words, a missing `-t` (or [`-a`](#opt)) will cause the
next transfer to behave as if it used [`--ignore-times`](#opt) (`-I`),
causing all files to be updated (though rsync's delta-transfer algorithm
will make the update fairly efficient if the files haven't actually
changed, you're much better off using `-t`).
0. `--atimes`, `-U`
@@ -1572,7 +1582,7 @@ your home directory (remove the '=' for that).
This option is overridden by both [`--super`](#opt) and `--no-super`.
See also the [`fake super`](./rsyncd.conf.5#fake_super) setting in the
See also the [`fake super`](rsyncd.conf.5#fake_super) setting in the
daemon's rsyncd.conf file.
0. `--sparse`, `-S`
@@ -1631,6 +1641,15 @@ your home directory (remove the '=' for that).
source and destination are specified as local paths, but only if no
batch-writing option is in effect.
0. `--no-whole-file`, `--no-W`
Disable whole-file updating when it is enaled by default for a local
transfer. This usually slows rsync down, but it can be useful if you are
trying to minimize the writes to the destination file (if combined with
[`--inplace`](#opt)) or for testing the checksum-based update algorithm.
See also the [`--whole-file`](#opt) option.
0. `--checksum-choice=STR`, `--cc=STR`
This option overrides the checksum algorithms. If one algorithm name is
@@ -1668,14 +1687,14 @@ your home directory (remove the '=' for that).
and various flavors of MD4 based on protocol age).
The default order can be customized by setting the environment variable
RSYNC_CHECKSUM_LIST to a space-separated list of acceptable checksum names.
If the string contains a "`&`" character, it is separated into the "client
string & server string", otherwise the same string
applies to both. If the string (or string portion) contains no
non-whitespace characters, the default checksum list is used. This method
does not allow you to specify the transfer checksum separately from the
pre-transfer checksum, and it discards "auto" and all unknown checksum
names. A list with only invalid names results in a failed negotiation.
[`RSYNC_CHECKSUM_LIST`](#) to a space-separated list of acceptable checksum
names. If the string contains a "`&`" character, it is separated into the
"client string & server string", otherwise the same string applies to both.
If the string (or string portion) contains no non-whitespace characters,
the default checksum list is used. This method does not allow you to
specify the transfer checksum separately from the pre-transfer checksum,
and it discards "auto" and all unknown checksum names. A list with only
invalid names results in a failed negotiation.
The use of the `--checksum-choice` option overrides this environment list.
@@ -1730,10 +1749,10 @@ your home directory (remove the '=' for that).
When [`--info=skip2`](#opt) is used rsync will output "FILENAME exists
(INFO)" messages where the INFO indicates one of "type change", "sum
change" (requires [`-c`](#opt--checksum)), "file change" (based on the
quick check), "attr change", or "uptodate". Using [`--info=skip1`](#opt)
(which is also implied by 2 [`-v`](#opt--verbose) options) outputs the
exists message without the INFO suffix.
change" (requires [`-c`](#opt)), "file change" (based on the quick check),
"attr change", or "uptodate". Using [`--info=skip1`](#opt) (which is also
implied by 2 [`-v`](#opt) options) outputs the exists message without the
INFO suffix.
0. `--remove-source-files`
@@ -1959,11 +1978,12 @@ your home directory (remove the '=' for that).
Beginning in 3.2.3, a value of 0 specifies no limit.
You can set a default value using the environment variable RSYNC_MAX_ALLOC
using the same SIZE values as supported by this option. If the remote
rsync doesn't understand the `--max-alloc` option, you can override an
environmental value by specifying `--max-alloc=1g`, which will make rsync
avoid sending the option to the remote side (because "1G" is the default).
You can set a default value using the environment variable
[`RSYNC_MAX_ALLOC`](#) using the same SIZE values as supported by this
option. If the remote rsync doesn't understand the `--max-alloc` option,
you can override an environmental value by specifying `--max-alloc=1g`,
which will make rsync avoid sending the option to the remote side (because
"1G" is the default).
0. `--block-size=SIZE`, `-B`
@@ -1988,10 +2008,10 @@ your home directory (remove the '=' for that).
remote host. See the [USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL
CONNECTION](#) section above.
Beginning with rsync 3.2.0, the RSYNC_PORT environment variable will be set
when a daemon connection is being made via a remote-shell connection. It
is set to 0 if the default daemon port is being assumed, or it is set to
the value of the rsync port that was specified via either the
Beginning with rsync 3.2.0, the [`RSYNC_PORT`](#) environment variable will
be set when a daemon connection is being made via a remote-shell
connection. It is set to 0 if the default daemon port is being assumed, or
it is set to the value of the rsync port that was specified via either the
[`--port`](#opt) option or a non-empty port value in an `rsync://` URL.
This allows the script to discern if a non-default port is being requested,
allowing for things such as an SSL or stunnel helper script to connect to a
@@ -2012,7 +2032,7 @@ your home directory (remove the '=' for that).
(Note that ssh users can alternately customize site-specific connect
options in their .ssh/config file.)
You can also choose the remote shell program using the RSYNC_RSH
You can also choose the remote shell program using the [`RSYNC_RSH`](#)
environment variable, which accepts the same range of values as `-e`.
See also the [`--blocking-io`](#opt) option which is affected by this
@@ -2219,8 +2239,8 @@ your home directory (remove the '=' for that).
[`--recursive`](#opt) (`-r`), so specify it explicitly, if you want it.
- These side-effects change the default state of rsync, so the position of
the `--files-from` option on the command-line has no bearing on how other
options are parsed (e.g. [`-a`](#opt--archive) works the same before or
after `--files-from`, as does `--no-R` and all other options).
options are parsed (e.g. [`-a`](#opt) works the same before or after
`--files-from`, as does `--no-R` and all other options).
The filenames that are read from the FILE are all relative to the source
dir -- any leading slashes are removed and no ".." references are allowed
@@ -2233,13 +2253,12 @@ your home directory (remove the '=' for that).
contains "bin/" (note the trailing slash), the immediate contents of the
directory would also be sent (without needing to be explicitly mentioned in
the file -- this began in version 2.6.4). In both cases, if the
[`-r`](#opt--recursive) option was enabled, that dir's entire hierarchy
would also be transferred (keep in mind that [`-r`](#opt--recursive) needs
to be specified explicitly with `--files-from`, since it is not implied by
[`-a`](#opt--archive). Also note that the effect of the (enabled by
default) [`-r`](#opt--relative) option is to duplicate only the path info
that is read from the file -- it does not force the duplication of the
source-spec path (/usr in this case).
[`-r`](#opt) option was enabled, that dir's entire hierarchy would also be
transferred (keep in mind that [`-r`](#opt) needs to be specified
explicitly with `--files-from`, since it is not implied by [`-a`](#opt).
Also note that the effect of the (enabled by default) [`-r`](#opt) option
is to duplicate only the path info that is read from the file -- it does
not force the duplication of the source-spec path (/usr in this case).
In addition, the `--files-from` file can be read from the remote host
instead of the local host if you specify a "host:" in front of the file
@@ -2275,25 +2294,28 @@ your home directory (remove the '=' for that).
0. `--old-args`
This option tells rsync to stop trying to protect the arg values from
unintended word-splitting or other misinterpretation by using its new
backslash-escape idiom. The newest default is for remote filenames to only
allow wildcards characters to be interpretated by the shell while
protecting other shell-interpreted characters (and the args of options get
even wildcards escaped). The only active wildcard characters on the remote
side are: `*`, `?`, `[`, & `]`.
This option tells rsync to stop trying to protect the arg values on the
remote side from unintended word-splitting or other misinterpretation.
If you have a script that wants to use old-style arg splitting in the
The default in a modern rsync is for "shell-active" characters (including
spaces) to be backslash-escaped in the args that are sent to the remote
shell. The wildcard characters `*`, `?`, `[`, & `]` are not escaped in
filename args (allowing them to expand into multiple filenames) while being
protected in option args, such as [`--usermap`](#opt).
If you have a script that wants to use old-style arg splitting in its
filenames, specify this option once. If the remote shell has a problem
with any backslash escapes, specify the option twice.
with any backslash escapes at all, specify this option twice.
You may also control this setting via the RSYNC_OLD_ARGS environment
You may also control this setting via the [`RSYNC_OLD_ARGS`](#) environment
variable. If it has the value "1", rsync will default to a single-option
setting. If it has the value "2" (or more), rsync will default to a
repeated-option setting. If it is "0", you'll get the default escaping
behavior. The environment is always overridden by manually specified
positive or negative options (the negative is `--no-old-args`).
This option conflicts with the [`--protect-args`](#opt) option.
0. `--protect-args`, `-s`
This option sends all filenames and most options to the remote rsync
@@ -2309,16 +2331,19 @@ your home directory (remove the '=' for that).
character-set. The translation happens before wild-cards are expanded.
See also the [`--files-from`](#opt) option.
You may also control this setting via the RSYNC_PROTECT_ARGS environment
variable. If it has a non-zero value, this setting will be
You may also control this setting via the [`RSYNC_PROTECT_ARGS`](#)
environment variable. If it has a non-zero value, this setting will be
enabled by default, otherwise it will be disabled by default. Either state
is overridden by a manually specified positive or negative version of this
option (note that `--no-s` and `--no-protect-args` are the negative
versions).
versions). This environment variable is also superseded by a non-zero
[`RSYNC_OLD_ARGS`](#) export.
You may need to disable this option when interacting with an older rsync
(one prior to 3.0.0).
This option conflicts with the [`--old-args`](#opt) option.
Note that this option is incompatible with the use of the restricted rsync
script (`rrsync`) since it hides options from the script's inspection.
@@ -2518,10 +2543,10 @@ your home directory (remove the '=' for that).
its list is assumed to be "zlib".
The default order can be customized by setting the environment variable
RSYNC_COMPRESS_LIST to a space-separated list of acceptable compression
names. If the string contains a "`&`" character, it is separated into the
"client string & server string", otherwise the same string applies to both.
If the string (or string portion) contains no
[`RSYNC_COMPRESS_LIST`](#) to a space-separated list of acceptable
compression names. If the string contains a "`&`" character, it is
separated into the "client string & server string", otherwise the same
string applies to both. If the string (or string portion) contains no
non-whitespace characters, the default compress list is used. Any unknown
compression names are discarded from the list, but a list with only invalid
names results in a failed negotiation.
@@ -2741,7 +2766,7 @@ your home directory (remove the '=' for that).
If a user or group has no name on the source system or it has no match on
the destination system, then the numeric ID from the source system is used
instead. See also the [`use chroot`](./rsyncd.conf.5#use_chroot) setting
instead. See also the [`use chroot`](rsyncd.conf.5#use_chroot) setting
in the rsyncd.conf manpage for some comments on how the chroot setting
affects rsync's ability to look up the names of the users and groups and
what you can do about it.
@@ -2799,7 +2824,7 @@ your home directory (remove the '=' for that).
0. `--chown=USER:GROUP`
This option forces all files to be owned by USER with group GROUP. This is
a simpler interface than using [`--usermap` & `--groupmap`](#opt--usermap)
a simpler interface than using [`--usermap`](#opt) & [`--groupmap`](#opt)
directly, but it is implemented using those options internally so they
cannot be mixed. If either the USER or GROUP is empty, no mapping for the
omitted user/group will occur. If GROUP is empty, the trailing colon may
@@ -2831,8 +2856,7 @@ your home directory (remove the '=' for that).
rsync daemon. The `--address` option allows you to specify a specific IP
address (or hostname) to bind to.
See also [the daemon version of the `--address`
option](#daemon-opt--address).
See also [the daemon version of the `--address` option](#dopt--address).
0. `--port=PORT`
@@ -2841,7 +2865,7 @@ your home directory (remove the '=' for that).
to connect with an rsync daemon (since the URL syntax has a way to specify
the port as a part of the URL).
See also [the daemon version of the `--port` option](#daemon-opt--port).
See also [the daemon version of the `--port` option](#dopt--port).
0. `--sockopts=OPTIONS`
@@ -2852,8 +2876,7 @@ your home directory (remove the '=' for that).
able to set. By default no special socket options are set. This only
affects direct socket connections to a remote rsync daemon.
See also [the daemon version of the `--sockopts`
option](#daemon-opt--sockopts).
See also [the daemon version of the `--sockopts` option](#dopt--sockopts).
0. `--blocking-io`
@@ -2955,11 +2978,10 @@ your home directory (remove the '=' for that).
user on a per-update basis. The format is a text string containing
embedded single-character escape sequences prefixed with a percent (%)
character. A default format of "%n%L" is assumed if either
[`--info=name`](#opt) or [`-v`](#opt--verbose) is specified (this tells you
just the name of the file and, if the item is a link, where it points).
For a full list of the possible escape characters, see the
[`log format`](./rsyncd.conf.5#log_format) setting in the rsyncd.conf
manpage.
[`--info=name`](#opt) or [`-v`](#opt) is specified (this tells you just the
name of the file and, if the item is a link, where it points). For a full
list of the possible escape characters, see the [`log
format`](rsyncd.conf.5#log_format) setting in the rsyncd.conf manpage.
Specifying the `--out-format` option implies the [`--info=name`](#opt)
option, which will mention each file, dir, etc. that gets updated in a
@@ -2994,8 +3016,7 @@ your home directory (remove the '=' for that).
This is very useful if you need to debug why a connection is closing
unexpectedly.
See also [the daemon version of the `--log-file`
option](#daemon-opt--log-file).
See also [the daemon version of the `--log-file` option](#dopt--log-file).
0. `--log-file-format=FORMAT`
@@ -3003,23 +3024,22 @@ your home directory (remove the '=' for that).
file specified by the [`--log-file`](#opt) option (which must also be
specified for this option to have any effect). If you specify an empty
string, updated files will not be mentioned in the log file. For a list of
the possible escape characters, see the [`log format`](./rsyncd.conf.5#log_format)
the possible escape characters, see the [`log format`](rsyncd.conf.5#log_format)
setting in the rsyncd.conf manpage.
The default FORMAT used if [`--log-file`](#opt) is specified and this
option is not is '%i %n%L'.
See also [the daemon version of the `--log-file-format`
option](#daemon-opt--log-file-format).
option](#dopt--log-file-format).
0. `--stats`
This tells rsync to print a verbose set of statistics on the file transfer,
allowing you to tell how effective rsync's delta-transfer algorithm is for
your data. This option is equivalent to [`--info=stats2`](#opt) if
combined with 0 or 1 [`-v`](#opt--verbose) options, or
[`--info=stats3`](#opt) if combined with 2 or more [`-v`](#opt--verbose)
options.
combined with 0 or 1 [`-v`](#opt) options, or [`--info=stats3`](#opt) if
combined with 2 or more [`-v`](#opt) options.
The current statistics are as follows:
@@ -3080,12 +3100,14 @@ your home directory (remove the '=' for that).
0. `--human-readable`, `-h`
Output numbers in a more human-readable format. There are 3 possible
levels: (1) output numbers with a separator between each set of 3 digits
(either a comma or a period, depending on if the decimal point is
represented by a period or a comma); (2) output numbers in units of 1000
(with a character suffix for larger units -- see below); (3) output
numbers in units of 1024.
Output numbers in a more human-readable format. There are 3 possible levels:
1. output numbers with a separator between each set of 3 digits (either a
comma or a period, depending on if the decimal point is represented by a
period or a comma).
2. output numbers in units of 1000 (with a character suffix for larger
units -- see below).
3. output numbers in units of 1024.
The default is human-readable level 1. Each `-h` option increases the
level by one. You can take the level down to 0 (to output numbers as pure
@@ -3113,57 +3135,64 @@ your home directory (remove the '=' for that).
0. `--partial-dir=DIR`
A better way to keep partial files than the [`--partial`](#opt) option is
to specify a _DIR_ that will be used to hold the partial data (instead of
writing it out to the destination file). On the next transfer, rsync will
use a file found in this dir as data to speed up the resumption of the
This option modifies the behavior of the [`--partial`](#opt) option while
also implying that it be enabled. This enhanced partial-file method puts
any partially transferred files into the specified _DIR_ instead of writing
the partial file out to the destination file. On the next transfer, rsync
will use a file found in this dir as data to speed up the resumption of the
transfer and then delete it after it has served its purpose.
Note that if [`--whole-file`](#opt) is specified (or implied), any
partial-dir file that is found for a file that is being updated will simply
be removed (since rsync is sending files without using rsync's
partial-dir files that are found for a file that is being updated will
simply be removed (since rsync is sending files without using rsync's
delta-transfer algorithm).
Rsync will create the _DIR_ if it is missing (just the last dir -- not the
whole path). This makes it easy to use a relative path (such as
Rsync will create the _DIR_ if it is missing, but just the last dir -- not
the whole path. This makes it easy to use a relative path (such as
"`--partial-dir=.rsync-partial`") to have rsync create the
partial-directory in the destination file's directory when needed, and then
remove it again when the partial file is deleted. Note that the directory
is only removed if it is a relative pathname, as it is expected that an
absolute path is to a directory that is reserved for partial-dir work.
partial-directory in the destination file's directory when it is needed,
and then remove it again when the partial file is deleted. Note that this
directory removal is only done for a relative pathname, as it is expected
that an absolute path is to a directory that is reserved for partial-dir
work.
If the partial-dir value is not an absolute path, rsync will add an exclude
rule at the end of all your existing excludes. This will prevent the
sending of any partial-dir files that may exist on the sending side, and
will also prevent the untimely deletion of partial-dir items on the
receiving side. An example: the above `--partial-dir` option would add the
equivalent of "`-f '-p .rsync-partial/'`" at the end of any other filter
rules.
equivalent of this "perishable" exclude at the end of any other filter
rules: `-f '-p .rsync-partial/'`
If you are supplying your own exclude rules, you may need to add your own
exclude/hide/protect rule for the partial-dir because (1) the auto-added
rule may be ineffective at the end of your other rules, or (2) you may wish
to override rsync's exclude choice. For instance, if you want to make
rsync clean-up any left-over partial-dirs that may be lying around, you
should specify [`--delete-after`](#opt) and add a "risk" filter rule, e.g.
`-f 'R .rsync-partial/'`. (Avoid using [`--delete-before`](#opt) or
[`--delete-during`](#opt) unless you don't need rsync to use any of the
left-over partial-dir data during the current run.)
exclude/hide/protect rule for the partial-dir because:
1. the auto-added rule may be ineffective at the end of your other rules, or
2. you may wish to override rsync's exclude choice.
For instance, if you want to make rsync clean-up any left-over partial-dirs
that may be lying around, you should specify [`--delete-after`](#opt) and
add a "risk" filter rule, e.g. `-f 'R .rsync-partial/'`. Avoid using
[`--delete-before`](#opt) or [`--delete-during`](#opt) unless you don't
need rsync to use any of the left-over partial-dir data during the current
run.
IMPORTANT: the `--partial-dir` should not be writable by other users or it
is a security risk. E.g. AVOID "/tmp".
is a security risk! E.g. AVOID "/tmp"!
You can also set the partial-dir value the RSYNC_PARTIAL_DIR environment
variable. Setting this in the environment does not force
You can also set the partial-dir value the [`RSYNC_PARTIAL_DIR`](#)
environment variable. Setting this in the environment does not force
[`--partial`](#opt) to be enabled, but rather it affects where partial
files go when [`--partial`](#opt) is specified. For instance, instead of
using `--partial-dir=.rsync-tmp` along with [`--progress`](#opt), you could
set RSYNC_PARTIAL_DIR=.rsync-tmp in your environment and then just use the
[`-P`](#opt) option to turn on the use of the .rsync-tmp dir for partial
transfers. The only times that the [`--partial`](#opt) option does not
look for this environment value are (1) when [`--inplace`](#opt) was
specified (since [`--inplace`](#opt) conflicts with `--partial-dir`), and
(2) when [`--delay-updates`](#opt) was specified (see below).
set [`RSYNC_PARTIAL_DIR=.rsync-tmp`](#) in your environment and then use
the [`-P`](#opt) option to turn on the use of the .rsync-tmp dir for
partial transfers. The only times that the [`--partial`](#opt) option does
not look for this environment value are:
1. when [`--inplace`](#opt) was specified (since [`--inplace`](#opt)
conflicts with `--partial-dir`), and
2. when [`--delay-updates`](#opt) was specified (see below).
When a modern rsync resumes the transfer of a file in the partial-dir, that
partial file is now updated in-place instead of creating yet another
@@ -3197,11 +3226,13 @@ your home directory (remove the '=' for that).
This option uses more memory on the receiving side (one bit per file
transferred) and also requires enough free disk space on the receiving side
to hold an additional copy of all the updated files. Note also that you
should not use an absolute path to [`--partial-dir`](#opt) unless (1) there
is no chance of any of the files in the transfer having the same name
(since all the updated files will be put into a single directory if the
path is absolute) and (2) there are no mount points in the hierarchy (since
the delayed updates will fail if they can't be renamed into place).
should not use an absolute path to [`--partial-dir`](#opt) unless:
1. there is no chance of any of the files in the transfer having the same
name (since all the updated files will be put into a single directory if
the path is absolute), and
2. there are no mount points in the hierarchy (since the delayed updates
will fail if they can't be renamed into place).
See also the "atomic-rsync" python script in the "support" subdir for an
update algorithm that is even more atomic (it uses [`--link-dest`](#opt)
@@ -3346,12 +3377,16 @@ your home directory (remove the '=' for that).
This option will cause the source files to be listed instead of
transferred. This option is inferred if there is a single source arg and
no destination specified, so its main uses are: (1) to turn a copy command
that includes a destination arg into a file-listing command, or (2) to be
able to specify more than one source arg (note: be sure to include the
destination). Caution: keep in mind that a source arg with a wild-card is
expanded by the shell into multiple args, so it is never safe to try to
list such an arg without using this option. For example:
no destination specified, so its main uses are:
1. to turn a copy command that includes a destination arg into a
file-listing command, or
2. to be able to specify more than one source arg. Note: be sure to
include the destination.
CAUTION: keep in mind that a source arg with a wild-card is expanded by the
shell into multiple args, so it is never safe to try to list such an arg
without using this option. For example:
> rsync -av --list-only foo* dest/
@@ -3397,22 +3432,21 @@ your home directory (remove the '=' for that).
quickly buffered, while other can show up as very slow when the flushing of
the output buffer occurs. This may be fixed in a future version.
See also [the daemon version of the `--bwlimit`
option](#daemon-opt--bwlimit).
See also [the daemon version of the `--bwlimit` option](#dopt--bwlimit).
0. `--stop-after=MINS`
0. `--stop-after=MINS`, (`--time-limit=MINS`)
This option tells rsync to stop copying when the specified number of
minutes has elapsed.
Rsync also accepts an earlier version of this option: `--time-limit=MINS`.
For maximal flexibility, rsync does not communicate this option to the
remote rsync since it is usually enough that one side of the connection
quits as specified. This allows the option's use even when only one side
of the connection supports it. You can tell the remote side about the time
limit using [`--remote-option`](#opt) (`-M`), should the need arise.
The `--time-limit` version of this option is deprecated.
0. `--stop-at=y-m-dTh:m`
This option tells rsync to stop copying when the specified point in time
@@ -3502,8 +3536,8 @@ your home directory (remove the '=' for that).
This order ensures that the option will stay the same whether you're
pushing or pulling files. Finally, you can specify either `--no-iconv` or
a CONVERT_SPEC of "-" to turn off any conversion. The default setting of
this option is site-specific, and can also be affected via the RSYNC_ICONV
environment variable.
this option is site-specific, and can also be affected via the
[`RSYNC_ICONV`](#) environment variable.
For a list of what charset names your local iconv library supports, you can
run "`iconv --list`".
@@ -3534,9 +3568,9 @@ your home directory (remove the '=' for that).
the "`--rsh SHELL -4`" option directly (or whatever ipv4/ipv6 hint options
it uses).
See also [the daemon version of these options](#daemon-opt--ipv4).
See also [the daemon version of these options](#dopt--ipv4).
If rsync was complied without support for IPv6, the `--ipv6` option will
If rsync was compiled without support for IPv6, the `--ipv6` option will
have no effect. The `rsync --version` output will contain "`no IPv6`" if
is the case.
@@ -3566,7 +3600,7 @@ The options allowed when starting an rsync daemon are as follows:
background daemon. The daemon will read the config file (rsyncd.conf) on
each connect made by a client and respond to requests accordingly.
See the [**rsyncd.conf**(5)](./rsyncd.conf.5) man page for more details.
See the [**rsyncd.conf**(5)](rsyncd.conf.5) man page for more details.
0. `--address=ADDRESS`
@@ -3575,7 +3609,7 @@ The options allowed when starting an rsync daemon are as follows:
specific IP address (or hostname) to bind to. This makes virtual hosting
possible in conjunction with the `--config` option.
See also the [address](./rsyncd.conf.5#address) global option in the
See also the [address](rsyncd.conf.5#address) global option in the
rsyncd.conf manpage and the [client version of the `--address`
option](#opt--address).
@@ -3591,7 +3625,7 @@ The options allowed when starting an rsync daemon are as follows:
0. `--config=FILE`
This specifies an alternate config file than the default. This is only
relevant when [`--daemon`](#daemon-opt) is specified. The default is
relevant when [`--daemon`](#dopt) is specified. The default is
/etc/rsyncd.conf unless the daemon is running over a remote shell program
and the remote user is not the super-user; in that case the default is
rsyncd.conf in the current directory (typically $HOME).
@@ -3621,7 +3655,7 @@ The options allowed when starting an rsync daemon are as follows:
rather than the default of 873.
See also [the client version of the `--port` option](#opt--port) and the
[port](./rsyncd.conf.5#port) global setting in the rsyncd.conf manpage.
[port](rsyncd.conf.5#port) global setting in the rsyncd.conf manpage.
0. `--log-file=FILE`
@@ -3642,7 +3676,7 @@ The options allowed when starting an rsync daemon are as follows:
0. `--sockopts`
This overrides the [`socket options`](./rsyncd.conf.5#socket_options)
This overrides the [`socket options`](rsyncd.conf.5#socket_options)
setting in the rsyncd.conf file and has the same syntax.
See also [the client version of the `--sockopts` option](#opt--sockopts).
@@ -3667,7 +3701,7 @@ The options allowed when starting an rsync daemon are as follows:
See also [the client version of these options](#opt--ipv4).
If rsync was complied without support for IPv6, the `--ipv6` option will
If rsync was compiled without support for IPv6, the `--ipv6` option will
have no effect. The `rsync --version` output will contain "`no IPv6`" if
is the case.
@@ -3780,8 +3814,8 @@ forms:
had been specified). This behavior was added in version 2.6.7.
Note that, when using the [`--recursive`](#opt) (`-r`) option (which is implied
by [`-a`](#opt--archive)), every subdir component of every path is visited left
to right, with each directory having a chance for exclusion before its content.
by [`-a`](#opt)), every subdir component of every path is visited left to
right, with each directory having a chance for exclusion before its content.
In this way include/exclude patterns are applied recursively to the pathname of
each node in the filesystem's tree (those inside the transfer). The exclude
patterns short-circuit the directory traversal stage as rsync finds the files
@@ -4175,10 +4209,10 @@ already) or the file-update may be attempted and then, if the file fails to
verify, the update discarded with an error. This means that it should be safe
to re-run a read-batch operation if the command got interrupted. If you wish
to force the batched-update to always be attempted regardless of the file's
size and date, use the [`-I`](#opt--ignore-times) option (when reading the
batch). If an error occurs, the destination tree will probably be in a
partially updated state. In that case, rsync can be used in its regular
(non-batch) mode of operation to fix up the destination tree.
size and date, use the [`-I`](#opt) option (when reading the batch). If an
error occurs, the destination tree will probably be in a partially updated
state. In that case, rsync can be used in its regular (non-batch) mode of
operation to fix up the destination tree.
The rsync version used on all destinations must be at least as new as the one
used to generate the batch file. Rsync will die with an error if the protocol
@@ -4260,7 +4294,7 @@ already exists on the receiving side. See that option's section for a warning.
## DIAGNOSTICS
rsync occasionally produces error messages that may seem a little cryptic. The
Rsync occasionally produces error messages that may seem a little cryptic. The
one that seems to cause the most confusion is "protocol version mismatch -- is
your shell clean?".
@@ -4322,53 +4356,109 @@ file is included or excluded.
Specify a "1" if you want the [`--old-args`](#opt) option to be enabled by
default, a "2" (or more) if you want it to be enabled in the
option-repeated state, or a "0" to make sure that it is disabled by
default. First supported in 3.2.4.
repeated-option state, or a "0" to make sure that it is disabled by
default. When this environment variable is set to a non-zero value, it
supersedes the [`RSYNC_PROTECT_ARGS`](#) variable.
This variable is ignored if [`--old-args`](#opt), `--no-old-args`, or
[`--protect-args`](#opt) is specified on the command line.
First supported in 3.2.4.
0. `RSYNC_PROTECT_ARGS`
Specify a non-zero numeric value if you want the [`--protect-args`](#opt)
option to be enabled by default, or a zero value to make sure that it is
disabled by default. First supported in 3.1.0.
disabled by default.
This variable is ignored if [`--protect-args`](#opt), `--no-protect-args`,
or [`--old-args`](#opt) is specified on the command line.
First supported in 3.1.0. Starting in 3.2.4, this variable is ignored if
[`RSYNC_OLD_ARGS`](#) is set to a non-zero value.
0. `RSYNC_RSH`
The RSYNC_RSH environment variable allows you to override the default shell
used as the transport for rsync. Command line options are permitted after
the command name, just as in the [`--rsh`](#opt) (`-e`) option.
This environment variable allows you to override the default shell used as
the transport for rsync. Command line options are permitted after the
command name, just as in the [`--rsh`](#opt) (`-e`) option.
0. `RSYNC_PROXY`
The RSYNC_PROXY environment variable allows you to redirect your rsync
client to use a web proxy when connecting to a rsync daemon. You should
set RSYNC_PROXY to a hostname:port pair.
This environment variable allows you to redirect your rsync
client to use a web proxy when connecting to an rsync daemon. You should
set `RSYNC_PROXY` to a hostname:port pair.
0. `RSYNC_PASSWORD`
Setting RSYNC_PASSWORD to the required password allows you to run
authenticated rsync connections to an rsync daemon without user
intervention. Note that this does not supply a password to a remote shell
transport such as ssh; to learn how to do that, consult the remote shell's
documentation.
This environment variable allows you to set the password for an rsync
**daemon** connection, which avoids the password prompt. Note that this
does **not** supply a password to a remote shell transport such as ssh
(consult its documentation for how to do that).
0. `USER` or `LOGNAME`
The USER or LOGNAME environment variables are used to determine the default
username sent to an rsync daemon. If neither is set, the username defaults
to "nobody".
to "nobody". If both are set, `USER` takes precedence.
0. `RSYNC_PARTIAL_DIR`
This environment variable specifies the directory to use for a
[`--partial`](#opt) transfer without implying that partial transfers be
enabled. See the [`--partial-dir`](#opt) option for full details.
0. `RSYNC_COMPRESS_LIST`
This environment variable allows you to customize the negotiation of the
compression algorithm by specifying an alternate order or a reduced list of
names. Use the command `rsync --version` to see the available compression
names. See the [`--compress`](#opt) option for full details.
0. `RSYNC_CHECKSUM_LIST`
This environment variable allows you to customize the negotiation of the
checksum algorithm by specifying an alternate order or a reduced list of
names. Use the command `rsync --version` to see the available checksum
names. See the [`--checksum-choice`](#opt) option for full details.
0. `RSYNC_MAX_ALLOC`
This environment variable sets an allocation maximum as if you had used the
[`--max-alloc`](#opt) option.
0. `RSYNC_PORT`
This environment variable does is not read by rsync, but is instead set in
its sub-environment when rsync is running the remote shell in combination
with a daemon connection. This allows a script such as
[`rsync-ssl`](rsync-ssl.1) to be able to know the port number that the user
specified on the command line.
0. `HOME`
The HOME environment variable is used to find the user's default .cvsignore
This environment variable is used to find the user's default .cvsignore
file.
0. `RSYNC_CONNECT_PROG`
This environment variable is mainly used in debug setups to set the program
to use when making a daemon connection. See [CONNECTING TO AN RSYNC
DAEMON](#) for full details.
0. `RSYNC_SHELL`
This environment variable is mainly used in debug setups to set the program
to use to run the program specified by [`RSYNC_CONNECT_PROG`]. See
[CONNECTING TO AN RSYNC DAEMON](#) for full details.
## FILES
/etc/rsyncd.conf or rsyncd.conf
## SEE ALSO
[**rsync-ssl**(1)](./rsync-ssl.1), [**rsyncd.conf**(5)](./rsyncd.conf.5), [**rrsync**(1)](./rrsync.1)
[**rsync-ssl**(1)](rsync-ssl.1), [**rsyncd.conf**(5)](rsyncd.conf.5), [**rrsync**(1)](rrsync.1)
## BUGS
@@ -4395,8 +4485,8 @@ that can be used with a restricted ssh login.
## CREDITS
rsync is distributed under the GNU General Public License. See the file
[COPYING](./COPYING) for details.
Rsync is distributed under the GNU General Public License. See the file
[COPYING](COPYING) for details.
An rsync web site is available at <https://rsync.samba.org/>. The site
includes an FAQ-O-Matic which may cover questions unanswered by this manual
@@ -4421,7 +4511,7 @@ David Bell. I've probably missed some people, my apologies if I have.
## AUTHOR
rsync was originally written by Andrew Tridgell and Paul Mackerras. Many
Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many
people have later contributed to it. It is currently maintained by Wayne
Davison.

View File

@@ -45,8 +45,7 @@ Case is not significant in boolean values, but is preserved in string values.
## LAUNCHING THE RSYNC DAEMON
The rsync daemon is launched by specifying the `--daemon` option to
rsync.
The rsync daemon is launched by specifying the `--daemon` option to rsync.
The daemon must run with root privileges if you wish to use chroot, to bind to
a port numbered under 1024 (as is the default 873), or to set file ownership.
@@ -1211,7 +1210,7 @@ The /etc/rsyncd.secrets file would look something like this:
## SEE ALSO
[**rsync**(1)](./rsync.1), [**rsync-ssl**(1)](./rsync-ssl.1)
[**rsync**(1)](rsync.1), [**rsync-ssl**(1)](rsync-ssl.1)
## BUGS
@@ -1224,8 +1223,8 @@ This man page is current for version @VERSION@ of rsync.
## CREDITS
rsync is distributed under the GNU General Public License. See the file
[COPYING](./COPYING) for details.
Rsync is distributed under the GNU General Public License. See the file
[COPYING](COPYING) for details.
An rsync web site is available at <https://rsync.samba.org/> and its github
project is <https://github.com/WayneD/rsync>.
@@ -1237,7 +1236,7 @@ Thanks to Karsten Thygesen for his many suggestions and documentation!
## AUTHOR
rsync was written by Andrew Tridgell and Paul Mackerras. Many people have
Rsync was written by Andrew Tridgell and Paul Mackerras. Many people have
later contributed to it.
Mailing lists for support and development are available at

View File

@@ -8,6 +8,9 @@ rrsync - a script to setup restricted rsync users via ssh logins
rrsync [-ro|-rw] [-munge] [-no-del] [-no-lock] DIR
```
The single non-option argument specifies the restricted _DIR_ to use. It can be
relative to the user's home directory or an absolute path.
The online version of this man page (that includes cross-linking of topics)
is available at <https://download.samba.org/pub/rsync/rrsync.1>.
@@ -30,7 +33,7 @@ ssh-key line that should be restricted:
Then, ensure that the rrsync script has your desired option restrictions. You
may want to copy the script to a local bin dir with a unique name if you want
to have multiple configurations. One or more rrsync options can be specified
prior to the `DIR` if you want to further restrict the transfer.
prior to the _DIR_ if you want to further restrict the transfer.
To use an rsync daemon setup, edit the user's `~/.ssh/authorized_keys` file and
add a prefix like one of the following (followed by a space) in front of each
@@ -43,9 +46,8 @@ ssh-key line that should be restricted:
Then, ensure that the rsyncd.conf file is created with one or more module names
with the appropriate path and option restrictions. If rsync's
[`--config`](./rsync.1#daemon-opt--config) option is omitted, it defaults to
`~/rsyncd.conf`. See the `rsyncd.conf` man page for details of how to
configure an rsync daemon.
[`--config`](rsync.1#dopt) option is omitted, it defaults to `~/rsyncd.conf`.
See the `rsyncd.conf` man page for details of how to configure an rsync daemon.
When using rrsync, there can be just one restricted dir per authorized key. A
daemon setup, on the other hand, allows multiple module names inside the config
@@ -53,33 +55,46 @@ file, each one with its own path setting.
The remainder of this man page is dedicated to using the rrsync script.
## OPTION SUMMARY
## OPTIONS
```
-ro Allow only reading from the DIR. Implies -no-del and -no-lock.
-wo Allow only writing to the DIR.
-munge Enable rsync's --munge-links on the server side.
-no-del Disable rsync's --delete* and --remove* options.
-no-lock Avoid the single-run (per-user) lock check.
-help, -h Output this help message and exit.
```
0. `-ro`
A single non-option argument specifies the restricted DIR to use. It can be
relative to the user's home directory or an absolute path.
Allow only reading from the DIR. Implies [`-no-del`](#opt) and
[`-no-lock`](#opt).
0. `-wo`
Allow only writing to the DIR.
0. `-munge`
Enable rsync's [`--munge-links`](rsync.1#opt) on the server side.
0. `-no-del`
Disable rsync's `--delete*` and `--remove*` options.
0. `-no-lock`
Avoid the single-run (per-user) lock check. Useful with [`-munge`](#opt).
0. `-help`, `-h`
Output this help message and exit.
## SECURITY RESTRICTIONS
The rrsync script validates the path arguments it is sent to try to restrict
them to staying within the specified DIR.
The rrsync script rejects rsync's [`--copy-links`](./rsync.1#opt--copy-links)
option (by default) so that a copy cannot dereference a symlink within the DIR
to get to a file outside the DIR.
The rrsync script rejects rsync's [`--copy-links`](rsync.1#opt) option (by
default) so that a copy cannot dereference a symlink within the DIR to get to a
file outside the DIR.
The rrsync script rejects rsync's
[`--protect-args`](./rsync.1#opt--protect-args) (`-s`) option because it would
allow options to be sent to the server-side that the script cannot check. If
you want to support `--protect-args`, use a daemon-over-ssh setup.
The rrsync script rejects rsync's [`--protect-args`](rsync.1#opt) (`-s`) option
because it would allow options to be sent to the server-side that the script
cannot check. If you want to support `--protect-args`, use a daemon-over-ssh
setup.
The rrsync script accepts just a subset of rsync's options that the real rsync
uses when running the server command. A few extra convenience options are also
@@ -104,7 +119,7 @@ The `~/.ssh/authorized_keys` file might have lines in it like this:
## SEE ALSO
[**rsync**(1)](./rsync.1)
[**rsync**(1)](rsync.1)
## VERSION
@@ -113,7 +128,7 @@ This man page is current for version @VERSION@ of rsync.
## CREDITS
rsync is distributed under the GNU General Public License. See the file
[COPYING](./COPYING) for details.
[COPYING](COPYING) for details.
An rsync web site is available at <https://rsync.samba.org/> and its github
project is <https://github.com/WayneD/rsync>.

View File

@@ -257,7 +257,10 @@ int do_chmod(const char *path, mode_t mode)
memset(&attrList, 0, sizeof attrList);
attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
attrList.commonattr = ATTR_CMN_ACCESSMASK;
code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW);
if ((code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW)) == 0)
break;
if (errno == ENOTSUP)
code = 1;
# else
code = 1;
# endif

View File

@@ -1,9 +1,11 @@
#!/bin/sh
test_fail() {
echo "$@" >&2
exit 1
}
# Test some foundational things.
. "$suitedir/rsync.fns"
RSYNC_RSH="$scratchdir/src/support/lsh.sh"
export RSYNC_RSH
echo $0 running
@@ -12,3 +14,48 @@ $RSYNC --version || test_fail '--version output failed'
$RSYNC --info=help || test_fail '--info=help output failed'
$RSYNC --debug=help || test_fail '--debug=help output failed'
weird_name="A weird)name"
mkdir "$fromdir"
mkdir "$fromdir/$weird_name"
append_line() {
echo "$1"
echo "$1" >>"$fromdir/$weird_name/file"
}
append_line test1
checkit "$RSYNC -ai '$fromdir/' '$todir/'" "$fromdir" "$todir"
copy_weird() {
checkit "$RSYNC $1 \"$2$fromdir/$weird_name/\" \"$3$todir/$weird_name\"" "$fromdir" "$todir"
}
append_line test2
copy_weird '-ai' 'lh:' ''
append_line test3
copy_weird '-ai' '' 'lh:'
append_line test4
copy_weird '-ais' 'lh:' ''
append_line test5
copy_weird '-ais' '' 'lh:'
echo test6
touch "$fromdir/one" "$fromdir/two"
(cd "$fromdir" && $RSYNC -ai --old-args lh:'one two' "$todir/")
if [ ! -f "$todir/one" ] || [ ! -f "$todir/two" ]; then
test_fail "old-args copy of 'one two' failed"
fi
echo test7
rm "$todir/one" "$todir/two"
(cd "$fromdir" && RSYNC_OLD_ARGS=1 $RSYNC -ai lh:'one two' "$todir/")
# The script would have aborted on error, so getting here means we've won.
exit 0

View File

@@ -10,7 +10,7 @@ $RSYNC --version | grep "[, ] crtimes" >/dev/null || test_skipped "Rsync is conf
# Setting it to a newer time affects just the mtime.
mkdir "$fromdir"
echo hiho "$fromdir/foo"
echo hiho >"$fromdir/foo"
touch -t 200101011111.11 "$fromdir"
touch -t 200202022222.22 "$fromdir"

View File

@@ -1 +1 @@
#define RSYNC_VERSION "3.2.4pre2"
#define RSYNC_VERSION "3.2.4pre3"