./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/acls.c b/acls.c
--- a/acls.c
+++ b/acls.c
Fix a bug that could lose some bits when stripping some (supposedly)
superfluous ACL info.
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
}
}
-@@ -1987,7 +1996,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1988,7 +1997,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
STRUCT_STAT st;
if (link_stat(fname, &st, 0) == 0
&& cmp_time(st.st_mtime, file->modtime) != 0)
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
-@@ -731,7 +731,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -729,7 +729,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -704,6 +705,7 @@ void usage(enum logcode F)
+@@ -705,6 +706,7 @@ void usage(enum logcode F)
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
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");
-@@ -858,6 +860,9 @@ static struct poptOption long_options[] = {
+@@ -859,6 +861,9 @@ static struct poptOption long_options[] = {
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 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 },
-@@ -2367,6 +2372,8 @@ void server_options(char **args, int *argc_p)
+@@ -2368,6 +2373,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -355,6 +355,7 @@ to the detailed description below for a complete description. verb(
+@@ -369,6 +369,7 @@ to the detailed description below for a complete description. verb(
--specials preserve special files
-D same as --devices --specials
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
-@@ -1126,6 +1127,12 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
+@@ -1156,6 +1157,12 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
updated (though rsync's delta-transfer algorithm will make the update fairly efficient
if the files haven't actually changed, you're much better off using bf(-t)).
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).
-@@ -2032,7 +2039,10 @@ quote(itemization(
+@@ -2062,7 +2069,10 @@ quote(itemization(
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -1702,7 +1702,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1703,7 +1703,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto notify_others;
if (read_batch || whole_file) {
if (!(backupptr = get_backup_name(fname)))
goto cleanup;
if (!(back_file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
-@@ -1738,7 +1738,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1739,7 +1739,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto notify_others;
}
if (!(backupptr = get_backup_name(fname))) {
close(fd);
goto cleanup;
-@@ -1877,7 +1877,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *lnk,
+@@ -1878,7 +1878,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *lnk,
skip_atomic = 0;
if (del_for_flag) {
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -674,6 +674,7 @@ void usage(enum logcode F)
+@@ -675,6 +675,7 @@ void usage(enum logcode F)
rprintf(F," -R, --relative use relative path names\n");
rprintf(F," --no-implied-dirs don't send implied dirs with --relative\n");
rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n");
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");
-@@ -982,7 +983,8 @@ static struct poptOption long_options[] = {
+@@ -983,7 +984,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 },
-@@ -2520,6 +2522,10 @@ void server_options(char **args, int *argc_p)
+@@ -2521,6 +2523,10 @@ void server_options(char **args, int *argc_p)
}
if (am_sender) {
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -329,6 +329,7 @@ to the detailed description below for a complete description. verb(
+@@ -343,6 +343,7 @@ to the detailed description below for a complete description. verb(
-R, --relative use relative path names
--no-implied-dirs don't send implied dirs with --relative
-b, --backup 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)
-u, --update skip files that are newer on the receiver
-@@ -731,6 +732,11 @@ in the list so that it has a high enough priority to be effective (e.g., if
+@@ -761,6 +762,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).
char *sockopts = NULL;
char *usermap = NULL;
char *groupmap = NULL;
-@@ -677,6 +683,8 @@ void usage(enum logcode F)
+@@ -678,6 +684,8 @@ void usage(enum logcode F)
rprintf(F," --backup-deleted make backups only of deleted files\n");
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");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
-@@ -987,7 +995,9 @@ static struct poptOption long_options[] = {
+@@ -988,7 +996,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 },
-@@ -2024,6 +2034,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2025,6 +2035,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;
-@@ -2045,6 +2057,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2046,6 +2058,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)
-@@ -2056,6 +2076,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2057,6 +2077,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] == '/')
-@@ -2091,6 +2125,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2092,6 +2126,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;
-@@ -2512,6 +2574,10 @@ void server_options(char **args, int *argc_p)
+@@ -2513,6 +2575,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) {
-@@ -2520,7 +2586,14 @@ void server_options(char **args, int *argc_p)
+@@ -2521,7 +2587,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
}
#endif
#ifndef HAVE_SIGACTION
-@@ -1500,6 +1511,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
+@@ -1499,6 +1510,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
}
#endif
int main(int argc,char *argv[])
{
-@@ -1522,6 +1539,11 @@ int main(int argc,char *argv[])
+@@ -1521,6 +1538,11 @@ int main(int argc,char *argv[])
SIGACTMASK(SIGFPE, rsync_panic_handler);
SIGACTMASK(SIGABRT, rsync_panic_handler);
SIGACTMASK(SIGBUS, rsync_panic_handler);
diff --git a/socket.c b/socket.c
--- a/socket.c
+++ b/socket.c
-@@ -521,7 +521,17 @@ int is_a_socket(int fd)
+@@ -532,7 +532,17 @@ int is_a_socket(int fd)
static RETSIGTYPE sigchld_handler(UNUSED(int val))
{
#ifdef WNOHANG
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2543,7 +2807,7 @@ struct file_list *recv_file_list(int f)
+@@ -2548,7 +2812,7 @@ struct file_list *recv_file_list(int f)
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
if (protocol_version < 30) {
/* Recv the io_error flag */
-@@ -2766,7 +3030,7 @@ void flist_free(struct file_list *flist)
+@@ -2771,7 +3035,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;
-@@ -2817,7 +3081,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2822,7 +3086,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;
-@@ -2833,8 +3097,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2838,8 +3102,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);
-@@ -2856,7 +3120,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2861,7 +3125,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
}
flist->high = prev_i;
}
statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
-@@ -1662,7 +1671,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1663,7 +1672,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
;
else if (fnamecmp_type == FNAMECMP_FUZZY)
;
int max_delete = INT_MIN;
OFF_T max_size = 0;
OFF_T min_size = 0;
-@@ -668,6 +669,7 @@ void usage(enum logcode F)
+@@ -669,6 +670,7 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -810,7 +812,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -811,7 +813,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-@@ -950,6 +952,7 @@ static struct poptOption long_options[] = {
+@@ -951,6 +953,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 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 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 },
-@@ -1668,6 +1671,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1669,6 +1672,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);
-@@ -1882,6 +1902,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1883,6 +1903,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -323,6 +323,7 @@ to the detailed description below for a complete description. verb(
+@@ -337,6 +337,7 @@ to the detailed description below for a complete description. verb(
-q, --quiet suppress non-error messages
--no-motd suppress daemon-mode MOTD (see caveat)
-c, --checksum skip based on checksum, not mod-time & size
-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
-@@ -570,9 +571,9 @@ uses a "quick check" that (by default) checks if each file's size and time
+@@ -600,9 +601,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
-@@ -580,6 +581,8 @@ its checksums when it is scanning for changed files, and will checksum any
+@@ -610,6 +611,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
-@@ -589,6 +592,36 @@ option's before-the-transfer "Does this file need to be updated?" check.
+@@ -619,6 +622,36 @@ option's before-the-transfer "Does this file need to be updated?" check.
For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
MD5. For older protocols, the checksum used is MD4.
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
-@@ -2676,6 +2892,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2681,6 +2897,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
}
need_new_dirscan = 0;
}
-@@ -1402,6 +1404,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1403,6 +1405,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
else
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
goto cleanup;
}
-@@ -1677,6 +1680,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1678,6 +1681,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
handle_partial_dir(partialptr, PDIR_DELETE);
}
set_file_attrs(fname, file, &sx, NULL, maybe_ATTRS_REPORT);
if (itemizing)
itemize(fnamecmp, file, ndx, statret, &sx, 0, 0, NULL);
#ifdef SUPPORT_HARD_LINKS
-@@ -2178,6 +2183,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2185,6 +2190,7 @@ void generate_files(int f_out, const char *local_name)
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
}
for (i = cur_flist->low; i <= cur_flist->high; i++) {
struct file_struct *file = cur_flist->sorted[i];
-@@ -2272,6 +2278,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2279,6 +2285,9 @@ void generate_files(int f_out, const char *local_name)
wait_for_receiver();
}
extern int protocol_version;
extern int remove_source_files;
extern int preserve_hard_links;
-@@ -1038,6 +1039,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
+@@ -1046,6 +1047,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
flist_ndx_push(&hlink_list, ndx);
flist->in_progress++;
}
+ struct file_struct *file = flist->files[ndx - flist->ndx_start];
+ set_cached_checksum(flist, file);
}
+ #endif
break;
- case FES_REDO:
diff --git a/loadparm.c b/loadparm.c
--- a/loadparm.c
+++ b/loadparm.c
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -1673,7 +1673,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1674,7 +1674,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
-@@ -601,9 +601,13 @@ computed just as it would be if bf(--sumfiles) was not specified.
+@@ -631,9 +631,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
typedef struct {
char *datum, *name;
-@@ -244,7 +250,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -247,7 +253,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
|| (am_root < 0
&& (strcmp(name+RPRE_LEN+1, XSTAT_SUFFIX) == 0
|| strcmp(name+RPRE_LEN+1, XACC_ACL_SUFFIX) == 0
continue;
}
-@@ -956,6 +964,39 @@ int del_def_xattr_acl(const char *fname)
+@@ -957,6 +965,39 @@ int del_def_xattr_acl(const char *fname)
}
#endif
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int preserve_specials;
extern int preserve_hard_links;
extern int preserve_executability;
-@@ -1558,7 +1559,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1559,7 +1560,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
-@@ -701,6 +702,7 @@ void usage(enum logcode F)
+@@ -702,6 +703,7 @@ void usage(enum logcode F)
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
-@@ -878,6 +880,7 @@ static struct poptOption long_options[] = {
+@@ -879,6 +881,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 },
{"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 },
{"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 },
{"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 },
-@@ -2687,6 +2690,9 @@ void server_options(char **args, int *argc_p)
+@@ -2688,6 +2691,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
-@@ -734,7 +734,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -732,7 +732,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -713,6 +714,7 @@ void usage(enum logcode F)
+@@ -714,6 +715,7 @@ void usage(enum logcode F)
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
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");
-@@ -876,6 +878,9 @@ static struct poptOption long_options[] = {
+@@ -877,6 +879,9 @@ static struct poptOption long_options[] = {
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 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 },
-@@ -2393,6 +2398,8 @@ void server_options(char **args, int *argc_p)
+@@ -2394,6 +2399,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -356,6 +356,7 @@ to the detailed description below for a complete description. verb(
+@@ -370,6 +370,7 @@ to the detailed description below for a complete description. verb(
--specials preserve special files
-D same as --devices --specials
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
-@@ -1154,6 +1155,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
+@@ -1184,6 +1185,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
updated (though rsync's delta-transfer algorithm will make the update fairly efficient
if the files haven't actually changed, you're much better off using bf(-t)).
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).
-@@ -2005,7 +2009,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -2035,7 +2039,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.
-@@ -2064,6 +2068,8 @@ quote(itemization(
+@@ -2094,6 +2098,8 @@ quote(itemization(
it() The bf(f) means that the fileflags information changed.
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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
if (strlcpy(dirbuf + dirbuf_len, ex->pattern,
MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) {
parse_filter_file(lp, dirbuf, ex,
-@@ -1151,6 +1161,7 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
+@@ -1147,6 +1157,7 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
char line[BIGPATHBUFLEN];
char *eob = line + sizeof line - 1;
BOOL word_split = (template->rflags & FILTRULE_WORD_SPLIT) != 0;
if (!fname || !*fname)
return;
-@@ -1197,6 +1208,24 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
+@@ -1193,6 +1204,24 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
}
break;
}
if (word_split && isspace(ch))
break;
if (eol_nulls? !ch : (ch == '\n' || ch == '\r'))
-@@ -1206,13 +1235,14 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
+@@ -1202,13 +1231,14 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_
else
overflow = 1;
}
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -752,6 +753,7 @@ void usage(enum logcode F)
+@@ -753,6 +754,7 @@ void usage(enum logcode F)
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
rprintf(F," -M, --remote-option=OPTION send OPTION to the remote side only\n");
rprintf(F," --size-only skip files that match in size\n");
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\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");
-@@ -903,6 +905,7 @@ static struct poptOption long_options[] = {
+@@ -904,6 +906,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 },
-@@ -2571,6 +2574,9 @@ void server_options(char **args, int *argc_p)
+@@ -2572,6 +2575,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.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -396,6 +396,7 @@ to the detailed description below for a complete description. verb(
+@@ -410,6 +410,7 @@ to the detailed description below for a complete description. verb(
--contimeout=SECONDS set daemon connection timeout in seconds
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -556,6 +557,12 @@ time to just looking for files that have changed in size. This is useful
+@@ -586,6 +587,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 (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -337,6 +337,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
+@@ -341,6 +341,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
unistd.h utime.h grp.h compat.h sys/param.h ctype.h sys/wait.h \
sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h \
sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
+ mysql/mysql.h sqlite3.h \
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
- popt.h popt/popt.h linux/falloc.h)
-@@ -1062,6 +1063,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+ popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h)
+@@ -1070,6 +1071,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
fi
fi
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
-@@ -2138,6 +2140,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2145,6 +2147,9 @@ void generate_files(int f_out, const char *local_name)
: "enabled");
}
extern char *shell_cmd;
extern char *batch_name;
extern char *password_file;
-@@ -1620,6 +1622,9 @@ int main(int argc,char *argv[])
+@@ -1619,6 +1621,9 @@ int main(int argc,char *argv[])
exit_cleanup(RERR_SYNTAX);
}
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -668,6 +675,7 @@ void usage(enum logcode F)
+@@ -669,6 +676,7 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -950,6 +958,7 @@ static struct poptOption long_options[] = {
+@@ -951,6 +959,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 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -323,6 +323,7 @@ to the detailed description below for a complete description. verb(
+@@ -337,6 +337,7 @@ to the detailed description below for a complete description. verb(
-q, --quiet suppress non-error messages
--no-motd suppress daemon-mode MOTD (see caveat)
-c, --checksum skip based on checksum, not mod-time & size
-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
-@@ -589,6 +590,47 @@ option's before-the-transfer "Does this file need to be updated?" check.
+@@ -619,6 +620,47 @@ option's before-the-transfer "Does this file need to be updated?" check.
For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
MD5. For older protocols, the checksum used is MD4.
diff = u_strcmp(fmid->basename, f->basename);
if (diff == 0) {
good_match = mid;
-@@ -1847,6 +1849,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1848,6 +1850,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp = partialptr;
fnamecmp_type = FNAMECMP_PARTIAL_DIR;
statret = 0;
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -757,6 +757,8 @@ void usage(enum logcode F)
+@@ -758,6 +758,8 @@ void usage(enum logcode F)
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");
rprintf(F," --detect-renamed try to find renamed files to speed up the transfer\n");
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");
-@@ -956,7 +958,9 @@ static struct poptOption long_options[] = {
+@@ -957,7 +959,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_VAL, &fuzzy_basis, 1, 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2558,8 +2562,14 @@ void server_options(char **args, int *argc_p)
+@@ -2559,8 +2563,14 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -400,6 +400,8 @@ to the detailed description below for a complete description. verb(
+@@ -414,6 +414,8 @@ to the detailed description below for a complete description. verb(
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy 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 received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -1738,6 +1740,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
+@@ -1768,6 +1770,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
static void send_directory(int f, struct file_list *flist,
char *fbuf, int len, int flags);
-@@ -2545,6 +2587,25 @@ struct file_list *recv_file_list(int f)
+@@ -2550,6 +2592,25 @@ struct file_list *recv_file_list(int f)
flist_sort_and_clean(flist, relative_paths);
static int phase = 0;
static int dflt_perms;
-@@ -1388,9 +1530,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1389,9 +1531,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
else if (delete_during && f_out != -1 && !phase
&& !(file->flags & FLAG_MISSING_DIR)) {
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
goto cleanup;
-@@ -1651,8 +1796,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1652,8 +1797,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
#endif
rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
full_fname(fname));
goto cleanup;
-@@ -2119,6 +2270,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2126,6 +2277,12 @@ void generate_files(int f_out, const char *local_name)
if (DEBUG_GTE(GENR, 1))
- rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
+ rprintf(FINFO, "generator starting pid=%d\n", (int)getpid());
+ if (detect_renamed) {
+ delayed_bits = bitbag_create(cur_flist->used);
if (delete_before && !solo_file && cur_flist->used > 0)
do_delete_pass();
if (delete_during == 2) {
-@@ -2129,7 +2286,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2136,7 +2293,7 @@ void generate_files(int f_out, const char *local_name)
}
info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
whole_file = 0;
if (DEBUG_GTE(FLIST, 1)) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -2165,7 +2322,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2172,7 +2329,7 @@ void generate_files(int f_out, const char *local_name)
dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
} else
dirdev = MAKEDEV(0, 0);
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
-@@ -2212,7 +2369,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2219,7 +2376,21 @@ void generate_files(int f_out, const char *local_name)
} while ((cur_flist = cur_flist->next) != NULL);
if (delete_during)
int implied_dirs = 1;
int missing_args = 0; /* 0 = FERROR_XFER, 1 = ignore, 2 = delete */
int numeric_ids = 0;
-@@ -755,6 +756,7 @@ void usage(enum logcode F)
+@@ -756,6 +757,7 @@ void usage(enum logcode F)
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\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");
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");
-@@ -954,6 +956,7 @@ static struct poptOption long_options[] = {
+@@ -955,6 +957,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_VAL, &fuzzy_basis, 1, 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2181,7 +2184,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2182,7 +2185,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -2190,6 +2193,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2191,6 +2194,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;
}
-@@ -2554,6 +2558,8 @@ void server_options(char **args, int *argc_p)
+@@ -2555,6 +2559,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -399,6 +399,7 @@ to the detailed description below for a complete description. verb(
+@@ -413,6 +413,7 @@ to the detailed description below for a complete description. verb(
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
--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
-@@ -1722,6 +1723,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1752,6 +1753,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int human_readable;
extern int ignore_existing;
extern int ignore_non_existing;
-@@ -1593,6 +1594,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1594,6 +1595,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
fnamecmp_type = FNAMECMP_FNAME;
if (statret == 0 && !S_ISREG(sx.st.st_mode)) {
-@@ -2025,6 +2033,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2032,6 +2040,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
ignore_existing = -ignore_existing;
ignore_non_existing = -ignore_non_existing;
update_only = -update_only;
always_checksum = -always_checksum;
size_only = -size_only;
append_mode = -append_mode;
-@@ -2050,6 +2059,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2057,6 +2066,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
ignore_existing = -ignore_existing;
ignore_non_existing = -ignore_non_existing;
update_only = -update_only;
int cvs_exclude = 0;
int dry_run = 0;
int do_xfers = 1;
-@@ -677,6 +678,7 @@ void usage(enum logcode F)
+@@ -678,6 +679,7 @@ void usage(enum logcode F)
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");
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");
-@@ -907,6 +909,7 @@ static struct poptOption long_options[] = {
+@@ -908,6 +910,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
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -593,7 +593,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
+@@ -592,6 +592,7 @@ AC_FUNC_UTIME_NULL
+ AC_FUNC_ALLOCA
+ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
+ fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
++ chflags \
+ memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \
+ strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
- seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
- extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
-- initgroups utimensat posix_fallocate)
-+ initgroups utimensat posix_fallocate chflags)
-
- dnl cygwin iconv.h defines iconv_open as libiconv_open
- if test x"$ac_cv_func_iconv_open" != x"yes"; then
diff --git a/delete.c b/delete.c
--- a/delete.c
+++ b/delete.c
if (statret != 0 && basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
itemizing, code);
-@@ -1365,10 +1380,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
- /* We need to ensure that the dirs in the transfer have writable
- * permissions during the time we are putting files within them.
- * This is then fixed after the transfer is done. */
+@@ -1366,10 +1381,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+ * readable and writable permissions during the time we are
+ * putting files within them. This is then restored to the
+ * former permissions after the transfer is done. */
+#ifdef SUPPORT_FORCE_CHANGE
+ if (force_change && F_FFLAGS(file) & force_change
+ && make_mutable(fname, file->mode, F_FFLAGS(file), force_change))
+ need_retouch_dir_perms = 1;
+#endif
#ifdef HAVE_CHMOD
- if (!am_root && !(file->mode & S_IWUSR) && dir_tweaking) {
- mode_t mode = file->mode | S_IWUSR;
+ if (!am_root && (file->mode & S_IRWXU) != S_IRWXU && dir_tweaking) {
+ mode_t mode = file->mode | S_IRWXU;
- if (do_chmod(fname, mode) < 0) {
+ if (do_chmod(fname, mode, 0) < 0) {
rsyserr(FERROR_XFER, errno,
"failed to modify permissions on %s",
full_fname(fname));
-@@ -1403,6 +1423,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1404,6 +1424,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms,
exists);
}
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -1982,13 +2006,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1983,13 +2007,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
continue;
fname = f_name(file, NULL);
if (fix_dir_perms)
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
-@@ -731,7 +731,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -729,7 +729,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
extern int dry_run;
extern int list_only;
-@@ -834,6 +837,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -836,6 +839,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
* points to an identical file won't be replaced by the referent. */
copy_links = copy_dirlinks = copy_unsafe_links = 0;
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -690,6 +696,9 @@ void usage(enum logcode F)
+@@ -691,6 +697,9 @@ void usage(enum logcode F)
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n");
#ifdef SUPPORT_ACLS
-@@ -735,7 +744,12 @@ void usage(enum logcode F)
+@@ -736,7 +745,12 @@ void usage(enum logcode F)
rprintf(F," --ignore-missing-args ignore missing source args without error\n");
rprintf(F," --delete-missing-args delete missing source args from destination\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
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");
-@@ -848,6 +862,10 @@ static struct poptOption long_options[] = {
+@@ -849,6 +863,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 },
-@@ -934,6 +952,14 @@ static struct poptOption long_options[] = {
+@@ -935,6 +953,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 },
-@@ -2461,6 +2487,9 @@ void server_options(char **args, int *argc_p)
+@@ -2462,6 +2488,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;
-@@ -2548,6 +2577,16 @@ void server_options(char **args, int *argc_p)
+@@ -2549,6 +2578,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -345,6 +345,7 @@ to the detailed description below for a complete description. verb(
+@@ -359,6 +359,7 @@ to the detailed description below for a complete description. verb(
-K, --keep-dirlinks treat symlinked dir on receiver as dir
-H, --hard-links preserve hard links
-p, --perms preserve permissions
-E, --executability preserve executability
--chmod=CHMOD affect file and/or directory permissions
-A, --acls preserve ACLs (implies -p)
-@@ -380,7 +381,10 @@ to the detailed description below for a complete description. verb(
+@@ -394,7 +395,10 @@ to the detailed description below for a complete description. verb(
--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
-@@ -597,7 +601,8 @@ specified, in which case bf(-r) is not implied.
+@@ -627,7 +631,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-":
-@@ -896,7 +901,7 @@ they would be using bf(--copy-links).
+@@ -926,7 +931,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.
-@@ -1059,6 +1064,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those
+@@ -1089,6 +1094,29 @@ Note that this option does not copy rsyncs 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
-@@ -1377,12 +1405,13 @@ display as a "*missing" entry in the bf(--list-only) output.
+@@ -1407,12 +1435,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
-@@ -1976,7 +2005,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -2006,7 +2035,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.
-@@ -2032,7 +2061,7 @@ quote(itemization(
+@@ -2062,7 +2091,7 @@ quote(itemization(
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
diff --git a/xattrs.c b/xattrs.c
--- a/xattrs.c
+++ b/xattrs.c
-@@ -1042,7 +1042,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1043,7 +1043,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
| (S_ISDIR(fst.st_mode) ? 0700 : 0600);
if (fst.st_mode != mode)
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
case 'p':
rule->rflags |= FILTRULE_PERISHABLE;
break;
-@@ -1275,6 +1396,23 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
+@@ -1271,6 +1392,23 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
else if (am_sender)
return NULL;
}
file->mode = tweak_mode(file->mode, chmod_modes);
if (f >= 0) {
-@@ -2297,7 +2318,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2302,7 +2323,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) {
-@@ -2311,7 +2332,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2316,7 +2337,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
-@@ -1081,6 +1081,8 @@ quote(--chmod=D2775,F664)
+@@ -1111,6 +1111,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.
-@@ -1933,6 +1935,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
+@@ -1963,6 +1965,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.
-@@ -2780,6 +2786,15 @@ itemization(
+@@ -2810,6 +2816,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.
)
manpagesection(MERGE-FILE FILTER RULES)
-@@ -2841,6 +2856,12 @@ itemization(
+@@ -2871,6 +2886,12 @@ itemization(
a rule prefix such as bf(hide)).
)
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
-@@ -743,6 +744,7 @@ void usage(enum logcode F)
+@@ -744,6 +745,7 @@ void usage(enum logcode F)
rprintf(F," --partial-dir=DIR put a partially transferred file into DIR\n");
rprintf(F," --delay-updates put all updated files into place at transfer's end\n");
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");
rprintf(F," --groupmap=STRING custom groupname mapping\n");
-@@ -1005,6 +1007,7 @@ static struct poptOption long_options[] = {
+@@ -1006,6 +1008,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 },
-@@ -2633,6 +2636,9 @@ void server_options(char **args, int *argc_p)
+@@ -2634,6 +2637,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = tmpdir;
}
extern int preserve_links;
extern int preserve_devices;
extern int preserve_specials;
-@@ -1404,6 +1405,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
- && make_mutable(fname, file->mode, F_FFLAGS(file), force_change))
- need_retouch_dir_perms = 1;
- #endif
-+
- #ifdef HAVE_CHMOD
- if (!am_root && !(file->mode & S_IWUSR) && dir_tweaking) {
- mode_t mode = file->mode | S_IWUSR;
-@@ -1681,6 +1683,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1682,6 +1683,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fname, fnamecmpbuf);
}
sx.st.st_size = F_LENGTH(fuzzy_file);
statret = 0;
fnamecmp = fnamecmpbuf;
fnamecmp_type = FNAMECMP_FUZZY;
-@@ -1856,6 +1866,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1857,6 +1866,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
if (read_batch)
goto cleanup;
int preserve_perms = 0;
int preserve_fileflags = 0;
int preserve_executability = 0;
-@@ -708,6 +709,10 @@ void usage(enum logcode F)
+@@ -709,6 +710,10 @@ void usage(enum logcode F)
#ifdef SUPPORT_XATTRS
rprintf(F," -X, --xattrs preserve extended attributes\n");
#endif
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
-@@ -965,6 +970,12 @@ static struct poptOption long_options[] = {
+@@ -966,6 +971,12 @@ static struct poptOption long_options[] = {
{"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 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -1913,6 +1924,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1914,6 +1925,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -2497,6 +2517,11 @@ void server_options(char **args, int *argc_p)
+@@ -2498,6 +2518,11 @@ void server_options(char **args, int *argc_p)
if (preserve_fileflags)
args[ac++] = "--fileflags";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -350,6 +350,8 @@ to the detailed description below for a complete description. verb(
+@@ -364,6 +364,8 @@ to the detailed description below for a complete description. verb(
--chmod=CHMOD affect file and/or directory permissions
-A, --acls preserve ACLs (implies -p)
-X, --xattrs preserve extended attributes
-o, --owner preserve owner (super-user only)
-g, --group preserve group
--devices preserve device files (super-user only)
-@@ -1088,6 +1090,42 @@ flags on files and directories that are being updated or deleted on the
+@@ -1118,6 +1120,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-schange).
typedef struct {
char *datum, *name;
size_t datum_len, name_len;
-@@ -164,8 +180,7 @@ static ssize_t get_xattr_names(const char *fname)
+@@ -167,8 +183,7 @@ static ssize_t get_xattr_names(const char *fname)
/* On entry, the *len_ptr parameter contains the size of the extra space we
* should allocate when we create a buffer for the data. On exit, it contains
* the length of the datum. */
{
size_t datum_len = sys_lgetxattr(fname, name, NULL, 0);
size_t extra_len = *len_ptr;
-@@ -174,7 +189,7 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
+@@ -177,7 +192,7 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
*len_ptr = datum_len;
if (datum_len == (size_t)-1) {
return NULL;
rsyserr(FERROR_XFER, errno,
"get_xattr_data: lgetxattr(\"%s\",\"%s\",0) failed",
-@@ -182,6 +197,15 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
+@@ -185,6 +200,15 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
return NULL;
}
if (!datum_len && !extra_len)
extra_len = 1; /* request non-zero amount of memory */
if (datum_len + extra_len < datum_len)
-@@ -210,7 +234,29 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
+@@ -213,7 +237,29 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
return ptr;
}
{
ssize_t list_len, name_len;
size_t datum_len, name_offset;
-@@ -219,7 +265,8 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -222,7 +268,8 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
int user_only = am_sender ? 0 : !am_root;
#endif
rsync_xa *rxa;
/* This puts the name list into the "namebuf" buffer. */
if ((list_len = get_xattr_names(fname)) < 0)
-@@ -249,20 +296,22 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -252,20 +299,22 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
}
datum_len = name_len; /* Pass extra size to get_xattr_data() */
} else
name_offset = datum_len;
-@@ -307,7 +356,7 @@ int get_xattr(const char *fname, stat_x *sxp)
+@@ -310,7 +359,7 @@ int get_xattr(const char *fname, stat_x *sxp)
return 0;
}
free_xattr(sxp);
return -1;
}
-@@ -342,6 +391,8 @@ int copy_xattrs(const char *source, const char *dest)
+@@ -345,6 +394,8 @@ int copy_xattrs(const char *source, const char *dest)
datum_len = 0;
if (!(ptr = get_xattr_data(source, name, &datum_len, 0)))
return -1;
if (sys_lsetxattr(dest, name, ptr, datum_len) < 0) {
int save_errno = errno ? errno : EINVAL;
rsyserr(FERROR_XFER, errno,
-@@ -358,6 +409,10 @@ int copy_xattrs(const char *source, const char *dest)
+@@ -361,6 +412,10 @@ int copy_xattrs(const char *source, const char *dest)
static int find_matching_xattr(item_list *xalp)
{
size_t i, j;
item_list *lst = rsync_xal_l.items;
-@@ -391,6 +446,7 @@ static int find_matching_xattr(item_list *xalp)
+@@ -394,6 +449,7 @@ static int find_matching_xattr(item_list *xalp)
}
return -1;
}
/* Store *xalp on the end of rsync_xal_l */
-@@ -570,11 +626,13 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -573,11 +629,13 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
/* Re-read the long datum. */
if (!(ptr = get_xattr_data(fname, rxa->name, &len, 0))) {
write_varint(f_out, len); /* length might have changed! */
write_buf(f_out, ptr, len);
free(ptr);
-@@ -792,7 +850,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -793,7 +851,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
int user_only = am_root <= 0;
#endif
size_t name_len;
/* This puts the current name list into the "namebuf" buffer. */
if ((list_len = get_xattr_names(fname)) < 0)
-@@ -804,7 +862,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -805,7 +863,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
if (XATTR_ABBREV(rxas[i])) {
/* See if the fnamecmp version is identical. */
len = name_len = rxas[i].name_len;
still_abbrev:
if (am_generator)
continue;
-@@ -813,14 +874,14 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -814,14 +875,14 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
ret = -1;
continue;
}
if (memcmp(sum, rxas[i].datum + 1, MAX_DIGEST_LEN) != 0) {
free(ptr);
goto still_abbrev;
-@@ -889,6 +950,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -890,6 +951,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
}
}
return ret;
}
-@@ -935,7 +1000,7 @@ char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p)
+@@ -936,7 +1001,7 @@ char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p)
{
const char *name = is_access_acl ? XACC_ACL_ATTR : XDEF_ACL_ATTR;
*len_p = 0; /* no extra data alloc needed from get_xattr_data() */
}
int set_xattr_acl(const char *fname, int is_access_acl, const char *buf, size_t buf_len)
-@@ -1078,11 +1143,33 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1079,11 +1144,33 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
return 0;
}
return ret;
}
-@@ -1091,6 +1178,9 @@ int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
+@@ -1092,6 +1179,9 @@ int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
int ret = do_lstat(fname, fst);
if ((ret < 0 || get_stat_xattr(fname, -1, fst, xst) < 0) && xst)
xst->st_mode = 0;
return ret;
}
-@@ -1099,6 +1189,9 @@ int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst)
+@@ -1100,6 +1190,9 @@ int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst)
int ret = do_fstat(fd, fst);
if ((ret < 0 || get_stat_xattr(NULL, fd, fst, xst) < 0) && xst)
xst->st_mode = 0;
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
extern int ignore_errors;
extern int numeric_ids;
extern int recurse;
-@@ -3007,6 +3008,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3012,6 +3013,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;
-@@ -3117,7 +3119,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3122,7 +3124,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
}
int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
-@@ -772,6 +773,7 @@ void usage(enum logcode F)
+@@ -773,6 +774,7 @@ void usage(enum logcode F)
rprintf(F," --files-from=FILE read list of source-file names from FILE\n");
rprintf(F," -0, --from0 all *-from/filter files are delimited by 0s\n");
rprintf(F," -s, --protect-args no space-splitting; only wildcard special-chars\n");
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");
-@@ -990,6 +992,8 @@ static struct poptOption long_options[] = {
+@@ -991,6 +993,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},
-@@ -2583,6 +2587,9 @@ void server_options(char **args, int *argc_p)
+@@ -2584,6 +2588,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -416,6 +416,7 @@ to the detailed description below for a complete description. verb(
+@@ -430,6 +430,7 @@ to the detailed description below for a complete description. verb(
--files-from=FILE read list of source-file names from FILE
-0, --from0 all *from/filter files are delimited by 0s
-s, --protect-args no space-splitting; wildcard chars only
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -1680,6 +1681,10 @@ default (with is overridden by both the environment and the command-line).
+@@ -1710,6 +1711,10 @@ default (with is overridden by both the environment and the command-line).
This option will eventually become a new default setting at some
as-yet-undetermined point in the future.
./configure
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
char *config_file = NULL;
char *shell_cmd = NULL;
char *logfile_name = NULL;
-@@ -758,6 +759,7 @@ void usage(enum logcode F)
+@@ -759,6 +760,7 @@ void usage(enum logcode F)
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");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," --compress-level=NUM explicitly set compression level\n");
rprintf(F," --skip-compress=LIST skip compressing files with a suffix in LIST\n");
-@@ -810,7 +812,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -811,7 +813,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-@@ -954,6 +956,7 @@ static struct poptOption long_options[] = {
+@@ -955,6 +957,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_VAL, &fuzzy_basis, 1, 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -1780,6 +1783,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1781,6 +1784,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. */
-@@ -2662,6 +2680,11 @@ void server_options(char **args, int *argc_p)
+@@ -2663,6 +2681,11 @@ void server_options(char **args, int *argc_p)
} else if (inplace)
args[ac++] = "--inplace";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -402,6 +402,7 @@ to the detailed description below for a complete description. verb(
+@@ -416,6 +416,7 @@ to the detailed description below for a complete description. verb(
--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
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -706,6 +707,7 @@ void usage(enum logcode F)
+@@ -707,6 +708,7 @@ void usage(enum logcode F)
rprintf(F," -t, --times preserve modification times\n");
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");
#ifdef SUPPORT_XATTRS
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
-@@ -864,6 +866,7 @@ static struct poptOption long_options[] = {
+@@ -865,6 +867,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", 0, 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 },
-@@ -2090,6 +2093,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2091,6 +2094,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)
-@@ -2341,6 +2347,8 @@ void server_options(char **args, int *argc_p)
+@@ -2342,6 +2348,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'O';
if (omit_link_times)
argstr[x++] = 'J';
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -357,6 +357,7 @@ to the detailed description below for a complete description. verb(
+@@ -371,6 +371,7 @@ to the detailed description below for a complete description. verb(
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1134,6 +1135,10 @@ This option is inferred if you use bf(--backup) without bf(--backup-dir).
+@@ -1164,6 +1165,10 @@ This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(-J, --omit-link-times)) This tells rsync to omit symlinks when
it is preserving modification times (see bf(--times)).
./configure
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -320,6 +320,25 @@ if test x"$enable_locale" != x"no"; then
+@@ -324,6 +324,25 @@ if test x"$enable_locale" != x"no"; then
AC_DEFINE(CONFIG_LOCALE)
fi
/* Wait for a process to exit, calling io_flush while waiting. */
static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
{
-@@ -808,6 +857,11 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[])
+@@ -806,6 +855,11 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[])
argv[0] = ".";
}
+#endif
+
flist = send_file_list(f_out,argc,argv);
- if (!flist || flist->used == 0)
- exit_cleanup(0);
-@@ -928,6 +982,10 @@ static int do_recv(int f_in, int f_out, char *local_name)
+ if (!flist || flist->used == 0) {
+ /* Make sure input buffering is off so we can't hang in noop_io_until_death(). */
+@@ -930,6 +984,10 @@ static int do_recv(int f_in, int f_out, char *local_name)
io_start_buffering_out(f_out);
io_start_multiplex_in(f_in);
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -797,6 +809,13 @@ void usage(enum logcode F)
+@@ -798,6 +810,13 @@ void usage(enum logcode F)
#endif
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
+ rprintf(F," --ssl-ca-certs=FILE path to trusted CA certificates\n");
+#endif
rprintf(F," --version print version number\n");
- rprintf(F,"(-h) --help show this help (-h works with no other options)\n");
+ rprintf(F,"(-h) --help show this help (-h is --help only if used alone)\n");
-@@ -810,7 +829,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -811,7 +830,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-@@ -1029,6 +1048,13 @@ static struct poptOption long_options[] = {
+@@ -1030,6 +1049,13 @@ static struct poptOption long_options[] = {
{"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 },
/* All the following options switch us into daemon-mode option-parsing. */
{"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
-@@ -1056,6 +1082,13 @@ static void daemon_usage(enum logcode F)
+@@ -1057,6 +1083,13 @@ static void daemon_usage(enum logcode F)
rprintf(F," -v, --verbose increase verbosity\n");
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
rprintf(F," --help show this help screen\n");
rprintf(F,"\n");
-@@ -1081,6 +1114,13 @@ static struct poptOption long_daemon_options[] = {
+@@ -1082,6 +1115,13 @@ static struct poptOption long_daemon_options[] = {
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
{"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
-@@ -1376,6 +1416,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1377,6 +1417,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
verbose++;
break;
default:
rprintf(FERROR,
"rsync: %s: %s (in daemon mode)\n",
-@@ -1402,6 +1448,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1403,6 +1449,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
exit_cleanup(RERR_SYNTAX);
}
*argv_p = argv = poptGetArgs(pc);
*argc_p = argc = count_args(argv);
am_starting_up = 0;
-@@ -1780,6 +1837,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1781,6 +1838,12 @@ 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. */
-@@ -2184,6 +2247,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2185,6 +2248,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (delay_updates && !partial_dir)
partial_dir = tmp_partialdir;
if (inplace) {
#ifdef HAVE_FTRUNCATE
if (partial_dir) {
-@@ -2779,9 +2853,18 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
+@@ -2780,9 +2854,18 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
{
char *path;
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
size_t bwlimit_writemax = 0;
int ignore_existing = 0;
int ignore_non_existing = 0;
-@@ -788,6 +789,7 @@ void usage(enum logcode F)
+@@ -789,6 +790,7 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read daemon-access password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=RATE limit socket I/O bandwidth\n");
rprintf(F," --write-batch=FILE write a batched update to FILE\n");
rprintf(F," --only-write-batch=FILE like --write-batch but w/o updating destination\n");
rprintf(F," --read-batch=FILE read a batched update from FILE\n");
-@@ -980,6 +982,7 @@ static struct poptOption long_options[] = {
+@@ -981,6 +983,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
--- a/clientserver.c
+++ b/clientserver.c
@@ -1202,6 +1202,13 @@ int daemon_main(void)
- * address too. In fact, why not just do inet_ntop on the
+ * address too. In fact, why not just do getnameinfo on the
* local address??? */
+#ifdef HAVE_LIBSLP
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -723,6 +723,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -727,6 +727,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
fi
diff --git a/socket.c b/socket.c
--- a/socket.c
+++ b/socket.c
-@@ -533,6 +533,16 @@ void start_accept_loop(int port, int (*fn)(int, int))
+@@ -544,6 +544,16 @@ void start_accept_loop(int port, int (*fn)(int, int))
{
fd_set deffds;
int *sp, maxfd, i;
#ifdef HAVE_SIGACTION
sigact.sa_flags = SA_NOCLDSTOP;
-@@ -561,14 +571,25 @@ void start_accept_loop(int port, int (*fn)(int, int))
+@@ -572,14 +582,25 @@ void start_accept_loop(int port, int (*fn)(int, int))
maxfd = sp[i];
}
/* close log file before the potentially very long select so
* file can be trimmed by another process instead of growing
-@@ -581,7 +602,18 @@ void start_accept_loop(int port, int (*fn)(int, int))
+@@ -592,7 +613,18 @@ void start_accept_loop(int port, int (*fn)(int, int))
fds = deffds;
#endif
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
/**
* If 1, send the whole file as literal data rather than trying to
-@@ -725,6 +726,7 @@ void usage(enum logcode F)
+@@ -726,6 +727,7 @@ void usage(enum logcode F)
rprintf(F," --existing skip creating new files on receiver\n");
rprintf(F," --ignore-existing skip updating files that already exist on receiver\n");
rprintf(F," --remove-source-files sender removes synchronized files (non-dirs)\n");
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");
-@@ -983,6 +985,7 @@ static struct poptOption long_options[] = {
+@@ -984,6 +986,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 },
-@@ -2562,6 +2565,8 @@ void server_options(char **args, int *argc_p)
+@@ -2563,6 +2566,8 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -370,6 +370,7 @@ to the detailed description below for a complete description. verb(
+@@ -384,6 +384,7 @@ to the detailed description below for a complete description. verb(
--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
-@@ -1274,6 +1275,14 @@ bf(--exclude='*.new') for the rsync transfer).
+@@ -1304,6 +1305,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
-@@ -752,6 +755,7 @@ void usage(enum logcode F)
+@@ -753,6 +756,7 @@ void usage(enum logcode F)
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
rprintf(F," -M, --remote-option=OPTION send OPTION to the remote side only\n");
rprintf(F," --size-only skip files that match in size\n");
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\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");
-@@ -791,6 +795,8 @@ void usage(enum logcode F)
+@@ -792,6 +796,8 @@ void usage(enum logcode F)
rprintf(F," --write-batch=FILE write a batched update to FILE\n");
rprintf(F," --only-write-batch=FILE like --write-batch but w/o updating destination\n");
rprintf(F," --read-batch=FILE read a batched update from FILE\n");
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");
-@@ -903,6 +909,7 @@ static struct poptOption long_options[] = {
+@@ -904,6 +910,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 },
-@@ -1024,6 +1031,8 @@ static struct poptOption long_options[] = {
+@@ -1025,6 +1032,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 },
{"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 },
-@@ -2225,6 +2234,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2226,6 +2235,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -2571,6 +2590,25 @@ void server_options(char **args, int *argc_p)
+@@ -2572,6 +2591,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -396,6 +396,7 @@ to the detailed description below for a complete description. verb(
+@@ -410,6 +410,7 @@ to the detailed description below for a complete description. verb(
--contimeout=SECONDS set daemon connection timeout in seconds
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -436,6 +437,8 @@ to the detailed description below for a complete description. verb(
+@@ -450,6 +451,8 @@ to the detailed description below for a complete description. verb(
--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)
-@@ -2444,6 +2447,33 @@ file previously generated by bf(--write-batch).
+@@ -2474,6 +2477,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
int preallocate_files = 0;
int do_compression = 0;
int def_compress_level = Z_DEFAULT_COMPRESSION;
-@@ -711,6 +712,7 @@ void usage(enum logcode F)
+@@ -712,6 +713,7 @@ void usage(enum logcode F)
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
#endif
rprintf(F," -S, --sparse handle sparse files efficiently\n");
#ifdef SUPPORT_PREALLOCATION
rprintf(F," --preallocate allocate dest files before writing them\n");
#else
-@@ -915,6 +917,7 @@ static struct poptOption long_options[] = {
+@@ -916,6 +918,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 },
-@@ -2494,6 +2497,12 @@ void server_options(char **args, int *argc_p)
+@@ -2495,6 +2498,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -360,6 +360,7 @@ to the detailed description below for a complete description. verb(
+@@ -374,6 +374,7 @@ to the detailed description below for a complete description. verb(
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
--preallocate allocate dest files before writing
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-@@ -1190,6 +1191,15 @@ filesystem, but with this option rsync will probably copy more slowly. If the
+@@ -1220,6 +1221,15 @@ filesystem, but with this option rsync will probably copy more slowly. If the
destination is not an extent-supporting filesystem (such as ext4, xfs, NTFS,
etc.), this option may have no positive effect at all.
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
static char *bwlimit_arg, *max_size_arg, *min_size_arg;
static char tmp_partialdir[] = ".~tmp~";
-@@ -788,6 +789,7 @@ void usage(enum logcode F)
+@@ -789,6 +790,7 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read daemon-access password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=RATE limit socket I/O bandwidth\n");
rprintf(F," --write-batch=FILE write a batched update to FILE\n");
rprintf(F," --only-write-batch=FILE like --write-batch but w/o updating destination\n");
rprintf(F," --read-batch=FILE read a batched update from FILE\n");
-@@ -1024,6 +1026,7 @@ static struct poptOption long_options[] = {
+@@ -1025,6 +1027,7 @@ 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 },
{"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 },
-@@ -1809,6 +1812,13 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1810,6 +1813,13 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
./configure (optional if already run)
make
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
int max_delete = INT_MIN;
OFF_T max_size = 0;
OFF_T min_size = 0;
-@@ -788,6 +789,8 @@ void usage(enum logcode F)
+@@ -789,6 +790,8 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read daemon-access password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=RATE limit socket I/O bandwidth\n");
rprintf(F," --write-batch=FILE write a batched update to FILE\n");
rprintf(F," --only-write-batch=FILE like --write-batch but w/o updating destination\n");
rprintf(F," --read-batch=FILE read a batched update from FILE\n");
-@@ -812,6 +815,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -813,6 +816,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,
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -1005,6 +1009,8 @@ static struct poptOption long_options[] = {
+@@ -1006,6 +1010,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 },
-@@ -1780,6 +1786,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1781,6 +1787,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. */
-@@ -2506,6 +2542,15 @@ void server_options(char **args, int *argc_p)
+@@ -2507,6 +2543,15 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -433,6 +433,8 @@ to the detailed description below for a complete description. verb(
+@@ -447,6 +447,8 @@ to the detailed description below for a complete description. verb(
--password-file=FILE read daemon-access password from FILE
--list-only list the files instead of copying them
--bwlimit=RATE limit socket I/O bandwidth
--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
-@@ -2418,6 +2420,19 @@ files can show up as being rapidly sent when the data is quickly buffered,
+@@ -2448,6 +2450,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
if (*thisname)
clean_fname(thisname, 0);
-@@ -2431,6 +2455,15 @@ struct file_list *recv_file_list(int f)
+@@ -2436,6 +2460,15 @@ struct file_list *recv_file_list(int f)
parse_name_map(usermap, True);
if (groupmap)
parse_name_map(groupmap, False);
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -795,6 +796,7 @@ void usage(enum logcode F)
+@@ -796,6 +797,7 @@ void usage(enum logcode F)
#ifdef ICONV_OPTION
rprintf(F," --iconv=CONVERT_SPEC request charset conversion of filenames\n");
#endif
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
rprintf(F," --version print version number\n");
-@@ -1012,6 +1014,7 @@ static struct poptOption long_options[] = {
+@@ -1013,6 +1015,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 },
-@@ -2271,6 +2274,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2272,6 +2275,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
am_starting_up = 0;
return 1;
-@@ -2682,6 +2703,12 @@ void server_options(char **args, int *argc_p)
+@@ -2683,6 +2704,12 @@ void server_options(char **args, int *argc_p)
if (fuzzy_basis && am_sender)
args[ac++] = "--fuzzy";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -438,6 +438,7 @@ to the detailed description below for a complete description. verb(
+@@ -452,6 +452,7 @@ to the detailed description below for a complete description. verb(
--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)
-4, --ipv4 prefer IPv4
-6, --ipv6 prefer IPv6
-@@ -2482,6 +2483,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2512,6 +2513,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: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
This patch has not yet been tested by me (Wayne), but was provided
Darryl Dixon. Thanks!
-based-on: a59a7b242393699fedeb4f66911e3fc9b4fadd73
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int preserve_specials;
extern int preserve_hard_links;
extern int preserve_executability;
-@@ -1595,7 +1596,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1596,7 +1597,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp_type = FNAMECMP_FNAME;
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
-@@ -701,6 +702,7 @@ void usage(enum logcode F)
+@@ -702,6 +703,7 @@ void usage(enum logcode F)
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
-@@ -878,6 +880,7 @@ static struct poptOption long_options[] = {
+@@ -879,6 +881,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 },
{"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 },
{"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 },
{"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 },
-@@ -1780,6 +1783,11 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1781,6 +1784,11 @@ 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. */
-@@ -2679,6 +2687,9 @@ void server_options(char **args, int *argc_p)
+@@ -2680,6 +2688,9 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
#define RSYNC_XAL_INITIAL 5
#define RSYNC_XAL_LIST_INITIAL 100
-@@ -252,7 +254,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -255,7 +257,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
if (!(ptr = get_xattr_data(fname, name, &datum_len, 0)))
return -1;
/* For large datums, we store a flag and a checksum. */
name_offset = 1 + MAX_DIGEST_LEN;
sum_init(checksum_seed);
-@@ -374,7 +376,7 @@ static int find_matching_xattr(item_list *xalp)
+@@ -377,7 +379,7 @@ static int find_matching_xattr(item_list *xalp)
|| rxas1[j].datum_len != rxas2[j].datum_len
|| strcmp(rxas1[j].name, rxas2[j].name))
break;
if (memcmp(rxas1[j].datum + 1,
rxas2[j].datum + 1,
MAX_DIGEST_LEN) != 0)
-@@ -411,13 +413,22 @@ int send_xattr(int f, stat_x *sxp)
+@@ -414,13 +416,22 @@ int send_xattr(int f, stat_x *sxp)
{
int ndx = find_matching_xattr(sxp->xattr);
for (rxa = sxp->xattr->items; count--; rxa++) {
size_t name_len = rxa->name_len;
const char *name = rxa->name;
-@@ -436,8 +447,8 @@ int send_xattr(int f, stat_x *sxp)
+@@ -439,8 +450,8 @@ int send_xattr(int f, stat_x *sxp)
name_len += UPRE_LEN;
}
#endif
#ifndef HAVE_LINUX_XATTRS
if (name_len > rxa->name_len) {
write_buf(f, USER_PREFIX, UPRE_LEN);
-@@ -445,7 +456,7 @@ int send_xattr(int f, stat_x *sxp)
+@@ -448,7 +459,7 @@ int send_xattr(int f, stat_x *sxp)
}
#endif
write_buf(f, name, name_len);
write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
else
write_buf(f, rxa->datum, rxa->datum_len);
-@@ -495,7 +506,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
+@@ -498,7 +509,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
cmp = rec_cnt ? strcmp(snd_rxa->name, rec_rxa->name) : -1;
if (cmp > 0)
same = 0;
same = cmp == 0 && snd_rxa->datum_len == rec_rxa->datum_len
&& memcmp(snd_rxa->datum + 1, rec_rxa->datum + 1,
MAX_DIGEST_LEN) == 0;
-@@ -540,6 +551,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -543,6 +554,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
int cnt, prior_req = 0;
rsync_xa *rxa;
lst += F_XATTR(file);
for (rxa = lst->items, cnt = lst->count; cnt--; rxa++) {
if (rxa->datum_len <= MAX_FULL_DATUM)
-@@ -596,6 +610,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -599,6 +613,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
rsync_xa *rxa;
int rel_pos, cnt, num, got_xattr_data = 0;
if (F_XATTR(file) < 0) {
rprintf(FERROR, "recv_xattr_request: internal data error!\n");
exit_cleanup(RERR_PROTOCOL);
-@@ -658,7 +675,22 @@ void receive_xattr(int f, struct file_struct *file)
+@@ -661,7 +678,22 @@ void receive_xattr(int f, struct file_struct *file)
#else
int need_sort = 1;
#endif
if (ndx < 0 || (size_t)ndx > rsync_xal_l.count) {
rprintf(FERROR, "receive_xattr: xa index %d out of"
-@@ -671,7 +703,7 @@ void receive_xattr(int f, struct file_struct *file)
+@@ -674,7 +706,7 @@ void receive_xattr(int f, struct file_struct *file)
return;
}
(void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
temp_xattr.count = 0;
}
-@@ -679,9 +711,10 @@ void receive_xattr(int f, struct file_struct *file)
+@@ -682,9 +714,10 @@ void receive_xattr(int f, struct file_struct *file)
for (num = 1; num <= count; num++) {
char *ptr, *name;
rsync_xa *rxa;