Some doc fixes.
authorWayne Davison <wayne@opencoder.net>
Tue, 21 Jul 2020 17:12:24 +0000 (10:12 -0700)
committerWayne Davison <wayne@opencoder.net>
Tue, 21 Jul 2020 17:38:58 +0000 (10:38 -0700)
checksum-reading.diff
detect-renamed-lax.diff
fileflags.diff
filter-attribute-mods.diff

index 64afc9371c4854dd3a6138233745ffbc0c8c3b63..20e93e43458b5cee473d544272be10ca707c7911 100644 (file)
@@ -16,11 +16,11 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: 0e814e956c438700c2617350b39dc7a5d8370c65
+based-on: 5eda68f11bf6efe782cca60a2415191f4532c3b5
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -44,6 +44,8 @@ extern int numeric_ids;
+@@ -45,6 +45,8 @@ extern int numeric_ids;
  extern int filesfrom_fd;
  extern int remote_protocol;
  extern int protocol_version;
@@ -29,7 +29,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern int io_timeout;
  extern int no_detach;
  extern int write_batch;
-@@ -1021,6 +1023,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -1038,6 +1040,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        } else if (am_root < 0) /* Treat --fake-super from client as --super. */
                am_root = 2;
  
@@ -42,7 +42,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/daemon-parm.txt b/daemon-parm.txt
 --- a/daemon-parm.txt
 +++ b/daemon-parm.txt
-@@ -48,6 +48,7 @@ INTEGER      max_connections         0
+@@ -49,6 +49,7 @@ INTEGER      max_connections         0
  INTEGER       max_verbosity           1
  INTEGER       timeout                 0
  
@@ -712,16 +712,16 @@ diff --git a/rsync.1.md b/rsync.1.md
 +
 +    This option has no effect unless `--checksum`, `-c` was also specified.  It
 +    also only affects the current side of the transfer, so if you want the
-+    remote side to parse its own .rsyncsums files, specify the option via the
-+    `--rsync-path` option (e.g. "--rsync-path="rsync --sumfiles=lax").
++    remote side to parse its own .rsyncsums files, specify the option via
++    `--remote-option` (`-M`) (e.g. "`-M--sumfiles=lax`").
 +
 +    To avoid transferring the system's checksum files, you can use an exclude
 +    (e.g. `--exclude=.rsyncsums`).  To make this easier to type, you can use a
 +    popt alias.  For instance, adding the following line in your ~/.popt file
-+    defines a `--cc` option that enables lax checksum files and excludes the
++    defines a `--cs` option that enables lax checksum files and excludes the
 +    checksum files:
 +
-+    >     rsync alias --cc -c --sumfiles=lax --exclude=.rsyncsums
++    >     rsync alias --cs -c --sumfiles=lax -M--sumfiles=lax -f-_.rsyncsums
 +
 +    An rsync daemon does not allow the client to control this setting, so see
 +    the "checksum files" daemon parameter for information on how to make a
@@ -737,7 +737,7 @@ diff --git a/rsync.h b/rsync.h
  #define F_SUM(f) ((char*)OPT_EXTRA(f, START_BUMP(f) + HLINK_BUMP(f) \
                                    + SUM_EXTRA_CNT - 1))
  
-+/* These are only valid on an entry read from a checksum file. */
++/* These are only valid on an entry derived from a checksum file. */
 +#define F_CTIME(f) OPT_EXTRA(f, LEN64_BUMP(f) + SUM_EXTRA_CNT)->unum
 +#define F_INODE(f) OPT_EXTRA(f, LEN64_BUMP(f) + SUM_EXTRA_CNT + 1)->unum
 +
@@ -761,7 +761,7 @@ diff --git a/rsync.h b/rsync.h
 diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
 --- a/rsyncd.conf.5.md
 +++ b/rsyncd.conf.5.md
-@@ -404,6 +404,19 @@ the values of parameters.  See the GLOBAL PARAMETERS section for more details.
+@@ -419,6 +419,19 @@ the values of parameters.  See the GLOBAL PARAMETERS section for more details.
      the max connections limit is not exceeded for the modules sharing the lock
      file.  The default is `/var/run/rsyncd.lock`.
  
