./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"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 },
-@@ -2779,6 +2780,10 @@ void server_options(char **args, int *argc_p)
+@@ -2783,6 +2784,10 @@ void server_options(char **args, int *argc_p)
args[ac++] = safe_arg("--compress-choice", compress_choice);
if (am_sender) {
continue;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "renaming %s to %s\n",
-@@ -748,7 +748,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -747,7 +747,7 @@ int recv_files(int f_in, int f_out, char *local_name)
} else {
/* Reminder: --inplace && --partial-dir are never
* enabled at the same time. */
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -367,6 +367,7 @@ has its own detailed description later in this manpage.
+@@ -392,6 +392,7 @@ has its own detailed description later in this manpage.
--relative, -R use relative path names
--no-implied-dirs don't send implied dirs with --relative
--backup, -b make backups (see --suffix & --backup-dir)
--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
-@@ -942,6 +943,13 @@ expand it.
+@@ -967,6 +968,13 @@ expand it.
rules specify a trailing inclusion/exclusion of `*`, the auto-added rule
would never be reached).
{"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 },
-@@ -2232,6 +2240,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2234,6 +2242,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;
-@@ -2253,6 +2263,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2255,6 +2265,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)
-@@ -2264,6 +2282,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2266,6 +2284,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 */
-@@ -2300,6 +2332,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2302,6 +2334,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 (make_backups && !backup_dir)
omit_dir_times = -1; /* Implied, so avoid -O to sender. */
-@@ -2764,11 +2824,20 @@ void server_options(char **args, int *argc_p)
+@@ -2768,11 +2828,20 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--backup-dir";
args[ac++] = safe_arg("", backup_dir);
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -369,7 +369,9 @@ has its own detailed description later in this manpage.
+@@ -394,7 +394,9 @@ has its own detailed description later in this manpage.
--backup, -b make backups (see --suffix & --backup-dir)
--backup-deleted make backups only of deleted files
--backup-dir=DIR make backups into hierarchy based in DIR
--update, -u skip files that are newer on the receiver
--inplace update destination files in-place
--append append data onto shorter files
-@@ -964,6 +966,11 @@ expand it.
+@@ -989,6 +991,11 @@ expand it.
daemon is the receiver, the backup dir cannot go outside the module's path
hierarchy, so take extra care not to delete it or copy into it.
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
{"block-size", 'B', POPT_ARG_STRING, 0, OPT_BLOCK_SIZE, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1744,6 +1746,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1746,6 +1748,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
break;
case OPT_INFO:
arg = poptGetOptArg(pc);
parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
-@@ -2097,6 +2116,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2099,6 +2118,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -361,6 +361,7 @@ has its own detailed description later in this manpage.
+@@ -386,6 +386,7 @@ has its own detailed description later in this manpage.
--quiet, -q suppress non-error messages
--no-motd suppress daemon-mode MOTD
--checksum, -c skip based on checksum, not mod-time & size
--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
--recursive, -r recurse into directories
-@@ -750,6 +751,8 @@ expand it.
+@@ -775,6 +776,8 @@ expand it.
file that has the same size as the corresponding sender's file: files with
either a changed size or a changed checksum are selected for transfer.
Note that rsync always verifies that each _transferred_ file was correctly
reconstructed on the receiving side by checking a whole-file checksum that
is generated as the file is transferred, but that automatic
-@@ -761,6 +764,38 @@ expand it.
+@@ -786,6 +789,38 @@ expand it.
option or an environment variable that is discussed in that option's
section.
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
-@@ -54,6 +54,7 @@ extern int read_batch;
+@@ -55,6 +55,7 @@ extern int read_batch;
extern int compat_flags;
extern int protect_args;
extern int checksum_seed;
extern int daemon_connection;
extern int protocol_version;
extern int remove_source_files;
-@@ -1092,6 +1093,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
+@@ -1117,6 +1118,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
if (inc_recurse)
flist->in_progress++;
}
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -1748,7 +1748,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1750,7 +1750,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
case OPT_SUMFILES:
arg = poptGetOptArg(pc);
extern int whole_file;
extern int inplace;
extern int inplace_partial;
-@@ -439,7 +440,7 @@ static void handle_delayed_updates(char *local_name)
+@@ -439,7 +440,8 @@ static void handle_delayed_updates(char *local_name)
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
-- if (remove_source_files
+- if (remove_source_files || (preserve_hard_links && F_IS_HLINKED(file)))
+ if (remove_source_files || checksum_files & CSF_UPDATE
- || (preserve_hard_links && F_IS_HLINKED(file)))
- send_msg_int(MSG_SUCCESS, ndx);
++ || (preserve_hard_links && F_IS_HLINKED(file)))
+ send_msg_success(fname, ndx);
handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -926,7 +927,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+ }
+@@ -925,7 +927,8 @@ int recv_files(int f_in, int f_out, char *local_name)
case 2:
break;
case 1:
-- if (remove_source_files || inc_recurse
+- if (remove_source_files || inc_recurse || (preserve_hard_links && F_IS_HLINKED(file)))
+ if (remove_source_files || inc_recurse || checksum_files & CSF_UPDATE
- || (preserve_hard_links && F_IS_HLINKED(file)))
- send_msg_int(MSG_SUCCESS, ndx);
++ || (preserve_hard_links && F_IS_HLINKED(file)))
+ send_msg_success(fname, ndx);
break;
+ case 0: {
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -775,9 +775,13 @@ expand it.
+@@ -800,9 +800,13 @@ expand it.
The MODE value is either "lax", for relaxed checking (which compares size
and mtime), "strict" (which also compares ctime and inode), or "none" to
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
{"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 },
-@@ -1001,6 +1002,9 @@ static void set_refuse_options(void)
+@@ -1003,6 +1004,9 @@ static void set_refuse_options(void)
#ifndef SUPPORT_HARD_LINKS
parse_one_refuse_match(0, "link-dest", list_end);
#endif
#ifndef HAVE_MKTIME
parse_one_refuse_match(0, "stop-at", list_end);
#endif
-@@ -1330,6 +1334,8 @@ char *alt_dest_opt(int type)
+@@ -1332,6 +1336,8 @@ char *alt_dest_opt(int type)
return "--copy-dest";
case LINK_DEST:
return "--link-dest";
default:
NOISY_DEATH("Unknown alt_dest_opt type");
}
-@@ -1707,6 +1713,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1709,6 +1715,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
want_dest_type = LINK_DEST;
goto set_dest_dir;
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -449,6 +449,7 @@ has its own detailed description later in this manpage.
+@@ -474,6 +474,7 @@ has its own detailed description later in this manpage.
--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
--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)
-@@ -2624,6 +2625,18 @@ expand it.
+@@ -2661,6 +2662,18 @@ expand it.
this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
old rsync.
diff --git a/t_stub.c b/t_stub.c
--- a/t_stub.c
+++ b/t_stub.c
-@@ -39,6 +39,7 @@ size_t max_alloc = 0; /* max_alloc is needed when combined with util2.o */
+@@ -38,6 +38,7 @@ size_t max_alloc = 0; /* max_alloc is needed when combined with util2.o */
char *partial_dir;
char *module_dir;
filter_rule_list daemon_filter_list;
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/daemon-parm.txt b/daemon-parm.txt
--- a/daemon-parm.txt
+++ b/daemon-parm.txt
int remove_source_files = 0;
int one_file_system = 0;
int protocol_version = PROTOCOL_VERSION;
-@@ -829,6 +831,8 @@ static struct poptOption long_options[] = {
+@@ -831,6 +833,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
-@@ -470,6 +470,8 @@ has its own detailed description later in this manpage.
+@@ -495,6 +495,8 @@ has its own detailed description later in this manpage.
--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: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"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 },
-@@ -2826,6 +2828,9 @@ void server_options(char **args, int *argc_p)
+@@ -2830,6 +2832,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
-@@ -443,6 +443,7 @@ has its own detailed description later in this manpage.
+@@ -468,6 +468,7 @@ has its own detailed description later in this manpage.
--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
-@@ -712,6 +713,14 @@ expand it.
+@@ -737,6 +738,14 @@ expand it.
after using another mirroring system which may not preserve timestamps
exactly.
./configure
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
+extern int use_db;
extern const char *checksum_choice;
- struct name_num_obj valid_checksums = {
-@@ -391,6 +392,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
+ struct name_num_item valid_checksums_items[] = {
+@@ -393,6 +394,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
md5_update(&m5, (uchar *)map_ptr(buf, i, remainder), remainder);
md5_result(&m5, (uchar *)sum);
break;
}
case CSUM_MD4:
-@@ -430,6 +433,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
+@@ -432,6 +435,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
mdfour_update(&m, (uchar *)map_ptr(buf, i, remainder), remainder);
mdfour_result(&m, (uchar *)sum);
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h mcheck.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 netgroup.h \
-@@ -1438,6 +1439,48 @@ if test x"$enable_acl_support" = x"no" || test x"$enable_xattr_support" = x"no"
+@@ -1423,6 +1424,48 @@ if test x"$enable_acl_support" = x"no" || test x"$enable_xattr_support" = x"no"
fi
fi
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
-@@ -41,8 +41,10 @@ extern int am_server;
- extern int am_sender;
- extern int am_receiver;
- extern int am_generator;
-+extern int local_server;
+@@ -44,6 +44,7 @@ extern int am_generator;
+ extern int local_server;
extern int msgs2stderr;
extern int inc_recurse;
+extern int same_db;
extern int io_error;
extern int batch_fd;
extern int eol_nulls;
-@@ -1520,6 +1522,32 @@ static void read_a_msg(void)
+@@ -1545,6 +1546,32 @@ static void read_a_msg(void)
if (am_sender)
maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
break;
case MSG_DELETED:
if (msg_bytes >= sizeof data)
goto overflow;
-@@ -1673,6 +1701,7 @@ static void read_a_msg(void)
+@@ -1699,6 +1726,7 @@ static void read_a_msg(void)
* with a duplicate exit message. */
_exit_cleanup(val, __FILE__, 0 - __LINE__);
default:
{"block-size", 'B', POPT_ARG_STRING, 0, OPT_BLOCK_SIZE, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -838,6 +849,9 @@ static struct poptOption long_options[] = {
+@@ -840,6 +851,9 @@ static struct poptOption long_options[] = {
{"dparam", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
{"detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
{"no-detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
{0,0,0,0, 0, 0, 0}
};
-@@ -866,6 +880,31 @@ static struct poptOption long_daemon_options[] = {
+@@ -868,6 +882,31 @@ static struct poptOption long_daemon_options[] = {
{0,0,0,0, 0, 0, 0}
};
static char err_buf[200];
-@@ -993,6 +1032,8 @@ static void set_refuse_options(void)
+@@ -995,6 +1034,8 @@ static void set_refuse_options(void)
parse_one_refuse_match(0, "iconv", list_end);
#endif
parse_one_refuse_match(0, "log-file*", list_end);
}
#ifndef SUPPORT_ATIMES
-@@ -1300,6 +1341,102 @@ static void create_refuse_error(int which)
+@@ -1302,6 +1343,102 @@ static void create_refuse_error(int which)
snprintf(err_buf + n, sizeof err_buf - n, " (-%c)\n", op->shortName);
}
/* This is used to make sure that --daemon & --server cannot be aliased to
* something else. These options have always disabled popt aliases for the
* parsing of a daemon or server command-line, but we have to make sure that
-@@ -1356,6 +1493,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1358,6 +1495,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
}
set_refuse_options();
#ifdef ICONV_OPTION
-@@ -1474,6 +1617,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1476,6 +1619,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
am_daemon = 1;
return 1;
case OPT_MODIFY_WINDOW:
/* The value has already been set by popt, but
* we need to remember that we're using a
-@@ -1546,6 +1695,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1548,6 +1697,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
preserve_devices = preserve_specials = 0;
break;
+ if (do_lstat(fname, &st) == 0)
+ db_update_ctime(5, &st);
+ }
- if (remove_source_files
- || (preserve_hard_links && F_IS_HLINKED(file)))
- send_msg_int(MSG_SUCCESS, ndx);
-@@ -548,6 +555,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+ if (remove_source_files || (preserve_hard_links && F_IS_HLINKED(file)))
+ send_msg_success(fname, ndx);
+ handle_partial_dir(partialptr, PDIR_DELETE);
+@@ -547,6 +554,9 @@ int recv_files(int f_in, int f_out, char *local_name)
if (whole_file < 0)
whole_file = 0;
progress_init();
while (1) {
-@@ -898,6 +908,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -897,6 +907,8 @@ int recv_files(int f_in, int f_out, char *local_name)
do_unlink(partialptr);
handle_partial_dir(partialptr, PDIR_DELETE);
}
} else if (keep_partial && partialptr && (!one_inplace || delay_updates)) {
if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
rprintf(FERROR,
-@@ -911,6 +923,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -910,6 +922,8 @@ int recv_files(int f_in, int f_out, char *local_name)
recv_ok = -1;
else if (delay_updates && recv_ok) {
bitbag_set_bit(delayed_bits, ndx);
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -409,6 +409,9 @@ has its own detailed description later in this manpage.
+@@ -434,6 +434,9 @@ has its own detailed description later in this manpage.
--dry-run, -n perform a trial run with no changes made
--whole-file, -W copy files whole (w/o delta-xfer algorithm)
--checksum-choice=STR choose the checksum algorithm (aka --cc)
{"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 },
-@@ -2812,8 +2814,14 @@ void server_options(char **args, int *argc_p)
+@@ -2816,8 +2818,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
-@@ -447,6 +447,8 @@ has its own detailed description later in this manpage.
+@@ -472,6 +472,8 @@ has its own detailed description later in this manpage.
--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
-@@ -2556,6 +2558,20 @@ expand it.
+@@ -2593,6 +2595,20 @@ expand it.
otential alternate-basis files will be removed as the transfer progresses.
This option conflicts with [`--inplace`](#opt) and [`--append`](#opt).
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
-@@ -168,6 +169,7 @@ void set_allow_inc_recurse(void)
+@@ -170,6 +171,7 @@ void set_allow_inc_recurse(void)
allow_inc_recurse = 0;
else if (!am_sender
&& (delete_before || delete_after
{"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 },
-@@ -2379,7 +2381,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2381,7 +2383,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -2388,6 +2390,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2390,6 +2392,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;
}
-@@ -2809,6 +2812,8 @@ void server_options(char **args, int *argc_p)
+@@ -2813,6 +2816,8 @@ 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
-@@ -446,6 +446,7 @@ has its own detailed description later in this manpage.
+@@ -471,6 +471,7 @@ has its own detailed description later in this manpage.
--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
--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
-@@ -2539,6 +2540,22 @@ expand it.
+@@ -2576,6 +2577,22 @@ expand it.
potential fuzzy-match files, so either use [`--delete-after`](#opt) or
specify some filename exclusions if you need to prevent this.
diff --git a/util1.c b/util1.c
--- a/util1.c
+++ b/util1.c
-@@ -184,7 +184,7 @@ int set_times(const char *fname, STRUCT_STAT *stp)
+@@ -183,7 +183,7 @@ int set_times(const char *fname, STRUCT_STAT *stp)
/* Create any necessary directories in fname. Any missing directories are
* created with default permissions. Returns < 0 on error, or the number
* of directories created. */
{
char *end, *p;
int ret = 0;
-@@ -215,7 +215,7 @@ int make_path(char *fname, int flags)
+@@ -214,7 +214,7 @@ int make_path(char *fname, int flags)
else
errno = ENOTDIR;
}
ret++;
break;
}
-@@ -254,7 +254,7 @@ int make_path(char *fname, int flags)
+@@ -253,7 +253,7 @@ int make_path(char *fname, int flags)
p += strlen(p);
if (ret < 0) /* Skip mkdir on error, but keep restoring the path. */
continue;
ret = -ret - 1;
else
ret++;
-@@ -1197,6 +1197,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
+@@ -1196,6 +1196,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
return path;
}
/**
* Return a quoted string with the full pathname of the indicated filename.
* The string " (in MODNAME)" may also be appended. The returned pointer
-@@ -1290,7 +1316,7 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1289,7 +1315,7 @@ int handle_partial_dir(const char *fname, int create)
}
statret = -1;
}
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -434,6 +434,7 @@ has its own detailed description later in this manpage.
+@@ -459,6 +459,7 @@ has its own detailed description later in this manpage.
--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
-@@ -3339,6 +3340,17 @@ expand it.
+@@ -3374,6 +3375,17 @@ expand it.
update algorithm that is even more atomic (it uses [`--link-dest`](#opt)
and a parallel hierarchy of files).
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -370,6 +370,7 @@ has its own detailed description later in this manpage.
+@@ -395,6 +395,7 @@ has its own detailed description later in this manpage.
--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
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -576,6 +578,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -578,6 +580,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
if (preserve_acls && !am_sender)
acls_ndx = ++file_extra_cnt;
if (preserve_xattrs)
-@@ -739,6 +743,10 @@ void setup_protocol(int f_out,int f_in)
+@@ -741,6 +745,10 @@ void setup_protocol(int f_out,int f_in)
fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n");
exit_cleanup(RERR_PROTOCOL);
}
{"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 },
-@@ -1013,6 +1023,14 @@ static void set_refuse_options(void)
+@@ -1015,6 +1025,14 @@ static void set_refuse_options(void)
#ifndef SUPPORT_CRTIMES
parse_one_refuse_match(0, "crtimes", list_end);
#endif
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2708,6 +2726,9 @@ void server_options(char **args, int *argc_p)
+@@ -2712,6 +2730,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;
-@@ -2803,6 +2824,16 @@ void server_options(char **args, int *argc_p)
+@@ -2807,6 +2828,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -385,6 +385,7 @@ has its own detailed description later in this manpage.
+@@ -410,6 +410,7 @@ has its own detailed description later in this manpage.
--keep-dirlinks, -K treat symlinked dir on receiver as dir
--hard-links, -H preserve hard links
--perms, -p preserve permissions
--executability, -E preserve executability
--chmod=CHMOD affect file and/or directory permissions
--acls, -A preserve ACLs (implies --perms)
-@@ -426,7 +427,10 @@ has its own detailed description later in this manpage.
+@@ -451,7 +452,10 @@ has its own detailed description later in this manpage.
--ignore-missing-args ignore missing source args without error
--delete-missing-args delete missing source args from destination
--ignore-errors delete even if there are I/O errors
--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
-@@ -767,6 +771,7 @@ expand it.
+@@ -792,6 +796,7 @@ expand it.
recursion and want to preserve almost everything. Be aware that it does
**not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
The only exception to the above equivalence is when [`--files-from`](#opt)
is specified, in which case [`-r`](#opt) is not implied.
-@@ -1226,7 +1231,7 @@ expand it.
+@@ -1251,7 +1256,7 @@ expand it.
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`](#opt) for an analogous option for the
receiving side.
-@@ -1421,6 +1426,37 @@ expand it.
+@@ -1446,6 +1451,37 @@ expand it.
those used by [`--fake-super`](#opt)) unless you repeat the option (e.g. `-XX`).
This "copy all xattrs" mode cannot be used with [`--fake-super`](#opt).
0. `--chmod=CHMOD`
This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1934,8 +1970,8 @@ expand it.
+@@ -1963,8 +1999,8 @@ expand it.
[`--ignore-missing-args`](#opt) 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
independent of any other type of delete processing.
The missing source files are represented by special file-list entries which
-@@ -1946,14 +1982,14 @@ expand it.
+@@ -1975,14 +2011,14 @@ expand it.
Tells [`--delete`](#opt) to go ahead and delete files even when there are
I/O errors.
[`--recursive`](#opt) option was also enabled.
0. `--max-delete=NUM`
-@@ -3005,7 +3041,7 @@ expand it.
+@@ -3040,7 +3076,7 @@ expand it.
also turns on the output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
int module_dirlen = 0;
+int force_change = 0;
+int preserve_acls = 0;
- int preserve_mtimes = 0;
int preserve_xattrs = 0;
int preserve_perms = 0;
-@@ -112,3 +114,23 @@ filter_rule_list daemon_filter_list;
+ int preserve_executability = 0;
+@@ -111,3 +113,23 @@ filter_rule_list daemon_filter_list;
{
return cst ? 0 : 0;
}
diff --git a/util1.c b/util1.c
--- a/util1.c
+++ b/util1.c
-@@ -35,6 +35,7 @@ extern int preserve_mtimes;
+@@ -34,6 +34,7 @@ extern int relative_paths;
extern int preserve_xattrs;
extern int omit_link_times;
extern int preallocate_files;
extern char *module_dir;
extern unsigned int module_dirlen;
extern char *partial_dir;
-@@ -117,6 +118,33 @@ void print_child_argv(const char *prefix, char **cmd)
+@@ -116,6 +117,33 @@ void print_child_argv(const char *prefix, char **cmd)
rprintf(FCLIENT, " (%d args)\n", cnt);
}
/* This returns 0 for success, 1 for a symlink if symlink time-setting
* is not possible, or -1 for any other error. */
int set_times(const char *fname, STRUCT_STAT *stp)
-@@ -144,6 +172,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
+@@ -143,6 +171,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
#include "case_N.h"
if (do_utimensat(fname, stp) == 0)
break;
if (errno != ENOSYS)
return -1;
switch_step++;
-@@ -153,6 +185,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
+@@ -152,6 +184,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
#include "case_N.h"
if (do_lutimes(fname, stp) == 0)
break;
if (errno != ENOSYS)
return -1;
switch_step++;
-@@ -174,6 +210,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
+@@ -173,6 +209,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
if (do_utime(fname, stp) == 0)
break;
#endif
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
if (ex->rflags & FILTRULE_PERDIR_MERGE)
teardown_mergelist(ex);
free(ex->pattern);
-@@ -962,7 +984,9 @@ static void report_filter_result(enum logcode code, char const *name,
+@@ -998,7 +1020,9 @@ static void report_filter_result(enum logcode code, char const *name,
/* This function is used to check if a file should be included/excluded
* from the list of files based on its name and type etc. The value of
int name_is_excluded(const char *fname, int name_flags, int filter_level)
{
if (daemon_filter_list.head && check_filter(&daemon_filter_list, FLOG, fname, name_flags) < 0) {
-@@ -971,6 +995,9 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
+@@ -1007,6 +1031,9 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
return 1;
}
if (filter_level != ALL_FILTERS)
return 0;
-@@ -981,7 +1008,8 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
+@@ -1017,7 +1044,8 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
}
/* Return -1 if file "name" is defined to be excluded by the specified
int check_filter(filter_rule_list *listp, enum logcode code,
const char *name, int name_flags)
{
-@@ -1004,10 +1032,12 @@ int check_filter(filter_rule_list *listp, enum logcode code,
+@@ -1040,10 +1068,12 @@ int check_filter(filter_rule_list *listp, enum logcode code,
}
if (rule_matches(name, ent, name_flags)) {
report_filter_result(code, name, ent, name_flags, listp->debug_type);
return 0;
}
-@@ -1024,9 +1054,45 @@ static const uchar *rule_strcmp(const uchar *str, const char *rule, int rule_len
+@@ -1060,9 +1090,45 @@ static const uchar *rule_strcmp(const uchar *str, const char *rule, int rule_len
return NULL;
}
/* Gets the next include/exclude rule from *rulestr_ptr and advances
* *rulestr_ptr to point beyond it. Stores the pattern's start (within
-@@ -1041,6 +1107,7 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
+@@ -1077,6 +1143,7 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
const char **pat_ptr, unsigned int *pat_len_ptr)
{
const uchar *s = (const uchar *)*rulestr_ptr;
filter_rule *rule;
unsigned int len;
-@@ -1059,6 +1126,12 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
+@@ -1095,6 +1162,12 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
/* Inherit from the template. Don't inherit FILTRULES_SIDES; we check
* that later. */
rule->rflags = template->rflags & FILTRULES_FROM_CONTAINER;
/* Figure out what kind of a filter rule "s" is pointing at. Note
* that if FILTRULE_NO_PREFIXES is set, the rule is either an include
-@@ -1205,11 +1278,63 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
+@@ -1241,11 +1314,63 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
goto invalid;
rule->rflags |= FILTRULE_EXCLUDE_SELF;
break;
case 'p':
rule->rflags |= FILTRULE_PERISHABLE;
break;
-@@ -1523,6 +1648,23 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
+@@ -1559,6 +1684,23 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
else if (am_sender)
return NULL;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -1444,7 +1444,9 @@ expand it.
+@@ -1469,7 +1469,9 @@ expand it.
> --chmod=D2775,F664
It is also legal to specify multiple `--chmod` options, as each additional
See the [`--perms`](#opt) and [`--executability`](#opt) options for how the
resulting permission value can be applied to the files in the transfer.
-@@ -2939,6 +2941,10 @@ expand it.
- avoid a complaint about wildcard characters, but a modern rsync handles
- this automatically.
+@@ -2974,6 +2976,10 @@ expand it.
+ An older rsync client may need to use [`-s`](#opt) to avoid a complaint
+ about wildcard characters, but a modern rsync handles this automatically.
+ 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
-@@ -4089,6 +4095,15 @@ The following modifiers are accepted after an include (+) or exclude (-) rule:
+@@ -4124,6 +4130,15 @@ The following modifiers are accepted after an include (+) or exclude (-) rule:
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
-@@ -4146,6 +4161,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -4181,6 +4196,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`).
diff --git a/util1.c b/util1.c
--- a/util1.c
+++ b/util1.c
-@@ -919,6 +919,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
+@@ -918,6 +918,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
return ret;
}
./configure [--with-openssl-conf=/path/to/openssl-rsync.cnf]
make
-based-on: cc861cf8c01662057ccc5d9268602ed15c76adc7
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/authenticate.c b/authenticate.c
--- a/authenticate.c
+++ b/authenticate.c
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
-@@ -922,16 +922,15 @@ static int rule_matches(const char *fname, filter_rule *ex, int name_flags)
+@@ -958,16 +958,15 @@ static int rule_matches(const char *fname, filter_rule *ex, int name_flags)
if (litmatch_array(pattern, strings, slash_handling))
return ret_match;
} else if (anchored_match) {
{"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},
-@@ -2839,6 +2842,9 @@ void server_options(char **args, int *argc_p)
+@@ -2843,6 +2846,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
-@@ -467,6 +467,7 @@ has its own detailed description later in this manpage.
- --protect-args, -s no space-splitting; wildcard chars only
+@@ -492,6 +492,7 @@ has its own detailed description later in this manpage.
+ --secluded-args, -s use the protocol to safely send the args
--trust-sender trust the remote sender's file list
--copy-as=USER[:GROUP] specify user & optional group for the copy
+--ignore-case ignore case when comparing filenames
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -2487,6 +2488,12 @@ expand it.
+@@ -2524,6 +2525,12 @@ expand it.
> sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/
diff --git a/t_stub.c b/t_stub.c
--- a/t_stub.c
+++ b/t_stub.c
-@@ -35,6 +35,7 @@ int preserve_perms = 0;
+@@ -34,6 +34,7 @@ int preserve_perms = 0;
int preserve_executability = 0;
int omit_link_times = 0;
int open_noatime = 0;
./configure (optional if already run)
make
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/options.c b/options.c
-index 3f8d5d08..6c8534c3 100644
--- a/options.c
+++ b/options.c
@@ -1926,7 +1926,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
diff --git a/usage.c b/usage.c
-index 048fd4cb..615049eb 100644
--- a/usage.c
+++ b/usage.c
@@ -22,6 +22,7 @@
./configure
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
+extern char link_by_hash_extra_sum[MAX_DIGEST_LEN];
extern const char *checksum_choice;
- struct name_num_obj valid_checksums = {
-@@ -449,7 +451,7 @@ static union {
+ struct name_num_item valid_checksums_items[] = {
+@@ -451,7 +453,7 @@ static union {
MD4_CTX m4;
#endif
md5_context m5;
#ifdef SUPPORT_XXHASH
static XXH64_state_t* xxh64_state;
#endif
-@@ -488,6 +490,8 @@ void sum_init(int csum_type, int seed)
+@@ -490,6 +492,8 @@ void sum_init(int csum_type, int seed)
#endif
case CSUM_MD5:
md5_begin(&ctx.m5);
break;
case CSUM_MD4:
#ifdef USE_OPENSSL
-@@ -538,6 +542,8 @@ void sum_update(const char *p, int32 len)
+@@ -540,6 +544,8 @@ void sum_update(const char *p, int32 len)
#endif
case CSUM_MD5:
md5_update(&ctx.m5, (uchar *)p, len);
break;
case CSUM_MD4:
#ifdef USE_OPENSSL
-@@ -603,6 +609,8 @@ int sum_end(char *sum)
+@@ -605,6 +611,8 @@ int sum_end(char *sum)
#endif
case CSUM_MD5:
md5_result(&ctx.m5, (uchar *)sum);
{"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 },
-@@ -987,6 +990,9 @@ static void set_refuse_options(void)
+@@ -989,6 +992,9 @@ static void set_refuse_options(void)
ref = cp + 1;
}
if (am_daemon) {
#ifdef ICONV_OPTION
if (!*lp_charset(module_id))
-@@ -1860,6 +1866,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1862,6 +1868,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
case OPT_STOP_AFTER: {
long val;
arg = poptGetOptArg(pc);
-@@ -2231,6 +2251,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2233,6 +2253,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;
-@@ -2915,6 +2937,12 @@ void server_options(char **args, int *argc_p)
+@@ -2919,6 +2941,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--no-W";
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -449,6 +449,7 @@ has its own detailed description later in this manpage.
+@@ -474,6 +474,7 @@ has its own detailed description later in this manpage.
--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
--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)
-@@ -2624,6 +2625,50 @@ expand it.
+@@ -2661,6 +2662,50 @@ expand it.
this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
old rsync.
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"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 },
-@@ -2300,7 +2302,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2302,7 +2304,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
omit_dir_times = -1; /* Implied, so avoid -O to sender. */
if (stdout_format) {
-@@ -2811,6 +2813,8 @@ void server_options(char **args, int *argc_p)
+@@ -2815,6 +2817,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--size-only";
if (do_stats)
args[ac++] = "--stats";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -402,6 +402,7 @@ has its own detailed description later in this manpage.
+@@ -427,6 +427,7 @@ has its own detailed description later in this manpage.
--crtimes, -N preserve create times (newness)
--omit-dir-times, -O omit directories from --times
--omit-link-times, -J omit symlinks from --times
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
--sparse, -S turn sequences of nulls into sparse blocks
-@@ -1576,6 +1577,11 @@ expand it.
+@@ -1601,6 +1602,11 @@ expand it.
This tells rsync to omit symlinks when it is preserving modification,
access, and create times.
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -486,6 +486,7 @@ has its own detailed description later in this manpage.
+@@ -511,6 +511,7 @@ has its own detailed description later in this manpage.
--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
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
{"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 },
-@@ -2814,6 +2816,8 @@ void server_options(char **args, int *argc_p)
+@@ -2818,6 +2820,8 @@ void server_options(char **args, int *argc_p)
} else {
if (skip_compress)
args[ac++] = safe_arg("--skip-compress", skip_compress);
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -416,6 +416,7 @@ has its own detailed description later in this manpage.
+@@ -441,6 +441,7 @@ has its own detailed description later in this manpage.
--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
-@@ -1808,6 +1809,17 @@ expand it.
- 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.
+@@ -1837,6 +1838,17 @@ expand it.
+ not remove a file the receiver just verified, such as when the user
+ accidentally makes the source and destination directory the same path.
+0. `--source-backup`
+
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -43,6 +43,7 @@ extern int protocol_version;
+@@ -44,6 +44,7 @@ extern int protocol_version;
extern int remove_source_files;
extern int updating_basis_file;
extern int make_backups;
extern int inplace;
extern int inplace_partial;
extern int batch_fd;
-@@ -129,6 +130,7 @@ void successful_send(int ndx)
+@@ -131,6 +132,7 @@ void successful_send(int ndx)
struct file_struct *file;
struct file_list *flist;
STRUCT_STAT st;
if (!remove_source_files)
return;
-@@ -153,7 +155,11 @@ void successful_send(int ndx)
+@@ -162,7 +164,11 @@ void successful_send(int ndx)
return;
}
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"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 },
-@@ -826,6 +830,8 @@ static struct poptOption long_options[] = {
+@@ -828,6 +832,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 },
-@@ -2423,6 +2429,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2425,6 +2431,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -2826,6 +2842,25 @@ void server_options(char **args, int *argc_p)
+@@ -2830,6 +2846,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
extern char *partial_dir;
extern char *basis_dir[MAX_BASIS_DIRS+1];
extern char sender_file_sum[MAX_DIGEST_LEN];
-@@ -528,6 +529,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -527,6 +528,7 @@ int recv_files(int f_in, int f_out, char *local_name)
char *fnametmp, fnametmpbuf[MAXPATHLEN];
char *fnamecmp, *partialptr;
char fnamecmpbuf[MAXPATHLEN];
uchar fnamecmp_type;
struct file_struct *file;
int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
-@@ -538,6 +540,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -537,6 +539,7 @@ int recv_files(int f_in, int f_out, char *local_name)
const char *parent_dirname = "";
#endif
int ndx, recv_ok, one_inplace;
if (DEBUG_GTE(RECV, 1))
rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used);
-@@ -548,6 +551,23 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -547,6 +550,23 @@ int recv_files(int f_in, int f_out, char *local_name)
if (whole_file < 0)
whole_file = 0;
progress_init();
while (1) {
-@@ -873,6 +893,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -872,6 +892,9 @@ int recv_files(int f_in, int f_out, char *local_name)
else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1))
rprintf(FINFO, "%s\n", fname);
/* recv file data */
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, file, inplace || one_inplace);
-@@ -888,6 +911,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -887,6 +910,16 @@ int recv_files(int f_in, int f_out, char *local_name)
exit_cleanup(RERR_FILEIO);
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -443,6 +443,7 @@ has its own detailed description later in this manpage.
+@@ -468,6 +468,7 @@ has its own detailed description later in this manpage.
--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
-@@ -492,6 +493,8 @@ has its own detailed description later in this manpage.
+@@ -517,6 +518,8 @@ has its own detailed description later in this manpage.
--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)
-@@ -3615,6 +3618,36 @@ expand it.
+@@ -3650,6 +3653,36 @@ expand it.
[`--write-batch`](#opt). If _FILE_ is `-`, the batch data will be read
from standard input. See the "BATCH MODE" section for details.
extern int do_xfers;
extern int am_server;
-@@ -49,6 +50,7 @@ extern int batch_fd;
+@@ -50,6 +51,7 @@ extern int batch_fd;
extern int write_batch;
extern int file_old_total;
extern BOOL want_progress_now;
+extern char *source_filter;
extern struct stats stats;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
-
-@@ -202,6 +204,26 @@ void send_files(int f_in, int f_out)
+ extern char num_dev_ino_buf[4 + 8 + 8];
+@@ -211,6 +213,26 @@ void send_files(int f_in, int f_out)
int f_xfer = write_batch < 0 ? batch_fd : f_out;
int save_io_error = io_error;
int ndx, j;
if (DEBUG_GTE(SEND, 1))
rprintf(FINFO, "send_files starting\n");
-@@ -339,6 +361,7 @@ void send_files(int f_in, int f_out)
+@@ -348,6 +370,7 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_PROTOCOL);
}
fd = do_open(fname, O_RDONLY, 0);
if (fd == -1) {
if (errno == ENOENT) {
-@@ -358,6 +381,33 @@ void send_files(int f_in, int f_out)
+@@ -367,6 +390,33 @@ void send_files(int f_in, int f_out)
continue;
}
/* map the local file */
if (do_fstat(fd, &st) != 0) {
io_error |= IOERR_GENERAL;
-@@ -428,6 +478,8 @@ void send_files(int f_in, int f_out)
+@@ -437,6 +487,8 @@ void send_files(int f_in, int f_out)
}
}
close(fd);
./configure (optional if already run)
make
-based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
{"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 },
-@@ -2746,6 +2748,12 @@ void server_options(char **args, int *argc_p)
+@@ -2750,6 +2752,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
-@@ -405,6 +405,7 @@ has its own detailed description later in this manpage.
+@@ -430,6 +430,7 @@ has its own detailed description later in this manpage.
--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
--dry-run, -n perform a trial run with no changes made
--whole-file, -W copy files whole (w/o delta-xfer algorithm)
-@@ -1650,6 +1651,18 @@ expand it.
+@@ -1675,6 +1676,18 @@ expand it.
(as 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: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
+based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -810,6 +811,7 @@ static struct poptOption long_options[] = {
+@@ -812,6 +813,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 },
-@@ -2469,6 +2471,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2471,6 +2473,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (trust_sender || am_server || read_batch)
trust_sender_args = trust_sender_filter = 1;
else if (old_style_args || filesfrom_host != NULL)
-@@ -2932,6 +2952,12 @@ void server_options(char **args, int *argc_p)
+@@ -2936,6 +2956,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
-@@ -494,6 +494,7 @@ has its own detailed description later in this manpage.
+@@ -519,6 +519,7 @@ has its own detailed description later in this manpage.
--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
-@@ -3657,6 +3658,25 @@ expand it.
+@@ -3692,6 +3693,22 @@ expand it.
free to specify just the local charset for a daemon transfer (e.g.
`--iconv=utf8`).
+ `--tr=':\/!'` replaces colons with exclamation marks and deletes
+ backslashes. Slashes cannot be transliterated because it would cause
+ havoc.
-+
-+ If the receiver is invoked over a remote shell, use [`--protect-args`](#opt)
-+ to stop the shell from interpreting any nasty characters in the argument.
+
0. `--ipv4`, `-4` or `--ipv6`, `-6`