automatically generates unique IDs). Defaults to True.
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-08-09 21:07:09
+++ 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 \
OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
fileio.o batch.o clientname.o
OBJS3=progress.o pipe.o
---- orig/cleanup.c 2004-07-20 21:36:07
+--- orig/cleanup.c 2004-07-29 16:08:03
+++ cleanup.c 2004-07-03 20:22:18
-@@ -138,8 +138,12 @@ void _exit_cleanup(int code, const char
+@@ -139,8 +139,12 @@ void _exit_cleanup(int code, const char
code = RERR_VANISHED;
}
if (verbose > 2) {
rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n",
---- orig/clientserver.c 2004-07-17 15:20:05
+--- orig/clientserver.c 2004-08-02 02:29:16
+++ clientserver.c 2004-07-03 20:22:18
-@@ -316,6 +316,9 @@ static int rsync_module(int f_in, int f_
+@@ -322,6 +322,9 @@ static int rsync_module(int f_in, int f_
exclude_path_prefix = NULL;
log_init();
if (use_chroot) {
/*
-@@ -434,6 +437,9 @@ static int rsync_module(int f_in, int f_
+@@ -440,6 +443,9 @@ static int rsync_module(int f_in, int f_
rprintf(FLOG, "rsync %s %s from %s@%s (%s)\n",
am_sender ? "on" : "to",
request, auth_user, host, addr);
} else {
rprintf(FLOG, "rsync %s %s from %s (%s)\n",
am_sender ? "on" : "to",
---- orig/configure.in 2004-07-16 20:07:22
+--- orig/configure.in 2004-08-02 21:56:58
+++ configure.in 2004-07-03 20:22:18
@@ -94,6 +94,8 @@ AC_ARG_WITH(rsync-path,
[ --with-rsync-path=PATH set default --rsync-path to PATH (default: rsync)],
AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
-@@ -465,6 +467,14 @@ then
+@@ -466,6 +468,14 @@ then
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
fi
+ rprintf(FERROR,"Error at db_log_exit: Not connected to database!\n");
+ }
+}
---- orig/loadparm.c 2004-05-21 08:43:10
+--- orig/loadparm.c 2004-07-31 16:41:04
+++ loadparm.c 2004-07-03 20:22:18
@@ -123,6 +123,17 @@ typedef struct
BOOL list;
{
int i;
for (i = 0; rerr_names[i].name; i++) {
---- orig/main.c 2004-07-19 17:14:44
+--- orig/main.c 2004-08-05 18:24:21
+++ main.c 2004-07-03 20:22:18
-@@ -134,6 +134,9 @@ static void report(int f)
+@@ -136,6 +136,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-20 21:36:07
+--- orig/receiver.c 2004-08-03 15:34:32
+++ receiver.c 2004-07-20 21:47:47
-@@ -512,6 +512,9 @@ int recv_files(int f_in, struct file_lis
+@@ -545,6 +545,9 @@ int recv_files(int f_in, struct file_lis
fname, fd2, file->length);
log_recv(file, &initial_stats);
if (fd1 != -1)
close(fd1);
---- orig/sender.c 2004-07-20 21:36:08
+--- orig/sender.c 2004-08-03 15:34:32
+++ sender.c 2004-07-15 02:37:48
-@@ -230,6 +230,9 @@ void send_files(struct file_list *flist,
+@@ -234,6 +234,9 @@ void send_files(struct file_list *flist,
match_sums(f_out, s, mbuf, st.st_size);
log_send(file, &initial_stats);
make
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-08-09 21:07:09
+++ Makefile.in 2004-07-03 20:11:58
@@ -25,7 +25,7 @@ VERSION=@VERSION@
.SUFFIXES:
free(file);
if (verbose > 1)
---- orig/configure.in 2004-07-16 20:07:22
+--- orig/configure.in 2004-08-02 21:56:58
+++ configure.in 2004-07-03 20:11:58
@@ -434,6 +434,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
AC_CHECK_LIB(resolv, strcasecmp)
dnl At the moment we don't test for a broken memcmp(), because all we
dnl need to do is test for equality, not comparison, and it seems that
dnl every platform has a memcmp that can do at least that.
-@@ -655,6 +660,74 @@ AC_SUBST(OBJ_RESTORE)
+@@ -656,6 +661,74 @@ AC_SUBST(OBJ_RESTORE)
AC_SUBST(CC_SHOBJ_FLAG)
AC_SUBST(BUILD_POPT)
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2004-07-17 15:20:05
+--- orig/flist.c 2004-08-11 23:42:23
+++ flist.c 2004-07-03 20:11:58
-@@ -942,6 +942,8 @@ void send_file_name(int f, struct file_l
+@@ -944,6 +944,8 @@ void send_file_name(int f, struct file_l
if (!file)
return;
maybe_emit_filelist_progress(flist);
-@@ -950,6 +952,10 @@ void send_file_name(int f, struct file_l
+@@ -952,6 +954,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)
-@@ -1266,6 +1272,8 @@ struct file_list *recv_file_list(int f)
+@@ -1268,6 +1274,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;
-@@ -1288,6 +1296,8 @@ struct file_list *recv_file_list(int f)
+@@ -1290,6 +1298,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-07-28 10:05:29
+--- orig/generator.c 2004-08-05 18:24:21
+++ generator.c 2004-07-03 20:11:58
-@@ -335,6 +335,10 @@ static void recv_generator(char *fname,
+@@ -332,6 +332,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
rprintf(FINFO, "%s/\n", safe_fname(fname));
next;
}
---- orig/options.c 2004-07-23 17:16:13
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-15 16:53:42
@@ -43,6 +43,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
int preserve_uid = 0;
-@@ -151,6 +152,7 @@ static void print_rsync_version(enum log
+@@ -152,6 +153,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -167,6 +169,10 @@ static void print_rsync_version(enum log
+@@ -168,6 +170,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#if SUPPORT_LINKS
links = "";
#endif
-@@ -181,9 +187,9 @@ static void print_rsync_version(enum log
+@@ -182,9 +188,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
-@@ -248,6 +254,7 @@ void usage(enum logcode F)
+@@ -249,6 +255,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");
-@@ -356,6 +363,7 @@ static struct poptOption long_options[]
+@@ -358,6 +365,7 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links", 0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
-@@ -602,6 +610,31 @@ int parse_arguments(int *argc, const cha
+@@ -620,6 +628,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). */
-@@ -873,6 +906,8 @@ void server_options(char **args,int *arg
+@@ -932,6 +965,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_uid)
argstr[x++] = 'o';
if (preserve_gid)
---- orig/rsync.c 2004-07-26 16:06:53
+--- orig/rsync.c 2004-08-09 21:07:10
+++ rsync.c 2004-07-03 20:11:58
-@@ -205,6 +205,14 @@ int set_perms(char *fname,struct file_st
+@@ -207,6 +207,14 @@ int set_perms(char *fname,struct file_st
}
#endif
if (verbose > 1 && flags & PERMS_REPORT) {
if (updated)
rprintf(FINFO,"%s\n",fname);
---- orig/rsync.h 2004-07-23 17:16:13
+--- orig/rsync.h 2004-08-03 15:41:32
+++ rsync.h 2004-07-03 20:11:58
-@@ -538,6 +538,40 @@ static inline int flist_up(struct file_l
+@@ -541,6 +541,40 @@ static inline int flist_up(struct file_l
#include "lib/permstring.h"
#include "lib/addrinfo.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2004-07-24 16:52:10
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-03 20:11:58
@@ -297,6 +297,7 @@ verb(
--safe-links ignore "unsafe" symlinks
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-@@ -542,6 +543,11 @@ source file's permissions and the umask
+@@ -549,6 +550,11 @@ source file's permissions and the umask
other files (including updated files) retain their existing permissions
(which is the same behavior as other file-copy utilities, such as cp).
rprintf(FINFO, "flist->length=%.0f\n",
(double) fptr[i]->length);
rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- orig/flist.c 2004-08-05 21:57:29
+--- orig/flist.c 2004-08-11 23:42:23
+++ flist.c 2004-07-03 20:15:41
@@ -58,6 +58,7 @@ extern int relative_paths;
extern int implied_dirs;
file->length = file_length;
file->mode = mode;
file->uid = uid;
-@@ -864,6 +878,7 @@ skip_excludes:
+@@ -866,6 +880,7 @@ skip_excludes:
file->flags = flags;
file->modtime = st.st_mtime;
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2004-08-05 21:57:29
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-03 20:15:41
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
return 0;
}
---- orig/util.c 2004-08-09 21:07:10
+--- orig/util.c 2004-08-11 23:42:23
+++ util.c 2004-07-03 20:15:41
@@ -128,31 +128,39 @@ void overflow(char *str)
make proto
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-08-09 21:07:09
+++ 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-07-17 15:20:05
+--- orig/flist.c 2004-08-11 23:42:23
+++ flist.c 2004-07-03 20:13:41
@@ -33,6 +33,7 @@ extern int verbose;
extern int do_progress;
extern struct exclude_list_struct exclude_list;
extern struct exclude_list_struct server_exclude_list;
extern struct exclude_list_struct local_exclude_list;
-@@ -865,7 +868,10 @@ skip_excludes:
+@@ -867,7 +870,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-08-03 15:41:32
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-03 20:13:41
-@@ -127,6 +127,7 @@ char *log_format = NULL;
+@@ -126,6 +126,7 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
-@@ -139,6 +140,8 @@ int list_only = 0;
+@@ -138,6 +139,8 @@ int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
-@@ -254,6 +257,7 @@ void usage(enum logcode F)
+@@ -253,6 +256,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");
-@@ -361,6 +365,7 @@ static struct poptOption long_options[]
+@@ -360,6 +364,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 },
-@@ -806,6 +811,13 @@ int parse_arguments(int *argc, const cha
+@@ -808,6 +813,13 @@ int parse_arguments(int *argc, const cha
return 0;
}
if (do_progress && !verbose)
verbose = 1;
-@@ -1076,6 +1088,11 @@ void server_options(char **args,int *arg
+@@ -1078,6 +1090,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-08-03 15:34:32
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-03 20:13:41
@@ -301,6 +301,7 @@ verb(
-g, --group preserve group
-n, --dry-run show what would have been transferred
-W, --whole-file copy whole files, no incremental checks
@@ -574,6 +575,14 @@ cause the next transfer to behave as if
- their checksums compared and show up in log messages even if they haven't
- changed.
+ updated (though the rsync algorithm will make the update fairly efficient
+ if the files haven't actually changed, you're much better off using -t).
+dit(bf(--chmod)) This options tells rsync to apply the listed "chmod" pattern
+to the permission of the files on the destination. In addition to the normal
dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
instead it will just report the actions it would have taken.
---- orig/testsuite/chmod.test 2004-06-18 17:22:09
-+++ testsuite/chmod.test 2004-06-18 17:22:09
+--- orig/testsuite/chmod-option.test 2004-06-18 17:22:09
++++ testsuite/chmod-option.test 2004-06-18 17:22:09
@@ -0,0 +1,43 @@
+#! /bin/sh
+
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2004-07-16 19:35:29
+--- orig/generator.c 2004-08-05 18:24:21
+++ generator.c 2004-07-03 20:16:51
@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
extern int csum_length;
if (st->st_size != file->length)
return 0;
if (link_dest) {
---- orig/options.c 2004-07-16 20:07:22
+--- orig/options.c 2004-08-11 23:42:23
+++ 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;
-@@ -272,6 +273,7 @@ void usage(enum logcode F)
+@@ -275,6 +276,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");
-@@ -327,6 +329,7 @@ static struct poptOption long_options[]
+@@ -330,6 +332,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 },
-@@ -951,6 +954,9 @@ void server_options(char **args,int *arg
+@@ -1025,6 +1028,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-07-16 20:07:23
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-03 20:16:51
-@@ -322,6 +322,7 @@ verb(
+@@ -323,6 +323,7 @@ verb(
--timeout=TIME set I/O timeout in seconds
-I, --ignore-times turn off mod time & file size quick check
--size-only ignore mod time for quick check (use size)
--modify-window=NUM compare mod times with reduced accuracy
-T --temp-dir=DIR create temporary files in directory DIR
--compare-dest=DIR also compare received files relative to DIR
-@@ -396,6 +397,12 @@ regardless of timestamp. This is useful
+@@ -397,6 +398,12 @@ regardless of timestamp. This is useful
after using another mirroring system which may not preserve timestamps
exactly.
---- orig/options.c 2004-08-05 21:57:29
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-03 20:17:33
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
Note that you'll need to run 'make proto' after applying this patch.
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-08-09 21:07:09
+++ 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
DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
popt/popthelp.o popt/poptparse.o
---- orig/cleanup.c 2004-07-20 21:36:07
+--- orig/cleanup.c 2004-07-29 16:08:03
+++ cleanup.c 2004-07-03 20:18:02
@@ -24,6 +24,7 @@
extern int io_error;
/**
* Close all open sockets and files, allowing a (somewhat) graceful
-@@ -121,6 +122,8 @@ void _exit_cleanup(int code, const char
+@@ -122,6 +123,8 @@ void _exit_cleanup(int code, const char
finish_transfer(cleanup_new_fname, fname, cleanup_file, 0);
}
io_flush(FULL_FLUSH);
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2004-07-17 15:20:05
+--- orig/flist.c 2004-08-11 23:42:23
+++ flist.c 2004-07-03 20:18:02
@@ -43,6 +43,7 @@ extern int cvs_exclude;
clean_fname(thisname);
if (sanitize_paths)
-@@ -1055,6 +1062,9 @@ struct file_list *send_file_list(int f,
+@@ -1057,6 +1064,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");
-@@ -1227,6 +1237,9 @@ struct file_list *send_file_list(int f,
+@@ -1229,6 +1239,9 @@ struct file_list *send_file_list(int f,
stats.num_files = flist->count;
}
if (verbose > 3)
output_flist(flist);
-@@ -1248,6 +1261,9 @@ struct file_list *recv_file_list(int f)
+@@ -1250,6 +1263,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;
-@@ -1300,6 +1316,9 @@ struct file_list *recv_file_list(int f)
+@@ -1302,6 +1318,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 2004-07-21 23:59:35
+--- orig/generator.c 2004-08-05 18:24:21
+++ generator.c 2004-07-03 20:18:02
-@@ -256,6 +256,12 @@ static void generate_and_send_sums(int f
+@@ -247,6 +247,12 @@ static void generate_and_send_sums(int f
*
* @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-07-21 23:59:35
+--- orig/main.c 2004-08-05 18:24:21
+++ main.c 2004-07-22 00:31:47
-@@ -329,7 +329,7 @@ static pid_t do_cmd(char *cmd, char *mac
+@@ -332,7 +332,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 2004-07-21 23:59:35
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-03 20:18:02
-@@ -128,6 +128,7 @@ char *backup_dir = NULL;
+@@ -129,6 +129,7 @@ char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
int verbose = 0;
int quiet = 0;
-@@ -277,6 +278,7 @@ void usage(enum logcode F)
+@@ -280,6 +281,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");
-@@ -375,6 +377,7 @@ static struct poptOption long_options[]
+@@ -378,6 +380,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 },
if (pid == -1) {
rsyserr(FERROR, errno, "fork");
exit_cleanup(RERR_IPC);
---- orig/syscall.c 2004-02-18 22:33:21
+--- orig/syscall.c 2004-08-02 21:56:59
+++ syscall.c 2004-07-02 21:39:00
@@ -231,3 +231,34 @@ char *d_name(struct dirent *di)
return di->d_name;
+
+ return result;
+}
---- orig/util.c 2004-06-09 21:54:47
+--- orig/util.c 2004-08-11 23:42:23
+++ util.c 2004-07-03 20:18:02
-@@ -1153,3 +1153,55 @@ void *_realloc_array(void *ptr, unsigned
+@@ -1231,3 +1231,55 @@ void *_realloc_array(void *ptr, unsigned
return malloc(size * num);
return realloc(ptr, size * num);
}
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-07-29 16:08:03
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-03 20:18:13
@@ -38,6 +38,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 },
-@@ -1021,6 +1024,9 @@ void server_options(char **args,int *arg
+@@ -1069,6 +1072,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-29 16:08:03
+--- orig/receiver.c 2004-08-03 15:34:32
+++ receiver.c 2004-07-16 20:13:31
-@@ -37,6 +37,7 @@ extern int preserve_hard_links;
+@@ -36,6 +36,7 @@ extern int preserve_hard_links;
extern int preserve_perms;
extern int cvs_exclude;
extern int io_error;
sum_end(file_sum1);
if (mapbuf)
---- orig/util.c 2004-07-29 16:08:04
+--- orig/util.c 2004-08-11 23:42:23
+++ util.c 2004-07-03 20:18:13
@@ -33,6 +33,7 @@ extern int module_id;
extern int modify_window;
/*
* Acts on file number @p i from @p flist, whose name is @p fname.
-@@ -447,6 +535,15 @@ static void recv_generator(char *fname,
+@@ -453,6 +541,15 @@ static void recv_generator(char *fname,
stat_errno = ENOENT;
}
if (statret == -1) {
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
-@@ -473,7 +570,7 @@ static void recv_generator(char *fname,
+@@ -479,7 +576,7 @@ static void recv_generator(char *fname,
return;
}
if (fnamecmp_type == G2R_FNAME)
set_perms(fname, file, &st, PERMS_REPORT);
return;
-@@ -521,6 +618,21 @@ static void recv_generator(char *fname,
+@@ -527,6 +624,21 @@ static void recv_generator(char *fname,
notify_others:
if (f_out_name >= 0) {
write_byte(f_out_name, fnamecmp_type);
extern int relative_paths;
extern int rsync_port;
extern int whole_file;
-@@ -459,7 +460,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -463,7 +464,7 @@ static int do_recv(int f_in,int f_out,st
int pid;
int status = 0;
int error_pipe[2], name_pipe[2];
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
---- orig/options.c 2004-08-03 15:41:32
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-16 20:14:12
-@@ -86,6 +86,7 @@ int safe_symlinks = 0;
+@@ -85,6 +85,7 @@ int safe_symlinks = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int bwlimit = 0;
size_t bwlimit_writemax = 0;
int delete_after = 0;
int only_existing = 0;
-@@ -280,6 +281,7 @@ void usage(enum logcode F)
+@@ -279,6 +280,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");
-@@ -379,6 +381,7 @@ static struct poptOption long_options[]
+@@ -378,6 +380,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 },
-@@ -1088,6 +1091,9 @@ void server_options(char **args,int *arg
+@@ -1090,6 +1093,9 @@ void server_options(char **args,int *arg
}
}
/* Log-message categories. FLOG is only used on the daemon side to
---- orig/rsync.yo 2004-08-03 15:34:32
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-03 19:27:25
@@ -327,6 +327,7 @@ verb(
-T --temp-dir=DIR create temporary files in directory DIR
You must run "make proto" before compiling.
---- orig/generator.c 2004-08-03 15:41:32
+--- orig/generator.c 2004-08-05 18:24:21
+++ generator.c 2004-07-30 07:18:03
@@ -249,13 +249,13 @@ static void generate_and_send_sums(int f
* out. It might be wrong.
if (list_only)
return;
-@@ -411,6 +411,7 @@ static void recv_generator(char *fname,
+@@ -417,6 +417,7 @@ static void recv_generator(char *fname,
}
fnamecmp = fname;
if (statret == -1 && compare_dest != NULL) {
/* try the file at compare_dest instead */
-@@ -427,10 +428,14 @@ static void recv_generator(char *fname,
+@@ -433,10 +434,14 @@ static void recv_generator(char *fname,
safe_fname(fname));
}
fnamecmp = fnamecmpbuf;
statret = 0;
}
}
-@@ -445,11 +450,9 @@ static void recv_generator(char *fname,
+@@ -451,11 +456,9 @@ static void recv_generator(char *fname,
if (statret == -1) {
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
rsyserr(FERROR, stat_errno,
"recv_generator: failed to stat %s",
full_fname(fname));
-@@ -457,13 +460,13 @@ static void recv_generator(char *fname,
+@@ -463,13 +466,13 @@ static void recv_generator(char *fname,
return;
}
&& cmp_modtime(st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
-@@ -471,21 +474,17 @@ static void recv_generator(char *fname,
+@@ -477,21 +480,17 @@ static void recv_generator(char *fname,
}
if (skip_file(fnamecmp, file, &st)) {
if (partial_dir) {
STRUCT_STAT st2;
-@@ -494,6 +493,7 @@ static void recv_generator(char *fname,
+@@ -500,6 +499,7 @@ static void recv_generator(char *fname,
&& S_ISREG(st2.st_mode)) {
st = st2;
fnamecmp = partialptr;
}
}
-@@ -506,9 +506,8 @@ static void recv_generator(char *fname,
+@@ -512,9 +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;
}
if (verbose > 3) {
-@@ -519,14 +518,28 @@ static void recv_generator(char *fname,
+@@ -525,14 +524,28 @@ static void recv_generator(char *fname,
if (verbose > 2)
rprintf(FINFO, "generating and sending sums for %d\n", i);
{
int i;
int phase = 0;
-@@ -567,7 +580,7 @@ void generate_files(int f_out, struct fi
+@@ -573,7 +586,7 @@ void generate_files(int f_out, struct fi
}
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
}
phase++;
-@@ -584,7 +597,7 @@ void generate_files(int f_out, struct fi
+@@ -590,7 +603,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),
}
phase++;
-@@ -603,7 +616,7 @@ void generate_files(int f_out, struct fi
+@@ -609,7 +622,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-07-31 16:41:04
+--- orig/main.c 2004-08-05 18:24:21
+++ main.c 2004-07-22 00:10:43
@@ -59,6 +59,7 @@ extern int filesfrom_fd;
extern pid_t cleanup_child_pid;
extern char *rsync_path;
extern char *shell_cmd;
extern char *batch_name;
-@@ -457,7 +458,8 @@ static int do_recv(int f_in,int f_out,st
+@@ -461,7 +462,8 @@ static int do_recv(int f_in,int f_out,st
{
int pid;
int status = 0;
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
-@@ -472,8 +474,9 @@ static int do_recv(int f_in,int f_out,st
+@@ -476,8 +478,9 @@ static int do_recv(int f_in,int f_out,st
delete_files(flist);
}
exit_cleanup(RERR_SOCKETIO);
}
-@@ -481,6 +484,11 @@ static int do_recv(int f_in,int f_out,st
+@@ -485,6 +488,11 @@ static int do_recv(int f_in,int f_out,st
if ((pid = do_fork()) == 0) {
close(error_pipe[0]);
if (f_in != f_out)
close(f_out);
-@@ -490,7 +498,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -494,7 +502,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);
-@@ -509,6 +517,11 @@ static int do_recv(int f_in,int f_out,st
+@@ -513,6 +521,11 @@ static int do_recv(int f_in,int f_out,st
stop_write_batch();
close(error_pipe[1]);
if (f_in != f_out)
close(f_in);
-@@ -516,7 +529,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -520,7 +533,7 @@ static int do_recv(int f_in,int f_out,st
set_msg_fd_in(error_pipe[0]);
continue;
case '?':
/* Match anything but '/'. */
---- orig/options.c 2004-07-29 16:08:03
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-29 16:13:45
@@ -92,6 +92,7 @@ int opt_ignore_existing = 0;
int max_delete = 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 },
-@@ -983,6 +986,9 @@ void server_options(char **args,int *arg
+@@ -1037,6 +1040,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
if (partial_dir && am_sender) {
args[ac++] = "--partial-dir";
args[ac++] = partial_dir;
---- orig/util.c 2004-07-29 16:08:04
+--- orig/util.c 2004-08-11 23:42:23
+++ util.c 2004-07-03 20:19:20
-@@ -1037,6 +1037,19 @@ int u_strcmp(const char *cs1, const char
+@@ -1029,6 +1029,19 @@ int u_strcmp(const char *cs1, const char
{
const uchar *s1 = (const uchar *)cs1;
const uchar *s2 = (const uchar *)cs2;
the file's name.
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-08-09 21:07:09
+++ 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-08-03 15:41:32
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-03 20:20:15
-@@ -127,6 +127,7 @@ char *log_format = NULL;
+@@ -126,6 +126,7 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
-@@ -280,6 +281,7 @@ void usage(enum logcode F)
+@@ -279,6 +280,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");
-@@ -320,7 +322,7 @@ void usage(enum logcode F)
+@@ -319,7 +321,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[] = {
-@@ -379,6 +381,7 @@ static struct poptOption long_options[]
+@@ -378,6 +380,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 },
-@@ -618,6 +621,19 @@ int parse_arguments(int *argc, const cha
+@@ -620,6 +623,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). */
-@@ -1076,6 +1092,11 @@ void server_options(char **args,int *arg
+@@ -1078,6 +1094,11 @@ void server_options(char **args,int *arg
args[ac++] = compare_dest;
}
log_recv(file, &initial_stats);
---- orig/rsync.c 2004-07-31 16:41:04
+--- orig/rsync.c 2004-08-09 21:07:10
+++ rsync.c 2004-07-16 20:16:53
@@ -34,6 +34,7 @@ extern int force_delete;
extern int recurse;
extern char *backup_dir;
extern int inplace;
-@@ -251,6 +252,12 @@ void finish_transfer(char *fname, char *
+@@ -254,6 +255,12 @@ void finish_transfer(char *fname, char *
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
handle relative symlinks properly, and that has not yet been fixed
in this modified version.
---- orig/flist.c 2004-07-15 02:21:10
+--- orig/flist.c 2004-08-11 23:42:23
+++ flist.c 2004-07-16 16:58:04
@@ -49,6 +49,7 @@ extern int filesfrom_fd;
extern int one_file_system;
extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_devices;
-@@ -722,6 +723,30 @@ void receive_file_entry(struct file_stru
+@@ -724,6 +725,30 @@ void receive_file_entry(struct file_stru
}
/**
* Create a file_struct for a named file by reading its stat()
* information and performing extensive checks against global
-@@ -841,7 +866,13 @@ skip_excludes:
+@@ -843,7 +868,13 @@ skip_excludes:
basename_len = strlen(basename) + 1; /* count the '\0' */
#if SUPPORT_LINKS
#else
linkname_len = 0;
#endif
---- orig/options.c 2004-07-16 20:07:22
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-16 16:12:29
@@ -42,6 +42,7 @@ int archive_mode = 0;
int keep_dirlinks = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
-@@ -242,6 +243,7 @@ void usage(enum logcode F)
+@@ -244,6 +245,7 @@ void usage(enum logcode F)
rprintf(F," --inplace update destination files inplace (SEE MAN PAGE)\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");
rprintf(F," --copy-unsafe-links copy the referent of \"unsafe\" symlinks\n");
rprintf(F," --safe-links ignore \"unsafe\" symlinks\n");
-@@ -350,6 +352,7 @@ static struct poptOption long_options[]
+@@ -353,6 +355,7 @@ static struct poptOption long_options[]
{"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
{"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 },
{"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 },
---- orig/generator.c 2004-07-29 16:08:03
+--- orig/generator.c 2004-08-05 18:24:21
+++ 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;
-@@ -337,6 +338,10 @@ static void recv_generator(char *fname,
+@@ -333,6 +334,10 @@ static void recv_generator(char *fname,
&& verbose && f_out != -1)
rprintf(FINFO, "%s/\n", safe_fname(fname));
return;
}
if (preserve_links && S_ISLNK(file->mode)) {
---- orig/options.c 2004-07-29 16:08:03
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-15 02:34:44
@@ -90,6 +90,7 @@ int delete_after = 0;
int only_existing = 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 },
-@@ -589,6 +593,32 @@ int parse_arguments(int *argc, const cha
+@@ -604,6 +608,32 @@ int parse_arguments(int *argc, const cha
read_batch = 1;
break;
case OPT_TIMEOUT:
if (io_timeout && io_timeout < select_timeout)
select_timeout = io_timeout;
-@@ -938,6 +968,11 @@ void server_options(char **args,int *arg
+@@ -983,6 +1013,11 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
if (io_timeout) {
if (asprintf(&arg, "--timeout=%d", io_timeout) < 0)
goto oom;
---- orig/rsync.yo 2004-07-29 16:08:04
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-03 20:20:46
@@ -316,6 +316,7 @@ verb(
--delete-after receiver deletes after transfer, not before
--partial keep partially transferred files
--partial-dir=DIR put a partially transferred file into DIR
--force force deletion of dirs even if not empty
-@@ -593,6 +594,11 @@ dit(bf(--max-delete=NUM)) This tells rsy
+@@ -599,6 +600,11 @@ dit(bf(--max-delete=NUM)) This tells rsy
files or directories. This is useful when mirroring very large trees
to prevent disasters.
can't say if I've left any cleanup/compatibility errors in the code.
---- orig/Makefile.in 2004-07-04 08:59:17
+--- orig/Makefile.in 2004-08-09 21:07:09
+++ 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
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
---- orig/main.c 2004-07-31 16:41:04
+--- orig/main.c 2004-08-05 18:24:21
+++ main.c 2004-07-15 02:40:51
@@ -56,6 +56,9 @@ extern int write_batch;
extern int batch_fd;
extern pid_t cleanup_child_pid;
extern char *files_from;
extern char *remote_filesfrom_file;
-@@ -757,18 +760,32 @@ static int start_client(int argc, char *
+@@ -761,18 +764,32 @@ static int start_client(int argc, char *
pid_t pid;
int f_in,f_out;
int rc;
p = strchr(host,'/');
if (p) {
*p = 0;
-@@ -816,12 +833,27 @@ static int start_client(int argc, char *
+@@ -820,12 +837,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-08-03 15:41:32
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-16 20:19:50
-@@ -136,6 +136,14 @@ int quiet = 0;
+@@ -135,6 +135,14 @@ int quiet = 0;
int always_checksum = 0;
int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -155,6 +163,7 @@ static void print_rsync_version(enum log
+@@ -154,6 +162,7 @@ static void print_rsync_version(enum log
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#ifdef HAVE_SOCKETPAIR
-@@ -177,6 +186,10 @@ static void print_rsync_version(enum log
+@@ -176,6 +185,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,
-@@ -190,10 +203,10 @@ static void print_rsync_version(enum log
+@@ -189,10 +202,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());
-@@ -309,6 +322,13 @@ void usage(enum logcode F)
+@@ -308,6 +321,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");
-@@ -320,7 +340,7 @@ void usage(enum logcode F)
+@@ -319,7 +339,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[] = {
-@@ -409,6 +429,13 @@ static struct poptOption long_options[]
+@@ -408,6 +428,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}
};
-@@ -618,6 +645,12 @@ int parse_arguments(int *argc, const cha
+@@ -620,6 +647,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). */
-@@ -809,6 +842,17 @@ int parse_arguments(int *argc, const cha
+@@ -811,6 +844,17 @@ int parse_arguments(int *argc, const cha
if (do_progress && !verbose)
verbose = 1;
case MSG_INFO:
case MSG_ERROR:
if (remaining >= sizeof line) {
---- orig/main.c 2004-07-31 16:41:04
+--- orig/main.c 2004-08-05 18:24:21
+++ main.c 2004-07-22 03:06:20
@@ -42,6 +42,7 @@ extern int list_only;
extern int local_server;
extern int orig_umask;
extern int copy_links;
extern int keep_dirlinks;
-@@ -617,6 +618,8 @@ void start_server(int f_in, int f_out, i
+@@ -621,6 +622,8 @@ void start_server(int f_in, int f_out, i
if (am_sender) {
keep_dirlinks = 0; /* Must be disabled on the sender. */
recv_exclude_list(f_in);
if (cvs_exclude)
-@@ -688,6 +691,9 @@ int client_run(int f_in, int f_out, pid_
+@@ -692,6 +695,9 @@ int client_run(int f_in, int f_out, pid_
exit_cleanup(status);
}
if (argc == 0)
list_only = 1;
---- orig/options.c 2004-08-03 15:41:32
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-16 20:09:54
-@@ -88,8 +88,10 @@ int size_only = 0;
+@@ -87,8 +87,10 @@ int size_only = 0;
int bwlimit = 0;
size_t bwlimit_writemax = 0;
int delete_after = 0;
int max_delete = 0;
int ignore_errors = 0;
int modify_window = 0;
-@@ -267,6 +269,7 @@ void usage(enum logcode F)
+@@ -266,6 +268,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");
-@@ -318,8 +321,8 @@ void usage(enum logcode F)
+@@ -317,8 +320,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};
-@@ -338,6 +341,7 @@ static struct poptOption long_options[]
+@@ -337,6 +340,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 },
-@@ -537,6 +541,11 @@ int parse_arguments(int *argc, const cha
+@@ -539,6 +543,11 @@ int parse_arguments(int *argc, const cha
delete_mode = 1;
break;
case OPT_EXCLUDE:
if (am_server || sanitize_paths)
return 0; /* Impossible... */
-@@ -1088,6 +1097,9 @@ void server_options(char **args,int *arg
+@@ -1090,6 +1099,9 @@ void server_options(char **args,int *arg
}
}
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-08-03 15:34:32
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-03 20:17:10
@@ -314,6 +314,7 @@ verb(
--delete delete files that don't exist on sender
[Updated to latest CVS source by Wayne Davison.]
---- orig/syscall.c 2004-02-18 22:33:21
+--- orig/syscall.c 2004-08-02 21:56:59
+++ syscall.c 2004-04-22 23:48:45
@@ -58,9 +58,14 @@ int do_symlink(char *fname1, char *fname
#if HAVE_LINK
Do we need configure support for mktime()?
---- orig/io.c 2004-07-21 23:59:35
+--- orig/io.c 2004-08-02 02:44:26
+++ io.c 2004-07-17 15:28:36
@@ -49,6 +49,7 @@ extern int am_sender;
extern int eol_nulls;
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds - exiting\n",
(int)(t-last_io));
---- orig/options.c 2004-07-21 23:59:35
+--- orig/options.c 2004-08-11 23:42:23
+++ options.c 2004-07-15 17:06:09
@@ -96,6 +96,7 @@ int blocking_io = -1;
int checksum_seed = 0;
/** Network address family. **/
-@@ -298,6 +299,8 @@ void usage(enum logcode F)
+@@ -301,6 +302,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," --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");
-@@ -317,6 +320,7 @@ enum {OPT_VERSION = 1000, OPT_SENDER, OP
+@@ -320,6 +323,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[] = {
-@@ -390,6 +394,8 @@ static struct poptOption long_options[]
+@@ -394,6 +398,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 },
-@@ -601,6 +607,36 @@ int parse_arguments(int *argc, const cha
+@@ -620,6 +626,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). */
-@@ -935,6 +971,15 @@ void server_options(char **args,int *arg
+@@ -995,6 +1031,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-07-20 21:36:08
+--- orig/rsync.yo 2004-08-11 17:26:27
+++ rsync.yo 2004-07-15 02:44:40
-@@ -348,6 +348,8 @@ verb(
+@@ -349,6 +349,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
--write-batch=FILE write a batch to FILE
--read-batch=FILE read a batch from FILE
--checksum-seed=NUM set block/file checksum seed
-@@ -912,6 +914,19 @@ transfer was too fast, it will wait befo
+@@ -943,6 +945,19 @@ transfer was too fast, it will wait befo
result is an average transfer rate equaling the specified limit. A value
of zero specifies no limit.
dit(bf(--write-batch=FILE)) Record a file that can later be applied to
another identical destination with --read-batch. See the "BATCH MODE"
section for details.
---- orig/util.c 2004-06-09 21:54:47
+--- orig/util.c 2004-08-11 23:42:23
+++ util.c 2004-07-03 20:23:22
-@@ -125,6 +125,132 @@ void overflow(char *str)
+@@ -126,6 +126,132 @@ void overflow(char *str)
exit_cleanup(RERR_MALLOC);
}
#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif
---- orig/rsync.h 2004-07-16 20:07:23
+--- orig/rsync.h 2004-08-03 15:41:32
+++ rsync.h 2004-07-03 20:23:33
-@@ -159,6 +159,11 @@ enum msgcode {
+@@ -162,6 +162,11 @@ enum msgcode {
#include <sys/socket.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
---- orig/syscall.c 2004-02-18 22:33:21
+--- orig/syscall.c 2004-08-02 21:56:59
+++ syscall.c 2004-06-18 17:38:35
@@ -76,6 +76,29 @@ int do_mknod(char *pathname, mode_t mode
{