@@ -770,7 +770,7 @@ diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
 +    This parameter tells rsync to make use of any cached checksum information
 +    it finds in per-directory .rsyncsums files when the current transfer is
 +    using the `--checksum` option.  The value can be set to either "lax",
-+    "strict", or "none" -- see the client's `--sumfiles` option for what these
++    "strict", or "none".  See the client's `--sumfiles` option for what these
 +    choices do.
 +
 +    Note also that the client's command-line option, `--sumfiles`, has no
index 0d28d8e0bbcb6538a1b4a1d157d770b2313f6546..a92e627b189eeba2475d75bea167dc29d0bc5e3b 100644 (file)
@@ -60,7 +60,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -933,7 +933,9 @@ static struct poptOption long_options[] = {
+@@ -940,7 +940,9 @@ static struct poptOption long_options[] = {
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -71,7 +71,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_NONE,   0, 'y', 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -2758,8 +2760,14 @@ void server_options(char **args, int *argc_p)
+@@ -2956,8 +2958,14 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -100,13 +100,13 @@ diff --git a/rsync.1.md b/rsync.1.md
  --compare-dest=DIR       also compare destination files relative to DIR
  --copy-dest=DIR          ... and include copies of unchanged files
  --link-dest=DIR          hardlink to files in DIR when unchanged
-@@ -2215,6 +2217,17 @@ your home directory (remove the '=' for that).
+@@ -2223,6 +2225,17 @@ your home directory (remove the '=' for that).
      otential alternate-basis files will be removed as the transfer progresses.
      This option conflicts with `--inplace` and `--append`.
  
-+0.  ``--detect-renamed-lax`) This version of `--detect-renamed` makes rsync
-+    hard-link em(dest/D) to em(dest/S) without verifying that em(src/S) and
-+    em(dest/S) have the same data.  This poses a significant risk of corrupting
++0.  ``--detect-renamed-lax` This version of `--detect-renamed` makes rsync
++    hard-link `dest/D` to `dest/S` without verifying that `src/S` and
++    `dest/S` have the same data.  This poses a significant risk of corrupting
 +    the destination by representing a new source file by an unrelated
 +    destination file that coincidentally passes the quick check with the source
 +    file.  Use this option only if you accept the risk and disk I/O is a
index 2afc75c3a743f18ab95b9faffb66f241bcb4b11c..b66d70c0a6a4beb93f735a8cacbb48d4df9bbadc 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: af531cf787995f6a3bc381cd1da1988192e7ef59
+based-on: 5eda68f11bf6efe782cca60a2415191f4532c3b5
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
@@ -111,7 +111,7 @@ diff --git a/flist.c b/flist.c
  extern int delete_during;
  extern int missing_args;
  extern int eol_nulls;
-@@ -378,6 +379,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -379,6 +380,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  {
        static time_t modtime, atime;
        static mode_t mode;
@@ -121,7 +121,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -421,6 +425,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -422,6 +426,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_MODE;
        else
                mode = file->mode;
@@ -136,7 +136,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_devices && IS_DEVICE(mode)) {
                if (protocol_version < 28) {
-@@ -571,6 +583,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -572,6 +584,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                write_varint(f, F_MOD_NSEC(file));
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -147,7 +147,7 @@ diff --git a/flist.c b/flist.c
        if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME))
                write_varlong(f, atime, 4);
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
-@@ -662,6 +678,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -663,6 +679,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
  {
        static int64 modtime, atime;
        static mode_t mode;
@@ -157,7 +157,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -775,6 +794,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -776,6 +795,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
                        mode = first->mode;
                        if (atimes_ndx && !S_ISDIR(mode))
                                atime = F_ATIME(first);
@@ -168,7 +168,7 @@ diff --git a/flist.c b/flist.c
                        if (preserve_uid)
                                uid = F_OWNER(first);
                        if (preserve_gid)
-@@ -830,6 +853,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -831,6 +854,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
  
        if (chmod_modes && !S_ISLNK(mode) && mode)
                mode = tweak_mode(mode, chmod_modes);
@@ -179,7 +179,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -988,6 +1015,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -989,6 +1016,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
        }
  #endif
        file->mode = mode;
@@ -190,7 +190,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid) {
-@@ -1385,6 +1416,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1386,6 +1417,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        }
  #endif
        file->mode = st.st_mode;
@@ -532,7 +532,7 @@ diff --git a/rsync.1.md b/rsync.1.md
      the corresponding destination file on the receiving side (should it exist).
      If the destination file is a non-empty directory, it will only be
 -    successfully deleted if `--force` or `--delete` are in effect.  Other than
-+    successfully deleted if `--force-delee` or `--delete` are in effect.  Other than
++    successfully deleted if `--force-delete` or `--delete` are in effect.  Other than
      that, this option is independent of any other type of delete processing.
  
      The missing source files are represented by special file-list entries which
@@ -541,7 +541,7 @@ diff --git a/rsync.1.md b/rsync.1.md
      errors.
  
 -0.  `--force`
-+0.  `--force-delee`
++0.  `--force-delete`
  
      This option tells rsync to delete a non-empty directory when it is to be
      replaced by a non-directory.  This is only relevant if deletions are not
@@ -736,7 +736,7 @@ diff --git a/rsync.h b/rsync.h
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -789,6 +816,7 @@ extern int pathname_ndx;
+@@ -793,6 +820,7 @@ extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -744,7 +744,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -843,6 +871,11 @@ extern int xattrs_ndx;
+@@ -847,6 +875,11 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
@@ -1079,7 +1079,7 @@ diff --git a/util.c b/util.c
 diff --git a/xattrs.c b/xattrs.c
 --- a/xattrs.c
 +++ b/xattrs.c
-@@ -1203,7 +1203,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1202,7 +1202,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
        mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
             | (S_ISDIR(fst.st_mode) ? 0700 : 0600);
        if (fst.st_mode != mode)
index 5616bb68cf836fa34664a10d1fd613c5eb8692e2..9b73e9ef4947227d86113d1670a39755cbf2001d 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 5eda68f11bf6efe782cca60a2415191f4532c3b5
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
@@ -268,7 +268,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef ICONV_OPTION
  extern int filesfrom_convert;
-@@ -1178,7 +1179,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1187,7 +1188,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        } else if (readlink_stat(thisname, &st, linkname) != 0) {
                int save_errno = errno;
                /* See if file is excluded before reporting an error. */
@@ -277,7 +277,7 @@ diff --git a/flist.c b/flist.c
                 && (is_excluded(thisname, 0, filter_level)
                  || is_excluded(thisname, 1, filter_level))) {
                        if (ignore_perishable && save_errno != ENOENT)
-@@ -1223,6 +1224,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1232,6 +1233,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
  
        if (filter_level == NO_FILTERS)
                goto skip_filters;
@@ -290,7 +290,7 @@ diff --git a/flist.c b/flist.c
  
        if (S_ISDIR(st.st_mode)) {
                if (!xfer_dirs) {
-@@ -1439,12 +1446,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1448,12 +1455,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
                                          int flags, int filter_level)
  {
        struct file_struct *file;
@@ -315,7 +315,7 @@ diff --git a/flist.c b/flist.c
                file->mode = tweak_mode(file->mode, chmod_modes);
  
        if (f >= 0) {
-@@ -2345,7 +2363,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2353,7 +2371,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                        struct file_struct *file;
                        file = send_file_name(f, flist, fbuf, &st,
                                              FLAG_TOP_DIR | FLAG_CONTENT_DIR | flags,
@@ -324,7 +324,7 @@ diff --git a/flist.c b/flist.c
                        if (!file)
                                continue;
                        if (inc_recurse) {
-@@ -2359,7 +2377,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2367,7 +2385,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                        } else
                                send_if_directory(f, flist, file, fbuf, len, flags);
                } else
@@ -336,7 +336,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/rsync.1.md b/rsync.1.md
 --- a/rsync.1.md
 +++ b/rsync.1.md
-@@ -1247,7 +1247,9 @@ your home directory (remove the '=' for that).
+@@ -1249,7 +1249,9 @@ your home directory (remove the '=' for that).
      >     --chmod=D2775,F664
  
      It is also legal to specify multiple `--chmod` options, as each additional
@@ -347,41 +347,41 @@ diff --git a/rsync.1.md b/rsync.1.md
  
      See the `--perms` and `--executability` options for how the resulting
      permission value can be applied to the files in the transfer.
-@@ -2548,6 +2550,10 @@ your home directory (remove the '=' for that).
+@@ -2556,6 +2558,10 @@ your home directory (remove the '=' for that).
      If you specify "`--chown=foo:bar`", this is exactly the same as specifying
      "`--usermap=*:foo --groupmap=*:bar`", only easier.
  
 +    To change ownership of files matching a pattern, use an include filter with
-+    the `o` and `g` modifiers, which take effect before uid/gid mapping and
-+    therefore em(can) be mixed with `--usermap` and `--groupmap`.
++    a `o` or `g` modifier, which take effect before uid/gid mapping and
++    therefore *can* be mixed with `--usermap` and `--groupmap`.
 +
  0.  `--timeout=SECONDS`
  
      This option allows you to set a maximum I/O timeout in seconds.  If no data
-@@ -3499,6 +3505,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
+@@ -3547,6 +3553,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
    rules that exclude things like "CVS" and "`*.o`" are marked as perishable,
    and will not prevent a directory that was removed on the source from being
    deleted on the destination.
-+- An `m+nop()(CHMOD)` on an include rule tweaks the permissions of matching
++- An `m(CHMOD)` on an include rule tweaks the permissions of matching
 +  source files in the same way as `--chmod`.  This happens before any tweaks
 +  requested via `--chmod` options.
-+- An `o+nop()(USER)` on an include rule pretends that matching source files are
++- An `o(USER)` on an include rule pretends that matching source files are
 +  owned by `USER` (a name or numeric uid).  This happens before any uid mapping
 +  by name or `--usermap`.
-+- A `g+nop()(GROUP)` on an include rule pretends that matching source files are
++- A `g(GROUP)` on an include rule pretends that matching source files are
 +  owned by `GROUP` (a name or numeric gid).  This happens before any gid
 +  mapping by name or `--groupmap`.
  - An `x` indicates that a rule affects xattr names in xattr copy/delete
    operations (and is thus ignored when matching file/dir names).  If no
    xattr-matching rules are specified, a default xattr filtering rule is used
-@@ -3556,6 +3571,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -3604,6 +3619,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
    rules in the file must not specify sides (via a modifier or a rule prefix
    such as `hide`).
  
 +The attribute-affecting modifiers `m`, `o`, and `g` work only in client filters
 +(not in daemon filters), and only the modifiers of the first matching rule are
 +applied.  As an example, assuming `--super` is enabled, the rule
-+"`+o+nop()(root)g+nop()(root)m+nop()(go=) *~`" would ensure that all "backup"
++"`+o(root),g(root),m(go=) *~`" would ensure that all "backup"
 +files belong to root and are not accessible to anyone else.
 +
  Per-directory rules are inherited in all subdirectories of the directory where
@@ -400,7 +400,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define XFLG_FATAL_ERRORS     (1<<0)
  #define XFLG_OLD_PREFIXES     (1<<1)
-@@ -920,6 +923,8 @@ struct map_struct {
+@@ -954,6 +957,8 @@ struct map_struct {
        int status;             /* first errno from read errors         */
  };
  
@@ -409,7 +409,7 @@ diff --git a/rsync.h b/rsync.h
  #define NAME_IS_FILE          (0)    /* filter name as a file */
  #define NAME_IS_DIR           (1<<0) /* filter name as a dir */
  #define NAME_IS_XATTR         (1<<2) /* filter name as an xattr */
-@@ -945,8 +950,18 @@ struct map_struct {
+@@ -979,8 +984,18 @@ struct map_struct {
  #define FILTRULE_CLEAR_LIST   (1<<18)/* this item is the "!" token */
  #define FILTRULE_PERISHABLE   (1<<19)/* perishable if parent dir goes away */
  #define FILTRULE_XATTR                (1<<20)/* rule only applies to xattr names */
@@ -428,7 +428,7 @@ diff --git a/rsync.h b/rsync.h
  
  typedef struct filter_struct {
        struct filter_struct *next;
-@@ -956,6 +971,11 @@ typedef struct filter_struct {
+@@ -990,6 +1005,11 @@ typedef struct filter_struct {
                int slash_cnt;
                struct filter_list_struct *mergelist;
        } u;