<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3b08efaebe3b7413093b981f2f4ad661d27cffac">https://github.com/macports/macports-ports/commit/3b08efaebe3b7413093b981f2f4ad661d27cffac</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3b08efa update to rsync 3.1.3
</span>3b08efa is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3b08efaebe3b7413093b981f2f4ad661d27cffac
</span>Author: jabenninghoff <jbenninghoff@mac.com>
AuthorDate: Sat Feb 10 15:56:33 2018 -0600
<span style='display:block; white-space:pre;color:#404040;'> update to rsync 3.1.3
</span>---
net/rsync/Portfile | 16 ++--
net/rsync/files/patch-crtimes.diff | 146 +++++++++++++++---------------
net/rsync/files/patch-fileflags.diff | 169 +++++++++++++++++------------------
3 files changed, 165 insertions(+), 166 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/rsync/Portfile b/net/rsync/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index cee84c6..2166cbd 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/rsync/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/rsync/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3,7 +3,7 @@
</span> PortSystem 1.0
name rsync
<span style='display:block; white-space:pre;background:#ffe0e0;'>-version 3.1.2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 3.1.3
</span> revision 0
categories net
license GPL-3+
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -20,19 +20,19 @@ homepage http://samba.org/rsync/
</span> master_sites http://rsync.samba.org/ftp/rsync/ \
http://rsync.samba.org/ftp/rsync/src/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums md5 0f758d7e000c0f7f7d3792610fad70cb \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha1 0d4c7fb7fe3fc80eeff922a7c1d81df11dbb8a1a \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rmd160 f7d6c0c9752af8d9eb933cffc6032c1763490a04 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums md5 1581a588fde9d89f6bc6201e8129afaf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha1 82e7829c0b3cefbd33c233005341e2073c425629 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 95a040e0c32e09d01f37fc7d2defd2c41a184db6 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0
</span>
depends_lib port:popt port:libiconv
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# these come from http://rsync.samba.org/ftp/rsync/rsync-patches-3.1.2.tar.gz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# these come from http://rsync.samba.org/ftp/rsync/rsync-patches-3.1.3.tar.gz
</span> # and need to be updated with each release
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# hfs-compression.diff is marked by upstream as broken as of 3.1.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# don't use: patch-hfs-compression.diff patch-hfs-compression-options.diff
</span> patchfiles patch-fileflags.diff \
patch-crtimes.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-hfs-compression.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-hfs-compression-options.diff \
</span> patch-acls-unpack-error.diff
patch.pre_args -p1
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/rsync/files/patch-crtimes.diff b/net/rsync/files/patch-crtimes.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 58e4d56..57d87d4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/rsync/files/patch-crtimes.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/rsync/files/patch-crtimes.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -42,7 +42,7 @@ diff --git a/compat.c b/compat.c
</span> diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -54,6 +54,7 @@ extern int preserve_fileflags;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -56,6 +56,7 @@ extern int preserve_fileflags;
</span> extern int delete_during;
extern int missing_args;
extern int eol_nulls;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -50,7 +50,7 @@ diff --git a/flist.c b/flist.c
</span> extern int relative_paths;
extern int implied_dirs;
extern int ignore_perishable;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -398,7 +399,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -380,7 +381,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> #endif
int ndx, int first_ndx)
{
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -59,7 +59,7 @@ diff --git a/flist.c b/flist.c
</span> static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -509,6 +510,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -491,6 +492,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> modtime = file->modtime;
if (NSEC_BUMP(file) && protocol_version >= 31)
xflags |= XMIT_MOD_NSEC;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -73,7 +73,7 @@ diff --git a/flist.c b/flist.c
</span>
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != -1) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -593,6 +601,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -575,6 +583,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> }
if (xflags & XMIT_MOD_NSEC)
write_varint(f, F_MOD_NSEC(file));
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -82,7 +82,7 @@ diff --git a/flist.c b/flist.c
</span> if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
#ifdef SUPPORT_FILEFLAGS
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -686,7 +696,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -668,7 +678,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span>
static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -91,7 +91,7 @@ diff --git a/flist.c b/flist.c
</span> static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -838,6 +848,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -820,6 +830,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span> modtime_nsec = read_varint(f);
else
modtime_nsec = 0;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -111,7 +111,7 @@ diff --git a/flist.c b/flist.c
</span> if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1015,6 +1038,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -997,6 +1020,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span> F_GROUP(file) = gid;
file->flags |= gid_flags;
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -120,7 +120,7 @@ diff --git a/flist.c b/flist.c
</span> if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1416,6 +1441,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1398,6 +1423,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span> F_GROUP(file) = st.st_gid;
if (am_generator && st.st_uid == our_uid)
file->flags |= FLAG_OWNED_BY_US;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -140,55 +140,55 @@ diff --git a/generator.c b/generator.c
</span> extern int preserve_hard_links;
extern int preserve_executability;
extern int preserve_fileflags;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -384,8 +385,15 @@ static void do_delete_pass(void)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(FINFO, " \r");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -394,6 +395,16 @@ static inline int time_diff(STRUCT_STAT *stp, struct file_struct *file)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>--static inline int time_differs(struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+static inline int time_differs(struct file_struct *file, stat_x *sxp, const char *fname)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (crtimes_ndx) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (sxp->crtime == 0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ sxp->crtime = get_create_time(fname);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (cmp_time(sxp->crtime, f_crtime(file)) != 0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return 1;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static inline int all_time_diff(stat_x *sxp, struct file_struct *file, const char *fname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int diff = time_diff(&sxp->st, file);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (diff || !crtimes_ndx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return diff;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (sxp->crtime == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sxp->crtime = get_create_time(fname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return cmp_time(sxp->crtime, 0, f_crtime(file), 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span> +
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return cmp_time(sxp->st.st_mtime, file->modtime);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -443,7 +451,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static inline int perms_differ(struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (preserve_perms)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -448,7 +459,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span> {
if (S_ISLNK(file->mode)) {
#ifdef CAN_SET_SYMLINK_TIMES
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (preserve_times & PRESERVE_LINK_TIMES && time_differs(file, sxp))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (preserve_times & PRESERVE_LINK_TIMES && time_differs(file, sxp, fname))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (preserve_times & PRESERVE_LINK_TIMES && time_diff(&sxp->st, file))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (preserve_times & PRESERVE_LINK_TIMES && all_time_diff(sxp, file, fname))
</span> return 0;
#endif
#ifdef CAN_CHMOD_SYMLINK
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -463,7 +471,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -468,7 +479,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span> return 0;
#endif
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (preserve_times && time_differs(file, sxp))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (preserve_times && time_differs(file, sxp, fname))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (preserve_times && time_diff(&sxp->st, file))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (preserve_times && all_time_diff(sxp, file, fname))
</span> return 0;
if (perms_differ(file, sxp))
return 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -506,6 +514,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -511,6 +522,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span> : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
iflags |= ITEM_REPORT_TIME;
+ if (crtimes_ndx) {
+ if (sxp->crtime == 0)
+ sxp->crtime = get_create_time(fnamecmp);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (cmp_time(sxp->crtime, f_crtime(file)) != 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (cmp_time(sxp->crtime, 0, f_crtime(file), 0) != 0)
</span> + iflags |= ITEM_REPORT_CRTIME;
+ }
#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1130,6 +1144,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1135,6 +1152,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
</span> static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -196,7 +196,7 @@ diff --git a/generator.c b/generator.c
</span> int64 len;
int colwidth = human_readable ? 14 : 11;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1145,10 +1160,12 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1150,10 +1168,12 @@ static void list_file_entry(struct file_struct *f)
</span>
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -212,7 +212,7 @@ diff --git a/generator.c b/generator.c
</span> } else
#endif
if (missing_args == 2 && f->mode == 0) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1156,9 +1173,12 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1161,9 +1181,12 @@ static void list_file_entry(struct file_struct *f)
</span> colwidth + 31, "*missing",
f_name(f, NULL));
} else {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -227,7 +227,7 @@ diff --git a/generator.c b/generator.c
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1251,6 +1271,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1258,6 +1281,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span> return;
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -270,7 +270,7 @@ diff --git a/ifuncs.h b/ifuncs.h
</span> diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -712,7 +712,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -716,7 +716,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span> c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -291,7 +291,7 @@ diff --git a/options.c b/options.c
</span> int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -716,6 +717,7 @@ void usage(enum logcode F)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -717,6 +718,7 @@ void usage(enum logcode F)
</span> rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -299,7 +299,7 @@ diff --git a/options.c b/options.c
</span> 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");
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -883,6 +885,9 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -885,6 +887,9 @@ static struct poptOption long_options[] = {
</span> {"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 },
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -309,7 +309,7 @@ diff --git a/options.c b/options.c
</span> {"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 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2463,6 +2468,8 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2491,6 +2496,8 @@ void server_options(char **args, int *argc_p)
</span> argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -321,7 +321,7 @@ diff --git a/options.c b/options.c
</span> diff --git a/rsync.c b/rsync.c
--- a/rsync.c
+++ b/rsync.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -581,6 +581,9 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -587,6 +587,9 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span> || (!(preserve_times & PRESERVE_DIR_TIMES) && S_ISDIR(sxp->st.st_mode))
|| (!(preserve_times & PRESERVE_LINK_TIMES) && S_ISLNK(sxp->st.st_mode)))
flags |= ATTRS_SKIP_MTIME;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -331,7 +331,7 @@ diff --git a/rsync.c b/rsync.c
</span> if (!(flags & ATTRS_SKIP_MTIME)
&& (sxp->st.st_mtime != file->modtime
#ifdef ST_MTIME_NSEC
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -598,6 +601,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -604,6 +607,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span> else
file->flags |= FLAG_TIME_FAILED;
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -339,28 +339,28 @@ diff --git a/rsync.c b/rsync.c
</span> + time_t file_crtime = f_crtime(file);
+ if (sxp->crtime == 0)
+ sxp->crtime = get_create_time(fname);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (cmp_time(sxp->crtime, file_crtime) != 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (cmp_time(sxp->crtime, 0, file_crtime, 0) != 0
</span> + && set_create_time(fname, file_crtime) == 0)
+ updated = 1;
+ }
#ifdef SUPPORT_ACLS
/* It's OK to call set_acl() now, even for a dir, as the generator
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -714,7 +725,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -720,7 +731,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span> /* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,
ATTRS_DELAY_IMMUTABLE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- | (ok_to_set_time ? 0 : ATTRS_SKIP_MTIME));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ | (ok_to_set_time ? 0 : ATTRS_SKIP_MTIME | ATTRS_SKIP_CRTIME));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- | (ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ | (ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME | ATTRS_SKIP_CRTIME));
</span>
/* move tmp file over real file */
if (DEBUG_GTE(RECV, 1))
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -743,7 +754,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -749,7 +760,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span>
do_set_file_attrs:
set_file_attrs(fnametmp, file, NULL, fnamecmp,
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- ok_to_set_time ? 0 : ATTRS_SKIP_MTIME);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ ok_to_set_time ? 0 : ATTRS_SKIP_MTIME | ATTRS_SKIP_CRTIME);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME | ATTRS_SKIP_CRTIME);
</span>
if (temp_copy_name) {
if (do_rename(fnametmp, fname) < 0) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -377,15 +377,15 @@ diff --git a/rsync.h b/rsync.h
</span>
/* These flags are used in the live flist data. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -167,6 +168,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ATTRS_REPORT (1<<0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -168,6 +169,7 @@
</span> #define ATTRS_SKIP_MTIME (1<<1)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ATTRS_DELAY_IMMUTABLE (1<<2)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define ATTRS_SKIP_CRTIME (1<<3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_SET_NANO (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_DELAY_IMMUTABLE (1<<4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ATTRS_SKIP_CRTIME (1<<5)
</span>
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -183,7 +185,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -184,7 +186,7 @@
</span> #define FNAMECMP_FUZZY 0x83
/* For use by the itemize_changes code */
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -394,7 +394,7 @@ diff --git a/rsync.h b/rsync.h
</span> #define ITEM_REPORT_CHANGE (1<<1)
#define ITEM_REPORT_SIZE (1<<2) /* regular files only */
#define ITEM_REPORT_TIMEFAIL (1<<2) /* symlinks only */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -734,6 +736,7 @@ extern int file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -741,6 +743,7 @@ extern int file_extra_cnt;
</span> extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -402,7 +402,7 @@ diff --git a/rsync.h b/rsync.h
</span> extern int fileflags_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -741,6 +744,7 @@ extern int xattrs_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -748,6 +751,7 @@ extern int xattrs_ndx;
</span> #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
#define EXTRA_LEN (sizeof (union file_extras))
#define PTR_EXTRA_CNT ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -410,7 +410,7 @@ diff --git a/rsync.h b/rsync.h
</span> #define DEV_EXTRA_CNT 2
#define DIRNODE_EXTRA_CNT 3
#define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1021,6 +1025,7 @@ typedef struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1033,6 +1037,7 @@ typedef struct {
</span>
typedef struct {
STRUCT_STAT st;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -429,7 +429,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> -O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1208,6 +1209,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1242,6 +1243,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
</span> 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)).
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -439,7 +439,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> 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).
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2110,7 +2114,7 @@ with older versions of rsync, but that also turns on the output of other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2173,7 +2177,7 @@ with older versions of rsync, but that also turns on the output of other
</span> verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -448,7 +448,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> 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.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2169,6 +2173,8 @@ quote(itemization(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2232,6 +2236,8 @@ quote(itemization(
</span> 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.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -460,9 +460,9 @@ diff --git a/rsync.yo b/rsync.yo
</span> diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -42,6 +42,13 @@ extern int force_change;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int preserve_perms;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int preserve_executability;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -54,6 +54,13 @@ extern int preserve_executability;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span>
+#pragma pack(push, 4)
+struct create_time {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -474,9 +474,9 @@ diff --git a/syscall.c b/syscall.c
</span> #define RETURN_ERROR_IF(x,e) \
do { \
if (x) { \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -460,6 +467,36 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -491,6 +498,36 @@ int do_setattrlist_times(const char *fname, time_t modtime, uint32 mod_nsec)
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span>
+time_t get_create_time(const char *path)
+{
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -559,7 +559,7 @@ diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
</span> diff --git a/tls.c b/tls.c
--- a/tls.c
+++ b/tls.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -109,6 +109,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -111,6 +111,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)
</span>
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -568,7 +568,7 @@ diff --git a/tls.c b/tls.c
</span> static void failed(char const *what, char const *where)
{
fprintf(stderr, PROGRAM ": %s %s: %s\n",
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -116,16 +118,44 @@ static void failed(char const *what, char const *where)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -118,16 +120,44 @@ static void failed(char const *what, char const *where)
</span> exit(1);
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -615,7 +615,7 @@ diff --git a/tls.c b/tls.c
</span> #ifdef SUPPORT_XATTRS
if (am_root < 0)
stat_xattr(fname, &buf);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -159,30 +189,17 @@ static void list_file(const char *fname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -161,30 +191,17 @@ static void list_file(const char *fname)
</span> }
permstring(permbuf, buf.st_mode);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -655,7 +655,7 @@ diff --git a/tls.c b/tls.c
</span>
/* TODO: Perhaps escape special characters in fname? */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -193,13 +210,14 @@ static void list_file(const char *fname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -195,13 +212,14 @@ static void list_file(const char *fname)
</span> (long)minor(buf.st_rdev));
} else
printf("%15s", do_big_num(buf.st_size, 1, NULL));
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -672,7 +672,7 @@ diff --git a/tls.c b/tls.c
</span> {"link-times", 'l', POPT_ARG_NONE, &link_times, 0, 0, 0 },
{"link-owner", 'L', POPT_ARG_NONE, &link_owner, 0, 0, 0 },
#ifdef SUPPORT_XATTRS
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -218,6 +236,7 @@ static void tls_usage(int ret)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -220,6 +238,7 @@ static void tls_usage(int ret)
</span> fprintf(F,"usage: " PROGRAM " [OPTIONS] FILE ...\n");
fprintf(F,"Trivial file listing program for portably checking rsync\n");
fprintf(F,"\nOptions:\n");
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -683,10 +683,10 @@ diff --git a/tls.c b/tls.c
</span> diff -Nurp a/proto.h b/proto.h
--- a/proto.h
+++ b/proto.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -328,6 +328,8 @@ int do_stat(const char *fname, STRUCT_ST
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_lstat(const char *fname, STRUCT_STAT *st);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -340,6 +340,8 @@ int do_lstat(const char *fname, STRUCT_S
</span> int do_fstat(int fd, STRUCT_STAT *st);
OFF_T do_lseek(int fd, OFF_T offset, int whence);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_setattrlist_times(const char *fname, time_t modtime, uint32 mod_nsec);
</span> +time_t get_create_time(const char *path);
+int set_create_time(const char *path, time_t crtime);
int do_utimensat(const char *fname, time_t modtime, uint32 mod_nsec);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -703,7 +703,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> \-O, \-\-omit\-dir\-times omit directories from \-\-times
\-J, \-\-omit\-link\-times omit symlinks from \-\-times
\-\-super receiver attempts super\-user activities
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1386,6 +1387,10 @@ cause the next transfer to behave as if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1427,6 +1428,10 @@ cause the next transfer to behave as if
</span> updated (though rsync\(cq\&s delta\-transfer algorithm will make the update fairly efficient
if the files haven\(cq\&t actually changed, you\(cq\&re much better off using \fB\-t\fP).
.IP
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -714,7 +714,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> .IP "\fB\-O, \-\-omit\-dir\-times\fP"
This tells rsync to omit directories when
it is preserving modification times (see \fB\-\-times\fP). If NFS is sharing
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2397,7 +2402,7 @@ with older versions of rsync, but that a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2462,7 +2467,7 @@ with older versions of rsync, but that a
</span> verbose messages).
.IP
The \(dq\&%i\(dq\& escape has a cryptic output that is 11 letters long. The general
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -723,7 +723,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> type of update being done, \fBX\fP is replaced by the file\-type, and the
other letters represent attributes that may be output if they are being
modified.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2472,6 +2477,9 @@ The \fBf\fP means that the fileflags inf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2537,6 +2542,9 @@ The \fBf\fP means that the fileflags inf
</span> The \fBa\fP means that the ACL information changed.
.IP o
The \fBx\fP means that the extended attribute information changed.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/rsync/files/patch-fileflags.diff b/net/rsync/files/patch-fileflags.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 8fa3720..e2bbcd4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/rsync/files/patch-fileflags.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/rsync/files/patch-fileflags.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
</span> ./configure
make
<span style='display:block; white-space:pre;background:#ffe0e0;'>-based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+based-on: d73762eea3f15f2c56bb3fa9394ad1883c25c949
</span> diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -66,7 +66,7 @@ diff --git a/compat.c b/compat.c
</span> diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -593,6 +593,7 @@ AC_FUNC_UTIME_NULL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -594,6 +594,7 @@ AC_FUNC_UTIME_NULL
</span> 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 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -122,7 +122,7 @@ diff --git a/delete.c b/delete.c
</span> diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -50,6 +50,7 @@ extern int preserve_links;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -52,6 +52,7 @@ extern int preserve_links;
</span> extern int preserve_hard_links;
extern int preserve_devices;
extern int preserve_specials;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,7 +130,7 @@ diff --git a/flist.c b/flist.c
</span> extern int delete_during;
extern int missing_args;
extern int eol_nulls;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -399,6 +400,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -381,6 +382,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> {
static time_t modtime;
static mode_t mode;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -140,7 +140,7 @@ diff --git a/flist.c b/flist.c
</span> #ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -442,6 +446,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -424,6 +428,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> xflags |= XMIT_SAME_MODE;
else
mode = file->mode;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -155,7 +155,7 @@ diff --git a/flist.c b/flist.c
</span>
if (preserve_devices && IS_DEVICE(mode)) {
if (protocol_version < 28) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -583,6 +595,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -565,6 +577,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> write_varint(f, F_MOD_NSEC(file));
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -166,7 +166,7 @@ diff --git a/flist.c b/flist.c
</span> if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
write_int(f, uid);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -672,6 +688,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -654,6 +670,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span> {
static int64 modtime;
static mode_t mode;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -176,7 +176,7 @@ diff --git a/flist.c b/flist.c
</span> #ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -779,6 +798,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -761,6 +780,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span> modtime = first->modtime;
modtime_nsec = F_MOD_NSEC(first);
mode = first->mode;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -187,7 +187,7 @@ diff --git a/flist.c b/flist.c
</span> if (preserve_uid)
uid = F_OWNER(first);
if (preserve_gid)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -820,6 +843,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -802,6 +825,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span>
if (chmod_modes && !S_ISLNK(mode) && mode)
mode = tweak_mode(mode, chmod_modes);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -198,7 +198,7 @@ diff --git a/flist.c b/flist.c
</span>
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -978,6 +1005,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -960,6 +987,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span> }
#endif
file->mode = mode;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -209,7 +209,7 @@ diff --git a/flist.c b/flist.c
</span> if (preserve_uid)
F_OWNER(file) = uid;
if (preserve_gid) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1375,6 +1406,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1357,6 +1388,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span> }
#endif
file->mode = st.st_mode;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -234,7 +234,7 @@ diff --git a/generator.c b/generator.c
</span> extern int delete_mode;
extern int delete_before;
extern int delete_during;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -465,6 +467,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -470,6 +472,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span> return 0;
if (perms_differ(file, sxp))
return 0;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -245,7 +245,7 @@ diff --git a/generator.c b/generator.c
</span> if (ownership_differs(file, sxp))
return 0;
#ifdef SUPPORT_ACLS
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -516,6 +522,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -521,6 +527,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span> if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
&& sxp->st.st_gid != (gid_t)F_GROUP(file))
iflags |= ITEM_REPORT_GROUP;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -257,7 +257,7 @@ diff --git a/generator.c b/generator.c
</span> #ifdef SUPPORT_ACLS
if (preserve_acls && !S_ISLNK(file->mode)) {
if (!ACL_READY(*sxp))
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1408,6 +1419,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1415,6 +1426,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span> file->mode = dest_mode(file->mode, sx.st.st_mode,
dflt_perms, statret == 0);
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -268,7 +268,7 @@ diff --git a/generator.c b/generator.c
</span> if (statret != 0 && basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
itemizing, code);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1452,10 +1467,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1459,10 +1474,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span> * 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. */
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -285,7 +285,7 @@ diff --git a/generator.c b/generator.c
</span> rsyserr(FERROR_XFER, errno,
"failed to modify permissions on %s",
full_fname(fname));
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1491,6 +1511,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1498,6 +1518,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span> file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms,
exists);
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -296,7 +296,7 @@ diff --git a/generator.c b/generator.c
</span>
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2059,13 +2083,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2065,12 +2089,16 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
</span> continue;
fname = f_name(file, NULL);
if (fix_dir_perms)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -304,8 +304,7 @@ diff --git a/generator.c b/generator.c
</span> + do_chmod(fname, file->mode, 0);
if (need_retouch_dir_times) {
STRUCT_STAT st;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (link_stat(fname, &st, 0) == 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && cmp_time(st.st_mtime, file->modtime) != 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (link_stat(fname, &st, 0) == 0 && time_diff(&st, file))
</span> - set_modtime(fname, file->modtime, F_MOD_NSEC(file), file->mode);
+ set_modtime(fname, file->modtime, F_MOD_NSEC(file), file->mode, 0);
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -319,7 +318,7 @@ diff --git a/generator.c b/generator.c
</span> diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -709,7 +709,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -713,7 +713,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span> c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -349,7 +348,7 @@ diff --git a/main.c b/main.c
</span> extern int file_total;
extern int recurse;
extern int xfer_dirs;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -840,6 +844,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -850,6 +854,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
</span> * points to an identical file won't be replaced by the referent. */
copy_links = copy_dirlinks = copy_unsafe_links = 0;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -391,7 +390,7 @@ diff --git a/options.c b/options.c
</span> int io_timeout = 0;
int prune_empty_dirs = 0;
int use_qsort = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -572,6 +574,7 @@ static void print_rsync_version(enum logcode f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -573,6 +575,7 @@ static void print_rsync_version(enum logcode f)
</span> char const *links = "no ";
char const *iconv = "no ";
char const *ipv6 = "no ";
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -399,7 +398,7 @@ diff --git a/options.c b/options.c
</span> STRUCT_STAT *dumstat;
#if SUBPROTOCOL_VERSION != 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -608,6 +611,9 @@ static void print_rsync_version(enum logcode f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -609,6 +612,9 @@ static void print_rsync_version(enum logcode f)
</span> #ifdef CAN_SET_SYMLINK_TIMES
symtimes = "";
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -409,7 +408,7 @@ diff --git a/options.c b/options.c
</span>
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -621,8 +627,8 @@ static void print_rsync_version(enum logcode f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -622,8 +628,8 @@ static void print_rsync_version(enum logcode f)
</span> (int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -420,7 +419,7 @@ diff --git a/options.c b/options.c
</span>
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -693,6 +699,9 @@ void usage(enum logcode F)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -694,6 +700,9 @@ void usage(enum logcode F)
</span> 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");
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -430,7 +429,7 @@ diff --git a/options.c b/options.c
</span> rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n");
#ifdef SUPPORT_ACLS
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -738,7 +747,12 @@ void usage(enum logcode F)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -740,7 +749,12 @@ void usage(enum logcode F)
</span> 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");
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -444,7 +443,7 @@ diff --git a/options.c b/options.c
</span> 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");
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -855,6 +869,10 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -857,6 +871,10 @@ static struct poptOption long_options[] = {
</span> {"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 },
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -455,7 +454,7 @@ diff --git a/options.c b/options.c
</span> {"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 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -941,6 +959,14 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -943,6 +961,14 @@ static struct poptOption long_options[] = {
</span> {"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 },
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -470,7 +469,7 @@ diff --git a/options.c b/options.c
</span> {"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 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2539,6 +2565,9 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2567,6 +2593,9 @@ void server_options(char **args, int *argc_p)
</span> if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -480,7 +479,7 @@ diff --git a/options.c b/options.c
</span> if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
goto oom;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2626,6 +2655,16 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2660,6 +2689,16 @@ void server_options(char **args, int *argc_p)
</span> args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -508,7 +507,7 @@ diff --git a/rsync.c b/rsync.c
</span> extern int preserve_executability;
extern int preserve_times;
extern int am_root;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -452,6 +453,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -458,6 +459,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
</span> return new_mode;
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -548,7 +547,7 @@ diff --git a/rsync.c b/rsync.c
</span> int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
const char *fnamecmp, int flags)
{
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -513,7 +547,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -519,7 +553,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span> if (am_root >= 0) {
uid_t uid = change_uid ? (uid_t)F_OWNER(file) : sxp->st.st_uid;
gid_t gid = change_gid ? (gid_t)F_GROUP(file) : sxp->st.st_gid;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -557,8 +556,8 @@ diff --git a/rsync.c b/rsync.c
</span> /* We shouldn't have attempted to change uid
* or gid unless have the privilege. */
rsyserr(FERROR_XFER, errno, "%s %s failed",
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -553,7 +587,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || (NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -559,7 +593,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (flags & ATTRS_SET_NANO && NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file))
</span> #endif
)) {
- int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -566,7 +565,7 @@ diff --git a/rsync.c b/rsync.c
</span> if (ret < 0) {
rsyserr(FERROR_XFER, errno, "failed to set times on %s",
full_fname(fname));
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -580,7 +614,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -586,7 +620,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span>
#ifdef HAVE_CHMOD
if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -575,7 +574,7 @@ diff --git a/rsync.c b/rsync.c
</span> if (ret < 0) {
rsyserr(FERROR_XFER, errno,
"failed to set permissions on %s",
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -592,6 +626,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -598,6 +632,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span> }
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -595,17 +594,17 @@ diff --git a/rsync.c b/rsync.c
</span> if (INFO_GTE(NAME, 2) && flags & ATTRS_REPORT) {
if (updated)
rprintf(FCLIENT, "%s\n", fname);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -666,7 +713,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -672,7 +719,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span>
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- ok_to_set_time ? 0 : ATTRS_SKIP_MTIME);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME);
</span> + ATTRS_DELAY_IMMUTABLE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ | (ok_to_set_time ? 0 : ATTRS_SKIP_MTIME));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ | (ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME));
</span>
/* move tmp file over real file */
if (DEBUG_GTE(RECV, 1))
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -683,6 +731,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -689,6 +737,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span> }
if (ret == 0) {
/* The file was moved into place (not copied), so it's done. */
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -627,15 +626,15 @@ diff --git a/rsync.h b/rsync.h
</span>
/* These flags are used in the live flist data. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -165,6 +166,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -166,6 +167,7 @@
</span> #define ATTRS_REPORT (1<<0)
#define ATTRS_SKIP_MTIME (1<<1)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define ATTRS_DELAY_IMMUTABLE (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_SET_NANO (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ATTRS_DELAY_IMMUTABLE (1<<4)
</span>
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -191,6 +193,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -192,6 +194,7 @@
</span> #define ITEM_REPORT_GROUP (1<<6)
#define ITEM_REPORT_ACL (1<<7)
#define ITEM_REPORT_XATTR (1<<8)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -643,7 +642,7 @@ diff --git a/rsync.h b/rsync.h
</span> #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
#define ITEM_XNAME_FOLLOWS (1<<12)
#define ITEM_IS_NEW (1<<13)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -522,6 +525,28 @@ typedef unsigned int size_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -529,6 +532,28 @@ typedef unsigned int size_t;
</span> #endif
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -672,7 +671,7 @@ diff --git a/rsync.h b/rsync.h
</span> /* Find a variable that is either exactly 32-bits or longer.
* If some code depends on 32-bit truncation, it will need to
* take special action in a "#if SIZEOF_INT32 > 4" section. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -709,6 +734,7 @@ extern int file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -716,6 +741,7 @@ extern int file_extra_cnt;
</span> extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -680,7 +679,7 @@ diff --git a/rsync.h b/rsync.h
</span> extern int acls_ndx;
extern int xattrs_ndx;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -750,6 +776,11 @@ extern int xattrs_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -757,6 +783,11 @@ extern int xattrs_ndx;
</span> /* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -703,7 +702,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> -E, --executability preserve executability
--chmod=CHMOD affect file and/or directory permissions
-A, --acls preserve ACLs (implies -p)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -397,7 +398,10 @@ to the detailed description below for a complete description. verb(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -398,7 +399,10 @@ to the detailed description below for a complete description. verb(
</span> --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
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -715,7 +714,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> --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
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -646,7 +650,8 @@ specified, in which case bf(-r) is not implied.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -658,7 +662,8 @@ specified, in which case bf(-r) is not implied.
</span>
Note that bf(-a) bf(does not preserve hardlinks), because
finding multiply-linked files is expensive. You must separately
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -725,7 +724,7 @@ diff --git a/rsync.yo b/rsync.yo
</span>
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-":
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -950,7 +955,7 @@ they would be using bf(--copy-links).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -963,7 +968,7 @@ they would be using bf(--copy-links).
</span> 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
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -734,9 +733,9 @@ diff --git a/rsync.yo b/rsync.yo
</span>
See also bf(--keep-dirlinks) for an analogous option for the receiving
side.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1113,6 +1118,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- used by bf(--fake-super)) unless you repeat the option (e.g. -XX). This
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "copy all xattrs" mode cannot be used with bf(--fake-super).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1147,6 +1152,29 @@ Note that the bf(-X) option does not copy rsync's special xattr values (e.g.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ those used by bf(--fake-super)) unless you repeat the option (e.g. -XX).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This "copy all xattrs" mode cannot be used with bf(--fake-super).
</span>
+dit(bf(--fileflags)) This option causes rsync to update the file-flags to be
+the same as the source files and directories (if your OS supports the
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -764,7 +763,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> 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
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1442,12 +1470,13 @@ display as a "*missing" entry in the bf(--list-only) output.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1502,12 +1530,13 @@ display as a "*missing" entry in the bf(--list-only) output.
</span> dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
even when there are I/O errors.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -781,7 +780,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> bf(--recursive) option was also enabled.
dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2081,7 +2110,7 @@ with older versions of rsync, but that also turns on the output of other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2144,7 +2173,7 @@ with older versions of rsync, but that also turns on the output of other
</span> verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -790,7 +789,7 @@ diff --git a/rsync.yo b/rsync.yo
</span> 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.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2137,7 +2166,7 @@ quote(itemization(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2200,7 +2229,7 @@ quote(itemization(
</span> 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).
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -807,10 +806,10 @@ diff --git a/syscall.c b/syscall.c
</span> extern int read_only;
extern int list_only;
+extern int force_change;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int inplace;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int preallocate_files;
</span> extern int preserve_perms;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int preserve_executability;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -55,7 +56,23 @@ int do_unlink(const char *fname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -67,7 +68,23 @@ int do_unlink(const char *fname)
</span> {
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -835,7 +834,7 @@ diff --git a/syscall.c b/syscall.c
</span> }
#ifdef SUPPORT_LINKS
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -116,14 +133,37 @@ int do_link(const char *fname1, const char *fname2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -128,14 +145,37 @@ int do_link(const char *fname1, const char *fname2)
</span> }
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -875,7 +874,7 @@ diff --git a/syscall.c b/syscall.c
</span> }
int do_mknod(const char *pathname, mode_t mode, dev_t dev)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -163,7 +203,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -175,7 +215,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
</span> return -1;
close(sock);
#ifdef HAVE_CHMOD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -884,7 +883,7 @@ diff --git a/syscall.c b/syscall.c
</span> #else
return 0;
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -180,7 +220,22 @@ int do_rmdir(const char *pathname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -192,7 +232,22 @@ int do_rmdir(const char *pathname)
</span> {
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -908,7 +907,7 @@ diff --git a/syscall.c b/syscall.c
</span> }
int do_open(const char *pathname, int flags, mode_t mode)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -194,7 +249,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -206,7 +261,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
</span> }
#ifdef HAVE_CHMOD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -917,7 +916,7 @@ diff --git a/syscall.c b/syscall.c
</span> {
int code;
if (dry_run) return 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -217,17 +272,74 @@ int do_chmod(const char *path, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -229,17 +284,74 @@ int do_chmod(const char *path, mode_t mode)
</span> } else
code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
#endif /* !HAVE_LCHMOD */
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -996,17 +995,17 @@ diff --git a/syscall.c b/syscall.c
</span> diff --git a/t_stub.c b/t_stub.c
--- a/t_stub.c
+++ b/t_stub.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -28,6 +28,7 @@ int module_id = -1;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int checksum_len = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -28,6 +28,7 @@ int protect_args = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int module_id = -1;
</span> int relative_paths = 0;
int module_dirlen = 0;
+int force_change = 0;
int preserve_acls = 0;
int preserve_times = 0;
int preserve_xattrs = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -97,3 +98,23 @@ filter_rule_list daemon_filter_list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -102,3 +103,23 @@ filter_rule_list daemon_filter_list;
</span> {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return "tester";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return cst || !flg ? 16 : 1;
</span> }
+
+#if defined SUPPORT_FILEFLAGS || defined SUPPORT_FORCE_CHANGE
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1077,7 +1076,7 @@ diff --git a/util.c b/util.c
</span> {
static int switch_step = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -132,6 +160,11 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -142,6 +170,11 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span> #include "case_N.h"
if (do_utimensat(fname, modtime, mod_nsec) == 0)
break;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1089,7 +1088,7 @@ diff --git a/util.c b/util.c
</span> if (errno != ENOSYS)
return -1;
switch_step++;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -142,6 +175,11 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -152,6 +185,11 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span> #include "case_N.h"
if (do_lutimes(fname, modtime, mod_nsec) == 0)
break;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1101,7 +1100,7 @@ diff --git a/util.c b/util.c
</span> if (errno != ENOSYS)
return -1;
switch_step++;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -165,6 +203,13 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -175,6 +213,13 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span> if (do_utime(fname, modtime, mod_nsec) == 0)
break;
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1118,7 +1117,7 @@ diff --git a/util.c b/util.c
</span> diff --git a/xattrs.c b/xattrs.c
--- a/xattrs.c
+++ b/xattrs.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1045,7 +1045,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1224,7 +1224,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
</span> mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
| (S_ISDIR(fst.st_mode) ? 0700 : 0600);
if (fst.st_mode != mode)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1143,7 +1142,7 @@ diff -Nurp a/config.h.in b/config.h.in
</span> diff -Nurp a/configure.sh b/configure.sh
--- a/configure.sh
+++ b/configure.sh
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -7687,6 +7687,7 @@ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7706,6 +7706,7 @@ fi
</span>
for ac_func in waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1154,7 +1153,7 @@ diff -Nurp a/configure.sh b/configure.sh
</span> diff -Nurp a/proto.h b/proto.h
--- a/proto.h
+++ b/proto.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -287,6 +287,8 @@ int read_ndx_and_attrs(int f_in, int f_o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -298,6 +298,8 @@ int read_ndx_and_attrs(int f_in, int f_o
</span> void free_sums(struct sum_struct *s);
mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
int exists);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1163,7 +1162,7 @@ diff -Nurp a/proto.h b/proto.h
</span> int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
const char *fnamecmp, int flags);
void sig_int(int sig_num);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -311,11 +313,12 @@ int do_unlink(const char *fname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -322,11 +324,12 @@ int do_unlink(const char *fname);
</span> int do_symlink(const char *lnk, const char *fname);
ssize_t do_readlink(const char *path, char *buf, size_t bufsiz);
int do_link(const char *fname1, const char *fname2);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1178,7 +1177,7 @@ diff -Nurp a/proto.h b/proto.h
</span> int do_rename(const char *fname1, const char *fname2);
int do_ftruncate(int fd, OFF_T size);
void trim_trailing_slashes(char *name);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -354,7 +357,7 @@ void set_nonblocking(int fd);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -367,7 +370,7 @@ void set_nonblocking(int fd);
</span> void set_blocking(int fd);
int fd_pair(int fd[2]);
void print_child_argv(const char *prefix, char **cmd);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1198,7 +1197,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> \-E, \-\-executability preserve executability
\-\-chmod=CHMOD affect file and/or directory permissions
\-A, \-\-acls preserve ACLs (implies \-p)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -473,7 +474,10 @@ to the detailed description below for a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -474,7 +475,10 @@ to the detailed description below for a
</span> \-\-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
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1210,7 +1209,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> \-\-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
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -745,7 +749,8 @@ specified, in which case \fB\-r\fP is no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -761,7 +765,8 @@ specified, in which case \fB\-r\fP is no
</span> .IP
Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because
finding multiply\-linked files is expensive. You must separately
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1220,7 +1219,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> .IP
.IP "\-\-no\-OPTION"
You may turn off one or more implied options by prefixing
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1087,7 +1092,7 @@ they would be using \fB\-\-copy\-links\f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1101,7 +1106,7 @@ they would be using \fB\-\-copy\-links\f
</span> 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
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1229,9 +1228,9 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> .IP
See also \fB\-\-keep\-dirlinks\fP for an analogous option for the receiving
side.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1274,6 +1279,33 @@ Note that this option does not copy rsyn
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- used by \fB\-\-fake\-super\fP) unless you repeat the option (e.g. \-XX). This
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \(dq\© all xattrs\(dq\& mode cannot be used with \fB\-\-fake\-super\fP.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1315,6 +1320,33 @@ Note that the \fB\-X\fP option does not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ those used by \fB\-\-fake\-super\fP) unless you repeat the option (e.g. \-XX).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This \(dq\© all xattrs\(dq\& mode cannot be used with \fB\-\-fake\-super\fP.
</span> .IP
+.IP "\fB\-\-fileflags\fP"
+This option causes rsync to update the file\-flags to be
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1263,7 +1262,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> .IP "\fB\-\-chmod\fP"
This option tells rsync to apply one or more
comma\-separated \(dq\&chmod\(dq\& modes to the permission of the files in the
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1640,13 +1672,14 @@ display as a \(dq\&*missing\(dq\& entry
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1705,13 +1737,14 @@ display as a \(dq\&*missing\(dq\& entry
</span> Tells \fB\-\-delete\fP to go ahead and delete files
even when there are I/O errors.
.IP
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1281,7 +1280,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> \fB\-\-recursive\fP option was also enabled.
.IP
.IP "\fB\-\-max\-delete=NUM\fP"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2364,7 +2397,7 @@ with older versions of rsync, but that a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2429,7 +2462,7 @@ with older versions of rsync, but that a
</span> verbose messages).
.IP
The \(dq\&%i\(dq\& escape has a cryptic output that is 11 letters long. The general
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1290,7 +1289,7 @@ diff -Nurp a/rsync.1 b/rsync.1
</span> type of update being done, \fBX\fP is replaced by the file\-type, and the
other letters represent attributes that may be output if they are being
modified.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2434,7 +2467,7 @@ sender\(cq\&s value (requires \fB\-\-own
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2499,7 +2532,7 @@ sender\(cq\&s value (requires \fB\-\-own
</span> A \fBg\fP means the group is different and is being updated to the
sender\(cq\&s value (requires \fB\-\-group\fP and the authority to set the group).
.IP o
</pre><pre style='margin:0'>
</pre>