<pre style='margin:0'>
ra1nb0w (ra1nb0w) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a3bfb9a478010af9565e69e8742a8f56c748197b">https://github.com/macports/macports-ports/commit/a3bfb9a478010af9565e69e8742a8f56c748197b</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 a3bfb9a4780 rsync: update version to 3.2.1
</span>a3bfb9a4780 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit a3bfb9a478010af9565e69e8742a8f56c748197b
</span>Author: Davide Gerhard <ra1nb0w@macports.org>
AuthorDate: Tue Jun 23 12:32:57 2020 +0200
<span style='display:block; white-space:pre;color:#404040;'> rsync: update version to 3.2.1
</span>---
net/rsync/Portfile | 24 +-
net/rsync/files/patch-crtimes.diff | 796 ++++++++++++++-------------
net/rsync/files/patch-fileflags.diff | 1004 ++++++++++++++++++----------------
3 files changed, 946 insertions(+), 878 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 b15cb55dd30..9a8af487157 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.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 3.2.1
</span> revision 0
categories net
license GPL-3+
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -20,17 +20,21 @@ 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 1581a588fde9d89f6bc6201e8129afaf \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha1 82e7829c0b3cefbd33c233005341e2073c425629 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rmd160 95a040e0c32e09d01f37fc7d2defd2c41a184db6 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 5e766682e2d2ea1194cf8cb13d21caa81d3a87ba \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 95f2dd62979b500a99b34c1a6453a0787ada0330e4bec7fcffad37b9062d58d3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 1051665
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_lib port:popt port:libiconv
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib port:popt \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libiconv \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:xxhash \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:lz4 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:zstd \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:openssl
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# these come from http://rsync.samba.org/ftp/rsync/rsync-patches-3.1.3.tar.gz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# these come from http://rsync.samba.org/ftp/rsync/rsync-patches-3.2.1.tar.gz
</span> # and need to be updated with each release
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# hfs-compression.diff is marked by upstream as broken as of 3.1.3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# removed: patch-hfs-compression.diff patch-hfs-compression-options.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# hfs-compression.diff is marked by upstream as broken as of 3.2.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# removed: patch-hfs-compression.diff
</span> patchfiles patch-fileflags.diff \
patch-crtimes.diff \
patch-acls-unpack-error.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,7 +52,7 @@ test.target check
</span> post-destroot {
xinstall -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- COPYING INSTALL NEWS OLDNEWS TODO README doc/README-SGML \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ COPYING INSTALL.md NEWS.md TODO README.md doc/README-SGML \
</span> doc/profile.txt doc/rsync.sgml \
${destroot}${prefix}/share/doc/${name}
xinstall -m 644 ${filespath}/rsyncd.conf.example \
<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 57d87d4c2c9..35f242f5efa 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;'>@@ -5,229 +5,259 @@ To use this patch, run these commands for a successful build:
</span>
patch -p1 <patches/fileflags.diff
patch -p1 <patches/crtimes.diff
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ./prepare-source
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ./configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ./configure (optional if already run)
</span> make
based-on: patch/master/fileflags
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -49,6 +49,7 @@ extern int force_change;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int protect_args;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,6 +43,7 @@ extern int protect_args;
</span> extern int preserve_uid;
extern int preserve_gid;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int preserve_atimes;
</span> +extern int preserve_crtimes;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int preserve_fileflags;
</span> extern int preserve_acls;
extern int preserve_xattrs;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -67,7 +68,7 @@ extern char *iconv_opt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int preserve_fileflags;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -76,7 +77,7 @@ int inplace_partial = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_negotiated_strings = 0;
</span>
/* These index values are for the file-list's extra-attribute array. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>--int uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+int uid_ndx, gid_ndx, crtimes_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int pathname_ndx, depth_ndx, atimes_ndx, uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int pathname_ndx, depth_ndx, atimes_ndx, crtimes_ndx, uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span>
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -146,6 +147,8 @@ void setup_protocol(int f_out,int f_in)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- uid_ndx = ++file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (preserve_gid)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- gid_ndx = ++file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -462,6 +463,8 @@ void setup_protocol(int f_out,int f_in)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * aligned for direct int64-pointer memory access. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (preserve_atimes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atimes_ndx = (file_extra_cnt += EXTRA64_CNT);
</span> + if (preserve_crtimes)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtimes_ndx = (file_extra_cnt += TIME_EXTRA_CNT);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (preserve_fileflags || (force_change && !am_sender))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fileflags_ndx = ++file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (preserve_acls && !am_sender)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ crtimes_ndx = (file_extra_cnt += EXTRA64_CNT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (am_sender) /* This is most likely in the in64 union as well. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pathname_ndx = (file_extra_cnt += PTR_EXTRA_CNT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -627,6 +630,10 @@ void setup_protocol(int f_out,int f_in)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!xfer_flags_as_varint && preserve_crtimes) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit_cleanup(RERR_PROTOCOL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!xfer_flags_as_varint && preserve_fileflags) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --fileflags.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit_cleanup(RERR_PROTOCOL);
</span> diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -56,6 +56,7 @@ extern int preserve_fileflags;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int delete_during;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -57,6 +57,7 @@ extern int delete_during;
</span> extern int missing_args;
extern int eol_nulls;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int atimes_ndx;
</span> +extern int crtimes_ndx;
extern int relative_paths;
extern int implied_dirs;
extern int ignore_perishable;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -380,7 +381,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -382,6 +383,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> int ndx, int first_ndx)
{
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- static time_t modtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ static time_t modtime, crtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static time_t modtime, atime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static time_t crtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -491,6 +492,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- modtime = file->modtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (NSEC_BUMP(file) && protocol_version >= 31)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xflags |= XMIT_MOD_NSEC;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -498,6 +502,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;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atime = F_ATIME(file);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (crtimes_ndx) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ time_t file_crtime = f_crtime(file);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (file_crtime == modtime)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ crtime = F_CRTIME(file);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (crtime == modtime)
</span> + xflags |= XMIT_CRTIME_EQ_MTIME;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtime = file_crtime;
</span> + }
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span>
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != -1) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -575,6 +583,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;'>+@@ -585,6 +596,10 @@ 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:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (crtimes_ndx && !(xflags & XMIT_CRTIME_EQ_MTIME))
+ write_varlong(f, crtime, 4);
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</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;'>-@@ -668,7 +678,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -681,6 +696,9 @@ 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:#ffe0e0;'>-- static int64 modtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ static int64 modtime, crtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int64 modtime, atime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ static time_t crtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> static mode_t mode;
#ifdef SUPPORT_FILEFLAGS
static uint32 fileflags;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -820,6 +830,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;'>+@@ -794,6 +812,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;'>+ mode = first->mode;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (atimes_ndx && !S_ISDIR(mode))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atime = F_ATIME(first);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (crtimes_ndx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ crtime = F_CRTIME(first);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef SUPPORT_FILEFLAGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (preserve_fileflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fileflags = F_FFLAGS(first);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -834,6 +856,21 @@ 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:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (crtimes_ndx) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (!(xflags & XMIT_CRTIME_EQ_MTIME)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (xflags & XMIT_CRTIME_EQ_MTIME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ crtime = modtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span> + crtime = read_varlong(f, 4);
+#if SIZEOF_TIME_T < SIZEOF_INT64
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (!am_generator && (int64)(time_t)crtime != crtime) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(FERROR_XFER,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ "Create time value of %s truncated on receiver.\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ lastname);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!am_generator && (int64)(time_t)crtime != crtime) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rprintf(FERROR_XFER,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "Create time value of %s truncated on receiver.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lastname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span> +#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ } else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtime = modtime;
</span> + }
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -997,6 +1020,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:#ffe0e0;'>- F_GROUP(file) = gid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file->flags |= gid_flags;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1023,6 +1060,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;'>+ if (atimes_ndx && !S_ISDIR(mode))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ F_ATIME(file) = atime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (crtimes_ndx)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ f_crtime_set(file, (time_t)crtime);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ F_CRTIME(file) = crtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1398,6 +1423,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- F_GROUP(file) = st.st_gid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (am_generator && st.st_uid == our_uid)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1426,6 +1467,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span> file->flags |= FLAG_OWNED_BY_US;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (atimes_ndx && !S_ISDIR(file->mode))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ F_ATIME(file) = st.st_atime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (crtimes_ndx)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ f_crtime_set(file, get_create_time(fname));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ F_CRTIME(file) = get_create_time(fname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span>
if (basename != thisname)
file->dirname = lastdir;
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -40,6 +40,7 @@ extern int preserve_xattrs;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int preserve_links;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,6 +41,7 @@ extern int preserve_links;
</span> extern int preserve_devices;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int write_devices;
</span> extern int preserve_specials;
+extern int preserve_fileflags;
extern int preserve_hard_links;
extern int preserve_executability;
extern int preserve_fileflags;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -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;'>+@@ -398,6 +399,19 @@ static inline int mtime_differs(STRUCT_STAT *stp, struct file_struct *file)
</span> #endif
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+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;'>++static inline int any_time_differs(stat_x *sxp, struct file_struct *file, UNUSED(const char *fname))
</span> +{
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int diff = time_diff(&sxp->st, file);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (diff || !crtimes_ndx)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return diff;
</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;'>-+ return cmp_time(sxp->crtime, 0, f_crtime(file), 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int differs = mtime_differs(&sxp->st, file);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!differs && crtimes_ndx) {
</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;'>++ differs = !same_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:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return differs;
</span> +}
+
static inline int perms_differ(struct file_struct *file, stat_x *sxp)
{
if (preserve_perms)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -448,7 +459,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -452,7 +466,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_diff(&sxp->st, file))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (preserve_times & PRESERVE_LINK_TIMES && all_time_diff(sxp, file, fname))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (preserve_times & PRESERVE_LINK_TIMES && mtime_differs(&sxp->st, file))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (preserve_times & PRESERVE_LINK_TIMES && any_time_differs(sxp, file, fname))
</span> return 0;
#endif
#ifdef CAN_CHMOD_SYMLINK
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -468,7 +479,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -472,7 +486,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_diff(&sxp->st, file))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (preserve_times && all_time_diff(sxp, file, fname))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (preserve_times && mtime_differs(&sxp->st, file))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (preserve_times && any_time_differs(sxp, file, fname))
</span> return 0;
if (perms_differ(file, sxp))
return 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -511,6 +522,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- iflags |= ITEM_REPORT_TIME;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -518,6 +532,14 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (atimes_ndx && !S_ISDIR(file->mode) && !S_ISLNK(file->mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && !same_time(F_ATIME(file), 0, sxp->st.st_atime, 0))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ iflags |= ITEM_REPORT_ATIME;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + 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, 0, f_crtime(file), 0) != 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!same_time(sxp->crtime, 0, F_CRTIME(file), 0))
</span> + iflags |= ITEM_REPORT_CRTIME;
+ }
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1135,6 +1152,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char permbuf[PERMSTRING_SIZE];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ time_t crtime = crtimes_ndx ? f_crtime(f) : 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int64 len;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int colwidth = human_readable ? 14 : 11;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1150,10 +1168,12 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef SUPPORT_LINKS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (preserve_links && S_ISLNK(f->mode)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- rprintf(FINFO, "%s %*s %s %s -> %s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(FINFO, "%s %*s %s%s%s %s -> %s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- permbuf, colwidth, human_num(len),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- timestring(f->modtime), f_name(f, NULL),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- F_SYMLINK(f));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ timestring(f->modtime),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtimes_ndx ? " " : "",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtimes_ndx ? timestring(crtime) : "",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ f_name(f, NULL), F_SYMLINK(f));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1142,6 +1164,7 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int size_width = human_readable ? 14 : 11;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int mtime_width = 1 + strlen(mtime_str);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int atime_width = atimes_ndx ? mtime_width : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int crtime_width = crtimes_ndx ? mtime_width : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!F_IS_ACTIVE(f)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* this can happen if duplicate names were removed */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1152,10 +1175,11 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if (missing_args == 2 && f->mode == 0) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1161,9 +1181,12 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- colwidth + 31, "*missing",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rprintf(FINFO, "%-*s %s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 10 + 1 + size_width + mtime_width + atime_width, "*missing",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 10 + 1 + size_width + mtime_width + atime_width + crtime_width, "*missing",
</span> f_name(f, NULL));
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- rprintf(FINFO, "%s %*s %s %s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(FINFO, "%s %*s %s%s%s %s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- permbuf, colwidth, human_num(len),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- timestring(f->modtime), f_name(f, NULL));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ timestring(f->modtime),
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtimes_ndx ? " " : "",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ crtimes_ndx ? timestring(crtime) : "",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ f_name(f, NULL));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const char *atime_str = atimes_ndx && !S_ISDIR(f->mode) ? timestring(F_ATIME(f)) : "";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const char *crtime_str = crtimes_ndx ? timestring(F_CRTIME(f)) : "";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const char *arrow, *lnk;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ permstring(permbuf, f->mode);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1168,9 +1192,9 @@ static void list_file_entry(struct file_struct *f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ arrow = lnk = "";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rprintf(FINFO, "%s %*s %s%*s %s%s%s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rprintf(FINFO, "%s %*s %s%*s%*s %s%s%s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ permbuf, size_width, human_num(F_LENGTH(f)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- timestring(f->modtime), atime_width, atime_str,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ timestring(f->modtime), atime_width, atime_str, crtime_width, crtime_str,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ f_name(f, NULL), arrow, lnk);
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1258,6 +1281,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1266,6 +1290,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span> return;
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -235,182 +265,218 @@ diff --git a/generator.c b/generator.c
</span>
if (dry_run > 1 || (dry_missing_dir && is_below(file, dry_missing_dir))) {
int i;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/ifuncs.h b/ifuncs.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/ifuncs.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/ifuncs.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -43,6 +43,28 @@ free_xbuf(xbuf *xb)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- memset(xb, 0, sizeof (xbuf));
</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;'>-+static inline time_t
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+f_crtime(struct file_struct *fp)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+{
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#if SIZEOF_TIME_T > 4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ time_t crtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ memcpy(&crtime, &REQ_EXTRA(fp, crtimes_ndx)->unum, SIZEOF_TIME_T);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return crtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return REQ_EXTRA(fp, crtimes_ndx)->unum;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</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;'>-+static inline void
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+f_crtime_set(struct file_struct *fp, time_t crtime)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+{
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#if SIZEOF_TIME_T > 4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ memcpy(&REQ_EXTRA(fp, crtimes_ndx)->unum, &crtime, SIZEOF_TIME_T);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ REQ_EXTRA(fp, crtimes_ndx)->unum = (uint32)crtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</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;'>- static inline int
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- to_wire_mode(mode_t mode)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span> diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -716,7 +716,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -721,7 +721,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span> c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- c[11] = '\0';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ c[11] = !(iflags & ITEM_REPORT_CRTIME) ? '.' : 'n';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ c[12] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ c[11] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- c[12] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ c[12] = !(iflags & ITEM_REPORT_CRTIME) ? '.' : 'n';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ c[13] = '\0';
</span>
if (iflags & (ITEM_IS_NEW|ITEM_MISSING_DATA)) {
char ch = iflags & ITEM_IS_NEW ? '+' : '?';
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -62,6 +62,7 @@ int preserve_specials = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int preserve_uid = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -64,6 +64,7 @@ int preserve_uid = 0;
</span> int preserve_gid = 0;
int preserve_times = 0;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ int preserve_atimes = 0;
</span> +int preserve_crtimes = 0;
int update_only = 0;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ int open_noatime = 0;
</span> int cvs_exclude = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int dry_run = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -717,6 +718,7 @@ void usage(enum logcode F)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --specials preserve special files\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -D same as --devices --specials\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -t, --times preserve modification times\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(F," -N, --crtimes preserve create times (newness)\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -O, --omit-dir-times omit directories from --times\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -J, --omit-link-times omit symlinks from --times\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --super receiver attempts super-user activities\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -885,6 +887,9 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -664,6 +665,11 @@ static void print_capabilities(enum logcode f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "file-flags",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef SUPPORT_CRTIMES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "no "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "crtimes",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "*" /* All options after this point are hidden w/o -V -V */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef HAVE_SIMD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "no "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -842,6 +848,9 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"no-U", 0, POPT_ARG_VAL, &preserve_atimes, 0, 0, 0 },
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"open-noatime", 0, POPT_ARG_VAL, &open_noatime, 1, 0, 0 },
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"no-open-noatime", 0, POPT_ARG_VAL, &open_noatime, 0, 0, 0 },
</span> + {"crtimes", 'N', POPT_ARG_VAL, &preserve_crtimes, 1, 0, 0 },
+ {"no-crtimes", 0, POPT_ARG_VAL, &preserve_crtimes, 0, 0, 0 },
+ {"no-N", 0, POPT_ARG_VAL, &preserve_crtimes, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 1, 0, 0 },
{"no-omit-dir-times",0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
{"no-O", 0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2491,6 +2496,8 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- argstr[x++] = 'D';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (preserve_times)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- argstr[x++] = 't';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1222,6 +1231,9 @@ static void set_refuse_options(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parse_one_refuse_match(0, "force-uchange", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parse_one_refuse_match(0, "force-schange", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef SUPPORT_CRTIMES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parse_one_refuse_match(0, "crtimes", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Now we use the descrip values to actually mark the options for refusal. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (op = long_options; op != list_end; op++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2569,6 +2581,10 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (preserve_atimes > 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ argstr[x++] = 'U';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (preserve_crtimes)
+ argstr[x++] = 'N';
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> if (preserve_perms)
argstr[x++] = 'p';
else if (preserve_executability && am_sender)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/rsync.1.md b/rsync.1.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/rsync.1.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/rsync.1.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -373,6 +373,7 @@ detailed description below for a complete description.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --times, -t preserve modification times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --atimes, -U preserve access (use) times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --open-noatime avoid changing the atime on opened files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--crtimes, -N preserve create times (newness)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --omit-dir-times, -O omit directories from --times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --omit-link-times, -J omit symlinks from --times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --super receiver attempts super-user activities
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1370,6 +1371,11 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mounted to avoid updating the atime on read access even without the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ O_NOATIME flag being set.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0. `--crtimes`, `-N,`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ This tells rsync to set the create times (newness) of +the destination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ files to the same value as the source files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0. `--omit-dir-times`, `-O`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This tells rsync to omit directories when it is preserving modification
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2606,7 +2612,7 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ output of other verbose messages).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- format is like the string `YXcstpoguaxf`, where **Y** is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ format is like the string `YXcstpoguaxfn`, where **Y** is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of update being done, **X** is replaced by the file-type, and the other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ letters represent attributes that may be output if they are being modified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2663,6 +2669,8 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ happens when a symlink or directory is updated.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - The `a` means that the ACL information changed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - The `x` means that the extended attribute information changed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ - A `n` means the create time (newness) is different and is being updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to the sender's value (requires `--crtimes`).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ One other output is possible: when deleting files, the "%i" will output the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ string "`*deleting`" for each item that is being removed (assuming that you
</span> diff --git a/rsync.c b/rsync.c
--- a/rsync.c
+++ b/rsync.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -587,6 +587,9 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || (!(preserve_times & PRESERVE_DIR_TIMES) && S_ISDIR(sxp->st.st_mode))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- || (!(preserve_times & PRESERVE_LINK_TIMES) && S_ISLNK(sxp->st.st_mode)))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- flags |= ATTRS_SKIP_MTIME;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -618,6 +618,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;'>+ memcpy(&sx2.st, &sxp->st, sizeof (sx2.st));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!atimes_ndx || S_ISDIR(sxp->st.st_mode))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ flags |= ATTRS_SKIP_ATIME;
</span> + /* Don't set the creation date on the root folder of an HFS+ volume. */
+ if (sxp->st.st_ino == 2 && S_ISDIR(sxp->st.st_mode))
+ flags |= ATTRS_SKIP_CRTIME;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (!(flags & ATTRS_SKIP_MTIME)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && (sxp->st.st_mtime != file->modtime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!(flags & ATTRS_SKIP_MTIME) && !same_mtime(file, &sxp->st, flags & ATTRS_ACCURATE_TIME)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sx2.st.st_mtime = file->modtime;
</span> #ifdef ST_MTIME_NSEC
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -604,6 +607,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -647,6 +650,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span> file->flags |= FLAG_TIME_FAILED;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (crtimes_ndx && !(flags & ATTRS_SKIP_CRTIME)) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ time_t file_crtime = f_crtime(file);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ time_t file_crtime = F_CRTIME(file);
</span> + if (sxp->crtime == 0)
+ sxp->crtime = get_create_time(fname);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (cmp_time(sxp->crtime, 0, file_crtime, 0) != 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!same_time(sxp->crtime, 0L, file_crtime, 0L)
</span> + && set_create_time(fname, file_crtime) == 0)
+ updated = 1;
+ }
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span>
#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;'>-@@ -720,7 +731,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -766,7 +779,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 ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ | (ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME | ATTRS_SKIP_CRTIME));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- | (ok_to_set_time ? ATTRS_ACCURATE_TIME : ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ | (ok_to_set_time ? ATTRS_ACCURATE_TIME : ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME | ATTRS_SKIP_CRTIME));
</span>
/* move tmp file over real file */
if (DEBUG_GTE(RECV, 1))
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -749,7 +760,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -795,7 +808,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 ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ ok_to_set_time ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME | ATTRS_SKIP_CRTIME);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ok_to_set_time ? ATTRS_ACCURATE_TIME : ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ok_to_set_time ? ATTRS_ACCURATE_TIME : ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME | ATTRS_SKIP_CRTIME);
</span>
if (temp_copy_name) {
if (do_rename(fnametmp, fname) < 0) {
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -62,7 +62,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - now (HLINKED files only) */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define XMIT_IO_ERROR_ENDLIST (1<<12) /* protocols 31*- now (w/XMIT_EXTENDED_FLAGS) (also protocol 30 w/'f' compat flag) */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define XMIT_MOD_NSEC (1<<13) /* protocols 31 - now */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#define XMIT_SAME_FLAGS (1<<14) /* protocols ?? - now */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define XMIT_CRTIME_EQ_MTIME (1<<14) /* protocols ?? - now */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define XMIT_SAME_FLAGS (1<<15) /* protocols ?? - now */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -69,7 +69,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* The following XMIT flags require an rsync that uses a varint for the flag values */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define XMIT_SAME_FLAGS (1<<16) /* any protocol - restricted by command-line option */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define XMIT_RESERVED_17 (1<<17) /* reserved for future crtimes use */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define XMIT_CRTIME_EQ_MTIME (1<<17) /* any protocol - restricted by command-line option */
</span>
/* These flags are used in the live flist data. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -168,6 +169,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ATTRS_SKIP_MTIME (1<<1)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ATTRS_SET_NANO (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -182,6 +182,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_ACCURATE_TIME (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_SKIP_ATIME (1<<3)
</span> #define ATTRS_DELAY_IMMUTABLE (1<<4)
+#define ATTRS_SKIP_CRTIME (1<<5)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define MSG_FLUSH 2
</span> #define FULL_FLUSH 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- #define NORMAL_FLUSH 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -184,7 +186,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define FNAMECMP_FUZZY 0x83
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* For use by the itemize_changes code */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#define ITEM_REPORT_ATIME (1<<0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define ITEM_REPORT_CRTIME (1<<0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ITEM_REPORT_CHANGE (1<<1)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ITEM_REPORT_SIZE (1<<2) /* regular files only */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ITEM_REPORT_TIMEFAIL (1<<2) /* symlinks only */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -741,6 +743,7 @@ extern int file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -210,6 +211,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ITEM_REPORT_ACL (1<<7)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ITEM_REPORT_XATTR (1<<8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ITEM_REPORT_FFLAGS (1<<9)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ITEM_REPORT_CRTIME (1<<10)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ITEM_XNAME_FOLLOWS (1<<12)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ITEM_IS_NEW (1<<13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -575,6 +577,10 @@ typedef unsigned int size_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ST_FLAGS(st) NO_FFLAGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_GETATTRLIST
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SUPPORT_CRTIMES 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Find a variable that is either exactly 32-bits or longer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * If some code depends on 32-bit truncation, it will need to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * take special action in a "#if SIZEOF_INT32 > 4" section. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -784,6 +790,7 @@ struct file_struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int file_extra_cnt;
</span> extern int inc_recurse;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int uid_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int gid_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int atimes_ndx;
</span> +extern int crtimes_ndx;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int fileflags_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int acls_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int xattrs_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -748,6 +751,7 @@ extern int xattrs_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define EXTRA_LEN (sizeof (union file_extras))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define PTR_EXTRA_CNT ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define TIME_EXTRA_CNT ((SIZEOF_TIME_T + EXTRA_LEN - 1) / EXTRA_LEN)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define DEV_EXTRA_CNT 2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define DIRNODE_EXTRA_CNT 3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1033,6 +1037,7 @@ typedef struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int pathname_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int depth_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int uid_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -848,6 +855,7 @@ extern int xattrs_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define F_XATTR(f) REQ_EXTRA(f, xattrs_ndx)->num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define F_NDX(f) REQ_EXTRA(f, unsort_ndx)->num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define F_ATIME(f) REQ_EXTRA64(f, atimes_ndx)->num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define F_CRTIME(f) REQ_EXTRA64(f, crtimes_ndx)->num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* These items are per-entry optional: */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define F_HL_GNUM(f) OPT_EXTRA(f, START_BUMP(f))->num /* non-dirs */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1090,6 +1098,7 @@ typedef struct {
</span>
typedef struct {
STRUCT_STAT st;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -418,49 +484,10 @@ diff --git a/rsync.h b/rsync.h
</span> #ifdef SUPPORT_ACLS
struct rsync_acl *acc_acl; /* access ACL */
struct rsync_acl *def_acl; /* default ACL */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/rsync.yo b/rsync.yo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/rsync.yo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/rsync.yo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -373,6 +373,7 @@ to the detailed description below for a complete description. verb(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --specials preserve special files
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -D same as --devices --specials
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -t, --times preserve modification times
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ -N, --crtimes preserve create times (newness)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -O, --omit-dir-times omit directories from --times
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -J, --omit-link-times omit symlinks from --times
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --super receiver attempts super-user activities
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1242,6 +1243,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:#ffe0e0;'>- updated (though rsync's delta-transfer algorithm will make the update fairly efficient
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if the files haven't actually changed, you're much better off using bf(-t)).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dit(bf(-N, --crtimes)) This tells rsync to set the create times (newness) of
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+the destination files to the same value as the source files.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it is preserving modification times (see bf(--times)). If NFS is sharing
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- the directories on the receiving side, it is a good idea to use bf(-O).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2173,7 +2177,7 @@ with older versions of rsync, but that also turns on the output of other
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- verbose messages).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--format is like the string bf(YXcstpogfax), where bf(Y) is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+format is like the string bf(YXcstpogfaxn), where bf(Y) is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- type of update being done, bf(X) is replaced by the file-type, and the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- other letters represent attributes that may be output if they are being
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- modified.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2232,6 +2236,8 @@ quote(itemization(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it() The bf(f) means that the fileflags information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it() The bf(a) means that the ACL information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it() The bf(x) means that the extended attribute information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ it() A bf(n) means the create time (newness) is different and is being
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ updated to the sender's value (requires bf(--crtimes)).
</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;'>- One other output is possible: when deleting files, the "%i" will output
</span> diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -54,6 +54,13 @@ extern int preserve_executability;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -55,6 +55,13 @@ extern int open_noatime;
</span> # endif
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -474,10 +501,11 @@ 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;'>-@@ -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;'>+@@ -493,6 +500,40 @@ int do_setattrlist_times(const char *fname, STRUCT_STAT *stp)
</span> }
#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> +time_t get_create_time(const char *path)
+{
+ static struct create_time attrBuf;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -490,7 +518,9 @@ diff --git a/syscall.c b/syscall.c
</span> + return 0;
+ return attrBuf.crtime.tv_sec;
+}
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> +
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> +int set_create_time(const char *path, time_t crtime)
+{
+ struct attrlist attrList;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -507,21 +537,24 @@ diff --git a/syscall.c b/syscall.c
</span> + attrList.commonattr = ATTR_CMN_CRTIME;
+ return setattrlist(path, &attrList, &ts, sizeof ts, FSOPT_NOFOLLOW);
+}
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> +
#ifdef HAVE_UTIMENSAT
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_utimensat(const char *fname, time_t modtime, uint32 mod_nsec)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_utimensat(const char *fname, STRUCT_STAT *stp)
</span> {
diff --git a/testsuite/crtimes.test b/testsuite/crtimes.test
new file mode 100644
--- /dev/null
+++ b/testsuite/crtimes.test
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -0,0 +1,24 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,26 @@
</span> +#! /bin/sh
+
+# Test rsync copying create times
+
+. "$suitedir/rsync.fns"
+
<span style='display:block; white-space:pre;background:#e0ffe0;'>++$RSYNC --version | grep " crtimes" >/dev/null || test_skipped "Rsync is configured without crtimes support"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span> +# Setting an older time via touch sets the create time to the mtime.
+# Setting it to a newer time affects just the mtime.
+
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -547,189 +580,184 @@ diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
</span> chkdir="$tmpdir/chk"
# For itemized output:
<span style='display:block; white-space:pre;background:#ffe0e0;'>--all_plus='+++++++++'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--allspace=' '
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--dots='.....' # trailing dots after changes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+all_plus='++++++++++'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+allspace=' '
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dots='......' # trailing dots after changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-all_plus='++++++++++'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-allspace=' '
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-dots='......' # trailing dots after changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all_plus='+++++++++++'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++allspace=' '
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++dots='.......' # trailing dots after changes
</span> tab_ch=' ' # a single tab character
# Berkley's nice.
diff --git a/tls.c b/tls.c
--- a/tls.c
+++ b/tls.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -111,6 +111,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -108,6 +108,9 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)
</span> #endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int display_atimes = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> +static int display_crtimes = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> static void failed(char const *what, char const *where)
{
<span style='display:block; white-space:pre;background:#ffe0e0;'>- fprintf(stderr, PROGRAM ": %s %s: %s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -118,16 +120,44 @@ static void failed(char const *what, char const *where)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- exit(1);
</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;'>-+static void storetime(char *dest, size_t destsize, time_t t, int nsecs)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+{
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (t) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int len;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ struct tm *mt = gmtime(&t);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ len = snprintf(dest, destsize,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ "%04d-%02d-%02d %02d:%02d:%02d",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (int)mt->tm_year + 1900,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (int)mt->tm_mon + 1,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (int)mt->tm_mday,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (int)mt->tm_hour,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (int)mt->tm_min,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (int)mt->tm_sec);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (nsecs >= 0 && len >= 0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ snprintf(dest + len, destsize - len, ".%09d", nsecs);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int has_nsecs = nsecs >= 0 ? 1 : 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int len = MIN(19 + 9*has_nsecs, (int)destsize - 1);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ memset(dest, ' ', len);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ dest[len] = '\0';
</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;'>-+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -143,14 +146,22 @@ static void storetime(char *dest, size_t destsize, time_t t, int nsecs)
</span> static void list_file(const char *fname)
{
STRUCT_STAT buf;
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + time_t crtime = 0;
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> char permbuf[PERMSTRING_SIZE];
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- struct tm *mt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- char datebuf[50];
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ char mtimebuf[50];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char mtimebuf[50];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char atimebuf[50];
</span> + char crtimebuf[50];
char linkbuf[4096];
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int nsecs;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int nsecs;
</span>
if (do_lstat(fname, &buf) < 0)
failed("stat", fname);
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (display_crtimes && (crtime = get_create_time(fname)) == 0)
+ failed("get_create_time", fname);
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> #ifdef SUPPORT_XATTRS
if (am_root < 0)
stat_xattr(fname, &buf);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -161,30 +191,17 @@ static void list_file(const char *fname)
</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;'>- permstring(permbuf, buf.st_mode);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (buf.st_mtime) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- int len;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- mt = gmtime(&buf.st_mtime);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- len = snprintf(datebuf, sizeof datebuf,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- "%04d-%02d-%02d %02d:%02d:%02d",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (int)mt->tm_year + 1900,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (int)mt->tm_mon + 1,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (int)mt->tm_mday,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (int)mt->tm_hour,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (int)mt->tm_min,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (int)mt->tm_sec);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef ST_MTIME_NSEC
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if (nsec_times) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- snprintf(datebuf + len, sizeof datebuf - len,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- ".%09d", (int)buf.ST_MTIME_NSEC);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (nsec_times)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ nsecs = (int)buf.ST_MTIME_NSEC;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- int len = MIN(19 + 9*nsec_times, (int)sizeof datebuf - 1);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- memset(datebuf, ' ', len);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- datebuf[len] = '\0';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ nsecs = -1;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ storetime(mtimebuf, sizeof mtimebuf, buf.st_mtime, nsecs);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -195,6 +206,12 @@ static void list_file(const char *fname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ storetime(atimebuf, sizeof atimebuf, S_ISDIR(buf.st_mode) ? 0 : buf.st_atime, -1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atimebuf[0] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + if (display_crtimes)
+ storetime(crtimebuf, sizeof crtimebuf, crtime, -1);
+ else
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> + crtimebuf[0] = '\0';
/* TODO: Perhaps escape special characters in fname? */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -195,13 +212,14 @@ static void list_file(const char *fname)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (long)minor(buf.st_rdev));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf("%s ", permbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -204,14 +221,17 @@ static void list_file(const char *fname)
</span> } else
printf("%15s", do_big_num(buf.st_size, 1, NULL));
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- printf(" %6ld.%-6ld %6ld %s %s%s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ printf(" %6ld.%-6ld %6ld %s%s%s%s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- printf(" %6ld.%-6ld %6ld%s%s %s%s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf(" %6ld.%-6ld %6ld%s%s%s %s%s\n",
</span> (long)buf.st_uid, (long)buf.st_gid, (long)buf.st_nlink,
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- datebuf, fname, linkbuf);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ mtimebuf, crtimebuf, fname, linkbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mtimebuf, atimebuf, fname, linkbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mtimebuf, atimebuf, crtimebuf, fname, linkbuf);
</span> }
static struct poptOption long_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"atimes", 'U', POPT_ARG_NONE, &display_atimes, 0, 0, 0},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + {"crtimes", 'N', POPT_ARG_NONE, &display_crtimes, 0, 0, 0},
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</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;'>-@@ -220,6 +238,7 @@ static void tls_usage(int ret)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fprintf(F,"usage: " PROGRAM " [OPTIONS] FILE ...\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -231,6 +251,9 @@ static void NORETURN tls_usage(int ret)
</span> fprintf(F,"Trivial file listing program for portably checking rsync\n");
fprintf(F,"\nOptions:\n");
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ fprintf(F," -U, --atimes display access (last-used) times\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_CRTIMES
</span> + fprintf(F," -N, --crtimes display create times (newness)\n");
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> fprintf(F," -l, --link-times display the time on a symlink\n");
fprintf(F," -L, --link-owner display the owner+group on a symlink\n");
#ifdef SUPPORT_XATTRS
diff -Nurp a/proto.h b/proto.h
--- a/proto.h
+++ b/proto.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -340,6 +340,8 @@ int do_lstat(const char *fname, STRUCT_S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -339,6 +339,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:#ffe0e0;'>- int do_setattrlist_times(const char *fname, time_t modtime, uint32 mod_nsec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_setattrlist_times(const char *fname, STRUCT_STAT *stp);
</span> +time_t get_create_time(const char *path);
+int set_create_time(const char *path, time_t crtime);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_utimensat(const char *fname, time_t modtime, uint32 mod_nsec);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_lutimes(const char *fname, time_t modtime, uint32 mod_nsec);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_utimes(const char *fname, time_t modtime, uint32 mod_nsec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_utimensat(const char *fname, STRUCT_STAT *stp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_lutimes(const char *fname, STRUCT_STAT *stp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_utimes(const char *fname, STRUCT_STAT *stp);
</span> diff -Nurp a/rsync.1 b/rsync.1
--- a/rsync.1
+++ b/rsync.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -449,6 +449,7 @@ to the detailed description below for a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-specials preserve special files
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-D same as \-\-devices \-\-specials
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-t, \-\-times preserve modification times
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ \-N, \-\-crtimes preserve create times (newness)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-O, \-\-omit\-dir\-times omit directories from \-\-times
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-J, \-\-omit\-link\-times omit symlinks from \-\-times
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-super receiver attempts super\-user activities
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1427,6 +1428,10 @@ cause the next transfer to behave as if
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- updated (though rsync\(cq\&s delta\-transfer algorithm will make the update fairly efficient
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if the files haven\(cq\&t actually changed, you\(cq\&re much better off using \fB\-t\fP).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP "\fB\-N, \-\-crtimes\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This tells rsync to set the create times (newness) of
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+the destination files to the same value as the source files.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP "\fB\-O, \-\-omit\-dir\-times\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- This tells rsync to omit directories when
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it is preserving modification times (see \fB\-\-times\fP). If NFS is sharing
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2462,7 +2467,7 @@ with older versions of rsync, but that a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- verbose messages).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- The \(dq\&%i\(dq\& escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--format is like the string \fBYXcstpogfax\fP, where \fBY\fP is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+format is like the string \fBYXcstpogfaxn\fP, where \fBY\fP is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- type of update being done, \fBX\fP is replaced by the file\-type, and the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- other letters represent attributes that may be output if they are being
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- modified.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2537,6 +2542,9 @@ The \fBf\fP means that the fileflags inf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -449,6 +449,7 @@ detailed description below for a complet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --times, -t preserve modification times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --atimes, -U preserve access (use) times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --open-noatime avoid changing the atime on opened files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--crtimes, -N preserve create times (newness)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --omit-dir-times, -O omit directories from --times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --omit-link-times, -J omit symlinks from --times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --super receiver attempts super-user activities
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1431,6 +1432,9 @@ transferred. If your OS does not suppor
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ will silently ignore this option. Note also that some filesystems are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mounted to avoid updating the atime on read access even without the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ O_NOATIME flag being set.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP "\fB\-\-crtimes\fP, \fB\-N,\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This tells rsync to set the create times (newness) of +the destination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++files to the same value as the source files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP "\fB\-\-omit-dir-times\fP, \fB\-O\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This tells rsync to omit directories when it is preserving modification
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ times (see \fB\-\-times\fP). If NFS is sharing the directories on the receiving
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2630,7 +2634,7 @@ also be output, but only if the receivin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ output of other verbose messages).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-format is like the string \fBYXcstpoguaxf\fP, where \fBY\fP is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++format is like the string \fBYXcstpoguaxfn\fP, where \fBY\fP is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of update being done, \fBX\fP is replaced by the file-type, and the other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ letters represent attributes that may be output if they are being modified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2705,6 +2709,9 @@ happens when a symlink or directory is u
</span> The \fBa\fP means that the ACL information changed.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP o
</span> The \fBx\fP means that the extended attribute information changed.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+A \fBn\fP means the create time (newness) is different and is being
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+updated to the sender\(cq\&s value (requires \fB\-\-crtimes\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++A \fBn\fP means the create time (newness) is different and is being updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to the sender's value (requires \fB\-\-crtimes\fP).
</span> .RE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ One other output is possible: when deleting files, the "%i" will output the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff -Nurp a/rsync.1.html b/rsync.1.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/rsync.1.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/rsync.1.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -364,6 +364,7 @@ detailed description below for a complet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --times, -t preserve modification times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --atimes, -U preserve access (use) times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --open-noatime avoid changing the atime on opened files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--crtimes, -N preserve create times (newness)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --omit-dir-times, -O omit directories from --times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --omit-link-times, -J omit symlinks from --times
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --super receiver attempts super-user activities
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1314,6 +1315,11 @@ mounted to avoid updating the atime on r
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ O_NOATIME flag being set.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<dt><code>--crtimes</code>, <code>-N,</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<p>This tells rsync to set the create times (newness) of +the destination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++files to the same value as the source files.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++</dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <dt><code>--omit-dir-times</code>, <code>-O</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>This tells rsync to omit directories when it is preserving modification
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ times (see <code>--times</code>). If NFS is sharing the directories on the receiving
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2460,7 +2466,7 @@ also be output, but only if the receivin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (you can use <code>-vv</code> with older versions of rsync, but that also turns on the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ output of other verbose messages).</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-format is like the string <code>YXcstpoguaxf</code>, where <strong>Y</strong> is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++format is like the string <code>YXcstpoguaxfn</code>, where <strong>Y</strong> is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of update being done, <strong>X</strong> is replaced by the file-type, and the other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ letters represent attributes that may be output if they are being modified.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>The update types that replace the <strong>Y</strong> are as follows:</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2514,6 +2520,8 @@ means that the access time will be set t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ happens when a symlink or directory is updated.</li>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <li>The <code>a</code> means that the ACL information changed.</li>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <li>The <code>x</code> means that the extended attribute information changed.</li>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<li>A <code>n</code> means the create time (newness) is different and is being updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to the sender's value (requires <code>--crtimes</code>).</li>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </ul>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>One other output is possible: when deleting files, the "%i" will output the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ string "<code>*deleting</code>" for each item that is being removed (assuming that you
</span><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 e2bbcd4d165..8238094d375 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;'>@@ -4,36 +4,14 @@ Modified from a patch that was written by Rolf Grossmann.
</span> To use this patch, run these commands for a successful build:
patch -p1 <patches/fileflags.diff
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ./prepare-source
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ./configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ./configure (optional if already run)
</span> make
<span style='display:block; white-space:pre;background:#ffe0e0;'>-based-on: d73762eea3f15f2c56bb3fa9394ad1883c25c949
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/Makefile.in b/Makefile.in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/Makefile.in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/Makefile.in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -46,7 +46,7 @@ popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- popt/popthelp.o popt/poptparse.o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--TLS_OBJ = tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o lib/sysxattrs.o @BUILD_POPT@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+TLS_OBJ = tls.o syscall.o t_stub.o lib/compat.o lib/snprintf.o lib/permstring.o lib/sysxattrs.o @BUILD_POPT@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Programs we must have to run the test cases
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -128,7 +128,7 @@ getgroups$(EXEEXT): getgroups.o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- getfsdev$(EXEEXT): getfsdev.o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--TRIMSLASH_OBJ = trimslash.o syscall.o lib/compat.o lib/snprintf.o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+TRIMSLASH_OBJ = trimslash.o syscall.o t_stub.o lib/compat.o lib/snprintf.o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- trimslash$(EXEEXT): $(TRIMSLASH_OBJ)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TRIMSLASH_OBJ) $(LIBS)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+based-on: a8fc8fc2d22ba7243b96decb91c586682a05e4a1
</span> diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -45,9 +45,11 @@ extern int checksum_seed;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -38,12 +38,14 @@ extern int checksum_seed;
</span> extern int basis_dir_cnt;
extern int prune_empty_dirs;
extern int protocol_version;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,20 +19,23 @@ diff --git a/compat.c b/compat.c
</span> extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+extern int preserve_fileflags;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int preserve_atimes;
</span> extern int preserve_acls;
extern int preserve_xattrs;
<span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int preserve_fileflags;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int xfer_flags_as_varint;
</span> extern int need_messages_from_generator;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -65,7 +67,7 @@ extern char *iconv_opt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int delete_mode, delete_before, delete_during, delete_after;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -74,7 +76,7 @@ int inplace_partial = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_negotiated_strings = 0;
</span>
/* These index values are for the file-list's extra-attribute array. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>--int uid_ndx, gid_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+int uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int pathname_ndx, depth_ndx, atimes_ndx, uid_ndx, gid_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int pathname_ndx, depth_ndx, atimes_ndx, uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
</span>
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -144,6 +146,8 @@ void setup_protocol(int f_out,int f_in)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -468,6 +470,8 @@ void setup_protocol(int f_out,int f_in)
</span> uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -63,17 +44,17 @@ diff --git a/compat.c b/compat.c
</span> if (preserve_acls && !am_sender)
acls_ndx = ++file_extra_cnt;
if (preserve_xattrs)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/configure.ac b/configure.ac
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/configure.ac
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/configure.ac
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -594,6 +594,7 @@ AC_FUNC_UTIME_NULL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- AC_FUNC_ALLOCA
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ chflags \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -623,6 +627,10 @@ void setup_protocol(int f_out,int f_in)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!xfer_flags_as_varint && preserve_fileflags) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --fileflags.\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit_cleanup(RERR_PROTOCOL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (am_sender) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ receiver_symlink_times = am_server
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ? strchr(client_info, 'L') != NULL
</span> diff --git a/delete.c b/delete.c
--- a/delete.c
+++ b/delete.c
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,9 +111,9 @@ 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;'>-@@ -381,6 +382,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;'>+@@ -382,6 +383,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
</span> {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- static time_t modtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static time_t modtime, atime;
</span> static mode_t mode;
+#ifdef SUPPORT_FILEFLAGS
+ static uint32 fileflags;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -140,7 +121,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;'>-@@ -424,6 +428,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;'>+@@ -425,6 +429,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 +136,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;'>-@@ -565,6 +577,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;'>+@@ -575,6 +587,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;'>@@ -163,12 +144,12 @@ diff --git a/flist.c b/flist.c
</span> + if (preserve_fileflags && !(xflags & XMIT_SAME_FLAGS))
+ write_int(f, (int)fileflags);
+#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ write_varlong(f, atime, 4);
</span> if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (protocol_version < 30)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- write_int(f, uid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -654,6 +670,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;'>+@@ -666,6 +682,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:#ffe0e0;'>- static int64 modtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int64 modtime, atime;
</span> static mode_t mode;
+#ifdef SUPPORT_FILEFLAGS
+ static uint32 fileflags;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -176,10 +157,10 @@ 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;'>-@@ -761,6 +780,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:#ffe0e0;'>- modtime = first->modtime;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- modtime_nsec = F_MOD_NSEC(first);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -775,6 +794,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
</span> mode = first->mode;
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (atimes_ndx && !S_ISDIR(mode))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atime = F_ATIME(first);
</span> +#ifdef SUPPORT_FILEFLAGS
+ if (preserve_fileflags)
+ fileflags = F_FFLAGS(first);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -187,7 +168,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;'>-@@ -802,6 +825,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;'>+@@ -826,6 +849,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 +179,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;'>-@@ -960,6 +987,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;'>+@@ -984,6 +1011,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 +190,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;'>-@@ -1357,6 +1388,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1383,6 +1414,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;'>@@ -223,7 +204,7 @@ diff --git a/flist.c b/flist.c
</span> diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -42,8 +42,10 @@ extern int preserve_devices;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,8 +43,10 @@ extern int write_devices;
</span> extern int preserve_specials;
extern int preserve_hard_links;
extern int preserve_executability;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -234,7 +215,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;'>-@@ -470,6 +472,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -474,6 +476,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,9 +226,9 @@ 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;'>-@@ -521,6 +527,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- && sxp->st.st_gid != (gid_t)F_GROUP(file))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -527,6 +533,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ iflags |= ITEM_REPORT_OWNER;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
</span> iflags |= ITEM_REPORT_GROUP;
+#ifdef SUPPORT_FILEFLAGS
+ if (preserve_fileflags && !S_ISLNK(file->mode)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -257,18 +238,18 @@ 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;'>-@@ -1415,6 +1426,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file->mode = dest_mode(file->mode, sx.st.st_mode,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dflt_perms, statret == 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1413,6 +1424,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!preserve_perms) { /* See comment in non-dir code below. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, statret == 0);
</span> }
+#ifdef SUPPORT_FORCE_CHANGE
+ if (force_change && !preserve_fileflags)
+ F_FFLAGS(file) = sx.st.st_flags;
+#endif
if (statret != 0 && basis_dir[0] != NULL) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- itemizing, code);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1459,10 +1474,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, itemizing, code);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (j == -2) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1455,10 +1470,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,9 +266,9 @@ 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;'>-@@ -1498,6 +1518,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- exists);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1493,6 +1513,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int exists = statret == 0 && !S_ISDIR(sx.st.st_mode);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, exists);
</span> }
+#ifdef SUPPORT_FORCE_CHANGE
+ if (force_change && !preserve_fileflags)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -296,7 +277,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;'>-@@ -2065,12 +2089,16 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2073,17 +2097,25 @@ 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,9 +285,17 @@ 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 && time_diff(&st, file))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- set_modtime(fname, file->modtime, F_MOD_NSEC(file), file->mode);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ set_modtime(fname, file->modtime, F_MOD_NSEC(file), file->mode, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (link_stat(fname, &st, 0) == 0 && mtime_differs(&st, file)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ st.st_mtime = file->modtime;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef ST_MTIME_NSEC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ st.ST_MTIME_NSEC = F_MOD_NSEC_or_0(file);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef SUPPORT_FORCE_CHANGE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ st.st_mode = file->mode;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ st.st_flags = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set_times(fname, &st);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
+#ifdef SUPPORT_FORCE_CHANGE
+ if (force_change && F_FFLAGS(file) & force_change)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -318,29 +307,30 @@ 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;'>-@@ -713,7 +713,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- c[8] = !(iflags & ITEM_REPORT_ATIME) ? '.' : 'u';
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -720,7 +720,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ : S_ISLNK(file->mode) ? 'U' : 'u';
</span> c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
<span style='display:block; white-space:pre;background:#ffe0e0;'>- c[11] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- c[11] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ c[11] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ c[12] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (iflags & (ITEM_IS_NEW|ITEM_MISSING_DATA)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char ch = iflags & ITEM_IS_NEW ? '+' : '?';
</span> diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -26,6 +26,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #if defined CONFIG_LOCALE && defined HAVE_LOCALE_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -27,6 +27,9 @@
</span> #include <locale.h>
#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <popt.h>
</span> +#ifdef SUPPORT_FORCE_CHANGE
+#include <sys/sysctl.h>
+#endif
extern int dry_run;
extern int list_only;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -51,6 +54,7 @@ extern int copy_unsafe_links;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -53,6 +56,7 @@ extern int copy_unsafe_links;
</span> extern int keep_dirlinks;
extern int preserve_hard_links;
extern int protocol_version;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -348,7 +338,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;'>-@@ -850,6 +854,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -951,6 +955,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;'>@@ -374,7 +364,7 @@ diff --git a/main.c b/main.c
</span> diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -55,6 +55,7 @@ int preserve_hard_links = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -56,6 +56,7 @@ int preserve_hard_links = 0;
</span> int preserve_acls = 0;
int preserve_xattrs = 0;
int preserve_perms = 0;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -382,7 +372,7 @@ diff --git a/options.c b/options.c
</span> int preserve_executability = 0;
int preserve_devices = 0;
int preserve_specials = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -89,6 +90,7 @@ int numeric_ids = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -92,6 +93,7 @@ int numeric_ids = 0;
</span> int msgs2stderr = 0;
int allow_8bit_chars = 0;
int force_delete = 0;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -390,96 +380,66 @@ 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;'>-@@ -573,6 +575,7 @@ static void print_rsync_version(enum logcode f)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char const *links = "no ";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char const *iconv = "no ";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- char const *ipv6 = "no ";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ char const *fileflags = "no ";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- STRUCT_STAT *dumstat;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #if SUBPROTOCOL_VERSION != 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -609,6 +612,9 @@ static void print_rsync_version(enum logcode f)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef CAN_SET_SYMLINK_TIMES
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- symtimes = "";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -657,6 +659,11 @@ static void print_capabilities(enum logcode f)
</span> #endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#ifdef SUPPORT_FILEFLAGS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ fileflags = "";
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "prealloc",
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(f, "%s version %s protocol version %d%s\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -622,8 +628,8 @@ static void print_rsync_version(enum logcode f)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (int)(sizeof (int64) * 8));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- got_socketpair, hardlinks, links, ipv6, have_inplace);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv, %ssymtimes, %sprealloc\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- have_inplace, acls, xattrs, iconv, symtimes, prealloc);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv, %ssymtimes, %sprealloc, %sfile-flags\n",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ have_inplace, acls, xattrs, iconv, symtimes, prealloc, fileflags);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef MAINTAINER_MODE
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -694,6 +700,9 @@ void usage(enum logcode F)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -H, --hard-links preserve hard links\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -p, --perms preserve permissions\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#ifdef SUPPORT_FILEFLAGS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(F," --fileflags preserve file-flags (aka chflags)\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," -E, --executability preserve the file's executability\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifdef SUPPORT_ACLS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -740,7 +749,12 @@ void usage(enum logcode F)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --ignore-missing-args ignore missing source args without error\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --delete-missing-args delete missing source args from destination\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --ignore-errors delete even if there are I/O errors\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- rprintf(F," --force force deletion of directories even if not empty\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(F," --force-delete force deletion of directories even if not empty\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#ifdef SUPPORT_FORCE_CHANGE
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(F," --force-change affect user-/system-immutable files/dirs\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(F," --force-uchange affect user-immutable files/dirs\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rprintf(F," --force-schange affect system-immutable files/dirs\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef SUPPORT_FILEFLAGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "no "
</span> +#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --max-size=SIZE don't transfer any file larger than SIZE\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rprintf(F," --min-size=SIZE don't transfer any file smaller than SIZE\n");
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -857,6 +871,10 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "file-flags",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "*" /* All options after this point are hidden w/o -V -V */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef HAVE_SIMD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "no "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -818,6 +825,8 @@ 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:#ffe0e0;'>-+#ifdef SUPPORT_FILEFLAGS
</span> + {"fileflags", 0, POPT_ARG_VAL, &preserve_fileflags, 1, 0, 0 },
+ {"no-fileflags", 0, POPT_ARG_VAL, &preserve_fileflags, 0, 0, 0 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</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;'>-@@ -943,6 +961,14 @@ static struct poptOption long_options[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -911,6 +920,12 @@ 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 },
+ {"force-delete", 0, POPT_ARG_VAL, &force_delete, 1, 0, 0 },
+ {"no-force-delete", 0, POPT_ARG_VAL, &force_delete, 0, 0, 0 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#ifdef SUPPORT_FORCE_CHANGE
</span> + {"force-change", 0, POPT_ARG_VAL, &force_change, ALL_IMMUTABLE, 0, 0 },
+ {"no-force-change", 0, POPT_ARG_VAL, &force_change, 0, 0, 0 },
+ {"force-uchange", 0, POPT_ARG_VAL, &force_change, USR_IMMUTABLE, 0, 0 },
+ {"force-schange", 0, POPT_ARG_VAL, &force_change, SYS_IMMUTABLE, 0, 0 },
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif
</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;'>-@@ -2567,6 +2593,9 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1199,6 +1214,14 @@ static void set_refuse_options(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef HAVE_SETVBUF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parse_one_refuse_match(0, "outbuf", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef SUPPORT_FILEFLAGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parse_one_refuse_match(0, "fileflags", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef SUPPORT_FORCE_CHANGE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parse_one_refuse_match(0, "force-change", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parse_one_refuse_match(0, "force-uchange", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parse_one_refuse_match(0, "force-schange", list_end);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Now we use the descrip values to actually mark the options for refusal. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (op = long_options; op != list_end; op++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2651,6 +2674,9 @@ void server_options(char **args, int *argc_p)
</span> if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
+ if (preserve_fileflags)
+ args[ac++] = "--fileflags";
+
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
</span> goto oom;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2660,6 +2689,16 @@ void server_options(char **args, int *argc_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2754,6 +2780,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;'>@@ -496,6 +456,116 @@ diff --git a/options.c b/options.c
</span> if (write_batch < 0)
args[ac++] = "--only-write-batch=X";
if (am_root > 1)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/rsync.1.md b/rsync.1.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/rsync.1.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/rsync.1.md
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -360,6 +360,7 @@ detailed description below for a complete description.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --keep-dirlinks, -K treat symlinked dir on receiver as dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --hard-links, -H preserve hard links
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --perms, -p preserve permissions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--fileflags preserve file-flags (aka chflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --executability, -E preserve executability
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --chmod=CHMOD affect file and/or directory permissions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --acls, -A preserve ACLs (implies --perms)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -399,7 +400,10 @@ detailed description below for a complete description.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --ignore-missing-args ignore missing source args without error
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --delete-missing-args delete missing source args from destination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --ignore-errors delete even if there are I/O errors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---force force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-delete force deletion of directories even if not empty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-change affect user-/system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-uchange affect user-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-schange affect system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --max-delete=NUM don't delete more than NUM files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --max-size=SIZE don't transfer any file larger than SIZE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --min-size=SIZE don't transfer any file smaller than SIZE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -702,6 +706,8 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Note that `-a` **does not preserve hardlinks**, because finding
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ multiply-linked files is expensive. You must separately specify `-H`.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Note also that for backward compatibility, `-a` currently does **not**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ imply the `--fileflags` option.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0. `--no-OPTION`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1040,7 +1046,7 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Without this option, if the sending side has replaced a directory with a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ symlink to a directory, the receiving side will delete anything that is in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the way of the new symlink, including a directory hierarchy (as long as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- `--force` or `--delete` is in effect).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `--force-delete` or `--delete` is in effect).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ See also `--keep-dirlinks` for an analogous option for the receiving side.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1226,6 +1232,29 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ those used by `--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 `--fake-super`.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0. `--fileflags` This option causes rsync to update the file-flags to be the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ same as the source files and directories (if your OS supports the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ **chflags**(2) system call). Some flags can only be altered by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ super-user and some might only be unset below a certain secure-level
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (usually single-user mode). It will not make files alterable that are set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to immutable on the receiver. To do that, see `--force-change`,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `--force-uchange`, and `--force-schange`.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0. `--force-change` This option causes rsync to disable both user-immutable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ and system-immutable flags on files and directories that are being updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ or deleted on the receiving side. This option overrides `--force-uchange`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ and `--force-schange`.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0. `--force-uchange` This option causes rsync to disable user-immutable flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ on files and directories that are being updated or deleted on the receiving
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ side. It does not try to affect system flags. This option overrides
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `--force-change` and `--force-schange`.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0. `--force-schange` This option causes rsync to disable system-immutable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ flags on files and directories that are being updated or deleted on the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ receiving side. It does not try to affect user flags. This option
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ overrides `--force-change` and `--force-uchange`.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0. `--chmod=CHMOD`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This option tells rsync to apply one or more comma-separated "chmod" modes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1685,7 +1714,7 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option a step farther: each missing arg will become a deletion request of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the corresponding destination file on the receiving side (should it exist).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If the destination file is a non-empty directory, it will only be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- successfully deleted if `--force` or `--delete` are in effect. Other than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ successfully deleted if `--force-delee` or `--delete` are in effect. Other than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that, this option is independent of any other type of delete processing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The missing source files are represented by special file-list entries which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1696,15 +1725,16 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tells `--delete` to go ahead and delete files even when there are I/O
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ errors.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-0. `--force`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++0. `--force-delee`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This option tells rsync to delete a non-empty directory when it is to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ replaced by a non-directory. This is only relevant if deletions are not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ active (see `--delete` for details).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Note for older rsync versions: `--force` used to still be required when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- using `--delete-after`, and it used to be non-functional unless the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- `--recursive` option was also enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ This option can be abbreviated `--force` for backward compatibility. Note
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ that some older rsync versions used to still require `--force` when using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `--delete-after`, and it used to be non-functional unless the `--recursive`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ option was also enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0. `--max-delete=NUM`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2576,7 +2606,7 @@ your home directory (remove the '=' for that).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ output of other verbose messages).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- format is like the string `YXcstpoguax`, where **Y** is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ format is like the string `YXcstpoguaxf`, where **Y** is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of update being done, **X** is replaced by the file-type, and the other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ letters represent attributes that may be output if they are being modified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> diff --git a/rsync.c b/rsync.c
--- a/rsync.c
+++ b/rsync.c
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -507,7 +577,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;'>-@@ -458,6 +459,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;'>+@@ -467,6 +468,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;'>@@ -544,10 +614,10 @@ diff --git a/rsync.c b/rsync.c
</span> +}
+#endif
+
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- const char *fnamecmp, int flags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int same_mtime(struct file_struct *file, STRUCT_STAT *st, int extra_accuracy)
</span> {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -519,7 +553,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;'>+ #ifdef ST_MTIME_NSEC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -543,7 +577,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;'>@@ -556,16 +626,7 @@ 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;'>-@@ -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:#ffe0e0;'>- || (flags & ATTRS_SET_NANO && NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- )) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode, ST_FLAGS(sxp->st));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (ret < 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rsyserr(FERROR_XFER, errno, "failed to set times on %s",
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- full_fname(fname));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -586,7 +620,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;'>+@@ -629,7 +663,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;'>@@ -574,7 +635,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;'>-@@ -598,6 +632,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;'>+@@ -641,6 +675,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;'>@@ -594,17 +655,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;'>-@@ -672,7 +719,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -718,7 +765,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 ? ATTRS_SET_NANO : ATTRS_SKIP_MTIME);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ok_to_set_time ? ATTRS_ACCURATE_TIME : ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME);
</span> + ATTRS_DELAY_IMMUTABLE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ | (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_ACCURATE_TIME : ATTRS_SKIP_MTIME | ATTRS_SKIP_ATIME));
</span>
/* move tmp file over real file */
if (DEBUG_GTE(RECV, 1))
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -689,6 +737,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -735,6 +783,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;'>@@ -618,23 +679,24 @@ diff --git a/rsync.c b/rsync.c
</span> diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -62,6 +62,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - now (HLINKED files only) */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define XMIT_IO_ERROR_ENDLIST (1<<12) /* protocols 31*- now (w/XMIT_EXTENDED_FLAGS) (also protocol 30 w/'f' compat flag) */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define XMIT_MOD_NSEC (1<<13) /* protocols 31 - now */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define XMIT_SAME_FLAGS (1<<14) /* protocols ?? - now */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -68,7 +68,7 @@
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- /* These flags are used in the live flist data. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* The following XMIT flags require an rsync that uses a varint for the flag values */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define XMIT_RESERVED_16 (1<<16) /* reserved for future fileflags use */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define XMIT_SAME_FLAGS (1<<16) /* any protocol - restricted by command-line option */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define XMIT_RESERVED_17 (1<<17) /* reserved for future crtimes use */
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -166,6 +167,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;'>+ /* These flags are used in the live flist data. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -181,6 +181,7 @@
</span> #define ATTRS_SKIP_MTIME (1<<1)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- #define ATTRS_SET_NANO (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_ACCURATE_TIME (1<<2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ATTRS_SKIP_ATIME (1<<3)
</span> +#define ATTRS_DELAY_IMMUTABLE (1<<4)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define MSG_FLUSH 2
</span> #define FULL_FLUSH 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- #define NORMAL_FLUSH 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -192,6 +194,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -208,6 +209,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;'>@@ -642,7 +704,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;'>-@@ -529,6 +532,28 @@ typedef unsigned int size_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -548,6 +550,31 @@ typedef unsigned int size_t;
</span> #endif
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -663,23 +725,26 @@ diff --git a/rsync.h b/rsync.h
</span> +#define USR_IMMUTABLE (UF_IMMUTABLE|UF_NOUNLINK|UF_APPEND)
+#define SYS_IMMUTABLE (SF_IMMUTABLE|SF_NOUNLINK|SF_APPEND)
+#define ALL_IMMUTABLE (USR_IMMUTABLE|SYS_IMMUTABLE)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define ST_FLAGS(st) (st.st_flags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ST_FLAGS(st) ((st).st_flags)
</span> +#else
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#define USR_IMMUTABLE 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SYS_IMMUTABLE 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define ALL_IMMUTABLE 0
</span> +#define ST_FLAGS(st) NO_FFLAGS
+#endif
+
/* 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;'>-@@ -716,6 +741,7 @@ extern int file_extra_cnt;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extern int inc_recurse;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -761,6 +788,7 @@ extern int pathname_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int depth_ndx;
</span> extern int uid_ndx;
extern int gid_ndx;
+extern int fileflags_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -757,6 +783,11 @@ extern int xattrs_ndx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -811,6 +839,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;'>@@ -691,113 +756,6 @@ diff --git a/rsync.h b/rsync.h
</span> #define F_ACL(f) REQ_EXTRA(f, acls_ndx)->num
#define F_XATTR(f) REQ_EXTRA(f, xattrs_ndx)->num
#define F_NDX(f) REQ_EXTRA(f, unsort_ndx)->num
<span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/rsync.yo b/rsync.yo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/rsync.yo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/rsync.yo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -362,6 +362,7 @@ to the detailed description below for a complete description. verb(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -K, --keep-dirlinks treat symlinked dir on receiver as dir
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -H, --hard-links preserve hard links
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -p, --perms preserve permissions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ --fileflags preserve file-flags (aka chflags)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -E, --executability preserve executability
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --chmod=CHMOD affect file and/or directory permissions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -A, --acls preserve ACLs (implies -p)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -398,7 +399,10 @@ to the detailed description below for a complete description. verb(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --ignore-missing-args ignore missing source args without error
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --delete-missing-args delete missing source args from destination
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --ignore-errors delete even if there are I/O errors
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- --force force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ --force-delete force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ --force-change affect user/system immutable files/dirs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ --force-uchange affect user-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ --force-schange affect system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --max-delete=NUM don't delete more than NUM files
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --max-size=SIZE don't transfer any file larger than SIZE
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --min-size=SIZE don't transfer any file smaller than SIZE
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -658,7 +662,8 @@ specified, in which case bf(-r) is not implied.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Note that bf(-a) bf(does not preserve hardlinks), because
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- finding multiply-linked files is expensive. You must separately
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--specify bf(-H).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+specify bf(-H). Note also that for backward compatibility, bf(-a)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+currently does bf(not) imply the bf(--fileflags) option.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dit(--no-OPTION) You may turn off one or more implied options by prefixing
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- the option name with "no-". Not all options may be prefixed with a "no-":
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -963,7 +968,7 @@ they would be using bf(--copy-links).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Without this option, if the sending side has replaced a directory with a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- symlink to a directory, the receiving side will delete anything that is in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- the way of the new symlink, including a directory hierarchy (as long as
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--bf(--force) or bf(--delete) is in effect).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+bf(--force-delete) or bf(--delete) is in effect).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- See also bf(--keep-dirlinks) for an analogous option for the receiving
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- side.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -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:#ffe0e0;'>- those used by bf(--fake-super)) unless you repeat the option (e.g. -XX).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- This "copy all xattrs" mode cannot be used with bf(--fake-super).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dit(bf(--fileflags)) This option causes rsync to update the file-flags to be
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+the same as the source files and directories (if your OS supports the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+bf(chflags)(2) system call). Some flags can only be altered by the super-user
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+and some might only be unset below a certain secure-level (usually single-user
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+mode). It will not make files alterable that are set to immutable on the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+receiver. To do that, see bf(--force-change), bf(--force-uchange), and
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+bf(--force-schange).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dit(bf(--force-change)) This option causes rsync to disable both user-immutable
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+and system-immutable flags on files and directories that are being updated or
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+deleted on the receiving side. This option overrides bf(--force-uchange) and
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+bf(--force-schange).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dit(bf(--force-uchange)) This option causes rsync to disable user-immutable
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+flags on files and directories that are being updated or deleted on the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+receiving side. It does not try to affect system flags. This option overrides
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+bf(--force-change) and bf(--force-schange).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dit(bf(--force-schange)) This option causes rsync to disable system-immutable
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+flags on files and directories that are being updated or deleted on the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+receiving side. It does not try to affect user flags. This option overrides
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+bf(--force-change) and bf(--force-uchange).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dit(bf(--chmod)) This option tells rsync to apply one or more
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- comma-separated "chmod" modes to the permission of the files in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- transfer. The resulting value is treated as though it were the permissions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1502,12 +1530,13 @@ display as a "*missing" entry in the bf(--list-only) output.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- even when there are I/O errors.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--dit(bf(--force)) This option tells rsync to delete a non-empty directory
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+dit(bf(--force-delete)) This option tells rsync to delete a non-empty directory
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- when it is to be replaced by a non-directory. This is only relevant if
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- deletions are not active (see bf(--delete) for details).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--Note for older rsync versions: bf(--force) used to still be required when
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--using bf(--delete-after), and it used to be non-functional unless the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This option can be abbreviated bf(--force) for backward compatibility.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Note that some older rsync versions used to still require bf(--force)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+when using bf(--delete-after), and it used to be non-functional unless the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- bf(--recursive) option was also enabled.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2144,7 +2173,7 @@ with older versions of rsync, but that also turns on the output of other
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- verbose messages).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--format is like the string bf(YXcstpoguax), where bf(Y) is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+format is like the string bf(YXcstpogfax), where bf(Y) is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- type of update being done, bf(X) is replaced by the file-type, and the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- other letters represent attributes that may be output if they are being
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- modified.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2200,7 +2229,7 @@ quote(itemization(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sender's value (requires bf(--owner) and super-user privileges).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it() A bf(g) means the group is different and is being updated to the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sender's value (requires bf(--group) and the authority to set the group).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- it() The bf(u) slot is reserved for future use.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ it() The bf(f) means that the fileflags information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it() The bf(a) means that the ACL information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- it() The bf(x) means that the extended attribute information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ))
</span> diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -809,7 +767,7 @@ diff --git a/syscall.c b/syscall.c
</span> extern int inplace;
extern int preallocate_files;
extern int preserve_perms;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -67,7 +68,23 @@ int do_unlink(const char *fname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -68,7 +69,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;'>@@ -834,12 +792,12 @@ diff --git a/syscall.c b/syscall.c
</span> }
#ifdef SUPPORT_LINKS
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -128,14 +145,37 @@ int do_link(const char *fname1, const char *fname2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -129,14 +146,35 @@ int do_link(const char *old_path, const char *new_path)
</span> }
#endif
-int do_lchown(const char *path, uid_t owner, gid_t group)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+int do_lchown(const char *path, uid_t owner, gid_t group, mode_t mode, uint32 fileflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int do_lchown(const char *path, uid_t owner, gid_t group, UNUSED(mode_t mode), UNUSED(uint32 fileflags))
</span> {
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -867,14 +825,12 @@ diff --git a/syscall.c b/syscall.c
</span> + }
+ errno = EPERM;
+ }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ mode = fileflags = 0; /* avoid compiler warning */
</span> +#endif
+ return -1;
}
int do_mknod(const char *pathname, mode_t mode, dev_t dev)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -175,7 +215,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -176,7 +214,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;'>@@ -883,7 +839,7 @@ diff --git a/syscall.c b/syscall.c
</span> #else
return 0;
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -192,7 +232,22 @@ int do_rmdir(const char *pathname)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -193,7 +231,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;'>@@ -907,16 +863,16 @@ 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;'>-@@ -206,7 +261,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -212,7 +265,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
</span> }
#ifdef HAVE_CHMOD
-int do_chmod(const char *path, mode_t mode)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+int do_chmod(const char *path, mode_t mode, uint32 fileflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int do_chmod(const char *path, mode_t mode, UNUSED(uint32 fileflags))
</span> {
int code;
if (dry_run) return 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -229,17 +284,74 @@ int do_chmod(const char *path, mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -235,17 +288,72 @@ 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;'>@@ -936,8 +892,6 @@ diff --git a/syscall.c b/syscall.c
</span> + }
+ errno = EPERM;
+ }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ fileflags = 0; /* avoid compiler warning */
</span> +#endif
if (code != 0 && (preserve_perms || preserve_executability))
return code;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -954,36 +908,36 @@ diff --git a/syscall.c b/syscall.c
</span> +}
+#endif
+
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_rename(const char *fname1, const char *fname2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_rename(const char *old_path, const char *new_path)
</span> {
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- return rename(fname1, fname2);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (rename(fname1, fname2) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return rename(old_path, new_path);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rename(old_path, new_path) == 0)
</span> + return 0;
+#ifdef SUPPORT_FORCE_CHANGE
+ if (force_change && errno == EPERM) {
+ STRUCT_STAT st1, st2;
+ int became_mutable;
+
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (x_lstat(fname1, &st1, NULL) != 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (x_lstat(old_path, &st1, NULL) != 0)
</span> + goto failed;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ became_mutable = make_mutable(fname1, st1.st_mode, st1.st_flags, force_change) > 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (became_mutable && rename(fname1, fname2) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ became_mutable = make_mutable(old_path, st1.st_mode, st1.st_flags, force_change) > 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (became_mutable && rename(old_path, new_path) == 0)
</span> + goto success;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (x_lstat(fname2, &st2, NULL) == 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ && make_mutable(fname2, st2.st_mode, st2.st_flags, force_change) > 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (rename(fname1, fname2) == 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (x_lstat(new_path, &st2, NULL) == 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && make_mutable(new_path, st2.st_mode, st2.st_flags, force_change) > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (rename(old_path, new_path) == 0) {
</span> + success:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (became_mutable) /* Yes, use fname2 and st1! */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ undo_make_mutable(fname2, st1.st_flags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (became_mutable) /* Yes, use new_path and st1! */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ undo_make_mutable(new_path, st1.st_flags);
</span> + return 0;
+ }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ undo_make_mutable(fname2, st2.st_flags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ undo_make_mutable(new_path, st2.st_flags);
</span> + }
+ /* TODO: handle immutable directories */
+ if (became_mutable)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ undo_make_mutable(fname1, st1.st_flags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ undo_make_mutable(old_path, st1.st_flags);
</span> + failed:
+ errno = EPERM;
+ }
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -995,17 +949,18 @@ 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 protect_args = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -28,6 +28,8 @@ int protect_args = 0;
</span> int module_id = -1;
int relative_paths = 0;
int module_dirlen = 0;
+int force_change = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int preserve_acls = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int preserve_acls = 0;
</span> int preserve_times = 0;
int preserve_xattrs = 0;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -102,3 +103,23 @@ filter_rule_list daemon_filter_list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int preserve_perms = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -109,3 +111,23 @@ filter_rule_list daemon_filter_list;
</span> {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return cst || !flg ? 16 : 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return cst ? 0 : 0;
</span> }
+
+#if defined SUPPORT_FILEFLAGS || defined SUPPORT_FORCE_CHANGE
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1027,6 +982,22 @@ diff --git a/t_stub.c b/t_stub.c
</span> + return -1;
+}
+#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/testsuite/rsync.fns
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/testsuite/rsync.fns
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -23,9 +23,9 @@ todir="$tmpdir/to"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chkdir="$tmpdir/chk"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # For itemized output:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-all_plus='+++++++++'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-allspace=' '
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-dots='.....' # trailing dots after changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++all_plus='++++++++++'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++allspace=' '
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++dots='......' # trailing dots after changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tab_ch=' ' # a single tab character
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Berkley's nice.
</span> diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1038,24 +1009,24 @@ diff --git a/util.c b/util.c
</span> extern char *module_dir;
extern unsigned int module_dirlen;
extern char *partial_dir;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -115,9 +116,36 @@ void print_child_argv(const char *prefix, char **cmd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -115,6 +116,33 @@ void print_child_argv(const char *prefix, char **cmd)
</span> rprintf(FCLIENT, " (%d args)\n", cnt);
}
+#ifdef SUPPORT_FORCE_CHANGE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+static int try_a_force_change(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode, uint32 fileflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int try_a_force_change(const char *fname, STRUCT_STAT *stp)
</span> +{
<span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint32 fileflags = ST_FLAGS(*stp);
</span> + if (fileflags == NO_FFLAGS) {
+ STRUCT_STAT st;
+ if (x_lstat(fname, &st, NULL) == 0)
+ fileflags = st.st_flags;
+ }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (fileflags != NO_FFLAGS && make_mutable(fname, mode, fileflags, force_change) > 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (fileflags != NO_FFLAGS && make_mutable(fname, stp->st_mode, fileflags, force_change) > 0) {
</span> + int ret, save_force_change = force_change;
+
+ force_change = 0; /* Make certain we can't come back here. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ ret = set_modtime(fname, modtime, mod_nsec, mode, fileflags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ret = set_times(fname, stp);
</span> + force_change = save_force_change;
+
+ undo_make_mutable(fname, fileflags);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1071,45 +1042,36 @@ diff --git a/util.c b/util.c
</span> +
/* This returns 0 for success, 1 for a symlink if symlink time-setting
* is not possible, or -1 for any other error. */
<span style='display:block; white-space:pre;background:#ffe0e0;'>--int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode, uint32 fileflags)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- static int switch_step = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -142,6 +170,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;'>+ int set_times(const char *fname, STRUCT_STAT *stp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -142,6 +170,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
</span> #include "case_N.h"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (do_utimensat(fname, modtime, mod_nsec) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (do_utimensat(fname, stp) == 0)
</span> break;
+#ifdef SUPPORT_FORCE_CHANGE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (force_change && errno == EPERM
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ && try_a_force_change(fname, modtime, mod_nsec, mode, fileflags) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (force_change && errno == EPERM && try_a_force_change(fname, stp) == 0)
</span> + break;
+#endif
if (errno != ENOSYS)
return -1;
switch_step++;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -152,6 +185,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;'>+@@ -151,6 +183,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
</span> #include "case_N.h"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (do_lutimes(fname, modtime, mod_nsec) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (do_lutimes(fname, stp) == 0)
</span> break;
+#ifdef SUPPORT_FORCE_CHANGE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (force_change && errno == EPERM
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ && try_a_force_change(fname, modtime, mod_nsec, mode, fileflags) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (force_change && errno == EPERM && try_a_force_change(fname, stp) == 0)
</span> + break;
+#endif
if (errno != ENOSYS)
return -1;
switch_step++;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -175,6 +213,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:#ffe0e0;'>- if (do_utime(fname, modtime, mod_nsec) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -172,6 +208,10 @@ int set_times(const char *fname, STRUCT_STAT *stp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (do_utime(fname, stp) == 0)
</span> break;
#endif
+#ifdef SUPPORT_FORCE_CHANGE
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if (force_change && errno == EPERM
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ && try_a_force_change(fname, modtime, mod_nsec, mode, fileflags) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (force_change && errno == EPERM && try_a_force_change(fname, stp) == 0)
</span> + break;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ fileflags = 0; /* avoid compiler warning */
</span> +#endif
return -1;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1117,7 +1079,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;'>-@@ -1224,7 +1224,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;'>+@@ -1216,7 +1216,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;'>@@ -1126,34 +1088,10 @@ diff --git a/xattrs.c b/xattrs.c
</span> if (!IS_DEVICE(fst.st_mode))
fst.st_rdev = 0; /* just in case */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-diff -Nurp a/config.h.in b/config.h.in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/config.h.in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/config.h.in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -76,6 +76,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* Define to 1 if vsprintf has a C99-compatible return value */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #undef HAVE_C99_VSNPRINTF
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+/* Define to 1 if you have the `chflags' function. */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#undef HAVE_CHFLAGS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /* Define to 1 if you have the `chmod' function. */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #undef HAVE_CHMOD
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff -Nurp a/configure.sh b/configure.sh
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/configure.sh
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/configure.sh
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -7706,6 +7706,7 @@ fi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for ac_func in waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ chflags \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
</span> diff -Nurp a/proto.h b/proto.h
--- a/proto.h
+++ b/proto.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -298,6 +298,8 @@ int read_ndx_and_attrs(int f_in, int f_o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -299,6 +299,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;'>@@ -1162,139 +1100,237 @@ 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;'>-@@ -322,11 +324,12 @@ int do_unlink(const char *fname);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -321,11 +323,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);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_link(const char *fname1, const char *fname2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_link(const char *old_path, const char *new_path);
</span> -int do_lchown(const char *path, uid_t owner, gid_t group);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+int do_lchown(const char *path, uid_t owner, gid_t group, mode_t mode, uint32 fileflags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int do_lchown(const char *path, uid_t owner, gid_t group, UNUSED(mode_t mode), UNUSED(uint32 fileflags));
</span> int do_mknod(const char *pathname, mode_t mode, dev_t dev);
int do_rmdir(const char *pathname);
int do_open(const char *pathname, int flags, mode_t mode);
-int do_chmod(const char *path, mode_t mode);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+int do_chmod(const char *path, mode_t mode, uint32 fileflags);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int do_chmod(const char *path, mode_t mode, UNUSED(uint32 fileflags));
</span> +int do_chflags(const char *path, uint32 fileflags);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- int do_rename(const char *fname1, const char *fname2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int do_rename(const char *old_path, const char *new_path);
</span> int do_ftruncate(int fd, OFF_T size);
void trim_trailing_slashes(char *name);
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -367,7 +370,7 @@ void set_nonblocking(int fd);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- void set_blocking(int fd);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int fd_pair(int fd[2]);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- void print_child_argv(const char *prefix, char **cmd);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode, uint32 fileflags);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int make_path(char *fname, int flags);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int full_write(int desc, const char *ptr, size_t len);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int copy_file(const char *source, const char *dest, int ofd, mode_t mode);
</span> diff -Nurp a/rsync.1 b/rsync.1
--- a/rsync.1
+++ b/rsync.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -438,6 +438,7 @@ to the detailed description below for a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-K, \-\-keep\-dirlinks treat symlinked dir on receiver as dir
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-H, \-\-hard\-links preserve hard links
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-p, \-\-perms preserve permissions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ \-\-fileflags preserve file\-flags (aka chflags)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-E, \-\-executability preserve executability
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-chmod=CHMOD affect file and/or directory permissions
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-A, \-\-acls preserve ACLs (implies \-p)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -474,7 +475,10 @@ to the detailed description below for a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-ignore\-missing\-args ignore missing source args without error
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-delete\-missing\-args delete missing source args from destination
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-ignore\-errors delete even if there are I/O errors
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- \-\-force force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ \-\-force\-delete force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ \-\-force\-change affect user/system immutable files/dirs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ \-\-force\-uchange affect user\-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ \-\-force\-schange affect system\-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-max\-delete=NUM don'\&t delete more than NUM files
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-max\-size=SIZE don'\&t transfer any file larger than SIZE
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \-\-min\-size=SIZE don'\&t transfer any file smaller than SIZE
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -761,7 +765,8 @@ specified, in which case \fB\-r\fP is no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- finding multiply\-linked files is expensive. You must separately
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--specify \fB\-H\fP.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+specify \fB\-H\fP. Note also that for backward compatibility, \fB\-a\fP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+currently does \fBnot\fP imply the \fB\-\-fileflags\fP option.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP "\-\-no\-OPTION"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- You may turn off one or more implied options by prefixing
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1101,7 +1106,7 @@ they would be using \fB\-\-copy\-links\f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -436,6 +436,7 @@ detailed description below for a complet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --keep-dirlinks, -K treat symlinked dir on receiver as dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --hard-links, -H preserve hard links
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --perms, -p preserve permissions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--fileflags preserve file-flags (aka chflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --executability, -E preserve executability
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --chmod=CHMOD affect file and/or directory permissions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --acls, -A preserve ACLs (implies --perms)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -475,7 +476,10 @@ detailed description below for a complet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --ignore-missing-args ignore missing source args without error
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --delete-missing-args delete missing source args from destination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --ignore-errors delete even if there are I/O errors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---force force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-delete force deletion of directories even if not empty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-change affect user-/system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-uchange affect user-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-schange affect system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --max-delete=NUM don't delete more than NUM files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --max-size=SIZE don't transfer any file larger than SIZE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --min-size=SIZE don't transfer any file smaller than SIZE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -765,6 +769,8 @@ omission). The only exception to the ab
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because finding
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ multiply-linked files is expensive. You must separately specify \fB\-H\fP.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Note also that for backward compatibility, \fB\-a\fP currently does \fBnot\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++imply the \fB\-\-fileflags\fP option.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP "\fB\-\-no-OPTION\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ You may turn off one or more implied options by prefixing the option name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with "no-". Not all options may be prefixed with a "no-": only options that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1094,7 +1100,7 @@ to non-directories to be affected, as th
</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
-\fB\-\-force\fP or \fB\-\-delete\fP is in effect).
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+\fB\-\-force\-delete\fP or \fB\-\-delete\fP is in effect).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- See also \fB\-\-keep\-dirlinks\fP for an analogous option for the receiving
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- side.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1315,6 +1320,33 @@ Note that the \fB\-X\fP option does not
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- those used by \fB\-\-fake\-super\fP) unless you repeat the option (e.g. \-XX).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- This \(dq\© all xattrs\(dq\& mode cannot be used with \fB\-\-fake\-super\fP.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP "\fB\-\-fileflags\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This option causes rsync to update the file\-flags to be
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+the same as the source files and directories (if your OS supports the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+\fBchflags\fP(2) system call). Some flags can only be altered by the super\-user
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+and some might only be unset below a certain secure\-level (usually single\-user
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+mode). It will not make files alterable that are set to immutable on the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+receiver. To do that, see \fB\-\-force\-change\fP, \fB\-\-force\-uchange\fP, and
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+\fB\-\-force\-schange\fP.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP "\fB\-\-force\-change\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This option causes rsync to disable both user\-immutable
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+and system\-immutable flags on files and directories that are being updated or
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+deleted on the receiving side. This option overrides \fB\-\-force\-uchange\fP and
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+\fB\-\-force\-schange\fP.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP "\fB\-\-force\-uchange\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This option causes rsync to disable user\-immutable
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+flags on files and directories that are being updated or deleted on the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+receiving side. It does not try to affect system flags. This option overrides
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+\fB\-\-force\-change\fP and \fB\-\-force\-schange\fP.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP "\fB\-\-force\-schange\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This option causes rsync to disable system\-immutable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fB\-\-force-delete\fP or \fB\-\-delete\fP is in effect).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ See also \fB\-\-keep-dirlinks\fP for an analogous option for the receiving side.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1303,6 +1309,25 @@ receiver-only rule that excludes all nam
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Note that the \fB\-X\fP option does not copy rsync's special xattr values (e.g.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ those used by \fB\-\-fake-super\fP) unless you repeat the option (e.g. \fB\-XX\fP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This "copy all xattrs" mode cannot be used with \fB\-\-fake-super\fP.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP "\fB\-\-fileflags\fP This option causes rsync to update the file-flags to be the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++same as the source files and directories (if your OS supports the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fBchflags\fP(2) system call). Some flags can only be altered by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++super-user and some might only be unset below a certain secure-level
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(usually single-user mode). It will not make files alterable that are set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to immutable on the receiver. To do that, see \fB\-\-force-change\fP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fB\-\-force-uchange\fP, and \fB\-\-force-schange\fP."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP "\fB\-\-force-change\fP This option causes rsync to disable both user-immutable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and system-immutable flags on files and directories that are being updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or deleted on the receiving side. This option overrides \fB\-\-force-uchange\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and \fB\-\-force-schange\fP."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP "\fB\-\-force-uchange\fP This option causes rsync to disable user-immutable flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++on files and directories that are being updated or deleted on the receiving
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++side. It does not try to affect system flags. This option overrides
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fB\-\-force-change\fP and \fB\-\-force-schange\fP."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP "\fB\-\-force-schange\fP This option causes rsync to disable system-immutable
</span> +flags on files and directories that are being updated or deleted on the
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+receiving side. It does not try to affect user flags. This option overrides
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+\fB\-\-force\-change\fP and \fB\-\-force\-uchange\fP.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP "\fB\-\-chmod\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- This option tells rsync to apply one or more
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- comma\-separated \(dq\&chmod\(dq\& modes to the permission of the files in the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1705,13 +1737,14 @@ display as a \(dq\&*missing\(dq\& entry
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Tells \fB\-\-delete\fP to go ahead and delete files
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- even when there are I/O errors.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++receiving side. It does not try to affect user flags. This option
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++overrides \fB\-\-force-change\fP and \fB\-\-force-uchange\fP."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP "\fB\-\-chmod=CHMOD\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This option tells rsync to apply one or more comma-separated "chmod" modes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to the permission of the files in the transfer. The resulting value is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1720,7 +1745,7 @@ This option takes the behavior of (the i
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option a step farther: each missing arg will become a deletion request of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the corresponding destination file on the receiving side (should it exist).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If the destination file is a non-empty directory, it will only be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-successfully deleted if \fB\-\-force\fP or \fB\-\-delete\fP are in effect. Other than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++successfully deleted if \fB\-\-force-delee\fP or \fB\-\-delete\fP are in effect. Other than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that, this option is independent of any other type of delete processing.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The missing source files are represented by special file-list entries which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1728,14 +1753,15 @@ display as a "\fB*missing\fP" entry in t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP "\fB\-\-ignore-errors\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tells \fB\-\-delete\fP to go ahead and delete files even when there are I/O
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ errors.
</span> -.IP "\fB\-\-force\fP"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+.IP "\fB\-\-force\-delete\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- This option tells rsync to delete a non\-empty directory
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- when it is to be replaced by a non\-directory. This is only relevant if
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- deletions are not active (see \fB\-\-delete\fP for details).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.IP "\fB\-\-force-delee\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This option tells rsync to delete a non-empty directory when it is to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ replaced by a non-directory. This is only relevant if deletions are not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ active (see \fB\-\-delete\fP for details).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span> -Note for older rsync versions: \fB\-\-force\fP used to still be required when
<span style='display:block; white-space:pre;background:#ffe0e0;'>--using \fB\-\-delete\-after\fP, and it used to be non\-functional unless the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+This option can be abbreviated \fB\-\-force\fP for backward compatibility.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Note that some older rsync versions used to still require \fB\-\-force\fP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+when using \fB\-\-delete\-after\fP, and it used to be non\-functional unless the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- \fB\-\-recursive\fP option was also enabled.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP "\fB\-\-max\-delete=NUM\fP"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2429,7 +2462,7 @@ with older versions of rsync, but that a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- verbose messages).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- The \(dq\&%i\(dq\& escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--format is like the string \fBYXcstpoguax\fP, where \fBY\fP is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+format is like the string \fBYXcstpogfax\fP, where \fBY\fP is replaced by the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- type of update being done, \fBX\fP is replaced by the file\-type, and the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- other letters represent attributes that may be output if they are being
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- modified.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2499,7 +2532,7 @@ sender\(cq\&s value (requires \fB\-\-own
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- A \fBg\fP means the group is different and is being updated to the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sender\(cq\&s value (requires \fB\-\-group\fP and the authority to set the group).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--The \fBu\fP slot is reserved for future use.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+The \fBf\fP means that the fileflags information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- The \fBa\fP means that the ACL information changed.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- .IP o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-using \fB\-\-delete-after\fP, and it used to be non-functional unless the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-\fB\-\-recursive\fP option was also enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++This option can be abbreviated \fB\-\-force\fP for backward compatibility. Note
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++that some older rsync versions used to still require \fB\-\-force\fP when using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++\fB\-\-delete-after\fP, and it used to be non-functional unless the \fB\-\-recursive\fP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++option was also enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP "\fB\-\-max-delete=NUM\fP"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This tells rsync not to delete more than NUM files or directories. If that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ limit is exceeded, all further deletions are skipped through the end of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2604,7 +2630,7 @@ also be output, but only if the receivin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ output of other verbose messages).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-format is like the string \fBYXcstpoguax\fP, where \fBY\fP is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++format is like the string \fBYXcstpoguaxf\fP, where \fBY\fP is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of update being done, \fBX\fP is replaced by the file-type, and the other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ letters represent attributes that may be output if they are being modified.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .IP
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff -Nurp a/rsync.1.html b/rsync.1.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/rsync.1.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/rsync.1.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -351,6 +351,7 @@ detailed description below for a complet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --keep-dirlinks, -K treat symlinked dir on receiver as dir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --hard-links, -H preserve hard links
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --perms, -p preserve permissions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--fileflags preserve file-flags (aka chflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --executability, -E preserve executability
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --chmod=CHMOD affect file and/or directory permissions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --acls, -A preserve ACLs (implies --perms)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -390,7 +391,10 @@ detailed description below for a complet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --ignore-missing-args ignore missing source args without error
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --delete-missing-args delete missing source args from destination
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --ignore-errors delete even if there are I/O errors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---force force deletion of dirs even if not empty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-delete force deletion of directories even if not empty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-change affect user-/system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-uchange affect user-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++--force-schange affect system-immutable files/dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --max-delete=NUM don't delete more than NUM files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --max-size=SIZE don't transfer any file larger than SIZE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --min-size=SIZE don't transfer any file smaller than SIZE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -673,7 +677,9 @@ recursion and want to preserve almost ev
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ omission). The only exception to the above equivalence is when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <code>--files-from</code> is specified, in which case <code>-r</code> is not implied.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>Note that <code>-a</code> <strong>does not preserve hardlinks</strong>, because finding
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-multiply-linked files is expensive. You must separately specify <code>-H</code>.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++multiply-linked files is expensive. You must separately specify <code>-H</code>.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Note also that for backward compatibility, <code>-a</code> currently does <strong>not</strong>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++imply the <code>--fileflags</code> option.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <dt><code>--no-OPTION</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -993,7 +999,7 @@ to non-directories to be affected, as th
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>Without this option, if the sending side has replaced a directory with a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ symlink to a directory, the receiving side will delete anything that is in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the way of the new symlink, including a directory hierarchy (as long as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-<code>--force</code> or <code>--delete</code> is in effect).</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<code>--force-delete</code> or <code>--delete</code> is in effect).</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>See also <code>--keep-dirlinks</code> for an analogous option for the receiving side.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p><code>--copy-dirlinks</code> applies to all symlinks to directories in the source. If
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ you want to follow only a few specified symlinks, a trick you can use is to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1173,6 +1179,33 @@ those used by <code>--fake-super</code>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ This "copy all xattrs" mode cannot be used with <code>--fake-super</code>.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<dt><code>--fileflags</code> This option causes rsync to update the file-flags to be the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++same as the source files and directories (if your OS supports the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<strong>chflags</strong>(2) system call). Some flags can only be altered by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++super-user and some might only be unset below a certain secure-level
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(usually single-user mode). It will not make files alterable that are set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++to immutable on the receiver. To do that, see <code>--force-change</code>,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<code>--force-uchange</code>, and <code>--force-schange</code>.</dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++</dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<dt><code>--force-change</code> This option causes rsync to disable both user-immutable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and system-immutable flags on files and directories that are being updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++or deleted on the receiving side. This option overrides <code>--force-uchange</code>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++and <code>--force-schange</code>.</dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++</dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<dt><code>--force-uchange</code> This option causes rsync to disable user-immutable flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++on files and directories that are being updated or deleted on the receiving
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++side. It does not try to affect system flags. This option overrides
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<code>--force-change</code> and <code>--force-schange</code>.</dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++</dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<dt><code>--force-schange</code> This option causes rsync to disable system-immutable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++flags on files and directories that are being updated or deleted on the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++receiving side. It does not try to affect user flags. This option
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++overrides <code>--force-change</code> and <code>--force-uchange</code>.</dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++</dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <dt><code>--chmod=CHMOD</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>This option tells rsync to apply one or more comma-separated "chmod" modes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to the permission of the files in the transfer. The resulting value is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1598,7 +1631,7 @@ is no longer there.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ option a step farther: each missing arg will become a deletion request of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the corresponding destination file on the receiving side (should it exist).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If the destination file is a non-empty directory, it will only be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-successfully deleted if <code>--force</code> or <code>--delete</code> are in effect. Other than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++successfully deleted if <code>--force-delee</code> or <code>--delete</code> are in effect. Other than
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that, this option is independent of any other type of delete processing.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>The missing source files are represented by special file-list entries which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ display as a "<code>*missing</code>" entry in the <code>--list-only</code> output.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1609,13 +1642,14 @@ display as a "<code>*missing</code>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ errors.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-<dt><code>--force</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<dt><code>--force-delee</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>This option tells rsync to delete a non-empty directory when it is to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ replaced by a non-directory. This is only relevant if deletions are not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ active (see <code>--delete</code> for details).</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-<p>Note for older rsync versions: <code>--force</code> used to still be required when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-using <code>--delete-after</code>, and it used to be non-functional unless the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-<code>--recursive</code> option was also enabled.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<p>This option can be abbreviated <code>--force</code> for backward compatibility. Note
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++that some older rsync versions used to still require <code>--force</code> when using
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++<code>--delete-after</code>, and it used to be non-functional unless the <code>--recursive</code>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++option was also enabled.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <dt><code>--max-delete=NUM</code></dt><dd>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2426,7 +2460,7 @@ also be output, but only if the receivin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (you can use <code>-vv</code> with older versions of rsync, but that also turns on the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ output of other verbose messages).</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>The "%i" escape has a cryptic output that is 11 letters long. The general
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-format is like the string <code>YXcstpoguax</code>, where <strong>Y</strong> is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++format is like the string <code>YXcstpoguaxf</code>, where <strong>Y</strong> is replaced by the type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ of update being done, <strong>X</strong> is replaced by the file-type, and the other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ letters represent attributes that may be output if they are being modified.</p>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <p>The update types that replace the <strong>Y</strong> are as follows:</p>
</span></pre><pre style='margin:0'>
</pre>