./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/acls.c b/acls.c
--- a/acls.c
+++ b/acls.c
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -457,13 +457,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -497,13 +497,6 @@ void setup_protocol(int f_out,int f_in)
if (protocol_version < 30) {
if (append_mode == 1)
append_mode = 2;
Fix a bug that could lose some bits when stripping some (supposedly)
superfluous ACL info.
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/lib/sysacls.c b/lib/sysacls.c
--- a/lib/sysacls.c
+++ b/lib/sysacls.c
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
-@@ -1020,7 +1021,8 @@ static struct poptOption long_options[] = {
+@@ -1024,7 +1025,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 },
-@@ -2751,6 +2753,10 @@ void server_options(char **args, int *argc_p)
+@@ -2776,6 +2778,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)
-u, --update skip files that are newer on the receiver
-@@ -801,6 +802,11 @@ in the list so that it has a high enough priority to be effective (e.g., if
+@@ -805,6 +806,11 @@ in the list so that it has a high enough priority to be effective (e.g., if
your rules specify a trailing inclusion/exclusion of '*', the auto-added
rule would never be reached).
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
-@@ -1025,7 +1033,9 @@ static struct poptOption long_options[] = {
+@@ -1029,7 +1037,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 },
-@@ -2228,6 +2238,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2243,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;
-@@ -2249,6 +2261,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2264,6 +2276,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)
-@@ -2260,6 +2280,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2275,6 +2295,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
backup_suffix);
return 0;
}
if (backup_dir) {
size_t len;
while (*backup_dir == '.' && backup_dir[1] == '/')
-@@ -2295,6 +2329,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2310,6 +2344,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;
-@@ -2737,6 +2799,10 @@ void server_options(char **args, int *argc_p)
+@@ -2752,6 +2814,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) {
-@@ -2745,6 +2811,14 @@ void server_options(char **args, int *argc_p)
+@@ -2760,6 +2826,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
static void output_flist(struct file_list *flist);
void init_flist(void)
-@@ -327,6 +349,238 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -328,6 +350,238 @@ static void flist_done_allocating(struct file_list *flist)
flist->pool_boundary = ptr;
}
/* 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
-@@ -1155,7 +1409,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1156,7 +1410,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];
-@@ -1301,9 +1555,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1302,9 +1556,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
-@@ -1321,11 +1582,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1322,11 +1583,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))
-@@ -1412,8 +1670,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1413,8 +1671,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2620,7 +2884,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2621,7 +2885,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 */
-@@ -2871,7 +3135,7 @@ void flist_free(struct file_list *flist)
+@@ -2872,7 +3136,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;
-@@ -2922,7 +3186,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2923,7 +3187,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;
-@@ -2938,8 +3202,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2939,8 +3203,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);
-@@ -2961,7 +3225,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2962,7 +3226,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
}
flist->high = prev_i;
- OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
+ OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_SUMFILES,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-
-@@ -986,6 +988,7 @@ static struct poptOption long_options[] = {
- {"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
- {"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
+@@ -988,6 +990,7 @@ static struct poptOption long_options[] = {
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
+ {"checksum-choice", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
+ {"cc", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
+ {"sumfiles", 0, POPT_ARG_STRING, 0, OPT_SUMFILES, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 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 },
-@@ -1793,6 +1796,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1810,6 +1813,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);
-@@ -2073,6 +2093,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2088,6 +2108,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-@@ -641,9 +642,9 @@ uses a "quick check" that (by default) checks if each file's size and time
+@@ -645,9 +646,9 @@ uses a "quick check" that (by default) checks if each file's size and time
of last modification match between the sender and receiver. This option
changes this to compare a 128-bit checksum for each file that has a
matching size. Generating the checksums means that both sides will expend
The sending side generates its checksums while it is doing the file-system
scan that builds the list of the available files. The receiver generates
-@@ -651,6 +652,8 @@ its checksums when it is scanning for changed files, and will checksum any
+@@ -655,6 +656,8 @@ its checksums when it is scanning for changed files, and will checksum any
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 em(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
-@@ -661,6 +664,36 @@ The checksum used is auto-negotiated between the client and the server, but
+@@ -665,6 +668,36 @@ The checksum used is auto-negotiated between the client and the server, but
can be overridden using either the bf(--checksum-choice) option or an
environment variable that is discussed in that option's section.
} *csum_cache = NULL;
static void flist_sort_and_clean(struct file_list *flist, int flags);
-@@ -349,7 +358,79 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -350,7 +359,79 @@ static void flist_done_allocating(struct file_list *flist)
flist->pool_boundary = ptr;
}
{
int slot, slots = am_sender ? 1 : basis_dir_cnt + 1;
-@@ -363,6 +444,9 @@ void reset_checksum_cache()
+@@ -364,6 +445,9 @@ void reset_checksum_cache()
struct file_list *flist = csum_cache[slot].flist;
if (flist) {
/* Reset the pool memory and empty the file-list array. */
pool_free_old(flist->file_pool,
pool_boundary(flist->file_pool, 0));
-@@ -373,6 +457,10 @@ void reset_checksum_cache()
+@@ -374,6 +458,10 @@ void reset_checksum_cache()
flist->low = 0;
flist->high = -1;
flist->next = NULL;
}
}
-@@ -380,7 +468,7 @@ void reset_checksum_cache()
+@@ -381,7 +469,7 @@ void reset_checksum_cache()
static int add_checksum(struct file_list *flist, const char *dirname,
const char *basename, int basename_len, OFF_T file_length,
time_t mtime, uint32 ctime, uint32 inode,
{
struct file_struct *file;
int alloc_len, extra_len;
-@@ -397,7 +485,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -398,7 +486,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
extra_len = (extra_len | (EXTRA_ROUNDING * EXTRA_LEN)) + EXTRA_LEN;
#endif
bp = pool_alloc(flist->file_pool, alloc_len, "add_checksum");
memset(bp, 0, extra_len + FILE_STRUCT_LEN);
-@@ -406,7 +494,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -407,7 +495,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
bp += FILE_STRUCT_LEN;
memcpy(bp, basename, basename_len);
file->mode = S_IFREG;
file->modtime = mtime;
file->len32 = (uint32)file_length;
-@@ -435,10 +530,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -436,10 +531,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
char line[MAXPATHLEN+1024], fbuf[MAXPATHLEN], sum[MAX_DIGEST_LEN];
FILE *fp;
char *cp;
int dlen = dirname ? strlcpy(fbuf, dirname, sizeof fbuf) : 0;
if (dlen >= (int)(sizeof fbuf - 1 - RSYNCSUMS_LEN))
-@@ -459,7 +555,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -460,7 +556,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
while (fgets(line, sizeof line, fp)) {
cp = line;
if (checksum_type == 5) {
if (*cp == '=')
while (*++cp == '=') {}
else
-@@ -470,7 +566,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -471,7 +567,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
}
if (*cp == '=') {
} else {
for (i = 0; i < flist_csum_len*2; i++, cp++) {
int x;
-@@ -488,13 +591,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -489,13 +592,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
else
sum[i/2] = x << 4;
}
if (*cp == '=')
while (*++cp == '=') {}
else
-@@ -544,24 +648,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -545,24 +649,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
continue;
strlcpy(fbuf+dlen, cp, sizeof fbuf - dlen);
read_checksums(slot, flist, file->dirname);
}
-@@ -573,12 +765,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
+@@ -574,12 +766,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
&& (checksum_files & CSF_LAX
|| (F_CTIME(fp) == (uint32)stp->st_ctime
&& F_INODE(fp) == (uint32)stp->st_ino))) {
}
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1510,6 +1721,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1511,6 +1722,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;
}
-@@ -1556,13 +1769,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1557,13 +1770,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' */
-@@ -1672,7 +1885,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1673,7 +1886,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)
-@@ -2051,6 +2264,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -2052,6 +2265,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". */
-@@ -2720,6 +2936,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2721,6 +2937,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -1798,7 +1798,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1815,7 +1815,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
case OPT_SUMFILES:
arg = poptGetOptArg(pc);
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -673,9 +673,13 @@ computed just as it would be if bf(--sumfiles) was not specified.
+@@ -677,9 +677,13 @@ computed just as it would be if bf(--sumfiles) was not specified.
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: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1322,7 +1322,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1323,7 +1323,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
#endif
if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/loadparm.c b/loadparm.c
--- a/loadparm.c
+++ b/loadparm.c
rprintf(F," --blocking-io use blocking I/O for the remote shell\n");
rprintf(F," --stats give some file-transfer stats\n");
rprintf(F," -8, --8-bit-output leave high-bit chars unescaped in output\n");
-@@ -1068,6 +1072,8 @@ static struct poptOption long_options[] = {
+@@ -1072,6 +1076,8 @@ static struct poptOption long_options[] = {
#endif
{"remote-option", 'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
{"checksum-seed", 0, POPT_ARG_INT, &checksum_seed, 0, 0, 0 },
{"server", 0, POPT_ARG_NONE, 0, OPT_SERVER, 0, 0 },
{"sender", 0, POPT_ARG_NONE, 0, OPT_SENDER, 0, 0 },
-@@ -1095,6 +1101,8 @@ static void daemon_usage(enum logcode F)
+@@ -1099,6 +1105,8 @@ static void daemon_usage(enum logcode F)
rprintf(F," --log-file=FILE override the \"log file\" setting\n");
rprintf(F," --log-file-format=FMT override the \"log format\" setting\n");
rprintf(F," --sockopts=OPTIONS specify custom TCP options\n");
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
-@@ -911,6 +913,7 @@ static struct poptOption long_options[] = {
+@@ -912,6 +914,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 },
-@@ -2919,6 +2922,9 @@ void server_options(char **args, int *argc_p)
+@@ -2940,6 +2943,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -390,6 +391,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -430,6 +431,8 @@ void setup_protocol(int f_out,int f_in)
* aligned for direct int64-pointer memory access. */
if (preserve_atimes)
atimes_ndx = (file_extra_cnt += EXTRA64_CNT);
if (am_sender) /* This is most likely in the in64 union as well. */
pathname_ndx = (file_extra_cnt += PTR_EXTRA_CNT);
else
-@@ -555,6 +558,10 @@ void setup_protocol(int f_out,int f_in)
+@@ -595,6 +598,10 @@ void setup_protocol(int f_out,int f_in)
want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0;
extern int relative_paths;
extern int implied_dirs;
extern int ignore_perishable;
-@@ -383,6 +384,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -384,6 +385,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
int ndx, int first_ndx)
{
static time_t modtime, atime;
static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
-@@ -499,6 +503,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -500,6 +504,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
else
atime = F_ATIME(file);
}
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != -1) {
-@@ -586,6 +597,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -587,6 +598,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
}
if (xflags & XMIT_MOD_NSEC)
write_varint(f, F_MOD_NSEC(file));
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
#ifdef SUPPORT_FILEFLAGS
-@@ -682,6 +697,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -683,6 +698,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
static int64 modtime, atime;
static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
-@@ -795,6 +813,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -796,6 +814,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
mode = first->mode;
if (atimes_ndx && !S_ISDIR(mode))
atime = F_ATIME(first);
#ifdef SUPPORT_FILEFLAGS
if (preserve_fileflags)
fileflags = F_FFLAGS(first);
-@@ -835,6 +857,21 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -836,6 +858,21 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
modtime_nsec = read_varint(f);
else
modtime_nsec = 0;
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME)) {
-@@ -1024,6 +1061,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1025,6 +1062,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
}
if (atimes_ndx && !S_ISDIR(mode))
F_ATIME(file) = atime;
if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1427,6 +1468,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1428,6 +1469,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
file->flags |= FLAG_OWNED_BY_US;
if (atimes_ndx && !S_ISDIR(file->mode))
F_ATIME(file) = st.st_atime;
rprintf(F," -O, --omit-dir-times omit directories from --times\n");
rprintf(F," -J, --omit-link-times omit symlinks from --times\n");
rprintf(F," --super receiver attempts super-user activities\n");
-@@ -911,6 +919,11 @@ static struct poptOption long_options[] = {
+@@ -912,6 +920,11 @@ static struct poptOption long_options[] = {
{"no-U", 0, POPT_ARG_VAL, &preserve_atimes, 0, 0, 0 },
{"open-noatime", 0, POPT_ARG_VAL, &open_noatime, 1, 0, 0 },
{"no-open-noatime", 0, POPT_ARG_VAL, &open_noatime, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 1, 0, 0 },
{"no-omit-dir-times",0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
{"no-O", 0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
-@@ -2609,6 +2622,10 @@ void server_options(char **args, int *argc_p)
+@@ -2624,6 +2637,10 @@ void server_options(char **args, int *argc_p)
if (preserve_atimes > 1)
argstr[x++] = 'U';
}
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
-@@ -1290,6 +1291,9 @@ flag then rsync will silently ignore this option. Note also that some
+@@ -1294,6 +1295,9 @@ flag then rsync will silently ignore this option. Note also that some
filesystems are mounted to avoid updating the atime on read access even
without the O_NOATIME flag being set.
dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when
it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
-@@ -2285,7 +2289,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -2316,7 +2320,7 @@ with older versions of rsync, but that also turns on the output of other
verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
type of update being done, bf(X) is replaced by the file-type, and the
other letters represent attributes that may be output if they are being
modified.
-@@ -2347,6 +2351,8 @@ quote(itemization(
+@@ -2378,6 +2382,8 @@ quote(itemization(
when a symlink or directory is updated.
it() The bf(a) means that the ACL information changed.
it() The bf(x) means that the extended attribute information changed.
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
rprintf(F," -@, --modify-window=NUM set the accuracy for mod-time comparisons\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
-@@ -938,6 +940,7 @@ static struct poptOption long_options[] = {
+@@ -939,6 +941,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 },
-@@ -2802,6 +2805,9 @@ void server_options(char **args, int *argc_p)
+@@ -2827,6 +2830,9 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
-@, --modify-window=NUM set the accuracy for mod-time comparisons
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -617,6 +618,12 @@ time to just looking for files that have changed in size. This is useful
+@@ -621,6 +622,12 @@ time to just looking for files that have changed in size. This is useful
when starting to use rsync after using another mirroring system which may
not preserve timestamps exactly.
./configure
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
extern int eol_nulls;
extern int atimes_ndx;
extern int relative_paths;
-@@ -1321,11 +1322,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1322,11 +1323,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))
-@@ -1412,8 +1410,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1413,8 +1411,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2088,6 +2090,9 @@ void send_extra_file_list(int f, int at_least)
+@@ -2089,6 +2091,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[])
-@@ -2111,6 +2116,13 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2112,6 +2117,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");
-@@ -2456,6 +2468,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2457,6 +2469,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
+ OPT_NO_DB, OPT_DBONLY,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-
-@@ -986,6 +1005,10 @@ static struct poptOption long_options[] = {
- {"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
- {"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
+@@ -988,6 +1007,10 @@ static struct poptOption long_options[] = {
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
+ {"checksum-choice", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
+ {"cc", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
+ {"db", 0, POPT_ARG_STRING, &db_config, 0, 0, 0 },
+ {"no-db", 0, POPT_ARG_NONE, 0, OPT_NO_DB, 0, 0 },
+ {"db-lax", 0, POPT_ARG_VAL, &db_lax, 1, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 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 },
-@@ -1077,6 +1100,9 @@ static struct poptOption long_options[] = {
+@@ -1081,6 +1104,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}
};
-@@ -1130,6 +1156,50 @@ static struct poptOption long_daemon_options[] = {
+@@ -1134,6 +1160,50 @@ static struct poptOption long_daemon_options[] = {
{0,0,0,0, 0, 0, 0}
};
static char err_buf[200];
-@@ -1253,6 +1323,8 @@ static void set_refuse_options(void)
+@@ -1257,6 +1327,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);
}
/* Now we use the descrip values to actually mark the options for refusal. */
-@@ -1377,6 +1449,102 @@ static void create_refuse_error(int which)
+@@ -1381,6 +1453,102 @@ static void create_refuse_error(int which)
}
}
/* 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
-@@ -1415,6 +1583,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1419,6 +1587,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
}
set_refuse_options();
#ifdef ICONV_OPTION
-@@ -1536,6 +1710,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1540,6 +1714,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
-@@ -1610,6 +1790,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1614,6 +1794,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
preserve_devices = preserve_specials = 0;
break;
#define NDX_DONE -1
#define NDX_FLIST_EOF -2
#define NDX_DEL_STATS -3
-@@ -1330,7 +1334,8 @@ extern short info_levels[], debug_levels[];
+@@ -1334,7 +1338,8 @@ extern short info_levels[], debug_levels[];
#define DEBUG_CHDIR (DEBUG_BIND+1)
#define DEBUG_CONNECT (DEBUG_CHDIR+1)
#define DEBUG_CMD (DEBUG_CONNECT+1)
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-@@ -661,6 +664,67 @@ The checksum used is auto-negotiated between the client and the server, but
+@@ -665,6 +668,67 @@ The checksum used is auto-negotiated between the client and the server, but
can be overridden using either the bf(--checksum-choice) option or an
environment variable that is discussed in that option's section.
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
-@@ -992,7 +994,9 @@ static struct poptOption long_options[] = {
+@@ -994,7 +996,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 },
-@@ -2789,8 +2793,14 @@ void server_options(char **args, int *argc_p)
+@@ -2814,8 +2818,14 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -1987,6 +1989,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
+@@ -1991,6 +1993,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
potential alternate-basis files will be removed as the transfer progresses.
This option conflicts with bf(--inplace) and bf(--append).
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
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;
-@@ -153,6 +154,7 @@ void set_allow_inc_recurse(void)
+@@ -156,6 +157,7 @@ void set_allow_inc_recurse(void)
allow_inc_recurse = 0;
else if (!am_sender
&& (delete_before || delete_after
static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int show_filelist_progress;
-@@ -276,6 +279,45 @@ static inline int is_excluded(const char *fname, int is_dir, int filter_level)
+@@ -277,6 +280,45 @@ static inline int is_excluded(const char *fname, int is_dir, int filter_level)
return name_is_excluded(fname, is_dir ? NAME_IS_DIR : NAME_IS_FILE, filter_level);
}
static void send_directory(int f, struct file_list *flist,
char *fbuf, int len, int flags);
-@@ -2622,6 +2664,25 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2623,6 +2665,25 @@ 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);
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
-@@ -990,6 +992,7 @@ static struct poptOption long_options[] = {
+@@ -992,6 +994,7 @@ 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 },
-@@ -2385,7 +2388,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2400,7 +2403,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -2394,6 +2397,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2409,6 +2412,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;
}
-@@ -2785,6 +2789,8 @@ void server_options(char **args, int *argc_p)
+@@ -2810,6 +2814,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -1971,6 +1972,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1975,6 +1976,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
fuzzy-match files, so either use bf(--delete-after) or specify some
filename exclusions if you need to prevent this.
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
rprintf(F," -m, --prune-empty-dirs prune empty directory chains from the file-list\n");
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
rprintf(F," --usermap=STRING custom username mapping\n");
-@@ -1008,6 +1010,8 @@ static struct poptOption long_options[] = {
+@@ -1012,6 +1014,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 },
-m, --prune-empty-dirs prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
--usermap=STRING custom username mapping
-@@ -2557,6 +2558,14 @@ See also the "atomic-rsync" perl script in the "support" subdir for an
+@@ -2588,6 +2589,14 @@ See also the "atomic-rsync" perl script in the "support" subdir for an
update algorithm that is even more atomic (it uses bf(--link-dest) and a
parallel hierarchy of files).
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
rprintf(F," --append-verify like --append, but with old data in file checksum\n");
-@@ -942,6 +944,7 @@ static struct poptOption long_options[] = {
+@@ -943,6 +945,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: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
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 */
-@@ -396,6 +398,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -436,6 +438,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)
-@@ -551,6 +555,10 @@ void setup_protocol(int f_out,int f_in)
+@@ -591,6 +595,10 @@ void setup_protocol(int f_out,int f_in)
want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0;
extern int delete_during;
extern int missing_args;
extern int eol_nulls;
-@@ -383,6 +384,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -384,6 +385,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
{
static time_t modtime, atime;
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
-@@ -426,6 +430,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -427,6 +431,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
xflags |= XMIT_SAME_MODE;
else
mode = file->mode;
if (preserve_devices && IS_DEVICE(mode)) {
if (protocol_version < 28) {
-@@ -576,6 +588,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -577,6 +589,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
write_varint(f, F_MOD_NSEC(file));
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME))
write_varlong(f, atime, 4);
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
-@@ -667,6 +683,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -668,6 +684,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
{
static int64 modtime, atime;
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
-@@ -776,6 +795,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -777,6 +796,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
mode = first->mode;
if (atimes_ndx && !S_ISDIR(mode))
atime = F_ATIME(first);
if (preserve_uid)
uid = F_OWNER(first);
if (preserve_gid)
-@@ -827,6 +850,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -828,6 +851,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)
-@@ -985,6 +1012,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -986,6 +1013,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) {
-@@ -1384,6 +1415,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1385,6 +1416,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
}
#endif
file->mode = st.st_mode;
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
rprintf(F," --max-size=SIZE don't transfer any file larger than SIZE\n");
rprintf(F," --min-size=SIZE don't transfer any file smaller than SIZE\n");
-@@ -876,6 +892,10 @@ static struct poptOption long_options[] = {
+@@ -877,6 +893,10 @@ static struct poptOption long_options[] = {
{"perms", 'p', POPT_ARG_VAL, &preserve_perms, 1, 0, 0 },
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
{"acls", 'A', POPT_ARG_NONE, 0, 'A', 0, 0 },
{"no-acls", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
-@@ -969,6 +989,14 @@ static struct poptOption long_options[] = {
+@@ -970,6 +990,14 @@ static struct poptOption long_options[] = {
{"remove-source-files",0,POPT_ARG_VAL, &remove_source_files, 1, 0, 0 },
{"force", 0, POPT_ARG_VAL, &force_delete, 1, 0, 0 },
{"no-force", 0, POPT_ARG_VAL, &force_delete, 0, 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 },
-@@ -2686,6 +2714,9 @@ void server_options(char **args, int *argc_p)
+@@ -2701,6 +2729,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
goto oom;
-@@ -2779,6 +2810,16 @@ void server_options(char **args, int *argc_p)
+@@ -2804,6 +2835,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
-@@ -669,7 +673,8 @@ specified, in which case bf(-r) is not implied.
+@@ -673,7 +677,8 @@ specified, in which case bf(-r) is not implied.
Note that bf(-a) bf(does not preserve hardlinks), because
finding multiply-linked files is expensive. You must separately
dit(--no-OPTION) You may turn off one or more implied options by prefixing
the option name with "no-". Not all options may be prefixed with a "no-":
-@@ -982,7 +987,7 @@ they would be using bf(--copy-links).
+@@ -986,7 +991,7 @@ they would be using bf(--copy-links).
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 bf(--keep-dirlinks) for an analogous option for the receiving
side.
-@@ -1166,6 +1171,29 @@ Note that the bf(-X) option does not copy rsync's special xattr values (e.g.
+@@ -1170,6 +1175,29 @@ Note that the bf(-X) option does not copy rsync's special xattr values (e.g.
those used by bf(--fake-super)) unless you repeat the option (e.g. -XX).
This "copy all xattrs" mode cannot be used with bf(--fake-super).
dit(bf(--chmod)) This option tells rsync to apply one or more
comma-separated "chmod" modes to the permission of the files in the
transfer. The resulting value is treated as though it were the permissions
-@@ -1573,12 +1601,13 @@ display as a "*missing" entry in the bf(--list-only) output.
+@@ -1577,12 +1605,13 @@ display as a "*missing" entry in the bf(--list-only) output.
dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
even when there are I/O errors.
bf(--recursive) option was also enabled.
dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
-@@ -2256,7 +2285,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -2287,7 +2316,7 @@ with older versions of rsync, but that also turns on the output of other
verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
#ifdef ICONV_OPTION
extern int filesfrom_convert;
-@@ -1183,7 +1184,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1184,7 +1185,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)
-@@ -1228,6 +1229,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1229,6 +1230,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) {
-@@ -1432,12 +1439,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1433,12 +1440,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) {
-@@ -2342,7 +2360,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2343,7 +2361,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) {
-@@ -2356,7 +2374,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2357,7 +2375,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.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -1188,6 +1188,8 @@ quote(--chmod=D2775,F664)
+@@ -1192,6 +1192,8 @@ quote(--chmod=D2775,F664)
It is also legal to specify multiple bf(--chmod) options, as each
additional option is just appended to the list of changes to make.
See the bf(--perms) and bf(--executability) options for how the resulting
permission value can be applied to the files in the transfer.
-@@ -2206,6 +2208,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
+@@ -2237,6 +2239,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
If you specify "--chown=foo:bar, this is exactly the same as specifying
"--usermap=*:foo --groupmap=*:bar", only easier.
dit(bf(--timeout=TIMEOUT)) This option allows you to set a maximum I/O
timeout in seconds. If no data is transferred for the specified time
then rsync will exit. The default is 0, which means no timeout.
-@@ -3100,6 +3106,15 @@ itemization(
+@@ -3131,6 +3137,15 @@ itemization(
option's default 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.
it() An bf(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
-@@ -3165,6 +3180,12 @@ itemization(
+@@ -3196,6 +3211,12 @@ itemization(
a rule prefix such as bf(hide)).
)
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
rprintf(F," --usermap=STRING custom username mapping\n");
rprintf(F," --groupmap=STRING custom groupname mapping\n");
-@@ -1043,6 +1045,7 @@ static struct poptOption long_options[] = {
+@@ -1047,6 +1049,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 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -2865,6 +2868,9 @@ void server_options(char **args, int *argc_p)
+@@ -2890,6 +2893,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = tmpdir;
}
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1612,6 +1612,9 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1613,6 +1613,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;
#endif
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
-@@ -1009,6 +1014,12 @@ static struct poptOption long_options[] = {
+@@ -1010,6 +1015,12 @@ 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 },
#endif
{"ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 1, 0, 0 },
{"no-ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 0, 0, 0 },
-@@ -2114,6 +2125,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2129,6 +2140,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
if (block_size) {
/* We may not know the real protocol_version at this point if this is the client
* option parsing, but we still want to check it so that the client can specify
-@@ -2734,6 +2754,11 @@ void server_options(char **args, int *argc_p)
+@@ -2749,6 +2769,11 @@ void server_options(char **args, int *argc_p)
if (preserve_fileflags)
args[ac++] = "--fileflags";
-o, --owner preserve owner (super-user only)
-g, --group preserve group
--devices preserve device files (super-user only)
-@@ -1195,6 +1197,42 @@ flags on files and directories that are being updated or deleted on the
+@@ -1199,6 +1201,42 @@ flags on files and directories that are being updated or deleted on the
receiving side. It does not try to affect user flags. This option overrides
bf(--force-change) and bf(--force-uchange).
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
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;
-@@ -3111,6 +3112,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3112,6 +3113,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;
-@@ -3221,7 +3223,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3222,7 +3224,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
}
rprintf(F," --address=ADDRESS bind address for outgoing socket to daemon\n");
rprintf(F," --port=PORT specify double-colon alternate port number\n");
rprintf(F," --sockopts=OPTIONS specify custom TCP options\n");
-@@ -1028,6 +1030,8 @@ static struct poptOption long_options[] = {
+@@ -1032,6 +1034,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},
-@@ -2815,6 +2819,9 @@ void server_options(char **args, int *argc_p)
+@@ -2840,6 +2844,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -1922,6 +1923,10 @@ available to that user, and makes it impossible for the joe user to do a timed
+@@ -1926,6 +1927,10 @@ available to that user, and makes it impossible for the joe user to do a timed
exploit of the path to induce a change to a file that the joe user has no
permissions to change.
./configure
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
- OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
+ OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_LINK_BY_HASH,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-
-@@ -990,6 +993,7 @@ static struct poptOption long_options[] = {
+@@ -992,6 +995,7 @@ 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 },
-@@ -1422,6 +1426,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1426,6 +1430,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
iconv_opt = strdup(arg);
#endif
/* TODO: Call poptReadDefaultConfig; handle errors. */
/* The context leaks in case of an error, but if there's a
-@@ -1905,6 +1912,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1922,6 +1929,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2226,6 +2248,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2241,6 +2263,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;
-@@ -2894,6 +2918,12 @@ void server_options(char **args, int *argc_p)
+@@ -2915,6 +2939,12 @@ void server_options(char **args, int *argc_p)
} else if (inplace)
args[ac++] = "--inplace";
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -1339,7 +1339,8 @@ extern short info_levels[], debug_levels[];
+@@ -1343,7 +1343,8 @@ extern short info_levels[], debug_levels[];
#define DEBUG_FUZZY (DEBUG_FLIST+1)
#define DEBUG_GENR (DEBUG_FUZZY+1)
#define DEBUG_HASH (DEBUG_GENR+1)
-z, --compress compress file data during the transfer
--compress-level=NUM explicitly set compression level
--skip-compress=LIST skip compressing files with suffix in LIST
-@@ -2052,6 +2053,48 @@ bf(--link-dest) from working properly for a non-super-user when bf(-o) was
+@@ -2056,6 +2057,48 @@ bf(--link-dest) from working properly for a non-super-user when bf(-o) was
specified (or implied by bf(-a)). You can work-around this bug by avoiding
the bf(-o) option when sending to an old rsync.
./configure
make
-based-on: 4496e0e8e7a7616ef64b683edc7a249ee16b5a1b
+based-on: 5ac353d84580e64d71a6516b72898b59916007c0
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -89,6 +89,9 @@ int filesfrom_convert = 0;
+@@ -89,6 +89,10 @@ int filesfrom_convert = 0;
struct name_num_obj valid_compressions = {
"compress", NULL, NULL, 0, 0, {
+#ifdef SUPPORT_LZ4
++ /* TODO decide where in the default preference order this should go. */
+ { CPRES_LZ4, "lz4", NULL },
+#endif
- #ifndef EXTERNAL_ZLIB
+ { CPRES_ZLIBX, "zlibx", NULL },
{ CPRES_ZLIB, "zlib", NULL },
- #endif
+ { CPRES_NONE, "none", NULL },
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/authenticate.c b/authenticate.c
--- a/authenticate.c
+++ b/authenticate.c
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
rprintf(F," --super receiver attempts super-user activities\n");
#ifdef SUPPORT_XATTRS
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
-@@ -897,6 +899,7 @@ static struct poptOption long_options[] = {
+@@ -898,6 +900,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 },
-@@ -2294,6 +2297,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2309,6 +2312,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)
-@@ -2545,6 +2551,8 @@ void server_options(char **args, int *argc_p)
+@@ -2560,6 +2566,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'O';
if (omit_link_times)
argstr[x++] = 'J';
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse turn sequences of nulls into sparse blocks
-@@ -1281,6 +1282,10 @@ directories.
+@@ -1285,6 +1286,10 @@ directories.
dit(bf(-J, --omit-link-times)) This tells rsync to omit symlinks when
it is preserving modification times (see bf(--times)).
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
-@@ -1776,6 +1777,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1777,6 +1778,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);
#ifdef HAVE_SETVBUF
rprintf(F," --outbuf=N|L|B set output buffering to None, Line, or Block\n");
#endif
-@@ -1018,6 +1020,7 @@ static struct poptOption long_options[] = {
+@@ -1022,6 +1024,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 },
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
rprintf(F," --del an alias for --delete-during\n");
rprintf(F," --delete delete extraneous files from destination dirs\n");
rprintf(F," --delete-before receiver deletes before transfer, not during\n");
-@@ -1021,6 +1023,7 @@ static struct poptOption long_options[] = {
+@@ -1025,6 +1027,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 },
-@@ -2793,6 +2796,8 @@ void server_options(char **args, int *argc_p)
+@@ -2818,6 +2821,8 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
--del an alias for --delete-during
--delete delete extraneous files from dest dirs
--delete-before receiver deletes before xfer, not during
-@@ -1470,6 +1471,14 @@ bf(--exclude='*.new') for the rsync transfer).
+@@ -1474,6 +1475,14 @@ bf(--exclude='*.new') for the rsync transfer).
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: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
rprintf(F," --protocol=NUM force an older protocol version to be used\n");
#ifdef ICONV_OPTION
rprintf(F," --iconv=CONVERT_SPEC request charset conversion of filenames\n");
-@@ -938,6 +944,7 @@ static struct poptOption long_options[] = {
+@@ -939,6 +945,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 },
-@@ -1063,6 +1070,8 @@ static struct poptOption long_options[] = {
+@@ -1067,6 +1074,8 @@ static struct poptOption long_options[] = {
{"password-file", 0, POPT_ARG_STRING, &password_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 },
#ifdef HAVE_SETVBUF
{"outbuf", 0, POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
#endif
-@@ -2429,6 +2438,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2444,6 +2453,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -2802,6 +2821,25 @@ void server_options(char **args, int *argc_p)
+@@ -2827,6 +2846,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
--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)
-@@ -2751,6 +2754,33 @@ file previously generated by bf(--write-batch).
+@@ -2782,6 +2785,33 @@ file previously generated by bf(--write-batch).
If em(FILE) is bf(-), the batch data will be read from standard input.
See the "BATCH MODE" section for details.
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
#ifdef SUPPORT_PREALLOCATION
rprintf(F," --preallocate allocate dest files before writing them\n");
#else
-@@ -950,6 +952,7 @@ static struct poptOption long_options[] = {
+@@ -951,6 +953,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 },
-@@ -2719,6 +2722,12 @@ void server_options(char **args, int *argc_p)
+@@ -2734,6 +2737,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
--preallocate allocate dest files before writing
--write-devices write to devices as files (implies --inplace)
-n, --dry-run perform a trial run with no changes made
-@@ -1347,6 +1348,15 @@ If combined with bf(--sparse), the file will only have sparse blocks (as
+@@ -1351,6 +1352,15 @@ If combined with bf(--sparse), the file will only have sparse blocks (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: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -2793,14 +2793,18 @@ regardless of the remote charset you actually pass. Thus, you may feel free to
+@@ -2824,14 +2824,18 @@ regardless of the remote charset you actually pass. Thus, you may feel free to
specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)).
dit(bf(-4, --ipv4) or bf(-6, --ipv6)) Tells rsync to prefer IPv4/IPv6
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
#ifdef HAVE_SETVBUF
rprintf(F," --outbuf=N|L|B set output buffering to None, Line, or Block\n");
#endif
-@@ -840,6 +843,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
+@@ -841,6 +844,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
+ OPT_STOP_AT, OPT_TIME_LIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -1043,6 +1047,8 @@ static struct poptOption long_options[] = {
+@@ -1047,6 +1051,8 @@ 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 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -1905,6 +1911,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1922,6 +1928,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2731,6 +2767,15 @@ void server_options(char **args, int *argc_p)
+@@ -2746,6 +2782,15 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
--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
-@@ -2725,6 +2727,19 @@ files can show up as being rapidly sent when the data is quickly buffered,
+@@ -2756,6 +2758,19 @@ files can show up as being rapidly sent when the data is quickly buffered,
while other can show up as very slow when the flushing of the output buffer
occurs. This may be fixed in a future version.
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
#define NORMAL_NAME 0
#define SLASH_ENDING_NAME 1
#define DOTDIR_NAME 2
-@@ -663,6 +666,23 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -664,6 +667,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;
-@@ -728,9 +748,13 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -729,9 +749,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);
-@@ -2476,6 +2500,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2477,6 +2501,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
parse_name_map(usermap, True);
if (groupmap)
parse_name_map(groupmap, False);
rprintf(F," --checksum-seed=NUM set block/file checksum seed (advanced)\n");
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
-@@ -1050,6 +1052,7 @@ static struct poptOption long_options[] = {
+@@ -1054,6 +1056,7 @@ static struct poptOption long_options[] = {
{"iconv", 0, POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },
{"no-iconv", 0, POPT_ARG_NONE, 0, OPT_NO_ICONV, 0, 0 },
#endif
{"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 },
-@@ -2475,6 +2478,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2490,6 +2493,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
am_starting_up = 0;
return 1;
-@@ -2911,6 +2932,12 @@ void server_options(char **args, int *argc_p)
+@@ -2932,6 +2953,12 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
--checksum-seed=NUM set block/file checksum seed (advanced)
-4, --ipv4 prefer IPv4
-6, --ipv6 prefer IPv6
-@@ -2792,6 +2793,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2823,6 +2824,22 @@ daemon uses the charset specified in its "charset" configuration parameter
regardless of the remote charset you actually pass. Thus, you may feel free to
specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)).
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -457,13 +457,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -497,13 +497,6 @@ void setup_protocol(int f_out,int f_in)
if (protocol_version < 30) {
if (append_mode == 1)
append_mode = 2;
./configure (optional if already run)
make
-based-on: 2f84a6bd73e1a6e2081b1bcb965049ef83b2ce45
+based-on: faecd066a6b523713299e659d8295eb8e308f9ed
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c