./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/acls.c b/acls.c
--- a/acls.c
+++ b/acls.c
static int calc_sacl_entries(const rsync_acl *racl)
{
/* A System ACL always gets user/group/other permission entries. */
-@@ -574,6 +587,96 @@ int get_acl(const char *fname, stat_x *sxp)
+@@ -580,6 +593,96 @@ int get_acl(const char *fname, stat_x *sxp)
return 0;
}
/* === Send functions === */
/* Send the ida list over the file descriptor. */
-@@ -649,6 +752,11 @@ static void send_rsync_acl(int f, rsync_acl *racl, SMB_ACL_TYPE_T type,
+@@ -655,6 +758,11 @@ static void send_rsync_acl(int f, rsync_acl *racl, SMB_ACL_TYPE_T type,
* This also frees the ACL data. */
void send_acl(int f, stat_x *sxp)
{
if (!sxp->acc_acl) {
sxp->acc_acl = create_racl();
rsync_acl_fake_perms(sxp->acc_acl, sxp->st.st_mode);
-@@ -666,6 +774,160 @@ void send_acl(int f, stat_x *sxp)
+@@ -672,6 +780,160 @@ void send_acl(int f, stat_x *sxp)
}
}
/* === Receive functions === */
static uint32 recv_acl_access(int f, uchar *name_follows_ptr)
-@@ -787,6 +1049,11 @@ static int recv_rsync_acl(int f, item_list *racl_list, SMB_ACL_TYPE_T type, mode
+@@ -793,6 +1055,11 @@ static int recv_rsync_acl(int f, item_list *racl_list, SMB_ACL_TYPE_T type, mode
/* Receive the ACL info the sender has included for this file-list entry. */
void receive_acl(int f, struct file_struct *file)
{
Fix a bug that could lose some bits when stripping some (supposedly)
superfluous ACL info.
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/lib/sysacls.c b/lib/sysacls.c
--- a/lib/sysacls.c
+++ b/lib/sysacls.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
patch -p1 <patches/remote-option.diff
patch -p1 <patches/db.diff
- ./configure (optional if already run)
+ ./configure
make
based-on: patch/b3.0.x/remote-option
AC_HEADER_MAJOR
AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
-@@ -1001,6 +1001,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1004,6 +1004,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
fi
fi
diff = u_strcmp(fmid->basename, f->basename);
if (diff == 0) {
good_match = mid;
-@@ -589,7 +591,6 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev,
- char *p, delbuf[MAXPATHLEN];
- unsigned remainder;
- int dlen, i, restore_dot = 0;
-- int save_uid_ndx = uid_ndx;
-
- if (!fbuf) {
- change_local_filter_dir(NULL, 0, 0);
-@@ -2047,6 +2048,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -2046,6 +2048,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp = partialptr;
fnamecmp_type = FNAMECMP_PARTIAL_DIR;
statret = 0;
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
if (delete_item(fname, fp->mode, flags) != DR_SUCCESS)
ret = DR_NOT_EMPTY;
}
-@@ -456,13 +577,19 @@ static void do_delayed_deletions(char *delbuf)
+@@ -456,13 +577,18 @@ static void do_delayed_deletions(char *delbuf)
* all the --delete-WHEN options. Note that the fbuf pointer must point to a
* MAXPATHLEN buffer with the name of the directory in it (the functions we
* call will append names onto the end, but the old dir value will be restored
+ char *p, delbuf[MAXPATHLEN];
+ unsigned remainder;
+ int dlen, i, restore_dot = 0;
-+ int save_uid_ndx = uid_ndx;
if (!fbuf) {
change_local_filter_dir(NULL, 0, 0);
-@@ -476,17 +603,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -476,17 +602,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
maybe_send_keepalive();
if (io_error && !ignore_errors) {
if (one_file_system) {
if (file->flags & FLAG_TOP_DIR)
filesystem_dev = *fs_dev;
-@@ -496,6 +628,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -496,6 +627,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
dirlist = get_dirlist(fbuf, dlen, 0);
/* If an item in dirlist is not found in flist, delete it
* from the filesystem. */
for (i = dirlist->used; i--; ) {
-@@ -508,6 +648,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -508,6 +647,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
f_name(fp, NULL));
continue;
}
/* Here we want to match regardless of file type. Replacement
* of a file with one of another type is handled separately by
* a delete_item call with a DEL_MAKE_ROOM flag. */
-@@ -516,14 +660,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -516,14 +659,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
if (!(fp->mode & S_IWUSR) && !am_root && fp->flags & FLAG_OWNED_BY_US)
flags |= DEL_NO_UID_WRITE;
f_name(fp, delbuf);
flist_free(dirlist);
}
-@@ -556,9 +705,9 @@ static void do_delete_pass(void)
+@@ -556,9 +704,9 @@ static void do_delete_pass(void)
|| !S_ISDIR(st.st_mode))
continue;
if (do_progress && !am_server)
rprintf(FINFO, " \r");
-@@ -1269,6 +1418,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1269,6 +1417,7 @@ static void list_file_entry(struct file_struct *f)
}
}
static int phase = 0;
static int dflt_perms;
-@@ -1557,9 +1707,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1557,9 +1706,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
else if (delete_during && f_out != -1 && !phase
&& !(file->flags & FLAG_MISSING_DIR)) {
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
goto cleanup;
-@@ -1843,8 +1996,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1843,8 +1995,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
#endif
rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
full_fname(fname));
goto cleanup;
-@@ -2247,6 +2406,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2247,6 +2405,12 @@ void generate_files(int f_out, const char *local_name)
if (verbose > 2)
rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
if (delete_before && !solo_file && cur_flist->used > 0)
do_delete_pass();
if (delete_during == 2) {
-@@ -2257,7 +2422,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2257,7 +2421,7 @@ void generate_files(int f_out, const char *local_name)
}
do_progress = 0;
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -2299,7 +2464,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2299,7 +2463,7 @@ void generate_files(int f_out, const char *local_name)
dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
} else
dirdev = MAKEDEV(0, 0);
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
-@@ -2346,7 +2511,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2346,7 +2510,21 @@ void generate_files(int f_out, const char *local_name)
} while ((cur_flist = cur_flist->next) != NULL);
if (delete_during)
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -1178,6 +1178,32 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1179,6 +1179,32 @@ int handle_partial_dir(const char *fname, int create)
return 1;
}
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
* pass --drop-cache on to the remote server
* make test works now
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+To use this patch, run these commands for a successful build:
+
+ patch -p1 <patches/drop-cache.diff
+ ./configure
+ make
+
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c
./configure
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
if (statret != 0 && basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
itemizing, code);
-@@ -1526,10 +1551,17 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1534,10 +1559,17 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
/* We need to ensure that the dirs in the transfer have writable
* permissions during the time we are putting files within them.
* This is then fixed after the transfer is done. */
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
patch -p1 <patches/link-by-hash.diff
./prepare-source
- ./configure
+ ./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
int do_compression = 0;
int def_compress_level = Z_DEFAULT_COMPRESSION;
int am_root = 0; /* 0 = normal, 1 = root, 2 = --super, -1 = --fake-super */
-@@ -223,6 +224,7 @@ static void print_rsync_version(enum logcode f)
- char const *links = "no ";
- char const *iconv = "no ";
- char const *ipv6 = "no ";
-+ char const *preallocation = "no ";
- STRUCT_STAT *dumstat;
-
- #if SUBPROTOCOL_VERSION != 0
-@@ -256,6 +258,9 @@ static void print_rsync_version(enum logcode f)
- #ifdef CAN_SET_SYMLINK_TIMES
- symtimes = "";
+@@ -217,6 +218,7 @@ static void print_rsync_version(enum logcode f)
+ char const *got_socketpair = "no ";
+ char const *have_inplace = "no ";
+ char const *hardlinks = "no ";
++ char const *prealloc = "no ";
+ char const *symtimes = "no ";
+ char const *acls = "no ";
+ char const *xattrs = "no ";
+@@ -238,6 +240,9 @@ static void print_rsync_version(enum logcode f)
+ #ifdef SUPPORT_HARD_LINKS
+ hardlinks = "";
#endif
+#ifdef SUPPORT_PREALLOCATION
-+ preallocation = "";
++ prealloc = "";
+#endif
-
- rprintf(f, "%s version %s protocol version %d%s\n",
- RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
+ #ifdef SUPPORT_ACLS
+ acls = "";
+ #endif
@@ -269,8 +274,8 @@ static void print_rsync_version(enum logcode f)
(int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
- rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv, %ssymtimes\n",
- have_inplace, acls, xattrs, iconv, symtimes);
-+ rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv, %ssymtimes, %spreallocation\n",
-+ have_inplace, acls, xattrs, iconv, symtimes, preallocation);
++ rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv, %ssymtimes, %sprealloc\n",
++ have_inplace, acls, xattrs, iconv, symtimes, prealloc);
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -24,6 +24,7 @@
- #include "ifuncs.h"
-
- extern int verbose;
+@@ -30,6 +30,7 @@ extern int relative_paths;
+ extern int preserve_times;
+ extern int human_readable;
+ extern int preserve_xattrs;
+extern int preallocate_files;
- extern int module_id;
- extern int modify_window;
- extern int relative_paths;
+ extern char *module_dir;
+ extern unsigned int module_dirlen;
+ extern mode_t orig_umask;
@@ -286,6 +287,9 @@ int copy_file(const char *source, const char *dest, int ofd,
int ifd;
char buf[1024 * 8];
+#ifdef PREALLOCATE_NEEDS_TRUNCATE
+ /* Source file might have shrunk since we fstatted it.
+ * Cut off any extra preallocated zeros from dest file. */
-+ if (offset < preallocated_len && ftruncate(ofd, offset) < 0) {
++ if (offset < preallocated_len && do_ftruncate(ofd, offset) < 0) {
+ /* If we fail to truncate, the dest file may be wrong, so we
+ * must trigger the "partial transfer" error. */
+ rsyserr(FERROR_XFER, errno, "ftruncate %s", full_fname(dest));
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
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: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
./configure (optional if already run)
make
-based-on: 1ddcdaf3f6808ba53aef9e19f630a18808de22ac
+based-on: 93bdc6478e8d8a392b318f3986f9799ac3203d0e
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c