#ifdef ICONV_OPTION
int ic_ndx;
-@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -122,6 +123,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
+ if (preserve_atimes && !S_ISDIR(file->mode) && !S_ISLNK(file->mode)
+ && cmp_time(F_ATIME(file), sxp->st.st_atime) != 0)
+ iflags |= ITEM_REPORT_ATIME;
- #ifndef HAVE_LCHMOD
+ #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
@@ -884,6 +888,8 @@ static int try_dests_reg(struct file_str
{"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 },
-@@ -1717,6 +1722,8 @@ void server_options(char **args, int *ar
+@@ -1713,6 +1718,8 @@ void server_options(char **args, int *ar
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
diff = u_strcmp(fmid->basename, f->basename);
if (diff == 0) {
good_match = mid;
-@@ -1826,6 +1828,21 @@ static void recv_generator(char *fname,
+@@ -1831,6 +1833,21 @@ static void recv_generator(char *fname,
fnamecmp = partialptr;
fnamecmp_type = FNAMECMP_PARTIAL_DIR;
statret = 0;
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 },
{"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 },
-@@ -1895,8 +1899,14 @@ void server_options(char **args, int *ar
- }
- }
- /* Both sides need to know in case this disables incremental recursion. */
-- if (detect_renamed)
-- args[ac++] = "--detect-renamed";
-+ if (detect_renamed) {
-+ if (detect_renamed == 1)
-+ args[ac++] = "--detect-renamed";
-+ else if (detect_renamed == 2)
-+ args[ac++] = "--detect-renamed-lax";
-+ else
-+ args[ac++] = "--detect-moved";
-+ }
-
- if (modify_window_set) {
- if (asprintf(&arg, "--modify-window=%d", modify_window) < 0)
+@@ -1889,8 +1893,14 @@ void server_options(char **args, int *ar
+ args[ac++] = "--super";
+ if (size_only)
+ args[ac++] = "--size-only";
+- if (detect_renamed)
+- args[ac++] = "--detect-renamed";
++ if (detect_renamed) {
++ if (detect_renamed == 1)
++ args[ac++] = "--detect-renamed";
++ else if (detect_renamed == 2)
++ args[ac++] = "--detect-renamed-lax";
++ else
++ args[ac++] = "--detect-moved";
++ }
+ } else {
+ if (skip_compress) {
+ if (asprintf(&arg, "--skip-compress=%s", skip_compress) < 0)
--- old/rsync.yo
+++ new/rsync.yo
@@ -385,6 +385,8 @@ to the detailed description below for a
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
strerror putenv iconv_open locale_charset nl_langinfo getxattr \
-- extattr_get_link sigaction sigprocmask)
-+ extattr_get_link sigaction sigprocmask posix_fadvise64)
+- extattr_get_link sigaction sigprocmask setattrlist)
++ extattr_get_link sigaction sigprocmask setattrlist posix_fadvise64)
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
if test $ac_cv_func_getpgrp = yes; then
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"ignore-non-existing",0,POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"ignore-existing", 0, POPT_ARG_NONE, &ignore_existing, 0, 0, 0 },
-@@ -1664,6 +1671,11 @@ void server_options(char **args, int *ar
+@@ -1659,6 +1666,11 @@ void server_options(char **args, int *ar
if (!am_sender)
args[ac++] = "--sender";
*
--- old/rsync.yo
+++ new/rsync.yo
-@@ -353,6 +353,7 @@ to the detailed description below for a
+@@ -352,6 +352,7 @@ to the detailed description below for a
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy files whole (without rsync algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1009,6 +1010,10 @@ NOTE: Don't use this option when the des
+@@ -1014,6 +1015,10 @@ NOTE: Don't use this option when the des
filesystem. It doesn't seem to handle seeks over null regions
correctly and ends up corrupting the files.
#ifdef ICONV_OPTION
int ic_ndx;
-@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -122,6 +123,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
- strerror putenv iconv_open locale_charset nl_langinfo getxattr \
+ chflags strerror putenv iconv_open locale_charset nl_langinfo getxattr \
- extattr_get_link sigaction sigprocmask)
+ extattr_get_link sigaction sigprocmask setattrlist)
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
--- old/flist.c
}
}
-@@ -1258,7 +1269,7 @@ static void recv_generator(char *fname,
+@@ -1263,7 +1274,7 @@ static void recv_generator(char *fname,
* full later (right before we handle its contents). */
if (statret == 0
&& (S_ISDIR(sx.st.st_mode)
goto cleanup; /* Any errors get reported later. */
if (do_mkdir(fname, file->mode & 0700) == 0)
file->flags |= FLAG_DIR_CREATED;
-@@ -1270,7 +1281,7 @@ static void recv_generator(char *fname,
+@@ -1275,7 +1286,7 @@ static void recv_generator(char *fname,
* we need to delete it. If it doesn't exist, then
* (perhaps recursively) create it. */
if (statret == 0 && !S_ISDIR(sx.st.st_mode)) {
goto skipping_dir_contents;
statret = -1;
}
-@@ -1399,7 +1410,7 @@ static void recv_generator(char *fname,
+@@ -1404,7 +1415,7 @@ static void recv_generator(char *fname,
}
/* Not the right symlink (or not a symlink), so
* delete it. */
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1478,7 +1489,7 @@ static void recv_generator(char *fname,
+@@ -1483,7 +1494,7 @@ static void recv_generator(char *fname,
goto return_with_success;
goto cleanup;
}
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1569,7 +1580,7 @@ static void recv_generator(char *fname,
+@@ -1574,7 +1585,7 @@ static void recv_generator(char *fname,
fnamecmp_type = FNAMECMP_FNAME;
if (statret == 0 && !S_ISREG(sx.st.st_mode)) {
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -1790,6 +1807,9 @@ void server_options(char **args, int *ar
+@@ -1792,6 +1809,9 @@ void server_options(char **args, int *ar
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
transfer. The resulting value is treated as though it was the permissions
--- old/syscall.c
+++ new/syscall.c
-@@ -162,6 +162,15 @@ int do_chmod(const char *path, mode_t mo
+@@ -173,6 +173,15 @@ int do_chmod(const char *path, mode_t mo
}
#endif
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
strerror putenv iconv_open locale_charset nl_langinfo getxattr \
-- extattr_get_link sigaction sigprocmask)
-+ extattr_get_link sigaction sigprocmask posix_fallocate)
+- extattr_get_link sigaction sigprocmask setattrlist)
++ extattr_get_link sigaction sigprocmask setattrlist posix_fallocate)
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
if test $ac_cv_func_getpgrp = yes; then
{"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
{"append", 0, POPT_ARG_NONE, 0, OPT_APPEND, 0, 0 },
{"append-verify", 0, POPT_ARG_VAL, &append_mode, 2, 0, 0 },
-@@ -1285,6 +1294,15 @@ int parse_arguments(int *argc_p, const c
+@@ -1284,6 +1293,15 @@ int parse_arguments(int *argc_p, const c
}
#endif
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -1992,6 +2010,9 @@ void server_options(char **args, int *ar
+@@ -1988,6 +2006,9 @@ void server_options(char **args, int *ar
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
if (do_progress)
--- old/rsync.h
+++ new/rsync.h
-@@ -564,6 +564,10 @@ struct ht_int64_node {
+@@ -568,6 +568,10 @@ struct ht_int64_node {
#define ACLS_NEED_MASK 1
#endif
uint32 unum;
--- old/rsync.yo
+++ new/rsync.yo
-@@ -353,6 +353,7 @@ to the detailed description below for a
+@@ -352,6 +352,7 @@ to the detailed description below for a
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy files whole (without rsync algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1009,6 +1010,19 @@ NOTE: Don't use this option when the des
+@@ -1014,6 +1015,19 @@ NOTE: Don't use this option when the des
filesystem. It doesn't seem to handle seeks over null regions
correctly and ends up corrupting the files.