automatically generates unique IDs). Defaults to True.
---- orig/Makefile.in 2004-05-15 00:53:53
+--- orig/Makefile.in 2004-07-04 08:59:17
+++ Makefile.in 2004-07-03 20:22:18
@@ -32,7 +32,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z
zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
if (verbose > 2) {
rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n",
---- orig/clientserver.c 2004-06-18 15:59:19
+--- orig/clientserver.c 2004-07-15 02:21:10
+++ clientserver.c 2004-07-03 20:22:18
-@@ -315,6 +315,9 @@ static int rsync_module(int f_in, int f_
+@@ -316,6 +316,9 @@ static int rsync_module(int f_in, int f_
exclude_path_prefix = NULL;
log_init();
if (use_chroot) {
/*
-@@ -433,6 +436,9 @@ static int rsync_module(int f_in, int f_
+@@ -434,6 +437,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);
{
int i;
for (i = 0; rerr_names[i].name; i++) {
---- orig/main.c 2004-06-30 07:24:30
+--- orig/main.c 2004-07-15 17:02:03
+++ main.c 2004-07-03 20:22:18
-@@ -121,6 +121,9 @@ static void report(int f)
+@@ -134,6 +134,9 @@ static void report(int f)
if (am_daemon) {
log_exit(0, __FILE__, __LINE__);
if (f == -1 || !am_sender)
return;
}
---- orig/receiver.c 2004-07-02 18:23:01
+--- orig/receiver.c 2004-07-14 17:12:06
+++ receiver.c 2004-07-03 20:22:18
-@@ -460,7 +460,9 @@ int recv_files(int f_in,struct file_list
+@@ -460,7 +460,9 @@ int recv_files(int f_in, struct file_lis
recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length);
log_recv(file, &initial_stats);
if (mapbuf)
unmap_file(mapbuf);
if (fd1 != -1)
---- orig/sender.c 2004-06-18 16:55:00
-+++ sender.c 2004-07-03 20:22:18
-@@ -281,6 +281,9 @@ void send_files(struct file_list *flist,
- } else { /* not read_batch */
- match_sums(f_out, s, mbuf, st.st_size);
- log_send(file, &initial_stats);
+--- orig/sender.c 2004-07-15 02:21:11
++++ sender.c 2004-07-15 02:37:48
+@@ -229,6 +229,9 @@ void send_files(struct file_list *flist,
+
+ match_sums(f_out, s, mbuf, st.st_size);
+ log_send(file, &initial_stats);
+#ifdef HAVE_LIBODBC
-+ db_log_transfer(file, &initial_stats,"send");
++ db_log_transfer(file, &initial_stats,"send");
+#endif
- }
- if (!read_batch) {
+ if (mbuf) {
+ j = unmap_file(mbuf);
make
---- orig/Makefile.in 2004-05-15 00:53:53
+--- orig/Makefile.in 2004-07-04 08:59:17
+++ Makefile.in 2004-07-03 20:11:58
@@ -25,7 +25,7 @@ VERSION=@VERSION@
.SUFFIXES:
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2004-06-18 16:23:07
+--- orig/flist.c 2004-07-15 02:21:10
+++ flist.c 2004-07-03 20:11:58
-@@ -945,6 +945,8 @@ void send_file_name(int f, struct file_l
+@@ -942,6 +942,8 @@ void send_file_name(int f, struct file_l
if (!file)
return;
maybe_emit_filelist_progress(flist);
-@@ -956,6 +958,10 @@ void send_file_name(int f, struct file_l
+@@ -950,6 +952,10 @@ void send_file_name(int f, struct file_l
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f, base_flags);
}
if (recursive && S_ISDIR(file->mode)
-@@ -1274,6 +1280,8 @@ struct file_list *recv_file_list(int f)
+@@ -1266,6 +1272,8 @@ struct file_list *recv_file_list(int f)
flags |= read_byte(f) << 8;
receive_file_entry(&flist->files[i], flags, flist, f);
if (S_ISREG(flist->files[i]->mode))
stats.total_size += flist->files[i]->length;
-@@ -1296,6 +1304,8 @@ struct file_list *recv_file_list(int f)
+@@ -1288,6 +1296,8 @@ struct file_list *recv_file_list(int f)
clean_flist(flist, relative_paths, 1);
if (f != -1) {
/* Now send the uid/gid list. This was introduced in
* protocol version 15 */
---- orig/generator.c 2004-06-30 07:24:45
+--- orig/generator.c 2004-07-15 02:21:10
+++ generator.c 2004-07-03 20:11:58
-@@ -343,6 +343,10 @@ static void recv_generator(char *fname,
+@@ -324,6 +324,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
rprintf(FINFO,"%s/\n",fname);
next;
}
---- orig/options.c 2004-06-20 19:30:00
-+++ options.c 2004-07-03 20:11:58
+--- orig/options.c 2004-07-15 16:51:50
++++ options.c 2004-07-15 16:53:42
@@ -43,6 +43,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
int preserve_uid = 0;
-@@ -150,6 +151,7 @@ static void print_rsync_version(enum log
+@@ -149,6 +150,7 @@ static void print_rsync_version(enum log
{
char const *got_socketpair = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -162,6 +164,10 @@ static void print_rsync_version(enum log
+@@ -161,6 +163,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#if SUPPORT_LINKS
links = "";
#endif
-@@ -176,9 +182,9 @@ static void print_rsync_version(enum log
+@@ -175,9 +181,9 @@ static void print_rsync_version(enum log
"Copyright (C) 1996-2004 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
-@@ -241,6 +247,7 @@ void usage(enum logcode F)
+@@ -240,6 +246,7 @@ void usage(enum logcode F)
rprintf(F," --safe-links ignore \"unsafe\" symlinks\n");
rprintf(F," -H, --hard-links preserve hard links\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");
-@@ -386,6 +393,7 @@ static struct poptOption long_options[]
- {"address", 0, POPT_ARG_STRING, &bind_address, 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 },
+@@ -347,6 +354,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 },
+ {"acls", 'A', POPT_ARG_NONE, &preserve_acls, 0, 0, 0 },
- {"read-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_READ_BATCH, 0, 0 },
- {"write-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_WRITE_BATCH, 0, 0 },
- {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 },
-@@ -596,6 +604,31 @@ int parse_arguments(int *argc, const cha
+ {"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 },
+@@ -593,6 +601,31 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -833,6 +866,8 @@ void server_options(char **args,int *arg
+@@ -832,6 +865,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (verbose > 1 && flags & PERMS_REPORT) {
if (updated)
rprintf(FINFO,"%s\n",fname);
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:11:58
@@ -538,6 +538,40 @@ static inline int flist_up(struct file_l
#include "lib/permstring.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:11:58
@@ -296,6 +296,7 @@ verb(
--safe-links ignore "unsafe" symlinks
make proto
---- orig/batch.c 2004-05-15 20:10:13
+--- orig/batch.c 2004-07-15 16:51:50
+++ batch.c 2004-07-03 20:15:41
-@@ -335,6 +335,8 @@ void show_flist(int index, struct file_s
+@@ -63,6 +63,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 2004-06-18 16:23:07
+--- orig/flist.c 2004-07-15 02:21:10
+++ flist.c 2004-07-03 20:15:41
@@ -58,6 +58,7 @@ extern int relative_paths;
extern int implied_dirs;
extern int protocol_version;
extern int sanitize_paths;
extern int delete_excluded;
-@@ -144,17 +145,17 @@ static void list_file_entry(struct file_
+@@ -141,17 +142,17 @@ static void list_file_entry(struct file_
#if SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
}
}
-@@ -335,6 +336,7 @@ void send_file_entry(struct file_struct
+@@ -332,6 +333,7 @@ void send_file_entry(struct file_struct
{
unsigned short flags;
static time_t modtime;
static mode_t mode;
static uint64 dev;
static dev_t rdev;
-@@ -350,7 +352,7 @@ void send_file_entry(struct file_struct
+@@ -347,7 +349,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;
-@@ -399,6 +401,12 @@ void send_file_entry(struct file_struct
+@@ -396,6 +398,12 @@ void send_file_entry(struct file_struct
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
#if SUPPORT_HARD_LINKS
if (file->link_u.idev) {
-@@ -454,6 +462,8 @@ void send_file_entry(struct file_struct
+@@ -451,6 +459,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);
-@@ -527,6 +537,7 @@ void receive_file_entry(struct file_stru
+@@ -524,6 +534,7 @@ void receive_file_entry(struct file_stru
struct file_list *flist, int f)
{
static time_t modtime;
static mode_t mode;
static uint64 dev;
static dev_t rdev;
-@@ -543,7 +554,7 @@ void receive_file_entry(struct file_stru
+@@ -540,7 +551,7 @@ void receive_file_entry(struct file_stru
struct file_struct *file;
if (!fptr) {
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
-@@ -598,6 +609,8 @@ void receive_file_entry(struct file_stru
+@@ -595,6 +606,8 @@ void receive_file_entry(struct file_stru
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);
-@@ -648,6 +661,7 @@ void receive_file_entry(struct file_stru
+@@ -645,6 +658,7 @@ void receive_file_entry(struct file_stru
file->flags = flags & XMIT_TOP_DIR ? FLAG_TOP_DIR : 0;
file->modtime = modtime;
file->length = file_length;
file->mode = mode;
file->uid = uid;
-@@ -867,6 +881,7 @@ skip_excludes:
+@@ -864,6 +878,7 @@ skip_excludes:
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 2004-06-30 07:24:45
+--- orig/generator.c 2004-07-15 02:21:10
+++ generator.c 2004-07-03 20:15:41
-@@ -99,7 +99,7 @@ static int skip_file(char *fname, struct
+@@ -98,7 +98,7 @@ static int skip_file(char *fname, struct
if (ignore_times)
return 0;
}
-@@ -484,7 +484,7 @@ static void recv_generator(char *fname,
+@@ -468,7 +468,7 @@ static void recv_generator(char *fname,
}
if (update_only && fnamecmp == fname
if (verbose > 1)
rprintf(FINFO,"%s is newer\n",fname);
return;
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:15:41
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -245,6 +246,7 @@ void usage(enum logcode F)
+@@ -244,6 +245,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," -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 whole files, no incremental checks\n");
-@@ -352,6 +354,7 @@ static struct poptOption long_options[]
+@@ -351,6 +353,7 @@ static struct poptOption long_options[]
{"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 },
{"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 },
-@@ -841,6 +844,8 @@ void server_options(char **args,int *arg
+@@ -840,6 +843,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 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:15:41
@@ -54,6 +54,7 @@
#define XMIT_HAS_IDEV_DATA (1<<9)
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:15:41
@@ -300,6 +300,7 @@ verb(
-g, --group preserve group
make proto
---- orig/Makefile.in 2004-05-15 00:53:53
+--- orig/Makefile.in 2004-07-04 08:59:17
+++ Makefile.in 2004-07-03 20:13:41
@@ -34,7 +34,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z
OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o \
+ }
+ return 0;
+}
---- orig/flist.c 2004-06-18 16:23:07
+--- orig/flist.c 2004-07-15 02:21:10
+++ flist.c 2004-07-03 20:13:41
@@ -33,6 +33,7 @@ extern int verbose;
extern int do_progress;
extern int am_daemon;
extern int always_checksum;
extern int module_id;
-@@ -67,6 +68,8 @@ extern int list_only;
- extern int read_batch;
- extern int write_batch;
+@@ -64,6 +65,8 @@ extern int delete_excluded;
+ extern int orig_umask;
+ extern int list_only;
+extern struct chmod_mode_struct *chmod_modes;
+
extern struct exclude_list_struct exclude_list;
extern struct exclude_list_struct server_exclude_list;
extern struct exclude_list_struct local_exclude_list;
-@@ -868,7 +871,10 @@ skip_excludes:
+@@ -865,7 +868,10 @@ skip_excludes:
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 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:13:41
@@ -124,6 +124,7 @@ char *log_format = NULL;
char *password_file = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
-@@ -137,6 +138,8 @@ int list_only = 0;
- #define MAX_BATCH_PREFIX_LEN 256 /* Must be less than MAXPATHLEN-13 */
- char *batch_prefix = NULL;
+@@ -136,6 +137,8 @@ int list_only = 0;
+ #define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
+ char *batch_name = NULL;
+struct chmod_mode_struct *chmod_modes = NULL;
+
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
-@@ -245,6 +248,7 @@ void usage(enum logcode F)
+@@ -244,6 +247,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," -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 whole files, no incremental checks\n");
-@@ -350,6 +354,7 @@ static struct poptOption long_options[]
+@@ -349,6 +353,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 },
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
-@@ -730,6 +735,13 @@ int parse_arguments(int *argc, const cha
+@@ -729,6 +734,13 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
if (do_progress && !verbose)
verbose = 1;
-@@ -977,6 +989,11 @@ void server_options(char **args,int *arg
+@@ -969,6 +981,11 @@ void server_options(char **args,int *arg
args[ac++] = compare_dest;
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
if (remote_filesfrom_file) {
args[ac++] = "--files-from";
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:13:41
@@ -300,6 +300,7 @@ verb(
-g, --group preserve group
extern int link_dest;
extern int whole_file;
extern int local_server;
-@@ -80,13 +80,12 @@ static int skip_file(char *fname, struct
+@@ -79,13 +79,12 @@ static int skip_file(char *fname, struct
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
char fnamecmpdest[MAXPATHLEN];
}
file_checksum(fname,sum,st->st_size);
return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
-@@ -424,13 +423,18 @@ static void recv_generator(char *fname,
+@@ -408,13 +407,18 @@ static void recv_generator(char *fname,
fnamecmp = fname;
if (statret < 0) {
errno = saveerrno;
*fnamecmpbuf = '\0';
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 17:33:30
@@ -117,7 +117,8 @@ unsigned int backup_dir_remainder;
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
-@@ -139,6 +140,7 @@ char *batch_prefix = NULL;
+@@ -138,6 +139,7 @@ char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
/** Local address to bind. As a character string because it's
* interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -308,7 +310,7 @@ void usage(enum logcode F)
+@@ -307,7 +309,7 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -366,8 +368,8 @@ static struct poptOption long_options[]
+@@ -365,8 +367,8 @@ static struct poptOption long_options[]
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -585,8 +587,36 @@ int parse_arguments(int *argc, const cha
+@@ -582,8 +584,36 @@ int parse_arguments(int *argc, const cha
select_timeout = io_timeout;
break;
link_dest = 1;
break;
#else
-@@ -661,6 +691,11 @@ int parse_arguments(int *argc, const cha
+@@ -660,6 +690,11 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
if (archive_mode) {
if (!files_from)
recurse = 1;
-@@ -689,8 +724,6 @@ int parse_arguments(int *argc, const cha
+@@ -688,8 +723,6 @@ int parse_arguments(int *argc, const cha
(*argv)[i] = alloc_sanitize_path((*argv)[i], NULL);
if (tmpdir)
tmpdir = alloc_sanitize_path(tmpdir, curr_dir);
if (backup_dir)
backup_dir = alloc_sanitize_path(backup_dir, curr_dir);
if (files_from)
-@@ -785,8 +818,8 @@ int parse_arguments(int *argc, const cha
+@@ -784,8 +817,8 @@ int parse_arguments(int *argc, const cha
**/
void server_options(char **args,int *argc)
{
char *arg;
int i, x;
-@@ -968,13 +1001,16 @@ void server_options(char **args,int *arg
+@@ -960,13 +993,16 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 17:33:30
@@ -98,6 +98,8 @@
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2004-06-30 07:24:45
+--- orig/generator.c 2004-07-15 02:21:10
+++ generator.c 2004-07-03 20:16:51
@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
extern int csum_length;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -60,6 +61,8 @@ extern struct exclude_list_struct server
+@@ -59,6 +60,8 @@ extern struct exclude_list_struct server
/* choose whether to skip a particular file */
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
{
if (st->st_size != file->length)
return 0;
if (link_dest) {
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:16:51
@@ -84,6 +84,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
int bwlimit = 0;
size_t bwlimit_writemax = 0;
int delete_after = 0;
-@@ -266,6 +267,7 @@ void usage(enum logcode F)
+@@ -265,6 +266,7 @@ void usage(enum logcode F)
rprintf(F," --timeout=TIME set I/O timeout in seconds\n");
rprintf(F," -I, --ignore-times turn off mod time & file size quick check\n");
rprintf(F," --size-only ignore mod time for quick check (use 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," --compare-dest=DIR also compare destination files relative to DIR\n");
-@@ -321,6 +323,7 @@ static struct poptOption long_options[]
+@@ -320,6 +322,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 },
{"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 },
-@@ -924,6 +927,9 @@ void server_options(char **args,int *arg
+@@ -916,6 +919,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 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:16:51
@@ -321,6 +321,7 @@ verb(
--timeout=TIME set I/O timeout in seconds
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:17:33
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -244,7 +245,8 @@ void usage(enum logcode F)
+@@ -243,7 +244,8 @@ void usage(enum logcode F)
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");
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 whole files, no incremental checks\n");
-@@ -352,6 +354,7 @@ static struct poptOption long_options[]
+@@ -351,6 +353,7 @@ static struct poptOption long_options[]
{"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 },
{"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 },
-@@ -841,6 +844,8 @@ void server_options(char **args,int *arg
+@@ -840,6 +843,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
rsyserr(FERROR, errno, "failed to set times on %s",
full_fname(fname));
return 0;
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:17:33
@@ -299,7 +299,8 @@ verb(
-o, --owner preserve owner (root only)
add_exclude(&exclude_list, default_cvsignore,
XFLG_WORD_SPLIT | XFLG_WORDS_ONLY);
---- orig/flist.c 2004-06-18 16:23:07
+--- orig/flist.c 2004-07-15 02:21:10
+++ flist.c 2004-07-03 20:21:27
@@ -39,8 +39,6 @@ extern int module_id;
extern int ignore_errors;
extern int sanitize_paths;
extern int delete_excluded;
extern int orig_umask;
-@@ -69,7 +68,6 @@ extern int write_batch;
+@@ -66,7 +65,6 @@ extern int list_only;
extern struct exclude_list_struct exclude_list;
extern struct exclude_list_struct server_exclude_list;
int io_error;
-@@ -224,8 +222,6 @@ int link_stat(const char *path, STRUCT_S
+@@ -221,8 +219,6 @@ int link_stat(const char *path, STRUCT_S
*/
static int check_exclude_file(char *fname, int is_dir, int exclude_level)
{
#if 0 /* This currently never happens, so avoid a useless compare. */
if (exclude_level == NO_EXCLUDES)
return 0;
-@@ -247,10 +243,7 @@ static int check_exclude_file(char *fnam
+@@ -244,10 +240,7 @@ static int check_exclude_file(char *fnam
if (exclude_level != ALL_EXCLUDES)
return 0;
if (exclude_list.head
return 1;
return 0;
}
-@@ -960,15 +953,7 @@ void send_file_name(int f, struct file_l
+@@ -954,15 +947,7 @@ void send_file_name(int f, struct file_l
if (recursive && S_ISDIR(file->mode)
&& !(file->flags & FLAG_MOUNT_POINT)) {
}
}
-@@ -979,6 +964,7 @@ static void send_directory(int f, struct
+@@ -973,6 +958,7 @@ static void send_directory(int f, struct
struct dirent *di;
char fname[MAXPATHLEN];
unsigned int offset;
char *p;
d = opendir(dir);
-@@ -1002,19 +988,13 @@ static void send_directory(int f, struct
+@@ -996,19 +982,13 @@ static void send_directory(int f, struct
offset++;
}
for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) {
char *dname = d_name(di);
if (dname[0] == '.' && (dname[1] == '\0'
-@@ -1034,6 +1014,8 @@ static void send_directory(int f, struct
+@@ -1028,6 +1008,8 @@ static void send_directory(int f, struct
rsyserr(FERROR, errno, "readdir(%s)", dir);
}
closedir(d);
}
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:21:27
@@ -50,6 +50,7 @@ int preserve_gid = 0;
int preserve_times = 0;
int dry_run = 0;
int local_server = 0;
int ignore_times = 0;
-@@ -309,7 +310,7 @@ void usage(enum logcode F)
+@@ -308,7 +309,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -334,6 +335,7 @@ static struct poptOption long_options[]
+@@ -333,6 +334,7 @@ static struct poptOption long_options[]
{"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },
{"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },
{"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 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 },
-@@ -542,6 +544,31 @@ int parse_arguments(int *argc, const cha
+@@ -541,6 +543,31 @@ int parse_arguments(int *argc, const cha
XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE);
break;
case 'h':
usage(FINFO);
exit_cleanup(0);
-@@ -771,6 +798,9 @@ int parse_arguments(int *argc, const cha
+@@ -770,6 +797,9 @@ int parse_arguments(int *argc, const cha
}
}
return 1;
}
-@@ -872,6 +902,12 @@ void server_options(char **args,int *arg
+@@ -871,6 +901,12 @@ void server_options(char **args,int *arg
if (x != 1)
args[ac++] = argstr;
if (block_size) {
if (asprintf(&arg, "-B%u", block_size) < 0)
goto oom;
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:21:27
@@ -108,6 +108,7 @@
#define XFLG_DEF_INCLUDE (1<<1)
};
struct exclude_list_struct {
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:21:27
@@ -332,6 +332,7 @@ verb(
--exclude-from=FILE exclude patterns listed in FILE
dit(bf(--files-from=FILE)) Using this option allows you to specify the
exact list of files to transfer (as read from the specified FILE or "-"
for stdin). It also tweaks the default behavior of rsync to make
-@@ -1043,6 +1066,11 @@ itemize(
+@@ -1039,6 +1062,11 @@ itemize(
then it is always considered an exclude pattern, even if specified as
part of an include option. The prefix is discarded before matching.
it() if the pattern is a single exclamation mark ! then the current
include/exclude list is reset, removing all previously defined patterns.
)
-@@ -1095,6 +1123,67 @@ itemize(
+@@ -1091,6 +1119,67 @@ itemize(
it would be excluded by the "*")
)
Note that you'll need to run 'make proto' after applying this patch.
---- orig/Makefile.in 2004-05-15 00:53:53
+--- orig/Makefile.in 2004-07-04 08:59:17
+++ Makefile.in 2004-07-03 20:18:02
@@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle
main.o checksum.o match.o syscall.o log.o backup.o
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2004-06-18 16:23:07
+--- orig/flist.c 2004-07-15 02:21:10
+++ flist.c 2004-07-03 20:18:02
@@ -43,6 +43,7 @@ extern int cvs_exclude;
extern char *files_from;
extern int filesfrom_fd;
-@@ -360,7 +361,10 @@ void send_file_entry(struct file_struct
+@@ -357,7 +358,10 @@ void send_file_entry(struct file_struct
io_write_phase = "send_file_entry";
flags = base_flags;
-@@ -573,6 +577,9 @@ void receive_file_entry(struct file_stru
+@@ -570,6 +574,9 @@ void receive_file_entry(struct file_stru
strlcpy(lastname, thisname, MAXPATHLEN);
clean_fname(thisname);
if (sanitize_paths)
-@@ -1061,6 +1068,9 @@ struct file_list *send_file_list(int f,
+@@ -1055,6 +1062,9 @@ struct file_list *send_file_list(int f,
start_write = stats.total_written;
flist = flist_new(f == -1 ? WITHOUT_HLINK : WITH_HLINK,
"send_file_list");
-@@ -1235,6 +1245,9 @@ struct file_list *send_file_list(int f,
- write_batch_flist_info(flist->count, flist->files);
+@@ -1227,6 +1237,9 @@ struct file_list *send_file_list(int f,
+ stats.num_files = flist->count;
}
+ if (fname_convert_cmd && !am_server)
if (verbose > 3)
output_flist(flist);
-@@ -1256,6 +1269,9 @@ struct file_list *recv_file_list(int f)
+@@ -1248,6 +1261,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;
-@@ -1310,6 +1326,9 @@ struct file_list *recv_file_list(int f)
- }
+@@ -1300,6 +1316,9 @@ struct file_list *recv_file_list(int f)
+ io_error |= read_int(f);
}
+ if (fname_convert_cmd && !am_server)
+ if (verbose > 2)
+ rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest);
+}
---- orig/generator.c 2004-06-30 07:24:45
+--- orig/generator.c 2004-07-15 02:21:10
+++ generator.c 2004-07-03 20:18:02
-@@ -265,6 +265,12 @@ static void generate_and_send_sums(struc
+@@ -246,6 +246,12 @@ static void generate_and_send_sums(struc
*
* @note This comment was added later by mbp who was trying to work it
* out. It might be wrong.
{ RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
{ RERR_WAITCHILD , "some error returned by waitpid()" },
{ RERR_MALLOC , "error allocating core memory buffers" },
---- orig/main.c 2004-06-30 07:24:30
+--- orig/main.c 2004-07-15 17:02:03
+++ main.c 2004-07-03 20:18:02
-@@ -304,7 +304,7 @@ static pid_t do_cmd(char *cmd, char *mac
- create_flist_from_batch(); /* sets batch_flist */
+@@ -318,7 +318,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 {
- ret = piped_child(args,f_in,f_out);
}
if (dir)
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:18:02
@@ -127,6 +127,7 @@ char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int verbose = 0;
int quiet = 0;
-@@ -271,6 +272,7 @@ void usage(enum logcode F)
+@@ -270,6 +271,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --link-dest=DIR create hardlinks to DIR for unchanged files\n");
rprintf(F," -P equivalent to --partial --progress\n");
rprintf(F," -z, --compress compress file data\n");
rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n");
rprintf(F," --exclude=PATTERN exclude files matching PATTERN\n");
-@@ -368,6 +370,7 @@ static struct poptOption long_options[]
+@@ -367,6 +369,7 @@ static struct poptOption long_options[]
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, &compare_dest, OPT_LINK_DEST, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
---- orig/pipe.c 2004-06-18 16:00:09
+--- orig/pipe.c 2004-07-15 02:21:11
+++ pipe.c 2004-07-03 20:18:02
@@ -23,7 +23,6 @@
-extern int blocking_io;
extern int orig_umask;
extern int read_batch;
- extern int filesfrom_fd;
-@@ -40,8 +39,10 @@ extern int filesfrom_fd;
+ extern int write_batch;
+@@ -41,8 +40,10 @@ extern int filesfrom_fd;
* If blocking_io is set then use blocking io on both fds. That can be
* used to cope with badly broken rsh implementations like the one on
* Solaris.
{
pid_t pid;
int to_child_pipe[2];
-@@ -56,7 +57,7 @@ pid_t piped_child(char **command, int *f
+@@ -57,7 +58,7 @@ pid_t piped_child(char **command, int *f
exit_cleanup(RERR_IPC);
}
This patch from Sami Farin lets you specify --fsync if you want fsync()
to be called on every file we write.
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:18:13
@@ -38,6 +38,7 @@ int make_backups = 0;
**/
int archive_mode = 0;
int keep_dirlinks = 0;
int copy_links = 0;
-@@ -233,6 +234,7 @@ void usage(enum logcode F)
+@@ -232,6 +233,7 @@ void usage(enum logcode F)
rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n");
rprintf(F," --backup-dir make backups into this directory\n");
rprintf(F," --suffix=SUFFIX backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update update only (don't overwrite newer files)\n");
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
-@@ -337,6 +339,7 @@ static struct poptOption long_options[]
+@@ -336,6 +338,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 },
-@@ -968,6 +971,9 @@ void server_options(char **args,int *arg
+@@ -960,6 +963,9 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
if (compare_dest && 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 2004-07-02 18:23:01
+--- orig/receiver.c 2004-07-14 17:12:06
+++ receiver.c 2004-07-03 20:18:13
@@ -48,6 +48,7 @@ extern int ignore_errors;
extern int orig_umask;
extern int always_checksum;
extern char *compare_dest;
extern int link_dest;
-@@ -257,6 +258,94 @@ static void generate_and_send_sums(struc
+@@ -238,6 +239,94 @@ static void generate_and_send_sums(struc
}
/*
* Acts on file number @p i from @p flist, whose name is @p fname.
-@@ -272,7 +361,7 @@ static void recv_generator(char *fname,
+@@ -253,7 +342,7 @@ static void recv_generator(char *fname,
int fd;
STRUCT_STAT st;
struct map_struct *mapbuf;
char *fnamecmp;
char fnamecmpbuf[MAXPATHLEN];
-@@ -452,6 +541,14 @@ static void recv_generator(char *fname,
+@@ -436,6 +525,14 @@ static void recv_generator(char *fname,
} else
*fnamecmpbuf = '\0';
if (statret == -1) {
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
-@@ -498,7 +595,7 @@ static void recv_generator(char *fname,
+@@ -482,7 +579,7 @@ static void recv_generator(char *fname,
return;
}
if (!*fnamecmpbuf)
set_perms(fname, file, &st, PERMS_REPORT);
return;
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 19:27:25
@@ -94,6 +94,7 @@ int ignore_errors = 0;
int modify_window = 0;
unsigned int block_size = 0;
-@@ -270,6 +271,7 @@ void usage(enum logcode F)
+@@ -269,6 +270,7 @@ void usage(enum logcode F)
rprintf(F," -T --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --link-dest=DIR create hardlinks to DIR for unchanged files\n");
rprintf(F," -P equivalent to --partial --progress\n");
rprintf(F," -z, --compress compress file data\n");
rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n");
-@@ -368,6 +370,7 @@ static struct poptOption long_options[]
+@@ -367,6 +369,7 @@ static struct poptOption long_options[]
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, &compare_dest, OPT_LINK_DEST, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -989,6 +992,9 @@ void server_options(char **args,int *arg
+@@ -981,6 +984,9 @@ void server_options(char **args,int *arg
}
}
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 19:27:25
@@ -325,6 +325,7 @@ verb(
-T --temp-dir=DIR create temporary files in directory DIR
You must run "make proto" before compiling.
---- orig/generator.c 2004-06-30 07:24:45
+--- orig/generator.c 2004-07-15 02:21:10
+++ generator.c 2004-07-03 20:08:07
-@@ -267,7 +267,7 @@ static void generate_and_send_sums(struc
+@@ -248,7 +248,7 @@ static void generate_and_send_sums(struc
* out. It might be wrong.
*/
static void recv_generator(char *fname, struct file_struct *file, int i,
{
int fd;
STRUCT_STAT st;
-@@ -431,8 +431,10 @@ static void recv_generator(char *fname,
+@@ -415,8 +415,10 @@ static void recv_generator(char *fname,
statret = link_stat(fnamecmpbuf, &st, 0);
if (!S_ISREG(st.st_mode))
statret = -1;
#if HAVE_LINK
else if (link_dest && !dry_run) {
if (do_link(fnamecmpbuf, fname) != 0) {
-@@ -440,18 +442,22 @@ static void recv_generator(char *fname,
+@@ -424,18 +426,22 @@ static void recv_generator(char *fname,
rsyserr(FINFO, errno, "link %s => %s",
fnamecmpbuf, fname);
}
write_int(f_out,i);
if (!dry_run)
write_sum_head(f_out, NULL);
-@@ -471,19 +477,21 @@ static void recv_generator(char *fname,
+@@ -455,19 +461,21 @@ static void recv_generator(char *fname,
/* now pretend the file didn't exist */
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
&& cmp_modtime(st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
rprintf(FINFO,"%s is newer\n",fname);
-@@ -491,17 +499,21 @@ static void recv_generator(char *fname,
+@@ -475,17 +483,21 @@ static void recv_generator(char *fname,
}
if (skip_file(fname, file, &st)) {
return;
}
- if (disable_deltas_p()) {
+ if (whole_file > 0) {
+ if (f_nameout >= 0)
+ write(f_nameout, "", 1);
write_int(f_out,i);
write_sum_head(f_out, NULL);
return;
-@@ -516,6 +528,8 @@ static void recv_generator(char *fname,
+@@ -500,6 +512,8 @@ static void recv_generator(char *fname,
/* pretend the file didn't exist */
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
write_int(f_out,i);
write_sum_head(f_out, NULL);
return;
-@@ -534,6 +548,8 @@ static void recv_generator(char *fname,
+@@ -518,6 +532,8 @@ static void recv_generator(char *fname,
if (verbose > 2)
rprintf(FINFO, "generating and sending sums for %d\n", i);
write_int(f_out,i);
generate_and_send_sums(mapbuf, st.st_size, f_out);
-@@ -543,7 +559,8 @@ static void recv_generator(char *fname,
+@@ -527,7 +543,8 @@ static void recv_generator(char *fname,
}
--void generate_files(int f, struct file_list *flist, char *local_name)
-+void generate_files(int f, struct file_list *flist, char *local_name,
+-void generate_files(int f_out, struct file_list *flist, char *local_name)
++void generate_files(int f_out, struct file_list *flist, char *local_name,
+ int f_nameout)
{
int i;
int phase = 0;
-@@ -584,7 +601,7 @@ void generate_files(int f, struct file_l
+@@ -568,7 +585,7 @@ void generate_files(int f_out, struct fi
}
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
-- file, i, f);
-+ file, i, f, f_nameout);
+- file, i, f_out);
++ file, i, f_out, f_nameout);
}
phase++;
-@@ -601,7 +618,7 @@ void generate_files(int f, struct file_l
+@@ -585,7 +602,7 @@ void generate_files(int f_out, struct fi
while ((i = get_redo_num()) != -1) {
struct file_struct *file = flist->files[i];
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
-- file, i, f);
-+ file, i, f, f_nameout);
+- file, i, f_out);
++ file, i, f_out, f_nameout);
}
phase++;
-@@ -620,7 +637,7 @@ void generate_files(int f, struct file_l
+@@ -604,7 +621,7 @@ void generate_files(int f_out, struct fi
if (!file->basename || !S_ISDIR(file->mode))
continue;
recv_generator(local_name ? local_name : f_name(file),
}
if (verbose > 2)
---- orig/main.c 2004-06-30 07:24:30
+--- orig/main.c 2004-07-15 17:02:03
+++ main.c 2004-07-03 20:08:07
-@@ -429,7 +429,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -443,7 +443,7 @@ static int do_recv(int f_in,int f_out,st
{
int pid;
int status = 0;
if (preserve_hard_links)
init_hard_links(flist);
-@@ -441,8 +441,8 @@ static int do_recv(int f_in,int f_out,st
+@@ -455,8 +455,8 @@ static int do_recv(int f_in,int f_out,st
}
}
exit_cleanup(RERR_SOCKETIO);
}
-@@ -450,8 +450,10 @@ static int do_recv(int f_in,int f_out,st
+@@ -464,8 +464,10 @@ static int do_recv(int f_in,int f_out,st
if ((pid = do_fork()) == 0) {
close(error_pipe[0]);
/* we can't let two processes write to the socket at one time */
io_multiplexing_close();
-@@ -459,7 +461,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -473,7 +475,7 @@ static int do_recv(int f_in,int f_out,st
/* set place to send errors */
set_msg_fd_out(error_pipe[1]);
io_flush(FULL_FLUSH);
report(f_in);
-@@ -475,14 +477,16 @@ static int do_recv(int f_in,int f_out,st
- am_generator = 1;
+@@ -491,14 +493,16 @@ static int do_recv(int f_in,int f_out,st
+ stop_write_batch();
close(error_pipe[1]);
+ close(name_pipe[0]);
get_redo_num(); /* Read final MSG_DONE and any prior messages. */
report(-1);
---- orig/receiver.c 2004-07-02 18:23:01
+--- orig/receiver.c 2004-07-14 17:12:06
+++ receiver.c 2004-07-03 20:08:07
@@ -289,14 +289,15 @@ static int receive_data(int f_in,struct
* main routine for receiver process.
*
* Receiver process runs on the same host as the generator process. */
--int recv_files(int f_in,struct file_list *flist,char *local_name)
+-int recv_files(int f_in, struct file_list *flist, char *local_name)
+int recv_files(int f_in, struct file_list *flist, char *local_name,
+ int f_name)
{
char fnamecmpbuf[MAXPATHLEN];
struct map_struct *mapbuf;
struct file_struct *file;
-@@ -358,19 +359,19 @@ int recv_files(int f_in,struct file_list
+@@ -358,19 +359,19 @@ int recv_files(int f_in, struct file_lis
if (verbose > 2)
rprintf(FINFO,"recv_files(%s)\n",fname);
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
-@@ -379,7 +380,7 @@ int recv_files(int f_in,struct file_list
+@@ -379,7 +380,7 @@ int recv_files(int f_in, struct file_lis
continue;
}
continue;
case '?':
/* Match anything but '/'. */
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:19:20
@@ -92,6 +92,7 @@ int opt_ignore_existing = 0;
int max_delete = 0;
int blocking_io = -1;
int checksum_seed = 0;
unsigned int block_size = 0;
-@@ -279,6 +280,7 @@ void usage(enum logcode F)
+@@ -278,6 +279,7 @@ void usage(enum logcode F)
rprintf(F," --include-from=FILE don't exclude patterns listed in FILE\n");
rprintf(F," --files-from=FILE read FILE for list of source-file names\n");
rprintf(F," -0 --from0 all *-from file lists are delimited by nulls\n");
rprintf(F," --version print version number\n");
rprintf(F," --daemon run as an rsync daemon\n");
rprintf(F," --no-detach do not detach from the parent\n");
-@@ -334,6 +336,7 @@ static struct poptOption long_options[]
+@@ -333,6 +335,7 @@ static struct poptOption long_options[]
{"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },
{"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },
{"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 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 },
-@@ -936,6 +939,9 @@ void server_options(char **args,int *arg
+@@ -928,6 +931,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk \
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid)
---- orig/match.c 2004-07-07 08:38:52
+--- orig/match.c 2004-07-15 02:21:10
+++ match.c 2004-07-04 08:03:36
@@ -23,6 +23,7 @@ extern int verbose;
extern int am_server;
want_i = i + 1;
matched(f,s,buf,offset,i);
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:19:54
@@ -94,6 +94,7 @@ int ignore_errors = 0;
int modify_window = 0;
unsigned int block_size = 0;
-@@ -149,6 +150,7 @@ char *bind_address;
+@@ -148,6 +149,7 @@ char *bind_address;
static void print_rsync_version(enum logcode f)
{
char const *got_socketpair = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
-@@ -158,6 +160,10 @@ static void print_rsync_version(enum log
+@@ -157,6 +159,10 @@ static void print_rsync_version(enum log
got_socketpair = "";
#endif
#if SUPPORT_HARD_LINKS
hardlinks = "";
#endif
-@@ -183,8 +189,8 @@ static void print_rsync_version(enum log
+@@ -182,8 +188,8 @@ static void print_rsync_version(enum log
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
* macros. */
(int) (sizeof dumstat->st_ino * 8),
(int) (sizeof (uint64) * 8));
#ifdef MAINTAINER_MODE
-@@ -234,6 +240,7 @@ void usage(enum logcode F)
+@@ -233,6 +239,7 @@ void usage(enum logcode F)
rprintf(F," --backup-dir make backups into this directory\n");
rprintf(F," --suffix=SUFFIX backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update update only (don't overwrite newer files)\n");
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
rprintf(F," -L, --copy-links copy the referent of all symlinks\n");
-@@ -341,6 +348,7 @@ static struct poptOption long_options[]
+@@ -340,6 +347,7 @@ static struct poptOption long_options[]
{"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 },
{"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
{"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 },
{"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 },
{"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 },
-@@ -739,6 +747,18 @@ int parse_arguments(int *argc, const cha
+@@ -738,6 +746,18 @@ int parse_arguments(int *argc, const cha
bwlimit_writemax = 512;
}
if (files_from) {
char *colon;
if (*argc != 2 && !(am_server && am_sender && *argc == 1)) {
-@@ -963,6 +983,9 @@ void server_options(char **args,int *arg
+@@ -955,6 +975,9 @@ void server_options(char **args,int *arg
if (opt_ignore_existing && am_sender)
args[ac++] = "--ignore-existing";
if (tmpdir) {
args[ac++] = "--temp-dir";
args[ac++] = tmpdir;
---- orig/receiver.c 2004-07-02 18:23:01
+--- orig/receiver.c 2004-07-14 17:12:06
+++ receiver.c 2004-07-03 20:19:54
@@ -48,6 +48,7 @@ extern int ignore_errors;
extern int orig_umask;
if (do_progress)
end_progress(total_size);
-@@ -414,44 +429,59 @@ int recv_files(int f_in,struct file_list
+@@ -414,44 +429,59 @@ int recv_files(int f_in, struct file_lis
} else
mapbuf = NULL;
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:19:55
@@ -289,6 +289,7 @@ verb(
--backup-dir make backups into this directory
the file's name.
---- orig/Makefile.in 2004-05-15 00:53:53
+--- orig/Makefile.in 2004-07-04 08:59:17
+++ Makefile.in 2004-07-03 20:20:15
@@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle
main.o checksum.o match.o syscall.o log.o backup.o
+}
+
+#endif
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:20:15
@@ -124,6 +124,7 @@ char *log_format = NULL;
char *password_file = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
-@@ -270,6 +271,7 @@ void usage(enum logcode F)
+@@ -269,6 +270,7 @@ void usage(enum logcode F)
rprintf(F," -T --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --link-dest=DIR create hardlinks to DIR for unchanged files\n");
rprintf(F," -P equivalent to --partial --progress\n");
rprintf(F," -z, --compress compress file data\n");
rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n");
-@@ -310,7 +312,7 @@ void usage(enum logcode F)
+@@ -309,7 +311,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -368,6 +370,7 @@ static struct poptOption long_options[]
+@@ -367,6 +369,7 @@ static struct poptOption long_options[]
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, &compare_dest, OPT_LINK_DEST, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -596,6 +599,19 @@ int parse_arguments(int *argc, const cha
+@@ -593,6 +596,19 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -977,6 +993,11 @@ void server_options(char **args,int *arg
+@@ -969,6 +985,11 @@ void server_options(char **args,int *arg
args[ac++] = compare_dest;
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
if (remote_filesfrom_file) {
args[ac++] = "--files-from";
---- orig/receiver.c 2004-07-02 18:23:01
+--- orig/receiver.c 2004-07-14 17:12:06
+++ receiver.c 2004-07-03 20:20:15
@@ -48,6 +48,7 @@ extern int ignore_errors;
extern int orig_umask;
read_buf(f_in,file_sum2,MD4_SUM_LENGTH);
if (verbose > 2)
-@@ -374,7 +385,7 @@ int recv_files(int f_in,struct file_list
+@@ -374,7 +385,7 @@ int recv_files(int f_in, struct file_lis
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
close(fd1);
continue;
}
-@@ -387,7 +398,7 @@ int recv_files(int f_in,struct file_list
+@@ -387,7 +398,7 @@ int recv_files(int f_in, struct file_lis
*/
rprintf(FERROR,"recv_files: %s is a directory\n",
full_fname(fnamecmp));
close(fd1);
continue;
}
-@@ -443,7 +454,7 @@ int recv_files(int f_in,struct file_list
+@@ -443,7 +454,7 @@ int recv_files(int f_in, struct file_lis
if (fd2 == -1) {
rsyserr(FERROR, errno, "mkstemp %s failed",
full_fname(fnametmp));
if (mapbuf)
unmap_file(mapbuf);
if (fd1 != -1)
-@@ -457,7 +468,11 @@ int recv_files(int f_in,struct file_list
+@@ -457,7 +468,11 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", fname);
/* recv file data */
ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:20:15
@@ -522,6 +522,14 @@ struct stats {
int current_file_index;
---- orig/generator.c 2004-06-30 07:24:45
+--- orig/generator.c 2004-07-15 02:21:10
+++ generator.c 2004-07-03 20:20:46
@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
extern int csum_length;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -344,6 +345,10 @@ static void recv_generator(char *fname,
+@@ -325,6 +326,10 @@ static void recv_generator(char *fname,
&& verbose && f_out != -1)
rprintf(FINFO,"%s/\n",fname);
return;
+ return;
}
- if (preserve_links && S_ISLNK(file->mode)) {
---- orig/options.c 2004-06-20 19:30:00
-+++ options.c 2004-07-03 20:20:46
+ if (read_batch)
+--- orig/options.c 2004-07-15 16:51:50
++++ options.c 2004-07-15 02:34:44
@@ -90,6 +90,7 @@ int delete_after = 0;
int only_existing = 0;
int opt_ignore_existing = 0;
int ignore_errors = 0;
int modify_window = 0;
int blocking_io = -1;
-@@ -139,6 +140,7 @@ char *batch_prefix = NULL;
+@@ -138,6 +139,7 @@ char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
/** Local address to bind. As a character string because it's
* interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -260,6 +262,7 @@ void usage(enum logcode F)
+@@ -259,6 +261,7 @@ void usage(enum logcode F)
rprintf(F," --delete-after receiver deletes after transferring, not before\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
rprintf(F," --partial keep partially transferred files\n");
rprintf(F," --force force deletion of directories even if not empty\n");
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
-@@ -310,7 +313,7 @@ void usage(enum logcode F)
+@@ -309,7 +312,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -364,6 +367,7 @@ static struct poptOption long_options[]
+@@ -363,6 +366,7 @@ static struct poptOption long_options[]
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_INT, &block_size, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
-@@ -580,6 +584,32 @@ int parse_arguments(int *argc, const cha
- checksum_seed = FIXED_CHECKSUM_SEED;
+@@ -577,6 +581,32 @@ int parse_arguments(int *argc, const cha
+ read_batch = 1;
break;
+ case OPT_MAX_SIZE:
case OPT_TIMEOUT:
if (io_timeout && io_timeout < select_timeout)
select_timeout = io_timeout;
-@@ -884,6 +914,11 @@ void server_options(char **args,int *arg
+@@ -883,6 +913,11 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
+ args[ac++] = max_size_arg;
+ }
+
- if (batch_prefix) {
- char *r_or_w = write_batch ? "write" : "read";
- if (asprintf(&arg, "--%s-batch=%s", r_or_w, batch_prefix) < 0)
---- orig/rsync.yo 2004-06-17 06:32:00
+ if (io_timeout) {
+ if (asprintf(&arg, "--timeout=%d", io_timeout) < 0)
+ goto oom;
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:20:46
@@ -315,6 +315,7 @@ verb(
--delete-after receiver deletes after transfer, not before
can't say if I've left any cleanup/compatibility errors in the code.
---- orig/Makefile.in 2004-05-15 00:53:53
+--- orig/Makefile.in 2004-07-04 08:59:17
+++ Makefile.in 2004-07-03 20:22:28
@@ -39,7 +39,7 @@ OBJS3=progress.o pipe.o
DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
if (verbose > 3) {
rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",
code, file, line);
---- orig/clientserver.c 2004-06-18 15:59:19
+--- orig/clientserver.c 2004-07-15 02:21:10
+++ clientserver.c 2004-07-03 20:22:28
@@ -46,6 +46,9 @@ extern int io_timeout;
extern int orig_umask;
+ return client_run(fd, fd, -1, argc, argv);
}
- int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc)
-@@ -148,6 +161,33 @@ int start_inband_exchange(char *user, ch
+ int start_inband_exchange(char *user, char *path, int f_in, int f_out,
+@@ -149,6 +162,33 @@ int start_inband_exchange(char *user, ch
if (protocol_version > remote_protocol)
protocol_version = remote_protocol;
p = strchr(path,'/');
if (p) *p = 0;
io_printf(f_out, "%s\n", path);
-@@ -176,6 +216,10 @@ int start_inband_exchange(char *user, ch
+@@ -177,6 +217,10 @@ int start_inband_exchange(char *user, ch
* server to terminate the listing of modules.
* We don't want to go on and transfer
* anything; just exit. */
exit(0);
}
-@@ -183,6 +227,10 @@ int start_inband_exchange(char *user, ch
+@@ -184,6 +228,10 @@ int start_inband_exchange(char *user, ch
rprintf(FERROR, "%s\n", line);
/* This is always fatal; the server will now
* close the socket. */
return RERR_STARTCLIENT;
} else {
rprintf(FINFO,"%s\n", line);
-@@ -487,6 +535,7 @@ static void send_listing(int fd)
+@@ -488,6 +536,7 @@ static void send_listing(int fd)
io_printf(fd,"@RSYNCD: EXIT\n");
}
/* this is called when a connection is established to a client
and we want to start talking. The setup of the system is done from
here */
-@@ -544,6 +593,20 @@ int start_daemon(int f_in, int f_out)
+@@ -545,6 +594,20 @@ int start_daemon(int f_in, int f_out)
return -1;
}
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
---- orig/main.c 2004-06-30 07:24:30
-+++ main.c 2004-07-03 20:22:28
-@@ -52,6 +52,9 @@ extern int rsync_port;
- extern int read_batch;
+--- orig/main.c 2004-07-15 17:02:03
++++ main.c 2004-07-15 02:40:51
+@@ -54,6 +54,9 @@ extern int read_batch;
extern int write_batch;
+ extern int batch_fd;
extern int filesfrom_fd;
+#ifdef HAVE_OPENSSL
+extern int use_ssl;
extern pid_t cleanup_child_pid;
extern char *files_from;
extern char *remote_filesfrom_file;
-@@ -719,17 +722,32 @@ static int start_client(int argc, char *
+@@ -748,18 +751,32 @@ static int start_client(int argc, char *
pid_t pid;
int f_in,f_out;
int rc;
if ((rc = copy_argv(argv)))
return rc;
-+ if (strncasecmp(URL_PREFIX, argv[0], url_prefix) != 0) {
++ if (strncasecmp(URL_PREFIX, argv[0], url_prefix) != 0 && !read_batch) {
+#ifdef HAVE_OPENSSL
+ url_prefix = strlen(SSL_URL_PREFIX);
+ if (strncasecmp(SSL_URL_PREFIX, argv[0], url_prefix) != 0)
+#endif
+ }
/* rsync:// always uses rsync server over direct socket connection */
-- if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0) {
+- if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0
+- && !read_batch) {
+ if (url_prefix) {
char *host, *path;
p = strchr(host,'/');
if (p) {
*p = 0;
-@@ -777,12 +795,27 @@ static int start_client(int argc, char *
+@@ -807,12 +824,27 @@ static int start_client(int argc, char *
argv++;
} else { /* source is local */
am_sender = 1;
p = strchr(host,'/');
if (p) {
*p = 0;
---- orig/options.c 2004-06-20 19:30:00
-+++ options.c 2004-07-03 20:22:28
+--- orig/options.c 2004-07-15 16:51:50
++++ options.c 2004-07-15 02:41:12
@@ -133,6 +133,14 @@ int quiet = 0;
int always_checksum = 0;
int list_only = 0;
+char *ssl_ca_path = NULL;
+#endif
+
- #define FIXED_CHECKSUM_SEED 32761
- #define MAX_BATCH_PREFIX_LEN 256 /* Must be less than MAXPATHLEN-13 */
- char *batch_prefix = NULL;
-@@ -145,13 +153,13 @@ static int modify_window_set;
+ #define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
+ char *batch_name = NULL;
+
+@@ -144,13 +152,13 @@ static int modify_window_set;
* address, or a hostname. **/
char *bind_address;
STRUCT_STAT *dumstat;
#ifdef HAVE_SOCKETPAIR
-@@ -170,6 +178,10 @@ static void print_rsync_version(enum log
+@@ -169,6 +177,10 @@ static void print_rsync_version(enum log
ipv6 = "";
#endif
rprintf(f, "%s version %s protocol version %d\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
rprintf(f,
-@@ -183,10 +195,10 @@ static void print_rsync_version(enum log
+@@ -182,10 +194,10 @@ static void print_rsync_version(enum log
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
* macros. */
#ifdef MAINTAINER_MODE
rprintf(f, " panic action: \"%s\"\n",
get_panic_action());
-@@ -299,6 +311,13 @@ void usage(enum logcode F)
+@@ -298,6 +310,13 @@ void usage(enum logcode F)
rprintf(F," -4 --ipv4 prefer IPv4\n");
rprintf(F," -6 --ipv6 prefer IPv6\n");
#endif
rprintf(F," -h, --help show this help screen\n");
rprintf(F,"\n");
-@@ -310,7 +329,7 @@ void usage(enum logcode F)
+@@ -309,7 +328,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -397,6 +416,13 @@ static struct poptOption long_options[]
+@@ -396,6 +415,13 @@ static struct poptOption long_options[]
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
#endif
{0,0,0,0, 0, 0, 0}
};
-@@ -596,6 +622,12 @@ int parse_arguments(int *argc, const cha
+@@ -593,6 +619,12 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -733,6 +765,17 @@ int parse_arguments(int *argc, const cha
+@@ -732,6 +764,17 @@ int parse_arguments(int *argc, const cha
if (do_progress && !verbose)
verbose = 1;
if (bwlimit) {
bwlimit_writemax = (size_t)bwlimit * 128;
if (bwlimit_writemax < 512)
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:22:28
@@ -32,6 +32,7 @@
make proto
---- orig/io.c 2004-06-23 01:13:56
+--- orig/io.c 2004-07-15 02:21:10
+++ io.c 2004-07-03 20:17:10
-@@ -225,6 +225,14 @@ static void read_msg_fd(void)
+@@ -231,6 +231,14 @@ static void read_msg_fd(void)
read_loop(fd, buf, 4);
redo_list_add(IVAL(buf,0));
break;
case MSG_INFO:
case MSG_ERROR:
case MSG_LOG:
-@@ -634,6 +642,16 @@ static int readfd_unbuffered(int fd, cha
+@@ -640,6 +648,16 @@ static int readfd_unbuffered(int fd, cha
read_loop(fd, buffer, remaining);
bufferIdx = 0;
break;
case MSG_INFO:
case MSG_ERROR:
if (remaining >= sizeof line) {
---- orig/main.c 2004-06-30 07:24:30
-+++ main.c 2004-07-03 20:17:10
+--- orig/main.c 2004-07-15 17:02:03
++++ main.c 2004-07-15 02:29:03
@@ -42,6 +42,7 @@ extern int list_only;
extern int local_server;
extern int log_got_error;
extern int orig_umask;
extern int keep_dirlinks;
extern int preserve_hard_links;
-@@ -585,6 +586,8 @@ void start_server(int f_in, int f_out, i
+@@ -598,6 +599,8 @@ void start_server(int f_in, int f_out, i
if (am_sender) {
keep_dirlinks = 0; /* Must be disabled on the sender. */
+ if (need_messages_from_generator)
+ io_start_multiplex_in(f_in);
- if (!read_batch) {
- recv_exclude_list(f_in);
- if (cvs_exclude)
-@@ -652,6 +655,9 @@ int client_run(int f_in, int f_out, pid_
+
+ recv_exclude_list(f_in);
+ if (cvs_exclude)
+@@ -677,6 +680,9 @@ int client_run(int f_in, int f_out, pid_
exit_cleanup(status);
}
if (argc == 0)
list_only = 1;
---- orig/options.c 2004-06-20 19:30:00
+--- orig/options.c 2004-07-15 16:51:50
+++ options.c 2004-07-03 20:17:10
@@ -87,6 +87,7 @@ int size_only = 0;
int bwlimit = 0;
unsigned int block_size = 0;
-@@ -258,6 +260,7 @@ void usage(enum logcode F)
+@@ -257,6 +259,7 @@ void usage(enum logcode F)
rprintf(F," --delete delete files that don't exist on the sending side\n");
rprintf(F," --delete-excluded also delete excluded files on the receiving side\n");
rprintf(F," --delete-after receiver deletes after transferring, not before\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
rprintf(F," --partial keep partially transferred files\n");
-@@ -308,8 +311,8 @@ void usage(enum logcode F)
+@@ -307,8 +310,8 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -328,6 +331,7 @@ static struct poptOption long_options[]
+@@ -327,6 +330,7 @@ static struct poptOption long_options[]
{"ignore-existing", 0, POPT_ARG_NONE, &opt_ignore_existing, 0, 0, 0 },
{"delete-after", 0, POPT_ARG_NONE, 0, OPT_DELETE_AFTER, 0, 0 },
{"delete-excluded", 0, POPT_ARG_NONE, 0, OPT_DELETE_EXCLUDED, 0, 0 },
{"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 },
{"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 },
{"exclude", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE, 0, 0 },
-@@ -513,6 +517,11 @@ int parse_arguments(int *argc, const cha
+@@ -512,6 +516,11 @@ int parse_arguments(int *argc, const cha
delete_mode = 1;
break;
case OPT_EXCLUDE:
if (am_server || sanitize_paths)
return 0; /* Impossible... */
-@@ -989,6 +998,9 @@ void server_options(char **args,int *arg
+@@ -981,6 +990,9 @@ void server_options(char **args,int *arg
}
}
*argc = ac;
return;
---- orig/receiver.c 2004-07-02 18:23:01
+--- orig/receiver.c 2004-07-14 17:12:06
+++ receiver.c 2004-07-03 20:17:10
@@ -48,6 +48,7 @@ extern int ignore_errors;
extern int orig_umask;
static void delete_one(char *fn, int is_dir)
{
-@@ -296,7 +297,7 @@ int recv_files(int f_in,struct file_list
+@@ -296,7 +297,7 @@ int recv_files(int f_in, struct file_lis
char *fname, fbuf[MAXPATHLEN];
char template[MAXPATHLEN];
char fnametmp[MAXPATHLEN];
char fnamecmpbuf[MAXPATHLEN];
struct map_struct *mapbuf;
struct file_struct *file;
-@@ -478,16 +479,20 @@ int recv_files(int f_in,struct file_list
+@@ -478,16 +479,20 @@ int recv_files(int f_in, struct file_lis
cleanup_disable();
}
}
}
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:17:10
@@ -60,6 +60,7 @@
#define FLAG_TOP_DIR (1<<0)
MSG_DONE=5, /* current phase is done */
MSG_REDO=4, /* reprocess indicated flist index */
MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */
---- orig/rsync.yo 2004-06-17 06:32:00
+--- orig/rsync.yo 2004-07-15 02:21:11
+++ rsync.yo 2004-07-03 20:17:10
@@ -313,6 +313,7 @@ verb(
--delete delete files that don't exist on sender
dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files
even when there are I/O errors.
---- orig/sender.c 2004-06-18 16:55:00
+--- orig/sender.c 2004-07-15 02:21:11
+++ sender.c 2004-07-03 20:17:10
@@ -27,6 +27,7 @@ extern int dry_run;
extern int am_server;
void send_files(struct file_list *flist, int f_out, int f_in)
{
-@@ -129,6 +152,8 @@ void send_files(struct file_list *flist,
+@@ -123,6 +146,8 @@ void send_files(struct file_list *flist,
if (verbose > 2)
rprintf(FINFO, "send_files starting\n");
while (1) {
unsigned int offset;
-@@ -300,6 +325,9 @@ void send_files(struct file_list *flist,
+@@ -245,6 +270,9 @@ void send_files(struct file_list *flist,
if (verbose > 2)
rprintf(FINFO, "sender finished %s\n", fname);
Do we need configure support for mktime()?
---- orig/io.c 2004-06-23 01:13:56
+--- orig/io.c 2004-07-15 02:21:10
+++ io.c 2004-07-03 20:23:22
@@ -44,6 +44,7 @@ static int io_multiplexing_in;
static int multiplex_in_fd = -1;
static int no_flush;
extern int bwlimit;
-@@ -128,16 +129,21 @@ static void check_timeout(void)
+@@ -134,16 +135,21 @@ static void check_timeout(void)
{
time_t t;
if (last_io && io_timeout && (t-last_io) >= io_timeout) {
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds - exiting\n",
---- orig/options.c 2004-06-20 19:30:00
-+++ options.c 2004-07-03 20:23:22
+--- orig/options.c 2004-07-15 16:51:50
++++ options.c 2004-07-15 17:06:09
@@ -95,6 +95,7 @@ int modify_window = 0;
int blocking_io = -1;
int checksum_seed = 0;
/** Network address family. **/
-@@ -292,6 +293,8 @@ void usage(enum logcode F)
+@@ -291,6 +292,8 @@ void usage(enum logcode F)
rprintf(F," --log-format=FORMAT log file transfers using specified format\n");
rprintf(F," --password-file=FILE get password from FILE\n");
rprintf(F," --bwlimit=KBPS limit I/O bandwidth, KBytes per second\n");
+ rprintf(F," --stop-at=y-m-dTh:m Stop rsync at year-month-dayThour:minute\n");
+ rprintf(F," --time-limit=MINS Stop rsync after MINS minutes have elapsed\n");
- rprintf(F," --write-batch=PREFIX write batch fileset starting with PREFIX\n");
- rprintf(F," --read-batch=PREFIX read batch fileset starting with PREFIX\n");
+ rprintf(F," --write-batch=FILE write a batch to FILE\n");
+ rprintf(F," --read-batch=FILE read a batch from FILE\n");
rprintf(F," --checksum-seed=NUM set block/file checksum seed\n");
-@@ -311,6 +314,7 @@ enum {OPT_VERSION = 1000, OPT_SENDER, OP
+@@ -310,6 +313,7 @@ enum {OPT_VERSION = 1000, OPT_SENDER, OP
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -383,6 +387,8 @@ static struct poptOption long_options[]
+@@ -382,6 +386,8 @@ static struct poptOption long_options[]
{"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 },
{"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 },
{"address", 0, POPT_ARG_STRING, &bind_address, 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 },
-@@ -596,6 +602,36 @@ int parse_arguments(int *argc, const cha
+@@ -593,6 +599,36 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -903,6 +939,15 @@ void server_options(char **args,int *arg
+@@ -895,6 +931,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 2004-06-17 06:32:00
-+++ rsync.yo 2004-07-03 20:23:22
+--- orig/rsync.yo 2004-07-15 02:21:11
++++ rsync.yo 2004-07-15 02:44:40
@@ -347,6 +347,8 @@ verb(
--log-format=FORMAT log file transfers using specified format
--password-file=FILE get password from FILE
--bwlimit=KBPS limit I/O bandwidth, KBytes per second
+ --stop-at=y-m-dTh:m Stop rsync at year-month-dayThour:minute
+ --time-limit=MINS Stop rsync after MINS minutes have elapsed
- --write-batch=PREFIX write batch fileset starting with PREFIX
- --read-batch=PREFIX read batch fileset starting with PREFIX
+ --write-batch=FILE write a batch to FILE
+ --read-batch=FILE read a batch from FILE
--checksum-seed=NUM set block/file checksum seed
@@ -897,6 +899,19 @@ transfer was too fast, it will wait befo
result is an average transfer rate equaling the specified limit. A value
+dit(bf(--time-limit=MINS)) This option allows you to specify the maximum
+number of minutes rsync will run for.
+
- dit(bf(--write-batch=PREFIX)) Generate a set of files that can be
- transferred as a batch update. Each filename in the set starts with
- PREFIX. See the "BATCH MODE" section for details.
+ dit(bf(--write-batch=FILE)) Record a file that can later be applied to
+ anonther identical destination with --read-batch. See the "BATCH MODE"
+ section for details.
--- orig/util.c 2004-06-09 21:54:47
+++ util.c 2004-07-03 20:23:22
@@ -125,6 +125,132 @@ void overflow(char *str)
#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif
---- orig/rsync.h 2004-05-16 07:58:12
+--- orig/rsync.h 2004-07-07 08:27:00
+++ rsync.h 2004-07-03 20:23:33
@@ -159,6 +159,11 @@ enum msgcode {
#include <sys/socket.h>