./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -1808,7 +1808,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1837,7 +1837,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto notify_others;
if (read_batch || whole_file) {
if (!(backupptr = get_backup_name(fname)))
goto cleanup;
if (!(back_file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
-@@ -1844,7 +1844,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1873,7 +1873,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto notify_others;
}
if (!(backupptr = get_backup_name(fname))) {
close(fd);
goto cleanup;
-@@ -1968,7 +1968,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
+@@ -1997,7 +1997,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
skip_atomic = 0;
if (del_for_flag) {
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -965,7 +965,8 @@ static struct poptOption long_options[] = {
+@@ -987,7 +987,8 @@ static struct poptOption long_options[] = {
{"no-i", 0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
{"no-bwlimit", 0, POPT_ARG_VAL, &bwlimit, 0, 0, 0 },
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2721,6 +2722,10 @@ void server_options(char **args, int *argc_p)
+@@ -2959,6 +2960,10 @@ void server_options(char **args, int *argc_p)
}
if (am_sender) {
--backup-dir=DIR make backups into hierarchy based in DIR
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
--update, -u skip files that are newer on the receiver
-@@ -839,6 +840,13 @@ your home directory (remove the '=' for that).
+@@ -856,6 +857,13 @@ your home directory (remove the '=' for that).
trailing inclusion/exclusion of `*`, the auto-added rule would never be
reached).
diff --git a/rsync.c b/rsync.c
--- a/rsync.c
+++ b/rsync.c
-@@ -708,7 +708,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -721,7 +721,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
goto do_set_file_attrs;
}
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -158,10 +158,14 @@ int no_detach
+@@ -160,10 +160,14 @@ int no_detach
int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
char *tmpdir = NULL;
char *partial_dir = NULL;
char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -174,7 +178,9 @@ char *password_file = NULL;
+@@ -176,7 +180,9 @@ char *password_file = NULL;
char *early_input_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char *sockopts = NULL;
char *usermap = NULL;
char *groupmap = NULL;
-@@ -969,7 +975,9 @@ static struct poptOption long_options[] = {
+@@ -991,7 +997,9 @@ static struct poptOption long_options[] = {
{"backup-deleted", 0, POPT_ARG_VAL, &make_backups, 1, 0, 0 },
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -2185,6 +2193,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2420,6 +2428,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2206,6 +2216,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2441,6 +2451,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (check_filter(elp, FLOG, dir, 1) < 0)
goto options_rejected;
}
}
if (!backup_suffix)
-@@ -2217,6 +2235,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2452,6 +2470,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
backup_suffix);
return 0;
}
if (backup_dir) {
size_t len;
make_backups = 1; /* --backup-dir implies --backup */
-@@ -2253,6 +2285,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2488,6 +2520,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
"P *%s", backup_suffix);
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (preserve_times) {
preserve_times = PRESERVE_FILE_TIMES;
-@@ -2696,6 +2756,10 @@ void server_options(char **args, int *argc_p)
+@@ -2934,6 +2994,10 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -2704,6 +2768,14 @@ void server_options(char **args, int *argc_p)
+@@ -2942,6 +3006,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -209,8 +209,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -214,8 +214,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
*exit_code_ptr = RERR_TERMINATED;
else
*exit_code_ptr = RERR_WAITCHILD;
}
void write_del_stats(int f)
-@@ -1577,6 +1580,14 @@ void remember_children(UNUSED(int val))
+@@ -1629,6 +1632,14 @@ void remember_children(UNUSED(int val))
break;
}
}
}
#endif
#ifndef HAVE_SIGACTION
-@@ -1632,6 +1643,12 @@ static void rsync_panic_handler(UNUSED(int whatsig))
+@@ -1684,6 +1695,12 @@ static void rsync_panic_handler(UNUSED(int whatsig))
}
#endif
int main(int argc,char *argv[])
{
-@@ -1656,6 +1673,11 @@ int main(int argc,char *argv[])
+@@ -1708,6 +1725,11 @@ int main(int argc,char *argv[])
SIGACTMASK(SIGFPE, rsync_panic_handler);
SIGACTMASK(SIGABRT, rsync_panic_handler);
SIGACTMASK(SIGBUS, rsync_panic_handler);
./configure (optional if already run)
make
-based-on: 0327a2526b8f3e6c050e4541805b8b702ba5d7ce
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
* F_PATHNAME(), or (2) "NULL, dir, dirlen" to chdir() to the supplied dir,
* with dir == NULL taken to be the starting directory, and dirlen < 0
-@@ -1200,7 +1451,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1201,7 +1452,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
STRUCT_STAT *stp, int flags, int filter_level)
{
static char *lastdir;
struct file_struct *file;
char thisname[MAXPATHLEN];
char linkname[MAXPATHLEN];
-@@ -1346,9 +1597,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1347,9 +1598,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
memcpy(lastdir, thisname, len);
lastdir[len] = '\0';
lastdir_len = len;
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
-@@ -1366,11 +1624,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1367,11 +1625,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
extra_len += EXTRA_LEN;
#endif
#if EXTRA_ROUNDING > 0
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1459,8 +1714,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1460,8 +1715,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2672,7 +2933,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2673,7 +2934,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
/* The --relative option sends paths with a leading slash, so we need
* to specify the strip_root option here. We rejected leading slashes
* for a non-relative transfer in recv_file_entry(). */
if (protocol_version < 30) {
/* Recv the io_error flag */
-@@ -2917,7 +3178,7 @@ void flist_free(struct file_list *flist)
+@@ -2918,7 +3179,7 @@ void flist_free(struct file_list *flist)
/* This routine ensures we don't have any duplicate names in our file list.
* duplicate names can cause corruption because of the pipelining. */
{
char fbuf[MAXPATHLEN];
int i, prev_i;
-@@ -2968,7 +3229,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2969,7 +3230,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
/* If one is a dir and the other is not, we want to
* keep the dir because it might have contents in the
* list. Otherwise keep the first one. */
struct file_struct *fp = flist->sorted[j];
if (!S_ISDIR(fp->mode))
keep = i, drop = j;
-@@ -2984,8 +3245,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2985,8 +3246,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
} else
keep = j, drop = i;
rprintf(FINFO,
"removing duplicate name %s from file list (%d)\n",
f_name(file, fbuf), drop + flist->ndx_start);
-@@ -3007,7 +3268,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -3008,7 +3269,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
}
flist->high = prev_i;
}
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1552,6 +1763,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1553,6 +1764,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
if (ignore_perishable)
non_perishable_cnt++;
return NULL;
}
-@@ -1598,13 +1811,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1599,13 +1812,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
lastdir[len] = '\0';
lastdir_len = len;
if (checksum_files && am_sender && flist)
}
}
basename_len = strlen(basename) + 1; /* count the '\0' */
-@@ -1716,7 +1929,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1717,7 +1930,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
if (flist && checksum_files)
else
file_checksum(thisname, &st, tmp_sum);
if (sender_keeps_checksum)
-@@ -2108,6 +2321,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -2109,6 +2322,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
closedir(d);
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
-@@ -2771,6 +2987,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2772,6 +2988,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1317,7 +1317,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1368,7 +1368,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
#endif
if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -589,7 +589,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -610,7 +610,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
of the file time to determine whether to sync */
if (always_checksum > 0 && S_ISREG(st->st_mode)) {
char sum[MAX_DIGEST_LEN];
continue;
}
-@@ -1118,6 +1126,38 @@ int del_def_xattr_acl(const char *fname)
+@@ -1116,6 +1124,38 @@ int del_def_xattr_acl(const char *fname)
}
#endif
./configure (optional if already run)
make
-based-on: 0327a2526b8f3e6c050e4541805b8b702ba5d7ce
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2330,6 +2331,17 @@ your home directory (remove the '=' for that).
+@@ -2331,6 +2332,17 @@ your home directory (remove the '=' for that).
specified (or implied by `-a`). You can work-around this bug by avoiding
the `-o` option when sending to an old rsync.
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-@@ -138,6 +138,54 @@ int do_link(const char *old_path, const char *new_path)
+@@ -142,6 +142,54 @@ int do_link(const char *old_path, const char *new_path)
}
#endif
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/daemon-parm.txt b/daemon-parm.txt
--- a/daemon-parm.txt
+++ b/daemon-parm.txt
STRING dont_compress DEFAULT_DONT_COMPRESS
STRING early_exec NULL
STRING exclude NULL
-@@ -44,6 +45,7 @@ STRING uid NULL
+@@ -45,6 +46,7 @@ STRING uid NULL
PATH path NULL
PATH temp_dir NULL
int remove_source_files = 0;
int one_file_system = 0;
int protocol_version = PROTOCOL_VERSION;
-@@ -1010,6 +1012,8 @@ static struct poptOption long_options[] = {
+@@ -1037,6 +1039,8 @@ static struct poptOption long_options[] = {
{"outbuf", 0, POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
{"remote-option", 'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -441,6 +441,8 @@ detailed description below for a complete description.
+@@ -443,6 +443,8 @@ detailed description below for a complete description.
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int write_devices;
extern int preserve_specials;
extern int preserve_hard_links;
-@@ -1650,7 +1651,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1679,7 +1680,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
if (solo_file)
fname = f_name(file, NULL);
rprintf(FINFO, "skipping non-regular file \"%s\"\n", fname);
-@@ -1871,6 +1872,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1900,6 +1901,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp_type = FNAMECMP_BACKUP;
}
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -51,6 +51,7 @@ int append_mode = 0;
+@@ -50,6 +50,7 @@ int append_mode = 0;
int keep_dirlinks = 0;
int copy_dirlinks = 0;
int copy_links = 0;
int write_devices = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
-@@ -851,6 +852,7 @@ static struct poptOption long_options[] = {
+@@ -873,6 +874,7 @@ static struct poptOption long_options[] = {
{"no-D", 0, POPT_ARG_NONE, 0, OPT_NO_D, 0, 0 },
{"devices", 0, POPT_ARG_VAL, &preserve_devices, 1, 0, 0 },
{"no-devices", 0, POPT_ARG_VAL, &preserve_devices, 0, 0, 0 },
{"write-devices", 0, POPT_ARG_VAL, &write_devices, 1, 0, 0 },
{"no-write-devices", 0, POPT_ARG_VAL, &write_devices, 0, 0, 0 },
{"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 },
-@@ -1148,6 +1150,7 @@ static void set_refuse_options(void)
+@@ -1175,6 +1177,7 @@ static void set_refuse_options(void)
|| strcmp("iconv", longName) == 0
|| strcmp("no-iconv", longName) == 0
|| strcmp("checksum-seed", longName) == 0
|| strcmp("write-devices", longName) == 0 /* disable wild-match (it gets refused below) */
|| strcmp("log-format", longName) == 0 /* aka out-format (NOT log-file-format) */
|| strcmp("sender", longName) == 0
-@@ -1159,6 +1162,7 @@ static void set_refuse_options(void)
+@@ -1186,6 +1189,7 @@ static void set_refuse_options(void)
assert(list_end != NULL);
if (am_daemon) { /* Refused by default, but can be accepted via a negated exact match. */
parse_one_refuse_match(0, "write-devices", list_end);
}
-@@ -2890,6 +2894,9 @@ void server_options(char **args, int *argc_p)
+@@ -3128,6 +3132,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -367,6 +367,7 @@ detailed description below for a complete description.
+@@ -368,6 +368,7 @@ detailed description below for a complete description.
--owner, -o preserve owner (super-user only)
--group, -g preserve group
--devices preserve device files (super-user only)
diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
--- a/rsyncd.conf.5.md
+++ b/rsyncd.conf.5.md
-@@ -913,9 +913,10 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
+@@ -930,9 +930,10 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
If you are un-refusing the compress option, you probably want to match
"`!compress*`" so that you also accept the `--compress-level` option.
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int size_only;
extern OFF_T max_size;
extern OFF_T min_size;
-@@ -582,6 +583,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -603,6 +604,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
/* Perform our quick-check heuristic for determining if a file is unchanged. */
int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
{
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -112,6 +112,7 @@ int safe_symlinks = 0;
+@@ -113,6 +113,7 @@ int safe_symlinks = 0;
int copy_unsafe_links = 0;
int munge_symlinks = 0;
int size_only = 0;
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -878,6 +879,7 @@ static struct poptOption long_options[] = {
+@@ -900,6 +901,7 @@ static struct poptOption long_options[] = {
{"chmod", 0, POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
-@@ -2777,6 +2779,9 @@ void server_options(char **args, int *argc_p)
+@@ -3015,6 +3017,9 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -416,6 +416,7 @@ detailed description below for a complete description.
+@@ -418,6 +418,7 @@ detailed description below for a complete description.
--contimeout=SECONDS set daemon connection timeout in seconds
--ignore-times, -I don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM, -@ set the accuracy for mod-time comparisons
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
-@@ -643,6 +644,14 @@ your home directory (remove the '=' for that).
+@@ -660,6 +661,14 @@ your home directory (remove the '=' for that).
after using another mirroring system which may not preserve timestamps
exactly.
./configure
make
-based-on: 0327a2526b8f3e6c050e4541805b8b702ba5d7ce
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
daemon-parm.h: daemon-parm.txt daemon-parm.awk
$(AWK) -f $(srcdir)/daemon-parm.awk $(srcdir)/daemon-parm.txt
-@@ -235,7 +245,7 @@ proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h daemon-parm.h
+@@ -235,7 +245,7 @@ proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
$(AWK) -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
.PHONY: man
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h dl.h \
popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \
-@@ -1336,6 +1337,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1345,6 +1346,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
fi
fi
extern int eol_nulls;
extern int atimes_ndx;
extern int crtimes_ndx;
-@@ -1366,11 +1367,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1367,11 +1368,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
extra_len += EXTRA_LEN;
#endif
#if EXTRA_ROUNDING > 0
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1459,8 +1457,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1460,8 +1458,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2144,6 +2146,9 @@ void send_extra_file_list(int f, int at_least)
+@@ -2145,6 +2147,9 @@ void send_extra_file_list(int f, int at_least)
finish:
if (io_error != save_io_error && protocol_version == 30 && !ignore_errors)
send_msg_int(MSG_IO_ERROR, io_error);
}
struct file_list *send_file_list(int f, int argc, char *argv[])
-@@ -2167,6 +2172,13 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2168,6 +2173,13 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
| (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0);
int implied_dot_dir = 0;
rprintf(FLOG, "building file list\n");
if (show_filelist_progress)
start_filelist_progress("building file list");
-@@ -2510,6 +2522,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2511,6 +2523,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
extern char *shell_cmd;
extern char *password_file;
extern char *backup_dir;
-@@ -1223,6 +1226,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
+@@ -1241,6 +1244,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
if (am_daemon && io_timeout && protocol_version >= 31)
send_msg_int(MSG_IO_TIMEOUT, io_timeout);
if (am_sender) {
keep_dirlinks = 0; /* Must be disabled on the sender. */
if (need_messages_from_generator)
-@@ -1506,6 +1512,9 @@ static int start_client(int argc, char *argv[])
+@@ -1531,6 +1537,9 @@ static int start_client(int argc, char *argv[])
else
env_port = rsync_port;
diff = u_strcmp(fmid->basename, f->basename);
if (diff == 0) {
good_match = mid;
-@@ -1953,6 +1955,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1982,6 +1984,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp = partialptr;
fnamecmp_type = FNAMECMP_PARTIAL_DIR;
statret = 0;
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -940,7 +940,9 @@ static struct poptOption long_options[] = {
+@@ -955,7 +955,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 },
{"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 },
-@@ -2956,8 +2958,14 @@ void server_options(char **args, int *argc_p)
+@@ -2996,8 +2998,14 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -420,6 +420,8 @@ detailed description below for a complete description.
+@@ -422,6 +422,8 @@ detailed description below for a complete description.
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
--detect-renamed try to find renamed files to speed the xfer
--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
-@@ -2223,6 +2225,17 @@ your home directory (remove the '=' for that).
+@@ -2264,6 +2266,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`.
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 1225eb4b2100b335ac6ec6d850ace76ca6ff3f67
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
static void send_directory(int f, struct file_list *flist,
char *fbuf, int len, int flags);
-@@ -2674,6 +2716,23 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2675,6 +2717,23 @@ struct file_list *recv_file_list(int f, int dir_ndx)
* for a non-relative transfer in recv_file_entry(). */
flist_sort_and_clean(flist, relative_paths);
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -716,7 +716,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -721,7 +721,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
trailing_slash = cp && !cp[1];
if (mkpath_dest_arg && statret < 0 && (cp || file_total > 1)) {
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -88,6 +88,7 @@ int am_server = 0;
+@@ -87,6 +87,7 @@ int am_server = 0;
int am_sender = 0;
int am_starting_up = 1;
int relative_paths = -1;
{"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 },
-@@ -2561,7 +2563,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2579,7 +2581,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -2570,6 +2572,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2588,6 +2590,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
snprintf(err_buf, sizeof err_buf,
"--%s cannot be used with --%s\n",
append_mode ? "append" : "inplace",
delay_updates ? "delay-updates" : "partial-dir");
return 0;
}
-@@ -2982,6 +2985,8 @@ void server_options(char **args, int *argc_p)
+@@ -2993,6 +2996,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
--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
-@@ -2237,6 +2238,22 @@ your home directory (remove the '=' for that).
+@@ -2247,6 +2248,22 @@ your home directory (remove the '=' for that).
fuzzy-match files, so either use `--delete-after` or specify some filename
exclusions if you need to prevent this.
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
extern int module_id;
extern int local_server;
extern int sanitize_paths;
-@@ -953,6 +954,8 @@ static struct poptOption long_options[] = {
+@@ -975,6 +976,8 @@ static struct poptOption long_options[] = {
{"partial-dir", 0, POPT_ARG_STRING, &partial_dir, 0, 0, 0 },
{"delay-updates", 0, POPT_ARG_VAL, &delay_updates, 1, 0, 0 },
{"no-delay-updates", 0, POPT_ARG_VAL, &delay_updates, 0, 0, 0 },
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -407,6 +407,7 @@ detailed description below for a complete description.
+@@ -409,6 +409,7 @@ detailed description below for a complete description.
--partial keep partially transferred files
--partial-dir=DIR put a partially transferred file into DIR
--delay-updates put all updated files into place at end
--prune-empty-dirs, -m prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
--usermap=STRING custom username mapping
-@@ -2918,6 +2919,16 @@ your home directory (remove the '=' for that).
+@@ -3012,6 +3013,16 @@ your home directory (remove the '=' for that).
update algorithm that is even more atomic (it uses `--link-dest` and a
parallel hierarchy of files).
#ifndef S_BLKSIZE
# if defined hpux || defined __hpux__ || defined __hpux
# define S_BLKSIZE 1024
-@@ -82,7 +84,12 @@ int do_symlink(const char *lnk, const char *fname)
+@@ -91,7 +93,12 @@ int do_symlink(const char *lnk, const char *fname)
* and write the lnk into it. */
if (am_root < 0) {
int ok, len = strlen(lnk);
if (fd < 0)
return -1;
ok = write(fd, lnk, len) == len;
-@@ -207,6 +214,8 @@ int do_open(const char *pathname, int flags, mode_t mode)
+@@ -220,6 +227,8 @@ int do_open(const char *pathname, int flags, mode_t mode)
if (open_noatime)
flags |= O_NOATIME;
#endif
return open(pathname, flags | O_BINARY, mode);
}
-@@ -575,6 +584,9 @@ int do_open_nofollow(const char *pathname, int flags)
+@@ -624,6 +633,9 @@ int do_open_nofollow(const char *pathname, int flags)
#endif
}
./configure (optional if already run)
make
-based-on: 974f49e22ac9f62fcfd750768d0835b900524578
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -66,6 +66,7 @@ int preserve_times = 0;
+@@ -65,6 +65,7 @@ int preserve_times = 0;
int preserve_atimes = 0;
int preserve_crtimes = 0;
int update_only = 0;
int open_noatime = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -898,6 +899,7 @@ static struct poptOption long_options[] = {
+@@ -904,6 +905,7 @@ static struct poptOption long_options[] = {
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
./configure (optional if already run)
make
-based-on: c3cf174e5ed52e709ecdfd65c7d5da34c7574b96
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
#endif
if (preserve_uid)
uid = F_OWNER(first);
-@@ -868,6 +891,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -869,6 +892,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);
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
-@@ -1026,6 +1053,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1027,6 +1054,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
}
#endif
file->mode = mode;
if (preserve_uid)
F_OWNER(file) = uid;
if (preserve_gid) {
-@@ -1427,6 +1458,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1428,6 +1459,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
}
#endif
file->mode = st.st_mode;
extern int msgs2stderr;
extern int module_id;
extern int read_only;
-@@ -965,6 +969,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -970,6 +974,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
* points to an identical file won't be replaced by the referent. */
copy_links = copy_dirlinks = copy_unsafe_links = 0;
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -57,6 +57,7 @@ int preserve_hard_links = 0;
+@@ -56,6 +56,7 @@ int preserve_hard_links = 0;
int preserve_acls = 0;
int preserve_xattrs = 0;
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
int preserve_specials = 0;
-@@ -94,6 +95,7 @@ int numeric_ids = 0;
+@@ -93,6 +94,7 @@ int numeric_ids = 0;
int msgs2stderr = 2; /* Default: send errors to stderr for local & remote-shell transfers */
int allow_8bit_chars = 0;
int force_delete = 0;
int io_timeout = 0;
int prune_empty_dirs = 0;
int use_qsort = 0;
-@@ -682,6 +684,11 @@ static void print_info_flags(enum logcode f)
+@@ -681,6 +683,11 @@ static void print_info_flags(enum logcode f)
#endif
"crtimes",
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2868,6 +2891,9 @@ void server_options(char **args, int *argc_p)
+@@ -2879,6 +2902,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
goto oom;
-@@ -2976,6 +3002,16 @@ void server_options(char **args, int *argc_p)
+@@ -2987,6 +3013,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
--max-delete=NUM don't delete more than NUM files
--max-size=SIZE don't transfer any file larger than SIZE
--min-size=SIZE don't transfer any file smaller than SIZE
-@@ -708,6 +712,8 @@ your home directory (remove the '=' for that).
+@@ -717,6 +721,8 @@ your home directory (remove the '=' for that).
Note that `-a` **does not preserve hardlinks**, because finding
multiply-linked files is expensive. You must separately specify `-H`.
0. `--no-OPTION`
-@@ -1066,7 +1072,7 @@ your home directory (remove the '=' for that).
+@@ -1076,7 +1082,7 @@ your home directory (remove the '=' for that).
Without this option, if the sending side has replaced a directory with a
symlink to a directory, the receiving side will delete anything that is in
the way of the new symlink, including a directory hierarchy (as long as
See also `--keep-dirlinks` for an analogous option for the receiving side.
-@@ -1252,6 +1258,29 @@ your home directory (remove the '=' for that).
+@@ -1262,6 +1268,29 @@ your home directory (remove the '=' for that).
those used by `--fake-super`) unless you repeat the option (e.g. `-XX`).
This "copy all xattrs" mode cannot be used with `--fake-super`.
0. `--chmod=CHMOD`
This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1719,7 +1748,7 @@ your home directory (remove the '=' for that).
+@@ -1729,7 +1758,7 @@ your home directory (remove the '=' for that).
option a step farther: each missing arg will become a deletion request of
the corresponding destination file on the receiving side (should it exist).
If the destination file is a non-empty directory, it will only be
that, this option is independent of any other type of delete processing.
The missing source files are represented by special file-list entries which
-@@ -1730,15 +1759,16 @@ your home directory (remove the '=' for that).
+@@ -1740,15 +1769,16 @@ your home directory (remove the '=' for that).
Tells `--delete` to go ahead and delete files even when there are I/O
errors.
0. `--max-delete=NUM`
-@@ -2651,7 +2681,7 @@ your home directory (remove the '=' for that).
+@@ -2700,7 +2730,7 @@ your home directory (remove the '=' for that).
output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
}
#ifdef SUPPORT_LINKS
-@@ -138,14 +155,35 @@ int do_link(const char *old_path, const char *new_path)
+@@ -142,14 +159,35 @@ int do_link(const char *old_path, const char *new_path)
}
#endif
}
int do_mknod(const char *pathname, mode_t mode, dev_t dev)
-@@ -185,7 +223,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
+@@ -189,7 +227,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
return -1;
close(sock);
#ifdef HAVE_CHMOD
#else
return 0;
#endif
-@@ -202,7 +240,22 @@ int do_rmdir(const char *pathname)
+@@ -206,7 +244,22 @@ int do_rmdir(const char *pathname)
{
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
}
int do_open(const char *pathname, int flags, mode_t mode)
-@@ -221,7 +274,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
+@@ -225,7 +278,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
}
#ifdef HAVE_CHMOD
{
int code;
if (dry_run) return 0;
-@@ -244,17 +297,72 @@ int do_chmod(const char *path, mode_t mode)
+@@ -248,17 +301,72 @@ int do_chmod(const char *path, mode_t mode)
} else
code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
#endif /* !HAVE_LCHMOD */
./configure (optional if already run)
make
-based-on: 5eda68f11bf6efe782cca60a2415191f4532c3b5
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -83,6 +83,7 @@ extern struct chmod_mode_struct *chmod_modes;
+@@ -84,6 +84,7 @@ extern struct chmod_mode_struct *chmod_modes;
extern filter_rule_list filter_list;
extern filter_rule_list daemon_filter_list;
#ifdef ICONV_OPTION
extern int filesfrom_convert;
-@@ -1187,7 +1188,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1229,7 +1230,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. */
&& (is_excluded(thisname, 0, filter_level)
|| is_excluded(thisname, 1, filter_level))) {
if (ignore_perishable && save_errno != ENOENT)
-@@ -1232,6 +1233,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1274,6 +1275,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (filter_level == NO_FILTERS)
goto skip_filters;
if (S_ISDIR(st.st_mode)) {
if (!xfer_dirs) {
-@@ -1448,12 +1455,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1494,12 +1501,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
int flags, int filter_level)
{
struct file_struct *file;
file->mode = tweak_mode(file->mode, chmod_modes);
if (f >= 0) {
-@@ -2353,7 +2371,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2399,7 +2417,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,
if (!file)
continue;
if (inc_recurse) {
-@@ -2367,7 +2385,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2413,7 +2431,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
} else
send_if_directory(f, flist, file, fbuf, len, flags);
} else
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -1249,7 +1249,9 @@ your home directory (remove the '=' for that).
+@@ -1285,7 +1285,9 @@ your home directory (remove the '=' for that).
> --chmod=D2775,F664
It is also legal to specify multiple `--chmod` options, as each additional
See the `--perms` and `--executability` options for how the resulting
permission value can be applied to the files in the transfer.
-@@ -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.
+@@ -2636,6 +2638,10 @@ your home directory (remove the '=' for that).
+ "`--usermap=*:foo --groupmap=*:bar`", only easier. If your shell complains
+ about the wildcards, use `--protect-args` (`-s`).
+ To change ownership of files matching a pattern, use an include filter with
+ a `o` or `g` modifier, which take effect before uid/gid mapping and
0. `--timeout=SECONDS`
This option allows you to set a maximum I/O timeout in seconds. If no data
-@@ -3547,6 +3553,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
+@@ -3633,6 +3639,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 `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
-@@ -3604,6 +3619,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -3690,6 +3705,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`).
#define XFLG_FATAL_ERRORS (1<<0)
#define XFLG_OLD_PREFIXES (1<<1)
-@@ -954,6 +957,8 @@ struct map_struct {
+@@ -962,6 +965,8 @@ struct map_struct {
int status; /* first errno from read errors */
};
#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 */
-@@ -979,8 +984,18 @@ struct map_struct {
+@@ -987,8 +992,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 */
typedef struct filter_struct {
struct filter_struct *next;
-@@ -990,6 +1005,11 @@ typedef struct filter_struct {
+@@ -998,6 +1013,11 @@ typedef struct filter_struct {
int slash_cnt;
struct filter_list_struct *mergelist;
} u;
./configure (optional if already run)
make
-based-on: af531cf787995f6a3bc381cd1da1988192e7ef59
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
int ignore_times = 0;
int delete_mode = 0;
int delete_during = 0;
-@@ -995,6 +996,7 @@ static struct poptOption long_options[] = {
+@@ -1010,6 +1011,7 @@ static struct poptOption long_options[] = {
{"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 },
{"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 },
{"no-contimeout", 0, POPT_ARG_VAL, &connect_timeout, 0, 0, 0 },
{"stop-after", 0, POPT_ARG_STRING, 0, OPT_STOP_AFTER, 0, 0 },
{"time-limit", 0, POPT_ARG_STRING, 0, OPT_STOP_AFTER, 0, 0 }, /* earlier stop-after name */
{"stop-at", 0, POPT_ARG_STRING, 0, OPT_STOP_AT, 0, 0 },
-@@ -3038,6 +3040,9 @@ void server_options(char **args, int *argc_p)
+@@ -3078,6 +3080,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = tmpdir;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -408,6 +408,7 @@ detailed description below for a complete description.
+@@ -410,6 +410,7 @@ detailed description below for a complete description.
--partial-dir=DIR put a partially transferred file into DIR
--delay-updates put all updated files into place at end
--prune-empty-dirs, -m prune empty directory chains from file-list
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1628,6 +1628,9 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1629,6 +1629,9 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
#ifdef SUPPORT_XATTRS
if (preserve_xattrs) {
sx.st.st_mode = file->mode;
extern int dry_run;
extern int list_only;
-@@ -59,6 +63,7 @@ extern int copy_dirlinks;
+@@ -60,6 +64,7 @@ extern int copy_dirlinks;
extern int copy_unsafe_links;
extern int keep_dirlinks;
extern int preserve_hard_links;
+extern int preserve_hfs_compression;
extern int protocol_version;
- extern int force_change;
+ extern int mkpath_dest_arg;
extern int file_total;
-@@ -115,6 +120,7 @@ int daemon_over_rsh = 0;
+@@ -117,6 +122,7 @@ int daemon_connection = 0; /* 0 = no daemon, 1 = daemon via remote shell, -1 = d
mode_t orig_umask = 0;
int batch_gen_fd = -1;
int sender_keeps_checksum = 0;
int raw_argc, cooked_argc;
char **raw_argv, **cooked_argv;
-@@ -665,6 +671,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
+@@ -671,6 +677,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
return pid;
}
/* The receiving side operates in one of two modes:
*
* 1. it receives any number of files into a destination directory,
-@@ -723,6 +766,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -748,6 +791,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
exit_cleanup(RERR_FILESELECT);
}
filesystem_dev = st.st_dev; /* ensures --force works right w/-x */
return NULL;
}
if (file_total > 1) {
-@@ -782,7 +828,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -805,7 +851,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
full_fname(dest_path));
exit_cleanup(RERR_FILESELECT);
}
return NULL;
}
-@@ -802,6 +850,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -825,6 +873,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
full_fname(dest_path));
exit_cleanup(RERR_FILESELECT);
}
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -56,6 +56,7 @@ int preserve_links = 0;
+@@ -55,6 +55,7 @@ int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
int preserve_xattrs = 0;
int preserve_perms = 0;
int preserve_fileflags = 0;
int preserve_executability = 0;
-@@ -941,6 +942,10 @@ static struct poptOption long_options[] = {
+@@ -947,6 +948,10 @@ static struct poptOption long_options[] = {
{"no-force-change", 0, POPT_ARG_VAL, &force_change, 0, 0, 0 },
{"force-uchange", 0, POPT_ARG_VAL, &force_change, USR_IMMUTABLE, 0, 0 },
{"force-schange", 0, POPT_ARG_VAL, &force_change, SYS_IMMUTABLE, 0, 0 },
{"ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 1, 0, 0 },
{"no-ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -1246,6 +1251,10 @@ static void set_refuse_options(void)
+@@ -1254,6 +1259,10 @@ static void set_refuse_options(void)
parse_one_refuse_match(0, "force-uchange", list_end);
parse_one_refuse_match(0, "force-schange", list_end);
#endif
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2282,6 +2291,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2308,6 +2317,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -2886,6 +2904,11 @@ void server_options(char **args, int *argc_p)
+@@ -2905,6 +2923,11 @@ void server_options(char **args, int *argc_p)
if (preserve_fileflags)
args[ac++] = "--fileflags";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -365,6 +365,8 @@ detailed description below for a complete description.
+@@ -366,6 +366,8 @@ detailed description below for a complete description.
--chmod=CHMOD affect file and/or directory permissions
--acls, -A preserve ACLs (implies --perms)
--xattrs, -X preserve extended attributes
--owner, -o preserve owner (super-user only)
--group, -g preserve group
--devices preserve device files (super-user only)
-@@ -1256,6 +1258,47 @@ your home directory (remove the '=' for that).
+@@ -1291,6 +1293,47 @@ your home directory (remove the '=' for that).
receiving side. It does not try to affect user flags. This option
overrides `--force-change` and `--force-uchange`.
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: af531cf787995f6a3bc381cd1da1988192e7ef59
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
extern int ignore_errors;
extern int numeric_ids;
extern int quiet;
-@@ -2544,7 +2545,8 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2591,7 +2592,8 @@ struct file_list *recv_file_list(int f, int dir_ndx)
cur_dir++;
if (cur_dir != good_dirname) {
const char *d = dir_ndx >= 0 ? f_name(dir_flist->files[dir_ndx], NULL) : empty_dir;
rprintf(FERROR,
"ABORTING due to invalid path from sender: %s/%s\n",
cur_dir, file->basename);
-@@ -3116,6 +3118,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3158,6 +3160,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
{
int dif;
const uchar *c1, *c2;
enum fnc_state state1, state2;
enum fnc_type type1, type2;
enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM;
-@@ -3226,7 +3229,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3268,7 +3271,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
}
int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
-@@ -980,6 +981,8 @@ static struct poptOption long_options[] = {
+@@ -995,6 +996,8 @@ static struct poptOption long_options[] = {
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
{"only-write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
{"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 },
{"from0", '0', POPT_ARG_VAL, &eol_nulls, 1, 0, 0},
{"no-from0", 0, POPT_ARG_VAL, &eol_nulls, 0, 0, 0},
-@@ -2988,6 +2991,9 @@ void server_options(char **args, int *argc_p)
+@@ -3028,6 +3031,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -438,6 +438,7 @@ detailed description below for a complete description.
+@@ -440,6 +440,7 @@ detailed description below for a complete description.
--from0, -0 all *-from/filter files are delimited by 0s
--protect-args, -s no space-splitting; wildcard chars only
--copy-as=USER[:GROUP] specify user & optional group for the copy
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -2154,6 +2155,12 @@ your home directory (remove the '=' for that).
+@@ -2195,6 +2196,12 @@ your home directory (remove the '=' for that).
> sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/
./configure
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -138,7 +138,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -140,7 +140,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
setup_iconv();
#endif
return ret ? ret : client_run(fd, fd, -1, argc, argv);
}
-@@ -215,7 +215,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
+@@ -217,7 +217,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
return 0;
}
{
int i, modlen;
char line[BIGPATHBUFLEN];
-@@ -330,6 +330,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -328,6 +328,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
continue;
}
if (strcmp(line,"@RSYNCD: OK") == 0)
break;
-@@ -686,7 +697,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -685,7 +696,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
}
read_only = lp_read_only(i); /* may also be overridden by auth_server() */
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -917,6 +917,31 @@ if test x"$enable_iconv" != x"no"; then
+@@ -926,6 +926,31 @@ if test x"$enable_iconv" != x"no"; then
AC_DEFINE(UTF8_CHARSET, "UTF-8", [String to pass to iconv() for the UTF-8 charset.])
fi
diff --git a/daemon-parm.txt b/daemon-parm.txt
--- a/daemon-parm.txt
+++ b/daemon-parm.txt
-@@ -60,6 +60,7 @@ BOOL reverse_lookup True
+@@ -61,6 +61,7 @@ BOOL reverse_lookup True
BOOL strict_modes True
BOOL transfer_logging False
BOOL use_chroot True
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1522,7 +1522,7 @@ static int start_client(int argc, char *argv[])
+@@ -1572,7 +1572,7 @@ static int start_client(int argc, char *argv[])
* remote shell command, we need to do the RSYNCD protocol first */
- if (daemon_over_rsh) {
+ if (daemon_connection) {
int tmpret;
- tmpret = start_inband_exchange(f_in, f_out, shell_user, remote_argc, remote_argv);
+ tmpret = start_inband_exchange(f_in, f_out, shell_user, shell_machine, remote_argc, remote_argv);
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -500,6 +500,15 @@ enum delret {
+@@ -520,6 +520,15 @@ enum delret {
#define iconv_t int
#endif
./configure
make
-based-on: 0327a2526b8f3e6c050e4541805b8b702ba5d7ce
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2330,6 +2331,50 @@ your home directory (remove the '=' for that).
+@@ -2331,6 +2332,50 @@ your home directory (remove the '=' for that).
specified (or implied by `-a`). You can work-around this bug by avoiding
the `-o` option when sending to an old rsync.
fast fallback for the case where xxHash libraries are not available at
build time.
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -708,10 +708,12 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
+@@ -729,10 +729,12 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
if (append_mode > 0 && f_copy < 0)
return 0;
for (i = 0; i < sum.count; i++) {
int32 n1 = (int32)MIN(len, (OFF_T)sum.blength);
-@@ -729,7 +731,7 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
+@@ -750,7 +752,7 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
}
sum1 = get_checksum1(map, n1);
if (DEBUG_GTE(DELTASUM, 3)) {
rprintf(FINFO,
-@@ -741,8 +743,10 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
+@@ -762,8 +764,10 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
write_buf(f_out, sum2, sum.s2length);
}
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int delete_mode;
extern int delete_before;
extern int delete_during;
-@@ -494,6 +495,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -507,6 +508,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
const char *xname)
{
if (statret >= 0) { /* A from-dest-dir statret can == 1! */
int keep_time = !preserve_times ? 0
: S_ISDIR(file->mode) ? preserve_times & PRESERVE_DIR_TIMES
: S_ISLNK(file->mode) ? preserve_times & PRESERVE_LINK_TIMES
-@@ -523,9 +525,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -544,9 +546,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
} else if (preserve_executability
&& ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
iflags |= ITEM_REPORT_PERMS;
iflags |= ITEM_REPORT_GROUP;
#ifdef SUPPORT_ACLS
if (preserve_acls && !S_ISLNK(file->mode)) {
-@@ -1410,7 +1412,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1439,7 +1441,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
real_ret = statret;
if (file->flags & FLAG_DIR_CREATED)
statret = -1;
int one_file_system = 0;
int protocol_version = PROTOCOL_VERSION;
int sparse_files = 0;
-@@ -837,6 +838,7 @@ static struct poptOption long_options[] = {
+@@ -859,6 +860,7 @@ static struct poptOption long_options[] = {
{"omit-link-times", 'J', POPT_ARG_VAL, &omit_link_times, 1, 0, 0 },
{"no-omit-link-times",0, POPT_ARG_VAL, &omit_link_times, 0, 0, 0 },
{"no-J", 0, POPT_ARG_VAL, &omit_link_times, 0, 0, 0 },
{"modify-window", '@', POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 },
{"no-super", 0, POPT_ARG_VAL, &am_root, 0, 0, 0 },
-@@ -2253,6 +2255,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2488,6 +2490,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (preserve_times) {
preserve_times = PRESERVE_FILE_TIMES;
if (!omit_dir_times)
-@@ -2505,6 +2510,8 @@ void server_options(char **args, int *argc_p)
+@@ -2733,6 +2738,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'O';
if (omit_link_times)
argstr[x++] = 'J';
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -374,6 +374,7 @@ detailed description below for a complete description.
- --open-noatime avoid changing the atime on opened files
+@@ -376,6 +376,7 @@ detailed description below for a complete description.
+ --crtimes, -N preserve create times (newness)
--omit-dir-times, -O omit directories from --times
--omit-link-times, -J omit symlinks from --times
+--omit-dir-changes omit directories from any attribute changes
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
--sparse, -S turn sequences of nulls into sparse blocks
-@@ -1362,6 +1363,11 @@ your home directory (remove the '=' for that).
+@@ -1405,6 +1406,11 @@ your home directory (remove the '=' for that).
This tells rsync to omit symlinks when it is preserving modification times
(see `--times`).
./configure (optional if already run)
make
-based-on: af531cf787995f6a3bc381cd1da1988192e7ef59
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -72,6 +72,7 @@ extern int sender_symlink_iconv;
+@@ -73,6 +73,7 @@ extern int sender_symlink_iconv;
extern int output_needs_newline;
extern int sender_keeps_checksum;
extern int unsort_ndx;
extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
-@@ -1790,6 +1791,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1837,6 +1838,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
}
send_file_name(f, flist, fbuf, NULL, flags, filter_level);
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -115,6 +115,7 @@ int size_only = 0;
+@@ -116,6 +116,7 @@ int size_only = 0;
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
size_t bwlimit_writemax = 0;
int ignore_existing = 0;
int ignore_non_existing = 0;
-@@ -970,6 +971,7 @@ static struct poptOption long_options[] = {
+@@ -985,6 +986,7 @@ static struct poptOption long_options[] = {
{"itemize-changes", 'i', POPT_ARG_NONE, 0, 'i', 0, 0 },
{"no-itemize-changes",0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
{"no-i", 0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -457,6 +457,7 @@ detailed description below for a complete description.
+@@ -459,6 +459,7 @@ detailed description below for a complete description.
--early-input=FILE use FILE for daemon's early exec input
--list-only list the files instead of copying them
--bwlimit=RATE limit socket I/O bandwidth
+--slow-down=USECs sleep N usec while creating the filelist
--stop-after=MINS Stop rsync after MINS minutes have elapsed
- --stop-at=y-m-dTh:m Stop rsync at the specified moment in time
+ --stop-at=y-m-dTh:m Stop rsync at the specified point in time
--write-batch=FILE write a batched update to FILE
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: 91eaffe13f29e9a42032a9f1cd2983e09d7b1ec9
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -985,6 +985,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -994,6 +994,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
fi
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1387,6 +1387,22 @@ static int start_client(int argc, char *argv[])
+@@ -1405,6 +1405,22 @@ static int start_client(int argc, char *argv[])
if (!read_batch) { /* for read_batch, NO source is specified */
char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
./configure (optional if already run)
make
-based-on: 14c4656fb8ecd2b41035cb3e1c264ec03f26dcc0
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -36,6 +36,7 @@ extern filter_rule_list filter_list;
+@@ -35,6 +35,7 @@ extern filter_rule_list filter_list;
extern filter_rule_list daemon_filter_list;
int make_backups = 0;
/**
* If 1, send the whole file as literal data rather than trying to
-@@ -966,6 +967,7 @@ static struct poptOption long_options[] = {
+@@ -988,6 +989,7 @@ static struct poptOption long_options[] = {
{"bwlimit", 0, POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
{"no-bwlimit", 0, POPT_ARG_VAL, &bwlimit, 0, 0, 0 },
{"backup", 'b', POPT_ARG_VAL, &make_backups, 1, 0, 0 },
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2763,6 +2765,8 @@ void server_options(char **args, int *argc_p)
+@@ -3001,6 +3003,8 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -389,6 +389,7 @@ detailed description below for a complete description.
+@@ -391,6 +391,7 @@ detailed description below for a complete description.
--existing skip creating new files on receiver
--ignore-existing skip updating files that exist on receiver
--remove-source-files sender removes synchronized files (non-dir)
--del an alias for --delete-during
--delete delete extraneous files from dest dirs
--delete-before receiver deletes before xfer, not during
-@@ -1577,6 +1578,16 @@ your home directory (remove the '=' for that).
+@@ -1620,6 +1621,16 @@ your home directory (remove the '=' for that).
Starting with 3.1.0, rsync will skip the sender-side removal (and output an
error) if the file's size or modify time has not stayed unchanged.
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int size_only;
extern OFF_T max_size;
extern OFF_T min_size;
-@@ -582,7 +583,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -603,7 +604,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
/* Perform our quick-check heuristic for determining if a file is unchanged. */
int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
{
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -182,7 +182,7 @@ int shell_exec(const char *cmd)
+@@ -187,7 +187,7 @@ int shell_exec(const char *cmd)
}
/* Wait for a process to exit, calling io_flush while waiting. */
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -112,6 +112,7 @@ int safe_symlinks = 0;
+@@ -113,6 +113,7 @@ int safe_symlinks = 0;
int copy_unsafe_links = 0;
int munge_symlinks = 0;
int size_only = 0;
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -171,6 +172,8 @@ char *logfile_name = NULL;
+@@ -173,6 +174,8 @@ char *logfile_name = NULL;
char *logfile_format = NULL;
char *stdout_format = NULL;
char *password_file = NULL;
char *early_input_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
-@@ -878,6 +881,7 @@ static struct poptOption long_options[] = {
+@@ -900,6 +903,7 @@ static struct poptOption long_options[] = {
{"chmod", 0, POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
-@@ -1007,6 +1011,8 @@ static struct poptOption long_options[] = {
+@@ -1034,6 +1038,8 @@ static struct poptOption long_options[] = {
{"early-input", 0, POPT_ARG_STRING, &early_input_file, 0, 0, 0 },
{"blocking-io", 0, POPT_ARG_VAL, &blocking_io, 1, 0, 0 },
{"no-blocking-io", 0, POPT_ARG_VAL, &blocking_io, 0, 0, 0 },
{"outbuf", 0, POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
{"remote-option", 'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
-@@ -2388,6 +2394,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2623,6 +2629,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -2777,6 +2793,25 @@ void server_options(char **args, int *argc_p)
+@@ -3015,6 +3031,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -416,6 +416,7 @@ detailed description below for a complete description.
+@@ -418,6 +418,7 @@ detailed description below for a complete description.
--contimeout=SECONDS set daemon connection timeout in seconds
--ignore-times, -I don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM, -@ set the accuracy for mod-time comparisons
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
-@@ -460,6 +461,8 @@ detailed description below for a complete description.
+@@ -464,6 +465,8 @@ detailed description below for a complete description.
--write-batch=FILE write a batched update to FILE
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
--protocol=NUM force an older protocol version to be used
--iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
-@@ -3143,6 +3146,36 @@ your home directory (remove the '=' for that).
+@@ -3277,6 +3280,36 @@ your home directory (remove the '=' for that).
`--write-batch`. If _FILE_ is `-`, the batch data will be read from
standard input. See the "BATCH MODE" section for details.
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
int preallocate_files = 0;
int do_compression = 0;
int do_compression_level = CLVL_NOT_SPECIFIED;
-@@ -891,6 +892,7 @@ static struct poptOption long_options[] = {
+@@ -913,6 +914,7 @@ static struct poptOption long_options[] = {
{"sparse", 'S', POPT_ARG_VAL, &sparse_files, 1, 0, 0 },
{"no-sparse", 0, POPT_ARG_VAL, &sparse_files, 0, 0, 0 },
{"no-S", 0, POPT_ARG_VAL, &sparse_files, 0, 0, 0 },
{"preallocate", 0, POPT_ARG_NONE, &preallocate_files, 0, 0, 0},
{"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 },
{"no-inplace", 0, POPT_ARG_VAL, &inplace, 0, 0, 0 },
-@@ -2679,6 +2681,12 @@ void server_options(char **args, int *argc_p)
+@@ -2917,6 +2919,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -377,6 +377,7 @@ detailed description below for a complete description.
+@@ -379,6 +379,7 @@ detailed description below for a complete description.
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
--sparse, -S turn sequences of nulls into sparse blocks
--preallocate allocate dest files before writing them
--write-devices write to devices as files (implies --inplace)
--dry-run, -n perform a trial run with no changes made
-@@ -1434,6 +1435,18 @@ your home directory (remove the '=' for that).
+@@ -1477,6 +1478,18 @@ your home directory (remove the '=' for that).
opposed to allocated sequences of null bytes) if the kernel version and
filesystem type support creating holes in the allocated data.
./configure (optional if already run)
make
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: 8695bcc2b140b2518254234659a03b96f04055fc
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -76,6 +76,7 @@ extern uid_t our_uid;
+@@ -77,6 +77,7 @@ extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
extern char *usermap, *groupmap;
extern char curr_dir[MAXPATHLEN];
-@@ -103,6 +104,8 @@ int file_old_total = 0; /* total of active items that will soon be gone */
+@@ -104,6 +105,8 @@ int file_old_total = 0; /* total of active items that will soon be gone */
int flist_eof = 0; /* all the file-lists are now known */
int xfer_flags_as_varint = 0;
#define NORMAL_NAME 0
#define SLASH_ENDING_NAME 1
#define DOTDIR_NAME 2
-@@ -658,6 +661,23 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -674,6 +677,23 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
stats.total_size += F_LENGTH(file);
}
static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
static int64 modtime, atime;
-@@ -723,9 +743,13 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -744,9 +764,13 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
outbuf.len = 0;
}
thisname[outbuf.len] = '\0';
if (*thisname
&& (clean_fname(thisname, CFN_REFUSE_DOT_DOT_DIRS) < 0 || (!relative_paths && *thisname == '/'))) {
rprintf(FERROR, "ABORTING due to unsafe pathname from sender: %s\n", thisname);
-@@ -2478,6 +2502,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2531,6 +2555,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
parse_name_map(usermap, True);
if (groupmap)
parse_name_map(groupmap, False);
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -206,6 +206,7 @@ int logfile_format_has_i = 0;
+@@ -208,6 +208,7 @@ int logfile_format_has_i = 0;
int logfile_format_has_o_or_i = 0;
int always_checksum = 0;
int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -993,6 +994,7 @@ static struct poptOption long_options[] = {
+@@ -1018,6 +1019,7 @@ static struct poptOption long_options[] = {
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"iconv", 0, POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },
{"no-iconv", 0, POPT_ARG_NONE, 0, OPT_NO_ICONV, 0, 0 },
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
{"8-bit-output", '8', POPT_ARG_VAL, &allow_8bit_chars, 1, 0, 0 },
-@@ -2434,6 +2436,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2669,6 +2671,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
am_starting_up = 0;
return 1;
-@@ -2882,6 +2902,12 @@ void server_options(char **args, int *argc_p)
+@@ -3120,6 +3140,12 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -462,6 +462,7 @@ detailed description below for a complete description.
+@@ -466,6 +466,7 @@ detailed description below for a complete description.
--read-batch=FILE read a batched update from FILE
--protocol=NUM force an older protocol version to be used
--iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
--ipv4, -4 prefer IPv4
--ipv6, -6 prefer IPv6
-@@ -3185,6 +3186,25 @@ your home directory (remove the '=' for that).
+@@ -3319,6 +3320,25 @@ your home directory (remove the '=' for that).
free to specify just the local charset for a daemon transfer (e.g.
`--iconv=utf8`).