./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
continue;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "renaming %s to %s\n",
-@@ -736,7 +736,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -739,7 +739,7 @@ int recv_files(int f_in, int f_out, char *local_name)
} else {
/* Reminder: --inplace && --partial-dir are never
* enabled at the same time. */
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -214,8 +214,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -215,8 +215,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
*exit_code_ptr = RERR_TERMINATED;
else
*exit_code_ptr = RERR_WAITCHILD;
}
void write_del_stats(int f)
-@@ -1634,6 +1637,14 @@ void remember_children(UNUSED(int val))
+@@ -1635,6 +1638,14 @@ void remember_children(UNUSED(int val))
break;
}
}
}
#endif
#ifndef HAVE_SIGACTION
-@@ -1687,6 +1698,13 @@ static void rsync_panic_handler(UNUSED(int whatsig))
+@@ -1688,6 +1699,13 @@ static void rsync_panic_handler(UNUSED(int whatsig))
}
#endif
static void unset_env_var(const char *var)
{
#ifdef HAVE_UNSETENV
-@@ -1703,7 +1721,6 @@ static void unset_env_var(const char *var)
+@@ -1704,7 +1722,6 @@ static void unset_env_var(const char *var)
#endif
}
int main(int argc,char *argv[])
{
int ret;
-@@ -1727,6 +1744,11 @@ int main(int argc,char *argv[])
+@@ -1728,6 +1745,11 @@ int main(int argc,char *argv[])
SIGACTMASK(SIGFPE, rsync_panic_handler);
SIGACTMASK(SIGABRT, rsync_panic_handler);
SIGACTMASK(SIGBUS, rsync_panic_handler);
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -895,6 +895,10 @@ extern int xattrs_ndx;
+@@ -896,6 +896,10 @@ extern int xattrs_ndx;
#define F_SUM(f) ((char*)OPT_EXTRA(f, START_BUMP(f) + HLINK_BUMP(f) \
+ SUM_EXTRA_CNT - 1))
/* Some utility defines: */
#define F_IS_ACTIVE(f) (f)->basename[0]
#define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -1107,6 +1111,13 @@ typedef struct {
+@@ -1108,6 +1112,13 @@ typedef struct {
#define RELNAMECACHE_LEN (offsetof(relnamecache, fname))
#endif
|| (preserve_hard_links && F_IS_HLINKED(file)))
send_msg_int(MSG_SUCCESS, ndx);
handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -906,7 +907,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -909,7 +910,7 @@ int recv_files(int f_in, int f_out, char *local_name)
case 2:
break;
case 1:
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -1113,6 +1113,8 @@ typedef struct {
+@@ -1114,6 +1114,8 @@ typedef struct {
#define CSF_ENABLE (1<<1)
#define CSF_LAX (1<<2)
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
continue;
}
-@@ -1116,6 +1124,38 @@ int del_def_xattr_acl(const char *fname)
+@@ -1129,6 +1137,38 @@ int del_def_xattr_acl(const char *fname)
}
#endif
./configure (optional if already run)
make
-based-on: 35d4f6737a57c88978b6e954506e9c73f8c10ccf
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
# Programs we must have to run the test cases
CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \
-@@ -155,7 +155,7 @@ getgroups$(EXEEXT): getgroups.o
+@@ -158,7 +158,7 @@ getgroups$(EXEEXT): getgroups.o
getfsdev$(EXEEXT): getfsdev.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS)
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -175,6 +175,11 @@
+@@ -177,6 +177,11 @@
#define COMPARE_DEST 1
#define COPY_DEST 2
#define LINK_DEST 3
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/daemon-parm.txt b/daemon-parm.txt
--- a/daemon-parm.txt
+++ b/daemon-parm.txt
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -362,6 +362,9 @@ void send_files(int f_in, int f_out)
+@@ -366,6 +366,9 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_FILEIO);
}
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure
make
-based-on: dbb1c2d10c127b9a5f99e3e4ee5981f5222fc7e7
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
-@@ -30,6 +30,7 @@ aclocal.m4
- /getgroups
+@@ -31,6 +31,7 @@ aclocal.m4
+ /gists
/gmon.out
/rsync
+/rsyncdb
libdir=@libdir@/rsync
mandir=@mandir@
-@@ -33,7 +34,7 @@ SIMD_x86_64=simd-checksum-x86_64.o
+@@ -33,7 +34,7 @@ SIMD_x86_64=simd-checksum-x86_64.o simd-checksum-avx2.o
ASM_x86_64=lib/md5-asm-x86_64.o
GENFILES=configure.sh aclocal.m4 config.h.in rsync.1 rsync.1.html \
daemon-parm.h: daemon-parm.txt daemon-parm.awk
$(AWK) -f $(srcdir)/daemon-parm.awk $(srcdir)/daemon-parm.txt
-@@ -240,7 +249,7 @@ proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
+@@ -247,7 +256,7 @@ proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
$(AWK) -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h
.PHONY: man
rsync.1: rsync.1.md md2man version.h Makefile
@$(srcdir)/maybe-make-man $(srcdir) rsync.1.md
-@@ -251,9 +260,12 @@ rsync-ssl.1: rsync-ssl.1.md md2man version.h Makefile
+@@ -258,9 +267,12 @@ rsync-ssl.1: rsync-ssl.1.md md2man version.h Makefile
rsyncd.conf.5: rsyncd.conf.5.md md2man version.h Makefile
@$(srcdir)/maybe-make-man $(srcdir) rsyncd.conf.5.md
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h mcheck.h \
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h dl.h \
popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netgroup.h \
-@@ -1474,6 +1475,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1395,6 +1396,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
fi
fi
}
+ if (use_db && do_lstat(fname, &st) == 0)
+ db_set_checksum(5, &st, sender_file_sum);
- } else if (keep_partial && partialptr && !one_inplace) {
+ } else if (keep_partial && partialptr && (!one_inplace || delay_updates)) {
if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
rprintf(FERROR,
@@ -894,6 +906,8 @@ int recv_files(int f_in, int f_out, char *local_name)
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -271,6 +271,7 @@ enum msgcode {
+@@ -273,6 +273,7 @@ enum msgcode {
MSG_IO_ERROR=22,/* the sending side had an I/O error */
MSG_IO_TIMEOUT=33,/* tell client about a daemon's timeout value */
MSG_NOOP=42, /* a do-nothing message (legacy protocol-30 only) */
MSG_ERROR_EXIT=86, /* synchronize an error exit (siblings and protocol >= 31) */
MSG_SUCCESS=100,/* successfully updated indicated flist index */
MSG_DELETED=101,/* successfully deleted a file on receiving side */
-@@ -281,6 +282,9 @@ enum filetype {
+@@ -283,6 +284,9 @@ enum filetype {
FT_UNSUPPORTED, FT_REG, FT_DIR, FT_SYMLINK, FT_SPECIAL, FT_DEVICE
};
#define NDX_DONE -1
#define NDX_FLIST_EOF -2
#define NDX_DEL_STATS -3
-@@ -1432,7 +1436,8 @@ extern short info_levels[], debug_levels[];
+@@ -1433,7 +1437,8 @@ extern short info_levels[], debug_levels[];
#define DEBUG_CHDIR (DEBUG_BIND+1)
#define DEBUG_CONNECT (DEBUG_CHDIR+1)
#define DEBUG_CMD (DEBUG_CONNECT+1)
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2276,6 +2278,17 @@ your home directory (remove the '=' for that).
+@@ -2280,6 +2282,17 @@ your home directory (remove the '=' for that).
otential alternate-basis files will be removed as the transfer progresses.
This option conflicts with `--inplace` and `--append`.
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -722,7 +722,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -723,7 +723,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
if (mkpath_dest_arg && statret < 0 && (cp || file_total > 1)) {
int save_errno = errno;
+ int ret = make_path(dest_path, ACCESSPERMS, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
if (ret < 0)
goto mkdir_error;
- if (ret && INFO_GTE(NAME, 1)) {
+ if (ret && (INFO_GTE(NAME, 1) || stdout_format_has_i)) {
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2259,6 +2260,22 @@ your home directory (remove the '=' for that).
+@@ -2263,6 +2264,22 @@ your home directory (remove the '=' for that).
fuzzy-match files, so either use `--delete-after` or specify some filename
exclusions if you need to prevent this.
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -286,7 +286,7 @@ enum filetype {
+@@ -288,7 +288,7 @@ enum filetype {
#define NDX_DEL_STATS -3
#define NDX_FLIST_OFFSET -101
#define DEL_NO_UID_WRITE (1<<0) /* file/dir has our uid w/o write perm */
#define DEL_RECURSE (1<<1) /* if dir, delete all contents */
#define DEL_DIR_IS_EMPTY (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -296,6 +296,7 @@ enum filetype {
+@@ -298,6 +298,7 @@ enum filetype {
#define DEL_FOR_DEVICE (1<<6) /* making room for a replacement device */
#define DEL_FOR_SPECIAL (1<<7) /* making room for a replacement special */
#define DEL_FOR_BACKUP (1<<8) /* the delete is for a backup operation */
ret = -ret - 1;
else
ret++;
-@@ -1162,6 +1162,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
+@@ -1167,6 +1167,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
return path;
}
/**
* Return a quoted string with the full pathname of the indicated filename.
* The string " (in MODNAME)" may also be appended. The returned pointer
-@@ -1255,7 +1281,7 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1260,7 +1286,7 @@ int handle_partial_dir(const char *fname, int create)
}
statret = -1;
}
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
--prune-empty-dirs, -m prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
--usermap=STRING custom username mapping
-@@ -3024,6 +3025,16 @@ your home directory (remove the '=' for that).
+@@ -3028,6 +3029,16 @@ your home directory (remove the '=' for that).
update algorithm that is even more atomic (it uses `--link-dest` and a
parallel hierarchy of files).
#ifndef S_BLKSIZE
# if defined hpux || defined __hpux__ || defined __hpux
# define S_BLKSIZE 1024
-@@ -91,7 +93,12 @@ int do_symlink(const char *lnk, const char *fname)
+@@ -95,7 +97,12 @@ int do_symlink(const char *lnk, const char *fname)
* and write the lnk into it. */
if (am_root < 0) {
int ok, len = strlen(lnk);
if (fd < 0)
return -1;
ok = write(fd, lnk, len) == len;
-@@ -220,6 +227,8 @@ int do_open(const char *pathname, int flags, mode_t mode)
+@@ -224,6 +231,8 @@ int do_open(const char *pathname, int flags, mode_t mode)
if (open_noatime)
flags |= O_NOATIME;
#endif
return open(pathname, flags | O_BINARY, mode);
}
-@@ -632,6 +641,9 @@ int do_open_nofollow(const char *pathname, int flags)
+@@ -664,6 +673,9 @@ int do_open_nofollow(const char *pathname, int flags)
#endif
}
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
extern int msgs2stderr;
extern int module_id;
extern int read_only;
-@@ -973,6 +977,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -974,6 +978,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
* points to an identical file won't be replaced by the referent. */
copy_links = copy_dirlinks = copy_unsafe_links = 0;
0. `--max-delete=NUM`
-@@ -2712,7 +2741,7 @@ your home directory (remove the '=' for that).
+@@ -2716,7 +2745,7 @@ your home directory (remove the '=' for that).
output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -69,7 +69,7 @@
+@@ -71,7 +71,7 @@
/* The following XMIT flags require an rsync that uses a varint for the flag values */
#define XMIT_CRTIME_EQ_MTIME (1<<17) /* any protocol - restricted by command-line option */
/* These flags are used in the live flist data. */
-@@ -192,6 +192,7 @@
+@@ -194,6 +194,7 @@
#define ATTRS_SKIP_MTIME (1<<1)
#define ATTRS_ACCURATE_TIME (1<<2)
#define ATTRS_SKIP_ATIME (1<<3)
#define ATTRS_SKIP_CRTIME (1<<5)
#define MSG_FLUSH 2
-@@ -220,6 +221,7 @@
+@@ -222,6 +223,7 @@
#define ITEM_REPORT_GROUP (1<<6)
#define ITEM_REPORT_ACL (1<<7)
#define ITEM_REPORT_XATTR (1<<8)
#define ITEM_REPORT_CRTIME (1<<10)
#define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
#define ITEM_XNAME_FOLLOWS (1<<12)
-@@ -591,6 +593,31 @@ typedef unsigned int size_t;
+@@ -592,6 +594,31 @@ typedef unsigned int size_t;
#define SUPPORT_CRTIMES 1
#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. */
-@@ -817,6 +844,7 @@ extern int pathname_ndx;
+@@ -818,6 +845,7 @@ extern int pathname_ndx;
extern int depth_ndx;
extern int uid_ndx;
extern int gid_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -871,6 +899,11 @@ extern int xattrs_ndx;
+@@ -872,6 +900,11 @@ extern int xattrs_ndx;
/* 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
extern int inplace;
extern int preallocate_files;
extern int preserve_perms;
-@@ -77,7 +78,23 @@ int do_unlink(const char *fname)
+@@ -81,7 +82,23 @@ int do_unlink(const char *fname)
{
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
}
#ifdef SUPPORT_LINKS
-@@ -142,14 +159,35 @@ int do_link(const char *old_path, const char *new_path)
+@@ -146,14 +163,35 @@ int do_link(const char *old_path, const char *new_path)
}
#endif
}
int do_mknod(const char *pathname, mode_t mode, dev_t dev)
-@@ -189,7 +227,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
+@@ -193,7 +231,7 @@ int do_mknod(const char *pathname, mode_t mode, dev_t dev)
return -1;
close(sock);
#ifdef HAVE_CHMOD
#else
return 0;
#endif
-@@ -206,7 +244,22 @@ int do_rmdir(const char *pathname)
+@@ -210,7 +248,22 @@ int do_rmdir(const char *pathname)
{
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
}
int do_open(const char *pathname, int flags, mode_t mode)
-@@ -225,7 +278,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
+@@ -229,7 +282,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
}
#ifdef HAVE_CHMOD
{
static int switch_step = 0;
int code;
-@@ -256,17 +309,72 @@ int do_chmod(const char *path, mode_t mode)
+@@ -260,17 +313,72 @@ int do_chmod(const char *path, mode_t mode)
code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
break;
}
diff --git a/xattrs.c b/xattrs.c
--- a/xattrs.c
+++ b/xattrs.c
-@@ -1203,7 +1203,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1216,7 +1216,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
| (S_ISDIR(fst.st_mode) ? 0700 : 0600);
if (fst.st_mode != mode)
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
See the `--perms` and `--executability` options for how the resulting
permission value can be applied to the files in the transfer.
-@@ -2648,6 +2650,10 @@ your home directory (remove the '=' for that).
+@@ -2652,6 +2654,10 @@ your home directory (remove the '=' for that).
"`--usermap=*:foo --groupmap=*:bar`", only easier. If your shell complains
about the wildcards, use `--protect-args` (`-s`).
0. `--timeout=SECONDS`
This option allows you to set a maximum I/O timeout in seconds. If no data
-@@ -3645,6 +3651,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
+@@ -3650,6 +3656,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
rules that exclude things like "CVS" and "`*.o`" are marked as perishable,
and will not prevent a directory that was removed on the source from being
deleted on the destination.
- An `x` indicates that a rule affects xattr names in xattr copy/delete
operations (and is thus ignored when matching file/dir names). If no
xattr-matching rules are specified, a default xattr filtering rule is used
-@@ -3702,6 +3717,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -3707,6 +3722,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
rules in the file must not specify sides (via a modifier or a rule prefix
such as `hide`).
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -181,6 +181,9 @@
+@@ -183,6 +183,9 @@
#define NO_FILTERS 0
#define SERVER_FILTERS 1
#define ALL_FILTERS 2
#define XFLG_FATAL_ERRORS (1<<0)
#define XFLG_OLD_PREFIXES (1<<1)
-@@ -979,6 +982,8 @@ struct map_struct {
+@@ -980,6 +983,8 @@ struct map_struct {
int status; /* first errno from read errors */
};
#define NAME_IS_FILE (0) /* filter name as a file */
#define NAME_IS_DIR (1<<0) /* filter name as a dir */
#define NAME_IS_XATTR (1<<2) /* filter name as an xattr */
-@@ -1004,8 +1009,18 @@ struct map_struct {
+@@ -1005,8 +1010,18 @@ struct map_struct {
#define FILTRULE_CLEAR_LIST (1<<18)/* this item is the "!" token */
#define FILTRULE_PERISHABLE (1<<19)/* perishable if parent dir goes away */
#define FILTRULE_XATTR (1<<20)/* rule only applies to xattr names */
typedef struct filter_struct {
struct filter_struct *next;
-@@ -1015,6 +1030,11 @@ typedef struct filter_struct {
+@@ -1016,6 +1031,11 @@ typedef struct filter_struct {
int slash_cnt;
struct filter_list_struct *mergelist;
} u;
diff --git a/util1.c b/util1.c
--- a/util1.c
+++ b/util1.c
-@@ -884,6 +884,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
+@@ -889,6 +889,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
return ret;
}
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
extern int protect_args;
extern int modify_window;
extern int relative_paths;
-@@ -412,6 +413,13 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
- rsyserr(FERROR_XFER, errno, "ftruncate %s", full_fname(dest));
+@@ -417,6 +418,13 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+ #endif
}
+ if (do_fsync && fsync(ofd) < 0) {
extern int protocol_version;
extern int mkpath_dest_arg;
extern int file_total;
-@@ -117,6 +122,7 @@ int daemon_connection = 0; /* 0 = no daemon, 1 = daemon via remote shell, -1 = d
+@@ -118,6 +123,7 @@ int daemon_connection = 0; /* 0 = no daemon, 1 = daemon via remote shell, -1 = d
mode_t orig_umask = 0;
int batch_gen_fd = -1;
int sender_keeps_checksum = 0;
int raw_argc, cooked_argc;
char **raw_argv, **cooked_argv;
-@@ -671,6 +677,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
+@@ -672,6 +678,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
return pid;
}
/* The receiving side operates in one of two modes:
*
* 1. it receives any number of files into a destination directory,
-@@ -751,6 +794,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -752,6 +795,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
exit_cleanup(RERR_FILESELECT);
}
filesystem_dev = st.st_dev; /* ensures --force works right w/-x */
return NULL;
}
if (file_total > 1) {
-@@ -808,7 +854,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -809,7 +855,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
full_fname(dest_path));
exit_cleanup(RERR_FILESELECT);
}
return NULL;
}
-@@ -828,6 +876,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -829,6 +877,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
full_fname(dest_path));
exit_cleanup(RERR_FILESELECT);
}
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -585,6 +585,17 @@ typedef unsigned int size_t;
+@@ -586,6 +586,17 @@ typedef unsigned int size_t;
#endif
#endif
return ret;
}
-@@ -1095,7 +1165,7 @@ char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p)
+@@ -1108,7 +1178,7 @@ char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p)
{
const char *name = is_access_acl ? XACC_ACL_ATTR : XDEF_ACL_ATTR;
*len_p = 0; /* no extra data alloc needed from get_xattr_data() */
}
int set_xattr_acl(const char *fname, int is_access_acl, const char *buf, size_t buf_len)
-@@ -1239,11 +1309,33 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1252,11 +1322,33 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
return 0;
}
return ret;
}
-@@ -1252,6 +1344,9 @@ int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
+@@ -1265,6 +1357,9 @@ int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
int ret = do_lstat(fname, fst);
if ((ret < 0 || get_stat_xattr(fname, -1, fst, xst) < 0) && xst)
xst->st_mode = 0;
return ret;
}
-@@ -1260,6 +1355,9 @@ int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst)
+@@ -1273,6 +1368,9 @@ int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst)
int ret = do_fstat(fd, fst);
if ((ret < 0 || get_stat_xattr(NULL, fd, fst, xst) < 0) && xst)
xst->st_mode = 0;
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -2207,6 +2208,12 @@ your home directory (remove the '=' for that).
+@@ -2211,6 +2212,12 @@ your home directory (remove the '=' for that).
> sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/
./configure
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -1010,6 +1010,31 @@ if test x"$enable_iconv" != x"no"; then
+@@ -931,6 +931,31 @@ if test x"$enable_iconv" != x"no"; then
AC_DEFINE(UTF8_CHARSET, "UTF-8", [String to pass to iconv() for the UTF-8 charset.])
fi
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1577,7 +1577,7 @@ static int start_client(int argc, char *argv[])
+@@ -1578,7 +1578,7 @@ static int start_client(int argc, char *argv[])
* remote shell command, we need to do the RSYNCD protocol first */
if (daemon_connection) {
int tmpret;
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -533,6 +533,15 @@ enum delret {
+@@ -534,6 +534,15 @@ enum delret {
#define iconv_t int
#endif
./configure
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2343,6 +2344,50 @@ your home directory (remove the '=' for that).
+@@ -2347,6 +2348,50 @@ your home directory (remove the '=' for that).
specified (or implied by `-a`). You can work-around this bug by avoiding
the `-o` option when sending to an old rsync.
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -1441,7 +1441,8 @@ extern short info_levels[], debug_levels[];
+@@ -1442,7 +1442,8 @@ extern short info_levels[], debug_levels[];
#define DEBUG_FUZZY (DEBUG_FLIST+1)
#define DEBUG_GENR (DEBUG_FUZZY+1)
#define DEBUG_HASH (DEBUG_GENR+1)
fast fallback for the case where xxHash libraries are not available at
build time.
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
.SUFFIXES:
.SUFFIXES: .c .o
--SIMD_x86_64=simd-checksum-x86_64.o
-+SIMD_x86_64=simd-checksum-x86_64.o simd-md5-parallel-x86_64.o
+-SIMD_x86_64=simd-checksum-x86_64.o simd-checksum-avx2.o
++SIMD_x86_64=simd-checksum-x86_64.o simd-checksum-avx2.o simd-md5-parallel-x86_64.o
ASM_x86_64=lib/md5-asm-x86_64.o
GENFILES=configure.sh aclocal.m4 config.h.in rsync.1 rsync.1.html \
lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o @LIBOBJS@
zlib_OBJS=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \
zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o
-@@ -140,6 +140,9 @@ git-version.h: mkgitver $(wildcard $(srcdir)/.git/logs/HEAD)
- simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
- @$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
+@@ -143,6 +143,9 @@ simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
+ simd-checksum-avx2.o: simd-checksum-avx2.S
+ @$(srcdir)/cmd-or-msg disable-asm $(CC) $(CFLAGS) --include=$(srcdir)/rsync.h -DAVX2_ASM -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/simd-checksum-avx2.S
+simd-md5-parallel-x86_64.o: simd-md5-parallel-x86_64.cpp
-+ @$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-md5-parallel-x86_64.cpp
++ @$(srcdir)/cmd-or-msg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-md5-parallel-x86_64.cpp
+
lib/md5-asm-x86_64.o: lib/md5-asm-x86_64.S config.h lib/md-defines.h
- @$(srcdir)/cmdormsg disable-asm $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S
+ @$(srcdir)/cmd-or-msg disable-asm $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
#ifdef HAVE_SIMD
#include <immintrin.h>
-@@ -473,9 +493,235 @@ uint32 get_checksum1(char *buf1, int32 len)
+@@ -359,9 +379,235 @@ uint32 get_checksum1(char *buf1, int32 len)
return get_checksum1_cpp(buf1, len);
}
#pragma clang optimize off
#pragma GCC push_options
#pragma GCC optimize ("O0")
-@@ -486,7 +732,9 @@ uint32 get_checksum1(char *buf1, int32 len)
+@@ -372,7 +618,9 @@ uint32 get_checksum1(char *buf1, int32 len)
#ifndef CLOCK_MONOTONIC_RAW
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
#endif
static void benchmark(const char* desc, int32 (*func)(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2), schar* buf, int32 len) {
struct timespec start, end;
uint64_t us;
-@@ -502,7 +750,7 @@ static void benchmark(const char* desc, int32 (*func)(schar* buf, int32 len, int
+@@ -388,7 +636,7 @@ static void benchmark(const char* desc, int32 (*func)(schar* buf, int32 len, int
clock_gettime(CLOCK_MONOTONIC_RAW, &end);
us = next == 0 ? 0 : (end.tv_sec - start.tv_sec) * 1000000 + (end.tv_nsec - start.tv_nsec) / 1000;
cs = next == 0 ? 0 : (s1 & 0xffff) + (s2 << 16);
}
static int32 get_checksum1_auto(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2) {
-@@ -526,10 +774,108 @@ int main() {
+@@ -412,10 +660,108 @@ int main() {
free(buf);
return 0;
}
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -1078,6 +1078,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -999,6 +999,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
fi
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1408,6 +1408,22 @@ static int start_client(int argc, char *argv[])
+@@ -1409,6 +1409,22 @@ static int start_client(int argc, char *argv[])
if (!read_batch) { /* for read_batch, NO source is specified */
char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -234,6 +234,10 @@
+@@ -236,6 +236,10 @@
#define SIGNIFICANT_ITEM_FLAGS (~(\
ITEM_BASIS_TYPE_FOLLOWS | ITEM_XNAME_FOLLOWS | ITEM_LOCAL_CHANGE))
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-@@ -132,13 +132,18 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz)
+@@ -136,13 +136,18 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz)
#if defined HAVE_LINK || defined HAVE_LINKAT
int do_link(const char *old_path, const char *new_path)
{
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -41,6 +41,7 @@ extern int protocol_version;
+@@ -42,6 +42,7 @@ extern int protocol_version;
extern int remove_source_files;
extern int updating_basis_file;
extern int make_backups;
extern int inplace;
extern int inplace_partial;
extern int batch_fd;
-@@ -127,6 +128,7 @@ void successful_send(int ndx)
+@@ -128,6 +129,7 @@ void successful_send(int ndx)
struct file_struct *file;
struct file_list *flist;
STRUCT_STAT st;
if (!remove_source_files)
return;
-@@ -151,7 +153,11 @@ void successful_send(int ndx)
+@@ -152,7 +154,11 @@ void successful_send(int ndx)
return;
}
./configure (optional if already run)
make
-based-on: dbb1c2d10c127b9a5f99e3e4ee5981f5222fc7e7
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
--protocol=NUM force an older protocol version to be used
--iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
-@@ -3289,6 +3292,36 @@ your home directory (remove the '=' for that).
+@@ -3293,6 +3296,36 @@ your home directory (remove the '=' for that).
`--write-batch`. If _FILE_ is `-`, the batch data will be read from
standard input. See the "BATCH MODE" section for details.
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -169,6 +169,7 @@
+@@ -171,6 +171,7 @@
#define IOERR_DEL_LIMIT (1<<2)
#define MAX_ARGS 1000
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/NEWS.md b/NEWS.md
--- a/NEWS.md
+++ b/NEWS.md
./configure (optional if already run)
make
-based-on: a6bdf313f239cabfef445bc3658b79aec8a40c37
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
--checksum-seed=NUM set block/file checksum seed (advanced)
--ipv4, -4 prefer IPv4
--ipv6, -6 prefer IPv6
-@@ -3331,6 +3332,25 @@ your home directory (remove the '=' for that).
+@@ -3335,6 +3336,25 @@ your home directory (remove the '=' for that).
free to specify just the local charset for a daemon transfer (e.g.
`--iconv=utf8`).
patch -p1 <patches/xxh3-safety-check.diff
make
-based-on: 35d4f6737a57c88978b6e954506e9c73f8c10ccf
+based-on: 109dbc0b7535e8f8094802182f9067bfdc88dfc9
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c