if (verbose > 2) {
rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n",
---- orig/clientserver.c 2005-03-31 00:24:21
+--- orig/clientserver.c 2005-04-09 17:38:31
+++ clientserver.c 2004-07-03 20:22:18
-@@ -351,6 +351,9 @@ static int rsync_module(int f_in, int f_
+@@ -347,6 +347,9 @@ static int rsync_module(int f_in, int f_
XFLG_ANCHORED2ABS | XFLG_OLD_PREFIXES);
log_init();
if (use_chroot) {
/*
-@@ -473,6 +476,9 @@ static int rsync_module(int f_in, int f_
+@@ -469,6 +472,9 @@ static int rsync_module(int f_in, int f_
rprintf(FLOG, "rsync %s %s from %s@%s (%s)\n",
am_sender ? "on" : "to",
request, auth_user, host, addr);
} else {
rprintf(FLOG, "rsync %s %s from %s (%s)\n",
am_sender ? "on" : "to",
---- orig/configure.in 2005-03-29 11:15:05
+--- orig/configure.in 2005-04-07 17:04:26
+++ configure.in 2004-07-03 20:22:18
@@ -94,6 +94,8 @@ AC_ARG_WITH(rsync-path,
[ --with-rsync-path=PATH set default --rsync-path to PATH (default: rsync)],
AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
-@@ -524,6 +526,14 @@ then
+@@ -535,6 +537,14 @@ then
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
fi
FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors)
FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable)
FN_LOCAL_STRING(lp_uid, uid)
---- orig/log.c 2005-03-31 03:03:27
+--- orig/log.c 2005-04-15 07:08:03
+++ log.c 2004-07-03 20:22:18
@@ -84,7 +84,7 @@ struct {
/*
{
int i;
for (i = 0; rerr_names[i].name; i++) {
---- orig/main.c 2005-03-30 16:57:27
+--- orig/main.c 2005-04-24 04:42:39
+++ main.c 2004-07-03 20:22:18
-@@ -141,6 +141,9 @@ static void handle_stats(int f)
+@@ -144,6 +144,9 @@ static void handle_stats(int f)
if (am_daemon) {
log_exit(0, __FILE__, __LINE__);
if (f == -1 || !am_sender)
return;
}
---- orig/receiver.c 2005-03-29 22:39:37
+--- orig/receiver.c 2005-04-14 01:53:12
+++ receiver.c 2005-03-05 00:31:00
-@@ -633,6 +633,9 @@ int recv_files(int f_in, struct file_lis
+@@ -640,6 +640,9 @@ int recv_files(int f_in, struct file_lis
if (!log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
if (fd1 != -1)
close(fd1);
---- orig/sender.c 2005-03-28 20:56:55
+--- orig/sender.c 2005-04-14 01:53:12
+++ sender.c 2005-03-05 00:31:19
-@@ -343,6 +343,9 @@ void send_files(struct file_list *flist,
+@@ -342,6 +342,9 @@ void send_files(struct file_list *flist,
if (!log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
free(file);
if (verbose > 1) {
---- orig/configure.in 2005-03-29 11:15:05
+--- orig/configure.in 2005-04-07 17:04:26
+++ configure.in 2004-08-19 19:53:27
-@@ -467,6 +467,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
+@@ -478,6 +478,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
AC_CHECK_LIB(resolv, strcasecmp)
fi
dnl At the moment we don't test for a broken memcmp(), because all we
dnl need to do is test for equality, not comparison, and it seems that
dnl every platform has a memcmp that can do at least that.
-@@ -713,6 +718,77 @@ AC_SUBST(OBJ_RESTORE)
+@@ -734,6 +739,77 @@ AC_SUBST(OBJ_RESTORE)
AC_SUBST(CC_SHOBJ_FLAG)
AC_SUBST(BUILD_POPT)
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2005-03-30 17:31:41
+--- orig/flist.c 2005-04-28 15:56:50
+++ flist.c 2005-03-16 02:24:11
-@@ -971,6 +971,8 @@ static struct file_struct *send_file_nam
+@@ -974,6 +974,8 @@ static struct file_struct *send_file_nam
file = make_file(fname, flist, f == -2 ? SERVER_FILTERS : ALL_FILTERS);
if (!file)
return NULL;
maybe_emit_filelist_progress(flist->count + flist_count_offset);
-@@ -979,6 +981,10 @@ static struct file_struct *send_file_nam
+@@ -982,6 +984,10 @@ static struct file_struct *send_file_nam
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f, base_flags);
}
return file;
}
-@@ -1305,6 +1311,8 @@ struct file_list *recv_file_list(int f)
+@@ -1308,6 +1314,8 @@ struct file_list *recv_file_list(int f)
flags |= read_byte(f) << 8;
file = receive_file_entry(flist, flags, f);
if (S_ISREG(file->mode))
stats.total_size += file->length;
-@@ -1327,6 +1335,8 @@ struct file_list *recv_file_list(int f)
+@@ -1330,6 +1338,8 @@ struct file_list *recv_file_list(int f)
clean_flist(flist, relative_paths, 1);
if (f >= 0) {
/* Now send the uid/gid list. This was introduced in
* protocol version 15 */
---- orig/generator.c 2005-03-30 16:35:08
+--- orig/generator.c 2005-04-28 16:26:28
+++ generator.c 2005-03-11 11:18:22
-@@ -711,6 +711,10 @@ static void recv_generator(char *fname,
+@@ -720,6 +720,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && code && f_out != -1)
rprintf(code, "%s/\n", safe_fname(fname));
next;
}
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-02-14 02:46:05
@@ -44,6 +44,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
int preserve_uid = 0;
-@@ -179,6 +180,7 @@ static void print_rsync_version(enum log
+@@ -180,6 +181,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -195,6 +197,10 @@ static void print_rsync_version(enum log
+@@ -196,6 +198,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -209,9 +215,9 @@ static void print_rsync_version(enum log
+@@ -210,9 +216,9 @@ static void print_rsync_version(enum log
"Copyright (C) 1996-2005 by Andrew Tridgell and others\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -281,6 +287,7 @@ void usage(enum logcode F)
+@@ -282,6 +288,7 @@ void usage(enum logcode F)
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -o, --owner preserve owner (root only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
-@@ -405,6 +412,7 @@ static struct poptOption long_options[]
+@@ -409,6 +416,7 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
-@@ -863,6 +871,24 @@ int parse_arguments(int *argc, const cha
+@@ -882,6 +890,24 @@ int parse_arguments(int *argc, const cha
basis_dir[basis_dir_cnt++] = (char *)arg;
break;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1264,6 +1290,8 @@ void server_options(char **args,int *arg
+@@ -1286,6 +1312,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (verbose > 1 && flags & PERMS_REPORT) {
enum logcode code = daemon_log_format_has_i || dry_run
? FCLIENT : FINFO;
---- orig/rsync.h 2005-03-28 20:56:55
+--- orig/rsync.h 2005-04-14 01:53:12
+++ rsync.h 2004-07-03 20:11:58
-@@ -639,6 +639,40 @@ struct stats {
+@@ -638,6 +638,40 @@ struct stats {
#include "lib/permstring.h"
#include "lib/addrinfo.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2004-07-03 20:11:58
-@@ -316,6 +316,7 @@ to the detailed description below for a
+@@ -325,6 +325,7 @@ to the detailed description below for a
-H, --hard-links preserve hard links
-K, --keep-dirlinks treat symlinked dir on receiver as dir
-p, --perms preserve permissions
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-@@ -625,6 +626,11 @@ source file's permissions and the umask
- other files (including updated files) retain their existing permissions
+@@ -637,6 +638,11 @@ based on the source file's permissions,
+ umask setting
(which is the same behavior as other file-copy utilities, such as cp).
+dit(bf(-A, --acls)) This option causes rsync to update the remote
This patch adds the --append option, which works like a "resume" mode in
an ftp client, appending new data onto the end of the files it updates.
---- orig/generator.c 2005-03-30 16:35:08
+--- orig/generator.c 2005-04-28 16:26:28
+++ generator.c 2005-03-03 02:59:17
-@@ -53,6 +53,7 @@ extern int delay_updates;
+@@ -54,6 +54,7 @@ extern int delay_updates;
extern int update_only;
extern int opt_ignore_existing;
extern int inplace;
extern int make_backups;
extern int csum_length;
extern int ignore_times;
-@@ -465,35 +466,42 @@ static void generate_and_send_sums(int f
+@@ -473,35 +474,42 @@ static void generate_and_send_sums(int f
OFF_T offset = 0;
sum_sizes_sqroot(&sum, len);
}
if (mapbuf)
-@@ -972,6 +980,9 @@ static void recv_generator(char *fname,
+@@ -1010,6 +1018,9 @@ static void recv_generator(char *fname,
return;
}
if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
;
else if (fnamecmp_type == FNAMECMP_FUZZY)
-@@ -1144,7 +1155,7 @@ void generate_files(int f_out, struct fi
+@@ -1185,7 +1196,7 @@ void generate_files(int f_out, struct fi
do_delete_pass(flist);
do_progress = 0;
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -1195,6 +1206,8 @@ void generate_files(int f_out, struct fi
+@@ -1242,6 +1253,8 @@ void generate_files(int f_out, struct fi
only_existing = max_size = opt_ignore_existing = 0;
update_only = always_checksum = size_only = 0;
ignore_times = 1;
+ append_mode = -1; /* ... but only longer files */
make_backups = 0; /* avoid a duplicate backup for inplace processing */
- /* We expect to just sit around now, so don't exit on a timeout.
+ if (verbose > 2)
--- orig/match.c 2005-03-05 17:51:23
+++ match.c 2005-02-11 20:26:31
@@ -23,6 +23,7 @@ extern int verbose;
matched(f, s, buf, j, -2);
matched(f, s, buf, len, -1);
}
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-03-11 11:21:34
@@ -39,6 +39,7 @@ int make_backups = 0;
**/
int archive_mode = 0;
int keep_dirlinks = 0;
int copy_links = 0;
-@@ -165,6 +166,7 @@ static int modify_window_set;
+@@ -166,6 +167,7 @@ static int modify_window_set;
static int itemize_changes = 0;
static int refused_delete, refused_archive_part;
static int refused_partial, refused_progress, refused_delete_before;
static char *max_size_arg;
static char partialdir_for_delayupdate[] = ".~tmp~";
-@@ -273,6 +275,7 @@ void usage(enum logcode F)
+@@ -274,6 +276,7 @@ void usage(enum logcode F)
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," -d, --dirs transfer directories without recursing\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
rprintf(F," -L, --copy-links transform symlink into referent file/dir\n");
-@@ -401,6 +404,7 @@ static struct poptOption long_options[]
+@@ -405,6 +408,7 @@ static struct poptOption long_options[]
{"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 },
{"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 },
{"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 },
{"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 },
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
-@@ -575,6 +579,8 @@ static void set_refuse_options(char *bp)
+@@ -580,6 +584,8 @@ static void set_refuse_options(char *bp)
refused_partial = op->val;
else if (wildmatch("progress", op->longName))
refused_progress = op->val;
break;
}
if (!is_wild)
-@@ -1108,6 +1114,14 @@ int parse_arguments(int *argc, const cha
+@@ -1130,6 +1136,14 @@ int parse_arguments(int *argc, const cha
bwlimit_writemax = 512;
}
if (delay_updates && !partial_dir)
partial_dir = partialdir_for_delayupdate;
-@@ -1418,7 +1432,9 @@ void server_options(char **args,int *arg
+@@ -1442,7 +1456,9 @@ void server_options(char **args,int *arg
if (opt_ignore_existing && am_sender)
args[ac++] = "--ignore-existing";
args[ac++] = "--inplace";
if (tmpdir) {
---- orig/receiver.c 2005-03-29 22:39:37
+--- orig/receiver.c 2005-04-14 01:53:12
+++ receiver.c 2005-02-11 20:26:32
-@@ -44,6 +44,7 @@ extern int remove_sent_files;
+@@ -45,6 +45,7 @@ extern int remove_sent_files;
extern int module_id;
extern int ignore_errors;
extern int orig_umask;
extern int keep_partial;
extern int checksum_seed;
extern int inplace;
-@@ -211,6 +212,28 @@ static int receive_data(int f_in, char *
+@@ -212,6 +213,28 @@ static int receive_data(int f_in, char *
sum_init(checksum_seed);
while ((i = recv_token(f_in, &data)) != 0) {
if (do_progress)
show_progress(offset, total_size);
-@@ -416,6 +439,7 @@ int recv_files(int f_in, struct file_lis
+@@ -417,6 +440,7 @@ int recv_files(int f_in, struct file_lis
send_msg(MSG_DONE, "", 0);
if (keep_partial && !partial_dir)
make_backups = 0; /* prevents double backup */
continue;
}
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-02-11 20:36:38
-@@ -308,6 +308,7 @@ to the detailed description below for a
+@@ -317,6 +317,7 @@ to the detailed description below for a
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
-u, --update skip files that are newer on the receiver
--inplace update destination files in-place
-d, --dirs transfer directories without recursing
-l, --links copy symlinks as symlinks
-L, --copy-links transform symlink into referent file/dir
-@@ -565,6 +566,14 @@ should not use this option to update fil
+@@ -576,6 +577,14 @@ should not use this option to update fil
rsync will be unable to update a file in-place that is not writable by the
receiving user.
dit(bf(-d, --dirs)) Tell the sending side to include any directories that
are encountered. Unlike bf(--recursive), a directory's contents are not copied
unless the directory was specified on the command-line as either "." or a
---- orig/sender.c 2005-03-28 20:56:55
+--- orig/sender.c 2005-04-14 01:53:12
+++ sender.c 2005-03-16 02:25:18
@@ -28,6 +28,7 @@ extern int log_format_has_i;
extern int daemon_log_format_has_i;
extern int protocol_version;
extern int remove_sent_files;
extern int updating_basis_file;
-@@ -68,6 +69,13 @@ static struct sum_struct *receive_sums(i
+@@ -70,6 +71,13 @@ static struct sum_struct *receive_sums(i
(double)s->count, (long)s->blength, (long)s->remainder);
}
if (s->count == 0)
return(s);
-@@ -227,6 +235,7 @@ void send_files(struct file_list *flist,
+@@ -226,6 +234,7 @@ void send_files(struct file_list *flist,
/* For inplace: redo phase turns off the backup
* flag so that we do a regular inplace send. */
make_backups = 0;
make proto
---- orig/batch.c 2005-03-27 05:13:14
+--- orig/batch.c 2005-04-09 18:00:28
+++ batch.c 2004-07-03 20:15:41
-@@ -207,6 +207,8 @@ void show_flist(int index, struct file_s
+@@ -208,6 +208,8 @@ void show_flist(int index, struct file_s
rprintf(FINFO, "flist->flags=%#x\n", fptr[i]->flags);
rprintf(FINFO, "flist->modtime=%#lx\n",
(long unsigned) fptr[i]->modtime);
rprintf(FINFO, "flist->length=%.0f\n",
(double) fptr[i]->length);
rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- orig/flist.c 2005-03-30 17:31:41
+--- orig/flist.c 2005-04-28 15:56:50
+++ flist.c 2005-02-07 21:06:04
@@ -54,6 +54,7 @@ extern int relative_paths;
extern int implied_dirs;
file->length = file_length;
file->mode = mode;
file->uid = uid;
-@@ -879,6 +895,7 @@ skip_filters:
+@@ -882,6 +898,7 @@ skip_filters:
file->flags = flags;
file->modtime = st.st_mtime;
file->length = st.st_size;
file->mode = st.st_mode;
file->uid = st.st_uid;
---- orig/generator.c 2005-03-30 16:35:08
+--- orig/generator.c 2005-04-28 16:26:28
+++ generator.c 2004-11-03 23:02:12
-@@ -372,7 +372,7 @@ static int unchanged_file(char *fn, stru
+@@ -380,7 +380,7 @@ static int unchanged_file(char *fn, stru
if (ignore_times)
return 0;
}
-@@ -837,7 +837,7 @@ static void recv_generator(char *fname,
+@@ -854,7 +854,7 @@ static void recv_generator(char *fname,
}
if (update_only && statret == 0
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-02-21 10:53:28
@@ -50,6 +50,7 @@ int preserve_uid = 0;
int preserve_gid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -285,6 +286,7 @@ void usage(enum logcode F)
+@@ -286,6 +287,7 @@ void usage(enum logcode F)
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -t, --times preserve times\n");
rprintf(F," -O, --omit-dir-times omit directories when preserving times\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
-@@ -410,6 +412,7 @@ static struct poptOption long_options[]
+@@ -414,6 +416,7 @@ static struct poptOption long_options[]
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 },
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
-@@ -1272,6 +1275,8 @@ void server_options(char **args,int *arg
+@@ -1294,6 +1297,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
}
change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- orig/rsync.h 2005-03-28 20:56:55
+--- orig/rsync.h 2005-04-14 01:53:12
+++ rsync.h 2004-07-03 20:15:41
@@ -54,6 +54,7 @@
#define XMIT_HAS_IDEV_DATA (1<<9)
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
-@@ -510,6 +512,7 @@ struct file_struct {
+@@ -509,6 +511,7 @@ struct file_struct {
struct hlink *links;
} link_u;
time_t modtime;
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-01-24 01:57:18
-@@ -321,6 +321,7 @@ to the detailed description below for a
+@@ -330,6 +330,7 @@ to the detailed description below for a
-D, --devices preserve devices (root only)
-t, --times preserve times
-O, --omit-dir-times omit directories when preserving times
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy files whole (without rsync algorithm)
-@@ -655,6 +656,11 @@ it is preserving modification times (see
+@@ -667,6 +668,11 @@ it is preserving modification times (see
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
return 0;
}
---- orig/util.c 2005-03-30 20:45:02
+--- orig/util.c 2005-05-03 16:47:33
+++ util.c 2005-02-07 21:09:12
@@ -128,12 +128,17 @@ void overflow(char *str)
t[0].tv_usec = 0;
t[1].tv_sec = modtime;
t[1].tv_usec = 0;
-@@ -1146,8 +1151,8 @@ int msleep(int t)
+@@ -1156,8 +1161,8 @@ int msleep(int t)
/**
* --modify-window).
*
* @retval 0 if the times should be treated as the same
-@@ -1156,7 +1161,7 @@ int msleep(int t)
+@@ -1166,7 +1171,7 @@ int msleep(int t)
*
* @retval -1 if the 2nd is later
**/
+ deleting = 0;
+ return ret;
+}
---- orig/generator.c 2005-03-30 16:35:08
+--- orig/generator.c 2005-04-28 16:26:28
+++ generator.c 2005-03-11 11:22:38
-@@ -85,6 +85,9 @@ extern dev_t filesystem_dev;
+@@ -86,6 +86,9 @@ extern dev_t filesystem_dev;
extern char *backup_dir;
extern char *backup_suffix;
extern int backup_suffix_len;
extern struct file_list *the_file_list;
extern struct filter_list_struct server_filter_list;
-@@ -93,10 +96,14 @@ int allowed_lull = 0;
+@@ -94,10 +97,14 @@ int allowed_lull = 0;
static int deletion_count = 0; /* used to implement --max-delete */
}
-@@ -113,8 +120,8 @@ static int delete_item(char *fname, int
+@@ -114,8 +121,8 @@ static int delete_item(char *fname, int
if (!S_ISDIR(mode)) {
if (max_delete && ++deletion_count > max_delete)
return 0;
else
ok = robust_unlink(fname) == 0;
if (ok) {
-@@ -137,9 +144,9 @@ static int delete_item(char *fname, int
+@@ -138,9 +145,9 @@ static int delete_item(char *fname, int
|| (dry_run && zap_dir)) {
ok = 0;
errno = ENOTEMPTY;
else
ok = do_rmdir(fname) == 0;
if (ok) {
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-03-01 01:25:39
-@@ -127,10 +127,14 @@ int no_detach
+@@ -128,10 +128,14 @@ int no_detach
int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
char *tmpdir = NULL;
char *partial_dir = NULL;
char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -140,7 +144,9 @@ char *log_format = NULL;
+@@ -141,7 +145,9 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
int rsync_port = 0;
int compare_dest = 0;
int copy_dest = 0;
-@@ -271,6 +277,8 @@ void usage(enum logcode F)
+@@ -272,6 +278,8 @@ void usage(enum logcode F)
rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n");
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," -d, --dirs transfer directories without recursing\n");
-@@ -367,6 +375,7 @@ static struct poptOption long_options[]
+@@ -371,6 +379,7 @@ static struct poptOption long_options[]
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{"version", 0, POPT_ARG_NONE, 0, OPT_VERSION, 0, 0},
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
{"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
{"password-file", 0, POPT_ARG_STRING, &password_file, 0, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
-@@ -447,6 +456,7 @@ static struct poptOption long_options[]
+@@ -452,6 +461,7 @@ static struct poptOption long_options[]
{"itemize-changes", 'i', POPT_ARG_NONE, &itemize_changes, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1008,6 +1018,8 @@ int parse_arguments(int *argc, const cha
+@@ -1027,6 +1037,8 @@ int parse_arguments(int *argc, const cha
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1042,6 +1054,14 @@ int parse_arguments(int *argc, const cha
+@@ -1061,6 +1073,14 @@ int parse_arguments(int *argc, const cha
return 0;
}
}
}
if (!backup_suffix)
-@@ -1053,6 +1073,16 @@ int parse_arguments(int *argc, const cha
+@@ -1072,6 +1092,16 @@ int parse_arguments(int *argc, const cha
backup_suffix);
return 0;
}
if (backup_dir) {
backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1074,6 +1104,31 @@ int parse_arguments(int *argc, const cha
+@@ -1093,6 +1123,31 @@ int parse_arguments(int *argc, const cha
"--suffix cannot be a null string without --backup-dir\n");
return 0;
}
if (make_backups && !backup_dir)
omit_dir_times = 1;
-@@ -1351,6 +1406,10 @@ void server_options(char **args,int *arg
+@@ -1373,6 +1428,10 @@ void server_options(char **args,int *arg
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1359,7 +1418,13 @@ void server_options(char **args,int *arg
+@@ -1381,7 +1440,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}
+ }
+ return 0;
+}
---- orig/flist.c 2005-03-30 17:31:41
+--- orig/flist.c 2005-04-28 15:56:50
+++ flist.c 2004-09-18 01:51:11
@@ -62,6 +62,8 @@ extern struct file_list *the_file_list;
extern struct filter_list_struct filter_list;
extern struct filter_list_struct server_filter_list;
-@@ -880,7 +882,10 @@ skip_filters:
+@@ -883,7 +885,10 @@ skip_filters:
file->flags = flags;
file->modtime = st.st_mtime;
file->length = st.st_size;
file->uid = st.st_uid;
file->gid = st.st_gid;
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-03-01 01:26:56
-@@ -140,6 +140,7 @@ char *log_format = NULL;
+@@ -141,6 +141,7 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = 0;
int compare_dest = 0;
-@@ -159,6 +160,8 @@ int list_only = 0;
+@@ -160,6 +161,8 @@ int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int F_option_cnt = 0;
static int modify_window_set;
-@@ -286,6 +289,7 @@ void usage(enum logcode F)
+@@ -287,6 +290,7 @@ void usage(enum logcode F)
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -t, --times preserve times\n");
rprintf(F," -O, --omit-dir-times omit directories when preserving times\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
rprintf(F," -W, --whole-file copy files whole (without rsync algorithm)\n");
-@@ -407,6 +411,7 @@ static struct poptOption long_options[]
+@@ -411,6 +415,7 @@ static struct poptOption long_options[]
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 },
-@@ -1077,6 +1082,13 @@ int parse_arguments(int *argc, const cha
+@@ -1096,6 +1101,13 @@ int parse_arguments(int *argc, const cha
if (make_backups && !backup_dir)
omit_dir_times = 1;
if (log_format) {
if (log_format_has(log_format, 'i'))
log_format_has_i = 1;
-@@ -1438,6 +1450,11 @@ void server_options(char **args,int *arg
+@@ -1462,6 +1474,11 @@ void server_options(char **args,int *arg
}
}
if (files_from && (!am_sender || filesfrom_host)) {
if (filesfrom_host) {
args[ac++] = "--files-from";
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-01-24 01:48:43
-@@ -321,6 +321,7 @@ to the detailed description below for a
+@@ -330,6 +330,7 @@ to the detailed description below for a
-D, --devices preserve devices (root only)
-t, --times preserve times
-O, --omit-dir-times omit directories when preserving times
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy files whole (without rsync algorithm)
-@@ -655,6 +656,14 @@ it is preserving modification times (see
+@@ -667,6 +668,14 @@ it is preserving modification times (see
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2005-03-30 16:35:08
+--- orig/generator.c 2005-04-28 16:26:28
+++ generator.c 2004-11-11 22:15:27
-@@ -56,6 +56,7 @@ extern int inplace;
+@@ -57,6 +57,7 @@ extern int inplace;
extern int make_backups;
extern int csum_length;
extern int ignore_times;
extern int size_only;
extern OFF_T max_size;
extern int io_timeout;
-@@ -354,6 +355,8 @@ void itemize(struct file_struct *file, i
+@@ -362,6 +363,8 @@ void itemize(struct file_struct *file, i
/* Perform our quick-check heuristic for determining if a file is unchanged. */
static int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
{
if (st->st_size != file->length)
return 0;
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-01-28 19:14:15
-@@ -89,6 +89,7 @@ int keep_partial = 0;
+@@ -90,6 +90,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -314,6 +315,7 @@ void usage(enum logcode F)
+@@ -315,6 +316,7 @@ void usage(enum logcode F)
rprintf(F," --timeout=TIME set I/O timeout in seconds\n");
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
rprintf(F," --size-only skip files that match in size\n");
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
-@@ -371,6 +373,7 @@ static struct poptOption long_options[]
+@@ -375,6 +377,7 @@ static struct poptOption long_options[]
{"password-file", 0, POPT_ARG_STRING, &password_file, 0, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, &one_file_system, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &only_existing, 0, 0, 0 },
-@@ -1378,6 +1381,9 @@ void server_options(char **args,int *arg
+@@ -1402,6 +1405,9 @@ void server_options(char **args,int *arg
if (size_only)
args[ac++] = "--size-only";
if (modify_window_set) {
if (asprintf(&arg, "--modify-window=%d", modify_window) < 0)
goto oom;
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-02-11 22:49:10
-@@ -349,6 +349,7 @@ to the detailed description below for a
+@@ -358,6 +358,7 @@ to the detailed description below for a
--timeout=TIME set I/O timeout in seconds
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -446,6 +447,12 @@ regardless of timestamp. This is useful
+@@ -457,6 +458,12 @@ regardless of timestamp. This is useful
after using another mirroring system which may not preserve timestamps
exactly.
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2005-03-30 17:31:41
+--- orig/flist.c 2005-04-28 15:56:50
+++ flist.c 2005-03-05 00:29:08
@@ -57,6 +57,7 @@ extern int copy_unsafe_links;
extern int protocol_version;
clean_fname(thisname, 0);
if (sanitize_paths)
-@@ -1082,6 +1089,9 @@ struct file_list *send_file_list(int f,
+@@ -1085,6 +1092,9 @@ struct file_list *send_file_list(int f,
start_write = stats.total_written;
gettimeofday(&start_tv, NULL);
flist = flist_new(WITH_HLINK, "send_file_list");
io_start_buffering_out();
-@@ -1266,6 +1276,9 @@ struct file_list *send_file_list(int f,
+@@ -1269,6 +1279,9 @@ struct file_list *send_file_list(int f,
stats.flist_size = stats.total_written - start_write;
stats.num_files = flist->count;
if (verbose > 3)
output_flist(flist);
-@@ -1287,6 +1300,9 @@ struct file_list *recv_file_list(int f)
+@@ -1290,6 +1303,9 @@ struct file_list *recv_file_list(int f)
start_read = stats.total_read;
flist = flist_new(WITH_HLINK, "recv_file_list");
flist->count = 0;
-@@ -1339,6 +1355,9 @@ struct file_list *recv_file_list(int f)
+@@ -1342,6 +1358,9 @@ struct file_list *recv_file_list(int f)
io_error |= read_int(f);
}
+ if (verbose > 2)
+ rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest);
+}
---- orig/generator.c 2005-04-13 02:59:47
+--- orig/generator.c 2005-04-28 16:26:28
+++ generator.c 2005-03-05 00:29:37
-@@ -583,7 +583,13 @@ static int phase = 0;
+@@ -588,7 +588,13 @@ static int phase = 0;
* start sending checksums.
*
* Note that f_out is set to -1 when doing final directory-permission and
static void recv_generator(char *fname, struct file_struct *file, int ndx,
int itemizing, int maybe_PERMS_REPORT,
enum logcode code, int f_out)
---- orig/log.c 2005-04-13 02:59:47
+--- orig/log.c 2005-04-15 07:08:03
+++ log.c 2004-07-03 20:18:02
-@@ -64,6 +64,7 @@ struct {
+@@ -65,6 +65,7 @@ struct {
{ RERR_STREAMIO , "error in rsync protocol data stream" },
{ RERR_MESSAGEIO , "errors with program diagnostics" },
{ RERR_IPC , "error in IPC code" },
{ RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
{ RERR_WAITCHILD , "some error returned by waitpid()" },
{ RERR_MALLOC , "error allocating core memory buffers" },
---- orig/main.c 2005-04-09 18:00:28
+--- orig/main.c 2005-04-24 04:42:39
+++ main.c 2004-07-22 00:31:47
-@@ -374,7 +374,7 @@ static pid_t do_cmd(char *cmd, char *mac
+@@ -376,7 +376,7 @@ static pid_t do_cmd(char *cmd, char *mac
whole_file = 1;
ret = local_child(argc, args, f_in, f_out, child_main);
} else
if (dir)
free(dir);
---- orig/options.c 2005-04-09 18:00:28
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-02-14 02:50:32
@@ -138,6 +138,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
+
+ return result;
+}
---- orig/util.c 2005-04-04 16:28:37
+--- orig/util.c 2005-05-03 16:47:33
+++ util.c 2004-07-03 20:18:02
-@@ -1337,3 +1337,55 @@ uint32 fuzzy_distance(const char *s1, in
+@@ -1338,3 +1338,55 @@ uint32 fuzzy_distance(const char *s1, in
return a[len2-1];
}
This patch from Sami Farin lets you specify --fsync if you want fsync()
to be called on every file we write.
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-01-28 19:30:47
@@ -39,6 +39,7 @@ int make_backups = 0;
**/
int archive_mode = 0;
int keep_dirlinks = 0;
int copy_links = 0;
-@@ -310,6 +311,7 @@ void usage(enum logcode F)
+@@ -311,6 +312,7 @@ void usage(enum logcode F)
rprintf(F," --partial keep partially transferred files\n");
rprintf(F," --partial-dir=DIR put a partially transferred file into DIR\n");
rprintf(F," --delay-updates put all updated files into place at transfer's end\n");
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
rprintf(F," --timeout=TIME set I/O timeout in seconds\n");
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
-@@ -392,6 +394,7 @@ static struct poptOption long_options[]
+@@ -396,6 +398,7 @@ static struct poptOption long_options[]
{"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 },
{"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 },
{"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 },
{"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 },
-@@ -1426,6 +1429,9 @@ void server_options(char **args,int *arg
+@@ -1450,6 +1453,9 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
if (basis_dir[0] && am_sender) {
/* the server only needs this option if it is not the sender,
* and it may be an older version that doesn't know this
---- orig/receiver.c 2005-03-29 22:39:37
+--- orig/receiver.c 2005-04-14 01:53:12
+++ receiver.c 2005-02-20 00:17:37
-@@ -37,6 +37,7 @@ extern int keep_dirlinks;
+@@ -38,6 +38,7 @@ extern int keep_dirlinks;
extern int preserve_hard_links;
extern int preserve_perms;
extern int io_error;
extern int basis_dir_cnt;
extern int make_backups;
extern int cleanup_got_literal;
-@@ -290,6 +291,12 @@ static int receive_data(int f_in, char *
+@@ -291,6 +292,12 @@ static int receive_data(int f_in, char *
exit_cleanup(RERR_FILEIO);
}
char *partial_dir;
struct filter_list_struct server_filter_list;
---- orig/util.c 2005-03-30 20:45:02
+--- orig/util.c 2005-05-03 16:47:33
+++ util.c 2004-07-03 20:18:13
@@ -33,6 +33,7 @@ extern int module_id;
extern int modify_window;
[last-match]
---- orig/exclude.c 2005-02-27 07:34:27
+--- orig/exclude.c 2005-04-28 15:56:50
+++ exclude.c 2005-02-26 03:22:20
@@ -73,6 +73,7 @@ static BOOL parent_dirscan = False;
static struct filter_struct **mergelist_parents;
} else {
ret->next = listp->tail->next;
listp->tail->next = ret;
-@@ -959,6 +963,7 @@ void parse_filter_file(struct filter_lis
+@@ -957,6 +961,7 @@ void parse_filter_file(struct filter_lis
char line[MAXPATHLEN+MAX_RULE_PREFIX+1]; /* +1 for trailing slash. */
char *eob = line + sizeof line - 1;
int word_split = mflags & MATCHFLG_WORD_SPLIT;
if (!fname || !*fname)
return;
-@@ -994,6 +999,7 @@ void parse_filter_file(struct filter_lis
+@@ -992,6 +997,7 @@ void parse_filter_file(struct filter_lis
}
dirbuf[dirbuf_len] = '\0';
while (1) {
char *s = line;
int ch, overflow = 0;
-@@ -1017,6 +1023,10 @@ void parse_filter_file(struct filter_lis
+@@ -1015,6 +1021,10 @@ void parse_filter_file(struct filter_lis
s = line;
}
*s = '\0';
/* Skip an empty token and (when line parsing) comments. */
if (*line && (word_split || (*line != ';' && *line != '#')))
parse_rule(listp, line, mflags, xflags);
-@@ -1024,6 +1034,7 @@ void parse_filter_file(struct filter_lis
+@@ -1022,6 +1032,7 @@ void parse_filter_file(struct filter_lis
break;
}
fclose(fp);
+}
+
+#endif
---- orig/options.c 2005-04-09 18:00:28
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-04-09 18:01:31
@@ -141,6 +141,7 @@ char *log_format = NULL;
char *password_file = NULL;
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
-@@ -873,6 +876,21 @@ int parse_arguments(int *argc, const cha
+@@ -882,6 +885,21 @@ int parse_arguments(int *argc, const cha
basis_dir[basis_dir_cnt++] = (char *)arg;
break;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1453,6 +1471,11 @@ void server_options(char **args,int *arg
+@@ -1462,6 +1480,11 @@ void server_options(char **args,int *arg
}
}
if (files_from && (!am_sender || filesfrom_host)) {
if (filesfrom_host) {
args[ac++] = "--files-from";
---- orig/receiver.c 2005-04-09 18:00:29
+--- orig/receiver.c 2005-04-14 01:53:12
+++ receiver.c 2005-01-15 21:29:13
@@ -52,6 +52,7 @@ extern int delay_updates;
extern struct stats stats;
}
static void handle_delayed_updates(struct file_list *flist, char *local_name)
-@@ -634,8 +645,12 @@ int recv_files(int f_in, struct file_lis
+@@ -635,8 +646,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
---- orig/rsync.h 2005-03-28 20:56:55
+--- orig/rsync.h 2005-04-14 01:53:12
+++ rsync.h 2004-07-03 20:20:15
-@@ -632,6 +632,14 @@ struct stats {
+@@ -631,6 +631,14 @@ struct stats {
int current_file_index;
};
#include "byteorder.h"
#include "lib/mdfour.h"
---- orig/rsync.yo 2005-04-09 18:00:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-02-13 06:58:47
-@@ -355,6 +355,7 @@ to the detailed description below for a
+@@ -364,6 +364,7 @@ to the detailed description below for a
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
handle relative symlinks properly, and that has not yet been fixed
in this modified version.
---- orig/flist.c 2005-03-30 17:31:41
+--- orig/flist.c 2005-04-28 15:56:50
+++ flist.c 2004-07-16 16:58:04
@@ -45,6 +45,7 @@ extern int filesfrom_fd;
extern int one_file_system;
extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_devices;
-@@ -731,6 +732,30 @@ static struct file_struct *receive_file_
+@@ -734,6 +735,30 @@ static struct file_struct *receive_file_
}
/**
* Create a file_struct for a named file by reading its stat()
* information and performing extensive checks against global
-@@ -856,7 +881,13 @@ skip_filters:
+@@ -859,7 +884,13 @@ skip_filters:
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
#else
linkname_len = 0;
#endif
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-01-28 19:33:24
@@ -43,6 +43,7 @@ int archive_mode = 0;
int keep_dirlinks = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
-@@ -275,6 +276,7 @@ void usage(enum logcode F)
+@@ -276,6 +277,7 @@ void usage(enum logcode F)
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," -d, --dirs transfer directories without recursing\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
rprintf(F," -L, --copy-links transform symlink into referent file/dir\n");
rprintf(F," --copy-unsafe-links only \"unsafe\" symlinks are transformed\n");
rprintf(F," --safe-links ignore symlinks that point outside the source tree\n");
-@@ -399,6 +401,7 @@ static struct poptOption long_options[]
+@@ -403,6 +405,7 @@ static struct poptOption long_options[]
{"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
{"dirs", 'd', POPT_ARG_VAL, &xfer_dirs, 2, 0, 0 },
{"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 },
{"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 },
{"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 },
{"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 },
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-01-28 19:33:40
-@@ -310,6 +310,7 @@ to the detailed description below for a
+@@ -319,6 +319,7 @@ to the detailed description below for a
--inplace update destination files in-place
-d, --dirs transfer directories without recursing
-l, --links copy symlinks as symlinks
update_only = always_checksum = size_only = 0;
ignore_times = 1;
make_backups = 0; /* avoid a duplicate backup for inplace processing */
---- orig/options.c 2005-04-28 16:11:43
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-04-28 16:20:41
@@ -98,6 +98,7 @@ int only_existing = 0;
int opt_ignore_existing = 0;
if (max_size && am_sender) {
args[ac++] = "--max-size";
args[ac++] = max_size_arg;
---- orig/rsync.yo 2005-04-28 15:56:50
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-04-28 15:13:29
@@ -350,6 +350,7 @@ to the detailed description below for a
--ignore-errors delete even if there are I/O errors
+ preserve_gid = 2;
+ }
}
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2004-09-09 01:59:08
-@@ -405,8 +405,8 @@ static struct poptOption long_options[]
+@@ -409,8 +409,8 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 },
-@@ -748,6 +748,14 @@ int parse_arguments(int *argc, const cha
+@@ -782,6 +782,14 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
case 'v':
verbose++;
break;
-@@ -950,8 +958,8 @@ int parse_arguments(int *argc, const cha
+@@ -969,8 +977,8 @@ int parse_arguments(int *argc, const cha
#endif
preserve_perms = 1;
preserve_times = 1;
preserve_devices = 1;
}
-@@ -1264,10 +1272,16 @@ void server_options(char **args,int *arg
+@@ -1286,10 +1294,16 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
[Updated to latest CVS source by Wayne Davison.]
---- orig/syscall.c 2005-02-14 00:58:10
+--- orig/syscall.c 2005-04-07 17:04:26
+++ syscall.c 2004-04-22 23:48:45
@@ -62,9 +62,14 @@ int do_symlink(char *fname1, char *fname
#ifdef HAVE_LINK
For two systems where one uses /usr/local/bin and the other /local/bin.
---- orig/flist.c 2005-03-30 17:31:41
+--- orig/flist.c 2005-04-28 15:56:50
+++ flist.c 2005-03-05 00:31:42
@@ -57,6 +57,7 @@ extern int copy_unsafe_links;
extern int protocol_version;
extern struct stats stats;
extern struct file_list *the_file_list;
-@@ -1086,13 +1087,14 @@ struct file_list *send_file_list(int f,
+@@ -1089,13 +1090,14 @@ struct file_list *send_file_list(int f,
io_start_buffering_out();
if (filesfrom_fd >= 0) {
while (1) {
struct file_struct *file;
---- orig/options.c 2005-03-31 00:24:21
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-03-01 01:37:22
-@@ -81,6 +81,7 @@ char *filesfrom_host = NULL;
+@@ -82,6 +82,7 @@ char *filesfrom_host = NULL;
int eol_nulls = 0;
int recurse = 0;
int xfer_dirs = 0;
int am_daemon = 0;
int daemon_over_rsh = 0;
int do_stats = 0;
-@@ -268,6 +269,7 @@ void usage(enum logcode F)
+@@ -269,6 +270,7 @@ void usage(enum logcode F)
rprintf(F," -R, --relative use relative path names\n");
rprintf(F," --no-relative turn off --relative\n");
rprintf(F," --no-implied-dirs don't send implied dirs with -R\n");
rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n");
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
-@@ -420,6 +422,7 @@ static struct poptOption long_options[]
+@@ -424,6 +426,7 @@ static struct poptOption long_options[]
{"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 },
{"relative", 'R', POPT_ARG_VAL, &relative_paths, 1, 0, 0 },
{"no-relative", 0, POPT_ARG_VAL, &relative_paths, 0, 0, 0 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -914,6 +917,11 @@ int parse_arguments(int *argc, const cha
+@@ -933,6 +936,11 @@ int parse_arguments(int *argc, const cha
} else if (dry_run)
write_batch = 0;
}
if (read_batch && files_from) {
snprintf(err_buf, sizeof err_buf,
"--read-batch cannot be used with --files-from\n");
-@@ -1008,6 +1016,14 @@ int parse_arguments(int *argc, const cha
+@@ -1027,6 +1035,14 @@ int parse_arguments(int *argc, const cha
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1400,6 +1416,11 @@ void server_options(char **args,int *arg
+@@ -1424,6 +1440,11 @@ void server_options(char **args,int *arg
} else if (keep_partial)
args[ac++] = "--partial";
if (ignore_errors)
args[ac++] = "--ignore-errors";
---- orig/rsync.yo 2005-03-30 16:57:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-02-22 18:20:24
-@@ -303,6 +303,7 @@ to the detailed description below for a
+@@ -312,6 +312,7 @@ to the detailed description below for a
-R, --relative use relative path names
--no-relative turn off --relative
--no-implied-dirs don't send implied dirs with -R
-b, --backup make backups (see --suffix & --backup-dir)
--backup-dir=DIR make backups into hierarchy based in DIR
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
-@@ -511,6 +512,11 @@ the bf(--no-implied-dirs) option would o
+@@ -522,6 +523,11 @@ the bf(--no-implied-dirs) option would o
which means that if "/path" was a real directory on one machine and a
symlink of the other machine, rsync would not try to change this.
if (t - last_io >= io_timeout) {
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
---- orig/options.c 2005-04-09 18:00:28
+--- orig/options.c 2005-05-03 16:47:32
+++ options.c 2005-04-09 18:03:53
@@ -106,6 +106,7 @@ int checksum_seed = 0;
int inplace = 0;
/** Network address family. **/
-@@ -345,6 +346,8 @@ void usage(enum logcode F)
+@@ -344,6 +345,8 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n");
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
-@@ -873,6 +879,36 @@ int parse_arguments(int *argc, const cha
+@@ -882,6 +888,36 @@ int parse_arguments(int *argc, const cha
basis_dir[basis_dir_cnt++] = (char *)arg;
break;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1360,6 +1396,15 @@ void server_options(char **args,int *arg
+@@ -1369,6 +1405,15 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
if (backup_dir) {
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
---- orig/rsync.yo 2005-04-09 18:00:29
+--- orig/rsync.yo 2005-05-03 16:47:33
+++ rsync.yo 2005-02-01 10:46:35
-@@ -379,6 +379,8 @@ to the detailed description below for a
+@@ -387,6 +387,8 @@ to the detailed description below for a
--password-file=FILE read password from FILE
--list-only list the files instead of copying them
--bwlimit=KBPS limit I/O bandwidth; KBytes per second
--write-batch=FILE write a batched update to FILE
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
-@@ -1274,6 +1276,19 @@ transfer was too fast, it will wait befo
+@@ -1284,6 +1286,19 @@ transfer was too fast, it will wait befo
result is an average transfer rate equaling the specified limit. A value
of zero specifies no limit.
+
dit(bf(--write-batch=FILE)) Record a file that can later be applied to
another identical destination with bf(--read-batch). See the "BATCH MODE"
- section for details.
---- orig/util.c 2005-04-04 16:28:37
+ section for details, and also the bf(--only-write-batch) option.
+--- orig/util.c 2005-05-03 16:47:33
+++ util.c 2004-07-03 20:23:22
@@ -126,6 +126,132 @@ void overflow(char *str)
exit_cleanup(RERR_MALLOC);
#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif
---- orig/syscall.c 2005-02-14 00:58:10
+--- orig/syscall.c 2005-04-07 17:04:26
+++ syscall.c 2005-02-14 02:54:45
@@ -27,6 +27,7 @@
#include "rsync.h"