if (verbose > 2) {
rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n",
---- orig/clientserver.c 2005-03-01 03:39:32
+--- orig/clientserver.c 2005-03-31 00:24:21
+++ clientserver.c 2004-07-03 20:22:18
@@ -351,6 +351,9 @@ static int rsync_module(int f_in, int f_
XFLG_ANCHORED2ABS | XFLG_OLD_PREFIXES);
} else {
rprintf(FLOG, "rsync %s %s from %s (%s)\n",
am_sender ? "on" : "to",
---- orig/configure.in 2005-03-16 02:19:29
+--- orig/configure.in 2005-03-29 11:15:05
+++ 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)],
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-27 05:58:51
+--- orig/log.c 2005-03-31 03:03:27
+++ log.c 2004-07-03 20:22:18
-@@ -83,7 +83,7 @@ struct {
+@@ -84,7 +84,7 @@ struct {
/*
* Map from rsync error code to name, or return NULL.
*/
{
int i;
for (i = 0; rerr_names[i].name; i++) {
---- orig/main.c 2005-03-16 02:19:30
+--- orig/main.c 2005-03-30 16:57:27
+++ main.c 2004-07-03 20:22:18
-@@ -139,6 +139,9 @@ static void report(int f)
+@@ -141,6 +141,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-24 16:41:46
+--- orig/receiver.c 2005-03-29 22:39:37
+++ receiver.c 2005-03-05 00:31:00
-@@ -620,6 +620,9 @@ int recv_files(int f_in, struct file_lis
+@@ -633,6 +633,9 @@ int recv_files(int f_in, struct file_lis
if (!log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
free(file);
if (verbose > 1) {
---- orig/configure.in 2005-03-16 02:19:29
+--- orig/configure.in 2005-03-29 11:15:05
+++ configure.in 2004-08-19 19:53:27
@@ -467,6 +467,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
AC_CHECK_LIB(resolv, strcasecmp)
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2005-03-16 02:19:29
+--- orig/flist.c 2005-03-30 17:31:41
+++ flist.c 2005-03-16 02:24:11
-@@ -970,6 +970,8 @@ static struct file_struct *send_file_nam
+@@ -971,6 +971,8 @@ static struct file_struct *send_file_nam
file = make_file(fname, flist, f == -2 ? SERVER_FILTERS : ALL_FILTERS);
if (!file)
return NULL;
+ if (!MAKE_ACL(file, fname))
+ return;
- maybe_emit_filelist_progress(flist);
+ maybe_emit_filelist_progress(flist->count + flist_count_offset);
-@@ -978,6 +980,10 @@ static struct file_struct *send_file_nam
+@@ -979,6 +981,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;
}
-@@ -1304,6 +1310,8 @@ struct file_list *recv_file_list(int f)
+@@ -1305,6 +1311,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;
-@@ -1326,6 +1334,8 @@ struct file_list *recv_file_list(int f)
+@@ -1327,6 +1335,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-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2005-03-11 11:18:22
@@ -711,6 +711,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
next;
}
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-02-14 02:46:05
@@ -44,6 +44,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1265,6 +1291,8 @@ void server_options(char **args,int *arg
+@@ -1264,6 +1290,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2005-03-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2004-07-03 20:11:58
@@ -316,6 +316,7 @@ to the detailed description below for a
-H, --hard-links preserve hard links
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-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2005-03-03 02:59:17
-@@ -52,6 +52,7 @@ extern int delay_updates;
+@@ -53,6 +53,7 @@ extern int delay_updates;
extern int update_only;
extern int opt_ignore_existing;
extern int inplace;
if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
;
else if (fnamecmp_type == FNAMECMP_FUZZY)
-@@ -1142,7 +1153,7 @@ void generate_files(int f_out, struct fi
- if (delete_before && !local_name && flist->count > 0)
+@@ -1144,7 +1155,7 @@ void generate_files(int f_out, struct fi
do_delete_pass(flist);
+ do_progress = 0;
- if (whole_file < 0)
+ if (append_mode || whole_file < 0)
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -1193,6 +1204,8 @@ void generate_files(int f_out, struct fi
+@@ -1195,6 +1206,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;
matched(f, s, buf, j, -2);
matched(f, s, buf, len, -1);
}
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ 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 F_option_cnt = 0;
- static int modify_window_set;
+@@ -165,6 +166,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 int refused_inplace;
break;
}
if (!is_wild)
-@@ -1109,6 +1115,14 @@ int parse_arguments(int *argc, const cha
+@@ -1108,6 +1114,14 @@ int parse_arguments(int *argc, const cha
bwlimit_writemax = 512;
}
if (delay_updates && !partial_dir)
partial_dir = partialdir_for_delayupdate;
-@@ -1419,7 +1433,9 @@ void server_options(char **args,int *arg
+@@ -1418,7 +1432,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-24 16:41:46
+--- orig/receiver.c 2005-03-29 22:39:37
+++ receiver.c 2005-02-11 20:26:32
@@ -44,6 +44,7 @@ extern int remove_sent_files;
extern int module_id;
extern int keep_partial;
extern int checksum_seed;
extern int inplace;
-@@ -210,6 +211,28 @@ static int receive_data(int f_in, char *
+@@ -211,6 +212,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);
-@@ -399,6 +422,7 @@ int recv_files(int f_in, struct file_lis
+@@ -416,6 +439,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-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-02-11 20:36:38
@@ -308,6 +308,7 @@ to the detailed description below for a
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
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-16 02:19:29
+--- orig/flist.c 2005-03-30 17:31:41
+++ flist.c 2005-02-07 21:06:04
@@ -54,6 +54,7 @@ extern int relative_paths;
extern int implied_dirs;
extern int protocol_version;
extern int sanitize_paths;
extern int orig_umask;
-@@ -140,16 +141,18 @@ static void list_file_entry(struct file_
+@@ -141,16 +142,18 @@ static void list_file_entry(struct file_
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
safe_fname(f_name(f)));
}
}
-@@ -313,6 +316,7 @@ void send_file_entry(struct file_struct
+@@ -314,6 +317,7 @@ void send_file_entry(struct file_struct
{
unsigned short flags;
static time_t modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -328,7 +332,7 @@ void send_file_entry(struct file_struct
+@@ -329,7 +333,7 @@ void send_file_entry(struct file_struct
if (!file) {
write_byte(f, 0);
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
-@@ -377,6 +381,12 @@ void send_file_entry(struct file_struct
+@@ -378,6 +382,12 @@ void send_file_entry(struct file_struct
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
#ifdef SUPPORT_HARD_LINKS
if (file->link_u.idev) {
-@@ -432,6 +442,8 @@ void send_file_entry(struct file_struct
+@@ -433,6 +443,8 @@ void send_file_entry(struct file_struct
write_int(f, modtime);
if (!(flags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (preserve_uid && !(flags & XMIT_SAME_UID)) {
if (!numeric_ids)
add_uid(uid);
-@@ -505,6 +517,7 @@ static struct file_struct *receive_file_
+@@ -506,6 +518,7 @@ static struct file_struct *receive_file_
unsigned short flags, int f)
{
static time_t modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -523,7 +536,7 @@ static struct file_struct *receive_file_
+@@ -524,7 +537,7 @@ static struct file_struct *receive_file_
struct file_struct *file;
if (!flist) {
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
-@@ -579,6 +592,8 @@ static struct file_struct *receive_file_
+@@ -580,6 +593,8 @@ static struct file_struct *receive_file_
modtime = (time_t)read_int(f);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (preserve_uid && !(flags & XMIT_SAME_UID))
uid = (uid_t)read_int(f);
-@@ -629,6 +644,7 @@ static struct file_struct *receive_file_
+@@ -630,6 +645,7 @@ static struct file_struct *receive_file_
file->flags = 0;
file->modtime = modtime;
file->length = file_length;
file->mode = mode;
file->uid = uid;
-@@ -878,6 +894,7 @@ skip_filters:
+@@ -879,6 +895,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-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2004-11-03 23:02:12
@@ -372,7 +372,7 @@ static int unchanged_file(char *fn, stru
if (ignore_times)
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-02-21 10:53:28
@@ -50,6 +50,7 @@ int preserve_uid = 0;
int preserve_gid = 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 },
-@@ -1273,6 +1276,8 @@ void server_options(char **args,int *arg
+@@ -1272,6 +1275,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2005-03-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-01-24 01:57:18
@@ -321,6 +321,7 @@ to the detailed description below for a
-D, --devices preserve devices (root only)
return 0;
}
---- orig/util.c 2005-03-17 09:05:21
+--- orig/util.c 2005-03-30 20:45:02
+++ util.c 2005-02-07 21:09:12
@@ -128,12 +128,17 @@ void overflow(char *str)
+ deleting = 0;
+ return ret;
+}
---- orig/generator.c 2005-03-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2005-03-11 11:22:38
@@ -85,6 +85,9 @@ extern dev_t filesystem_dev;
extern char *backup_dir;
else
ok = do_rmdir(fname) == 0;
if (ok) {
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-03-01 01:25:39
@@ -127,10 +127,14 @@ int no_detach
int write_batch = 0;
if (make_backups && !backup_dir)
omit_dir_times = 1;
-@@ -1352,6 +1407,10 @@ void server_options(char **args,int *arg
+@@ -1351,6 +1406,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) {
-@@ -1360,7 +1419,13 @@ void server_options(char **args,int *arg
+@@ -1359,7 +1418,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}
+ }
+ return 0;
+}
---- orig/flist.c 2005-03-16 02:19:29
+--- orig/flist.c 2005-03-30 17:31:41
+++ 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;
-@@ -879,7 +881,10 @@ skip_filters:
+@@ -880,7 +882,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-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-03-01 01:26:56
@@ -140,6 +140,7 @@ char *log_format = NULL;
char *password_file = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = 0;
int compare_dest = 0;
-@@ -160,6 +161,8 @@ int list_only = 0;
+@@ -159,6 +160,8 @@ int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
+ }
+
if (log_format) {
- if (strstr(log_format, "%i") != NULL)
+ if (log_format_has(log_format, 'i'))
log_format_has_i = 1;
-@@ -1439,6 +1451,11 @@ void server_options(char **args,int *arg
+@@ -1438,6 +1450,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-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-01-24 01:48:43
@@ -321,6 +321,7 @@ to the detailed description below for a
-D, --devices preserve devices (root only)
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2005-03-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2004-11-11 22:15:27
-@@ -55,6 +55,7 @@ extern int inplace;
+@@ -56,6 +56,7 @@ extern int inplace;
extern int make_backups;
extern int csum_length;
extern int ignore_times;
if (st->st_size != file->length)
return 0;
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-01-28 19:14:15
@@ -89,6 +89,7 @@ int keep_partial = 0;
int safe_symlinks = 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 },
-@@ -1379,6 +1382,9 @@ void server_options(char **args,int *arg
+@@ -1378,6 +1381,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-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-02-11 22:49:10
@@ -349,6 +349,7 @@ to the detailed description below for a
--timeout=TIME set I/O timeout in seconds
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2005-03-16 02:19:29
+--- orig/flist.c 2005-03-30 17:31:41
+++ flist.c 2005-03-05 00:29:08
@@ -57,6 +57,7 @@ extern int copy_unsafe_links;
extern int protocol_version;
extern struct stats stats;
extern struct file_list *the_file_list;
-@@ -338,7 +339,10 @@ void send_file_entry(struct file_struct
+@@ -339,7 +340,10 @@ void send_file_entry(struct file_struct
io_write_phase = "send_file_entry";
flags = base_flags;
-@@ -554,6 +558,9 @@ static struct file_struct *receive_file_
+@@ -555,6 +559,9 @@ static struct file_struct *receive_file_
strlcpy(lastname, thisname, MAXPATHLEN);
clean_fname(thisname, 0);
if (sanitize_paths)
-@@ -1081,6 +1088,9 @@ struct file_list *send_file_list(int f,
+@@ -1082,6 +1089,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();
-@@ -1265,6 +1275,9 @@ struct file_list *send_file_list(int f,
+@@ -1266,6 +1276,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);
-@@ -1286,6 +1299,9 @@ struct file_list *recv_file_list(int f)
+@@ -1287,6 +1300,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;
-@@ -1338,6 +1354,9 @@ struct file_list *recv_file_list(int f)
+@@ -1339,6 +1355,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-03-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2005-03-05 00:29:37
@@ -580,7 +580,13 @@ static int phase = 0;
* start sending checksums.
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-03-27 05:58:51
+--- orig/log.c 2005-03-31 03:03:27
+++ 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-03-16 02:19:30
+--- orig/main.c 2005-03-30 16:57:27
+++ main.c 2004-07-22 00:31:47
-@@ -363,7 +363,7 @@ static pid_t do_cmd(char *cmd, char *mac
+@@ -371,7 +371,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-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-02-14 02:50:32
@@ -137,6 +137,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
+
+ return result;
+}
---- orig/util.c 2005-03-17 09:05:21
+--- orig/util.c 2005-03-30 20:45:02
+++ util.c 2004-07-03 20:18:02
@@ -1328,3 +1328,55 @@ uint32 fuzzy_distance(const char *s1, in
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-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-01-28 19:30:47
@@ -39,6 +39,7 @@ int make_backups = 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 },
-@@ -1427,6 +1430,9 @@ void server_options(char **args,int *arg
+@@ -1426,6 +1429,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-24 16:41:46
+--- orig/receiver.c 2005-03-29 22:39:37
+++ receiver.c 2005-02-20 00:17:37
@@ -37,6 +37,7 @@ extern int keep_dirlinks;
extern int preserve_hard_links;
extern int basis_dir_cnt;
extern int make_backups;
extern int cleanup_got_literal;
-@@ -289,6 +290,12 @@ static int receive_data(int f_in, char *
+@@ -290,6 +291,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-17 09:05:21
+--- orig/util.c 2005-03-30 20:45:02
+++ util.c 2004-07-03 20:18:13
@@ -33,6 +33,7 @@ extern int module_id;
extern int modify_window;
case '?':
/* Match anything but '/'. */
if (*text == '/')
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2004-10-14 17:22:51
@@ -100,6 +100,7 @@ int max_delete = 0;
OFF_T max_size = 0;
{"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 },
-@@ -1391,6 +1394,9 @@ void server_options(char **args,int *arg
+@@ -1390,6 +1393,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
char *partial_dir;
struct filter_list_struct server_filter_list;
---- orig/util.c 2005-03-17 09:05:21
+--- orig/util.c 2005-03-30 20:45:02
+++ util.c 2004-08-13 16:40:34
@@ -31,6 +31,7 @@ extern int verbose;
extern int dry_run;
+}
+
+#endif
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-03-01 01:27:55
@@ -140,6 +140,7 @@ char *log_format = NULL;
char *password_file = NULL;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1439,6 +1457,11 @@ void server_options(char **args,int *arg
+@@ -1438,6 +1456,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-03-24 16:41:46
+--- orig/receiver.c 2005-03-29 22:39:37
+++ receiver.c 2005-01-15 21:29:13
@@ -51,6 +51,7 @@ extern int delay_updates;
extern struct stats stats;
+extern char *link_by_hash_dir;
extern char *partial_dir;
extern char *basis_dir[];
-
-@@ -183,12 +184,13 @@ static int get_tmpname(char *fnametmp, c
+ extern struct file_list *the_file_list;
+@@ -184,12 +185,13 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
int32 len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -208,6 +210,9 @@ static int receive_data(int f_in, char *
+@@ -209,6 +211,9 @@ static int receive_data(int f_in, char *
} else
mapbuf = NULL;
sum_init(checksum_seed);
while ((i = recv_token(f_in, &data)) != 0) {
-@@ -224,6 +229,8 @@ static int receive_data(int f_in, char *
+@@ -225,6 +230,8 @@ static int receive_data(int f_in, char *
cleanup_got_literal = 1;
sum_update(data, i);
if (fd != -1 && write_file(fd,data,i) != i)
goto report_write_error;
-@@ -250,6 +257,8 @@ static int receive_data(int f_in, char *
+@@ -251,6 +258,8 @@ static int receive_data(int f_in, char *
see_token(map, len);
sum_update(map, len);
}
if (inplace) {
-@@ -290,6 +299,8 @@ static int receive_data(int f_in, char *
+@@ -291,6 +300,8 @@ static int receive_data(int f_in, char *
}
sum_end(file_sum1);
if (mapbuf)
unmap_file(mapbuf);
-@@ -305,7 +316,7 @@ static int receive_data(int f_in, char *
+@@ -306,7 +317,7 @@ static int receive_data(int f_in, char *
static void discard_receive_data(int f_in, OFF_T length)
{
}
static void handle_delayed_updates(struct file_list *flist, char *local_name)
-@@ -615,8 +626,12 @@ int recv_files(int f_in, struct file_lis
+@@ -628,8 +639,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
#include "byteorder.h"
#include "lib/mdfour.h"
---- orig/rsync.yo 2005-03-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-02-13 06:58:47
@@ -355,6 +355,7 @@ to the detailed description below for a
--compare-dest=DIR also compare received files relative to DIR
handle relative symlinks properly, and that has not yet been fixed
in this modified version.
---- orig/flist.c 2005-03-16 02:19:29
+--- orig/flist.c 2005-03-30 17:31:41
+++ 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;
-@@ -730,6 +731,30 @@ static struct file_struct *receive_file_
+@@ -731,6 +732,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
-@@ -855,7 +880,13 @@ skip_filters:
+@@ -856,7 +881,13 @@ skip_filters:
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
#else
linkname_len = 0;
#endif
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-01-28 19:33:24
@@ -43,6 +43,7 @@ int archive_mode = 0;
int keep_dirlinks = 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-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-01-28 19:33:40
@@ -310,6 +310,7 @@ to the detailed description below for a
--inplace update destination files in-place
}
} else
write_arg(fd, p);
---- orig/generator.c 2005-03-29 01:05:12
+--- orig/generator.c 2005-03-30 16:35:08
+++ generator.c 2005-03-24 07:07:12
@@ -25,6 +25,7 @@
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
return;
-@@ -1121,9 +1122,9 @@ void generate_files(int f_out, struct fi
+@@ -1122,9 +1123,9 @@ void generate_files(int f_out, struct fi
maybe_PERMS_REPORT = log_format_has_i ? 0 : PERMS_REPORT;
code = daemon_log_format_has_i ? 0 : FLOG;
} else if (am_daemon) {
} else if (!am_server) {
itemizing = log_format_has_i;
maybe_PERMS_REPORT = log_format_has_i ? 0 : PERMS_REPORT;
---- orig/main.c 2005-03-16 02:19:30
+--- orig/main.c 2005-03-30 16:57:27
+++ main.c 2005-03-24 07:07:12
-@@ -168,7 +168,7 @@ static void report(int f)
+@@ -170,7 +170,7 @@ static void handle_stats(int f)
stats.flist_buildtime = read_longint(f);
stats.flist_xfertime = read_longint(f);
}
/* The --read-batch process is going to be a client
* receiver, so we need to give it the stats. */
write_longint(batch_fd, total_read);
-@@ -583,7 +583,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -591,7 +591,7 @@ static int do_recv(int f_in,int f_out,st
am_generator = 1;
close_multiplexing_in();
stop_write_batch();
close(error_pipe[1]);
-@@ -756,7 +756,7 @@ int client_run(int f_in, int f_out, pid_
+@@ -764,7 +764,7 @@ int client_run(int f_in, int f_out, pid_
if (filesfrom_host)
filesfrom_fd = f_in;
start_write_batch(f_out);
flist = send_file_list(f_out, argc, argv);
set_msg_fd_in(-1);
-@@ -793,7 +793,7 @@ int client_run(int f_in, int f_out, pid_
+@@ -802,7 +802,7 @@ int client_run(int f_in, int f_out, pid_
filesfrom_fd = -1;
}
start_write_batch(f_in);
flist = recv_file_list(f_in);
if (!flist || flist->count == 0) {
-@@ -1111,7 +1111,7 @@ int main(int argc,char *argv[])
+@@ -1123,7 +1123,7 @@ int main(int argc,char *argv[])
init_flist();
if (write_batch)
write_batch_shell_file(orig_argc, orig_argv, argc);
-@@ -1130,6 +1130,8 @@ int main(int argc,char *argv[])
+@@ -1142,6 +1142,8 @@ int main(int argc,char *argv[])
if (read_batch)
read_stream_flags(batch_fd);
}
if (am_daemon && !am_server)
return daemon_main();
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-03-24 07:07:13
@@ -53,6 +53,7 @@ int omit_dir_times = 0;
int update_only = 0;
if (verbose && !log_format) {
log_format = "%n%L";
log_before_transfer = !am_server;
-@@ -1246,7 +1258,7 @@ void server_options(char **args,int *arg
+@@ -1245,7 +1257,7 @@ void server_options(char **args,int *arg
argstr[x++] = 'b';
if (update_only)
argstr[x++] = 'u';
argstr[x++] = 'n';
if (preserve_links)
argstr[x++] = 'l';
-@@ -1374,6 +1386,8 @@ void server_options(char **args,int *arg
+@@ -1373,6 +1385,8 @@ void server_options(char **args,int *arg
args[ac++] = "--delete-after";
if (force_delete)
args[ac++] = "--force";
if (!am_sender)
filesfrom_fd = -1;
---- orig/receiver.c 2005-03-24 16:41:46
+--- orig/receiver.c 2005-03-29 22:39:37
+++ receiver.c 2005-03-24 07:07:13
@@ -21,7 +21,7 @@
#include "rsync.h"
extern int batch_gen_fd;
extern int protocol_version;
extern int relative_paths;
-@@ -435,13 +436,18 @@ int recv_files(int f_in, struct file_lis
+@@ -452,13 +453,18 @@ int recv_files(int f_in, struct file_lis
exit_cleanup(RERR_PROTOCOL);
}
+ }
if (read_batch) {
- while (i > next_gen_i) {
---- orig/rsync.yo 2005-03-28 20:56:55
+ next_gen_i = get_next_gen_i(batch_gen_fd, next_gen_i, i);
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-03-27 05:13:01
@@ -379,6 +379,7 @@ to the detailed description below for a
--list-only list the files instead of copying them
if (verbose > 3) {
rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",
code, safe_fname(file), line);
---- orig/clientserver.c 2005-03-01 03:39:32
+--- orig/clientserver.c 2005-03-31 00:24:21
+++ clientserver.c 2004-10-08 20:44:59
@@ -45,6 +45,9 @@ extern int select_timeout;
extern int orig_umask;
if (*line == '#') {
/* it's some sort of command that I don't understand */
io_printf(f_out, "@ERROR: Unknown command '%s'\n", line);
---- orig/configure.in 2005-03-16 02:19:29
+--- orig/configure.in 2005-03-29 11:15:05
+++ configure.in 2004-07-03 20:22:28
@@ -271,6 +271,21 @@ yes
AC_SEARCH_LIBS(getaddrinfo, inet6)
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-03-01 01:34:42
-@@ -157,6 +157,14 @@ int log_format_has_o_or_i = 0;
+@@ -156,6 +156,14 @@ int log_format_has_o_or_i = 0;
int always_checksum = 0;
int list_only = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1112,6 +1145,17 @@ int parse_arguments(int *argc, const cha
+@@ -1111,6 +1144,17 @@ int parse_arguments(int *argc, const cha
if (delay_updates && !partial_dir)
partial_dir = partialdir_for_delayupdate;
if (inplace) {
#ifdef HAVE_FTRUNCATE
if (partial_dir) {
-@@ -1479,11 +1523,28 @@ char *check_for_hostspec(char *s, char *
+@@ -1478,11 +1522,28 @@ char *check_for_hostspec(char *s, char *
{
char *p;
int not_host;
+ preserve_gid = 2;
+ }
}
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2004-09-09 01:59:08
@@ -405,8 +405,8 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
preserve_devices = 1;
}
-@@ -1265,10 +1273,16 @@ void server_options(char **args,int *arg
+@@ -1264,10 +1272,16 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
For two systems where one uses /usr/local/bin and the other /local/bin.
---- orig/flist.c 2005-03-16 02:19:29
+--- orig/flist.c 2005-03-30 17:31:41
+++ 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;
-@@ -1085,13 +1086,14 @@ struct file_list *send_file_list(int f,
+@@ -1086,13 +1087,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-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-03-01 01:37:22
@@ -81,6 +81,7 @@ char *filesfrom_host = NULL;
int eol_nulls = 0;
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1401,6 +1417,11 @@ void server_options(char **args,int *arg
+@@ -1400,6 +1416,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-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-02-22 18:20:24
@@ -303,6 +303,7 @@ to the detailed description below for a
-R, --relative use relative path names
if (t - last_io >= io_timeout) {
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
---- orig/options.c 2005-03-28 20:56:55
+--- orig/options.c 2005-03-31 00:24:21
+++ options.c 2005-01-28 19:35:23
@@ -105,6 +105,7 @@ int checksum_seed = 0;
int inplace = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1348,6 +1384,15 @@ void server_options(char **args,int *arg
+@@ -1347,6 +1383,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-03-28 20:56:55
+--- orig/rsync.yo 2005-03-30 16:57:29
+++ rsync.yo 2005-02-01 10:46:35
@@ -378,6 +378,8 @@ to the detailed description below for a
--password-file=FILE read password from FILE
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-03-17 09:05:21
+--- orig/util.c 2005-03-30 20:45:02
+++ util.c 2004-07-03 20:23:22
@@ -126,6 +126,132 @@ void overflow(char *str)
exit_cleanup(RERR_MALLOC);