automatically generates unique IDs). Defaults to True.
---- orig/Makefile.in 2004-08-09 21:07:09
+--- orig/Makefile.in 2004-08-13 07:18:58
+++ 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 \
} else {
rprintf(FLOG, "rsync %s %s from %s (%s)\n",
am_sender ? "on" : "to",
---- orig/configure.in 2004-08-02 21:56:58
+--- orig/configure.in 2004-08-13 07:18:59
+++ configure.in 2004-07-03 20:22:18
@@ -94,6 +94,8 @@ AC_ARG_WITH(rsync-path,
[ --with-rsync-path=PATH set default --rsync-path to PATH (default: rsync)],
FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors)
FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable)
FN_LOCAL_STRING(lp_uid, uid)
---- orig/log.c 2004-06-09 15:34:38
+--- orig/log.c 2004-09-07 19:54:51
+++ log.c 2004-07-03 20:22:18
@@ -75,7 +75,7 @@ struct {
/*
{
int i;
for (i = 0; rerr_names[i].name; i++) {
---- orig/main.c 2004-08-05 18:24:21
+--- orig/main.c 2004-09-18 01:49:33
+++ main.c 2004-07-03 20:22:18
@@ -136,6 +136,9 @@ static void report(int f)
if (f == -1 || !am_sender)
return;
}
---- orig/receiver.c 2004-08-03 15:34:32
+--- orig/receiver.c 2004-09-21 09:40:27
+++ receiver.c 2004-07-20 21:47:47
-@@ -545,6 +545,9 @@ int recv_files(int f_in, struct file_lis
+@@ -546,6 +546,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-08-03 15:34:32
+--- orig/sender.c 2004-09-20 05:10:48
+++ sender.c 2004-07-15 02:37:48
-@@ -234,6 +234,9 @@ void send_files(struct file_list *flist,
+@@ -239,6 +239,9 @@ void send_files(struct file_list *flist,
match_sums(f_out, s, mbuf, st.st_size);
log_send(file, &initial_stats);
+}
+
+#endif /* SUPPORT_ACLS */
---- orig/backup.c 2004-09-07 21:45:30
+--- orig/backup.c 2004-09-20 19:50:13
+++ backup.c 2004-09-07 21:45:57
-@@ -121,6 +121,7 @@ static int make_bak_dir(char *fullpath)
+@@ -119,6 +119,7 @@ static int make_bak_dir(char *fullpath)
} else {
do_lchown(fullpath, st.st_uid, st.st_gid);
do_chmod(fullpath, st.st_mode);
}
}
*p = '/';
-@@ -178,6 +179,8 @@ static int keep_backup(char *fname)
+@@ -176,6 +177,8 @@ static int keep_backup(char *fname)
if (!(buf = get_backup_name(fname)))
return 0;
#ifdef HAVE_MKNOD
/* Check to see if this is a device file, or link */
if (IS_DEVICE(file->mode)) {
-@@ -253,6 +256,7 @@ static int keep_backup(char *fname)
+@@ -251,6 +254,7 @@ static int keep_backup(char *fname)
}
}
set_perms(buf, file, NULL, 0);
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2004-08-12 18:34:38
+--- orig/flist.c 2004-09-21 09:40:27
+++ flist.c 2004-07-03 20:11:58
-@@ -944,6 +944,8 @@ void send_file_name(int f, struct file_l
+@@ -966,6 +966,8 @@ void send_file_name(int f, struct file_l
if (!file)
return;
maybe_emit_filelist_progress(flist);
-@@ -952,6 +954,10 @@ void send_file_name(int f, struct file_l
+@@ -974,6 +976,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)
-@@ -1268,6 +1274,8 @@ struct file_list *recv_file_list(int f)
+@@ -1291,6 +1297,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;
-@@ -1290,6 +1298,8 @@ struct file_list *recv_file_list(int f)
+@@ -1313,6 +1321,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-09-07 21:45:30
+--- orig/generator.c 2004-09-20 19:50:13
+++ generator.c 2004-07-03 20:11:58
@@ -338,6 +338,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
next;
}
---- orig/options.c 2004-09-07 21:45:30
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-08-19 17:38:57
@@ -43,6 +43,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -934,6 +960,8 @@ void server_options(char **args,int *arg
+@@ -938,6 +964,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2004-09-07 19:54:51
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 20:11:58
@@ -326,6 +326,7 @@ verb(
--safe-links ignore "unsafe" symlinks
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-12 18:34:38
+--- orig/flist.c 2004-09-21 09:40:27
+++ flist.c 2004-07-03 20:15:41
-@@ -58,6 +58,7 @@ extern int relative_paths;
+@@ -59,6 +59,7 @@ extern int relative_paths;
extern int implied_dirs;
extern int copy_links;
extern int copy_unsafe_links;
extern int protocol_version;
extern int sanitize_paths;
extern int delete_excluded;
-@@ -141,17 +142,17 @@ static void list_file_entry(struct file_
+@@ -143,17 +144,17 @@ static void list_file_entry(struct file_
#if SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
}
}
-@@ -332,6 +333,7 @@ void send_file_entry(struct file_struct
+@@ -334,6 +335,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;
-@@ -347,7 +349,7 @@ void send_file_entry(struct file_struct
+@@ -349,7 +351,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;
-@@ -396,6 +398,12 @@ void send_file_entry(struct file_struct
+@@ -398,6 +400,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) {
-@@ -451,6 +459,8 @@ void send_file_entry(struct file_struct
+@@ -453,6 +461,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);
-@@ -524,6 +534,7 @@ void receive_file_entry(struct file_stru
+@@ -526,6 +536,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;
-@@ -540,7 +551,7 @@ void receive_file_entry(struct file_stru
+@@ -542,7 +553,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;
-@@ -595,6 +606,8 @@ void receive_file_entry(struct file_stru
+@@ -597,6 +608,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);
-@@ -645,6 +658,7 @@ void receive_file_entry(struct file_stru
+@@ -647,6 +660,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;
-@@ -866,6 +880,7 @@ skip_excludes:
+@@ -868,6 +882,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-08-05 18:24:21
+--- orig/generator.c 2004-09-20 19:50:13
+++ generator.c 2004-07-03 20:15:41
-@@ -90,7 +90,7 @@ static int skip_file(char *fname, struct
+@@ -92,7 +92,7 @@ static int skip_file(char *fname, struct
if (ignore_times)
return 0;
}
-@@ -470,7 +470,7 @@ static void recv_generator(char *fname,
+@@ -484,7 +484,7 @@ static void recv_generator(char *fname,
}
if (update_only && fnamecmp == fname
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-03 20:15:41
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 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 },
-@@ -940,6 +943,8 @@ void server_options(char **args,int *arg
+@@ -946,6 +949,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (preserve_perms)
argstr[x++] = 'p';
if (recurse)
---- orig/rsync.c 2004-08-09 21:07:10
+--- orig/rsync.c 2004-09-07 21:45:30
+++ rsync.c 2004-08-13 08:17:28
@@ -25,6 +25,7 @@
extern int verbose;
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2004-08-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 20:15:41
@@ -330,6 +330,7 @@ verb(
-g, --group preserve group
+
+# The script would have aborted on error, so getting here means we've won.
+exit 0
---- orig/testsuite/rsync.fns 2004-07-23 17:16:13
+--- orig/testsuite/rsync.fns 2004-09-18 01:49:34
+++ testsuite/rsync.fns 2004-07-03 20:15:41
@@ -50,7 +50,7 @@ printmsg() {
}
rsync_getgroups() {
-@@ -150,6 +150,8 @@ checkit() {
+@@ -158,6 +158,8 @@ checkit() {
# We can just write everything to stdout/stderr, because the
# wrapper hides it unless there is a problem.
echo "Running: \"$1\""
eval "$1"
status=$?
-@@ -158,6 +160,12 @@ checkit() {
+@@ -166,6 +168,12 @@ checkit() {
fi
echo "-------------"
echo "check how the files compare with diff:"
echo ""
for f in `cd "$2"; find . -type f -print `
-@@ -165,12 +173,6 @@ checkit() {
+@@ -173,12 +181,6 @@ checkit() {
diff $diffopt "$2"/"$f" "$3"/"$f" || failed=YES
done
return 0;
}
---- orig/util.c 2004-08-13 07:18:59
+--- orig/util.c 2004-09-07 21:45:30
+++ util.c 2004-07-03 20:15:41
@@ -128,31 +128,39 @@ void overflow(char *str)
+ }
+ return 0;
+}
---- orig/flist.c 2004-08-12 18:34:38
-+++ flist.c 2004-07-03 20:13:41
-@@ -33,6 +33,7 @@ extern int verbose;
- extern int do_progress;
- extern int am_root;
- extern int am_server;
-+extern int am_sender;
- extern int am_daemon;
- extern int always_checksum;
- extern int module_id;
-@@ -64,6 +65,8 @@ extern int delete_excluded;
+--- orig/flist.c 2004-09-21 09:40:27
++++ flist.c 2004-09-18 01:51:11
+@@ -65,6 +65,8 @@ extern int delete_excluded;
extern int orig_umask;
extern int list_only;
extern struct exclude_list_struct exclude_list;
extern struct exclude_list_struct server_exclude_list;
extern struct exclude_list_struct local_exclude_list;
-@@ -867,7 +870,10 @@ skip_excludes:
+@@ -869,7 +871,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-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-03 20:13:41
@@ -126,6 +126,7 @@ char *log_format = NULL;
char *password_file = NULL;
{"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 },
-@@ -808,6 +813,13 @@ int parse_arguments(int *argc, const cha
+@@ -804,6 +809,13 @@ int parse_arguments(int *argc, const cha
return 0;
}
if (do_progress && !verbose)
verbose = 1;
-@@ -1078,6 +1090,11 @@ void server_options(char **args,int *arg
+@@ -1083,6 +1095,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-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 20:13:41
@@ -330,6 +330,7 @@ verb(
-g, --group preserve group
Before compiling, be sure to run "make proto".
---- orig/generator.c 2004-07-30 07:18:03
+--- orig/generator.c 2004-09-20 19:57:58
+++ generator.c 2004-07-30 07:28:13
-@@ -43,7 +43,7 @@ extern int io_timeout;
+@@ -45,7 +45,7 @@ extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
extern char *partial_dir;
extern int link_dest;
extern int whole_file;
extern int local_server;
-@@ -419,11 +419,19 @@ static void recv_generator(char *fname,
+@@ -426,11 +426,19 @@ static void recv_generator(char *fname,
fnamecmp = fname;
fnamecmp_type = G2R_FNAME;
#if HAVE_LINK
if (link_dest && !dry_run) {
if (do_link(fnamecmpbuf, fname) < 0) {
-@@ -434,15 +442,14 @@ static void recv_generator(char *fname,
+@@ -441,15 +449,14 @@ static void recv_generator(char *fname,
safe_fname(fname));
}
fnamecmp = fnamecmpbuf;
/* 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-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-08-13 07:55:37
@@ -114,12 +114,13 @@ int write_batch = 0;
int read_batch = 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 },
-@@ -609,8 +611,28 @@ int parse_arguments(int *argc, const cha
+@@ -605,8 +607,28 @@ int parse_arguments(int *argc, const cha
select_timeout = io_timeout;
break;
link_dest = 1;
break;
#else
-@@ -703,6 +725,11 @@ int parse_arguments(int *argc, const cha
+@@ -699,6 +721,11 @@ int parse_arguments(int *argc, const cha
return 0;
}
if (archive_mode) {
if (!files_from)
recurse = 1;
-@@ -733,8 +760,6 @@ int parse_arguments(int *argc, const cha
+@@ -729,8 +756,6 @@ int parse_arguments(int *argc, const cha
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
if (partial_dir)
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
if (files_from)
-@@ -742,6 +767,7 @@ int parse_arguments(int *argc, const cha
+@@ -738,6 +763,7 @@ int parse_arguments(int *argc, const cha
}
if (server_exclude_list.head && !am_sender) {
struct exclude_list_struct *elp = &server_exclude_list;
if (tmpdir) {
clean_fname(tmpdir, 1);
if (check_exclude(elp, tmpdir, 1) < 0)
-@@ -752,9 +778,9 @@ int parse_arguments(int *argc, const cha
+@@ -748,9 +774,9 @@ int parse_arguments(int *argc, const cha
if (check_exclude(elp, partial_dir, 1) < 0)
goto options_rejected;
}
goto options_rejected;
}
if (backup_dir) {
-@@ -884,8 +910,8 @@ int parse_arguments(int *argc, const cha
+@@ -890,8 +916,8 @@ int parse_arguments(int *argc, const cha
**/
void server_options(char **args,int *argc)
{
char *arg;
int i, x;
-@@ -1069,13 +1095,16 @@ void server_options(char **args,int *arg
+@@ -1074,13 +1100,16 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
---- orig/receiver.c 2004-07-30 07:17:48
+--- orig/receiver.c 2004-09-07 21:57:20
+++ receiver.c 2004-07-30 07:31:12
@@ -38,7 +38,7 @@ extern int cvs_exclude;
extern int io_error;
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
-@@ -442,7 +442,8 @@ int recv_files(int f_in, struct file_lis
+@@ -438,7 +438,8 @@ int recv_files(int f_in, struct file_lis
partialptr = partial_dir ? partial_dir_fname(fname) : fname;
if (f_in_name >= 0) {
case G2R_FNAME:
fnamecmp = fname;
break;
-@@ -451,7 +452,7 @@ int recv_files(int f_in, struct file_lis
+@@ -450,7 +451,7 @@ int recv_files(int f_in, struct file_lis
break;
default:
pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
fnamecmp = fnamecmpbuf;
break;
}
---- orig/rsync.h 2004-07-30 07:16:38
+--- orig/rsync.h 2004-09-07 21:52:22
+++ rsync.h 2004-07-30 07:23:54
@@ -98,6 +98,8 @@
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2004-08-05 18:24:21
+--- orig/generator.c 2004-09-20 19:50:13
+++ generator.c 2004-07-03 20:16:51
-@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
+@@ -41,6 +41,7 @@ extern int make_backups;
extern int csum_length;
extern int ignore_times;
extern int size_only;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -60,6 +61,8 @@ extern struct exclude_list_struct server
+@@ -62,6 +63,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-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-03 20:16:51
@@ -84,6 +84,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
{"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, &one_file_system, 0, 0, 0 },
{"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 },
-@@ -1025,6 +1028,9 @@ void server_options(char **args,int *arg
+@@ -1030,6 +1033,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-08-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 20:16:51
@@ -352,6 +352,7 @@ verb(
--timeout=TIME set I/O timeout in seconds
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-03 20:17:33
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 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 },
-@@ -940,6 +943,8 @@ void server_options(char **args,int *arg
+@@ -946,6 +949,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (preserve_perms)
argstr[x++] = 'p';
if (recurse)
---- orig/rsync.c 2004-08-09 21:07:10
+--- orig/rsync.c 2004-09-07 21:45:30
+++ rsync.c 2004-07-03 20:17:33
@@ -25,6 +25,7 @@
extern int verbose;
rsyserr(FERROR, errno, "failed to set times on %s",
full_fname(fname));
return 0;
---- orig/rsync.yo 2004-08-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-08-11 17:27:51
@@ -329,7 +329,8 @@ verb(
-o, --owner preserve owner (root only)
add_exclude(&exclude_list, default_cvsignore,
XFLG_WORD_SPLIT | XFLG_WORDS_ONLY);
---- orig/flist.c 2004-08-12 18:34:38
+--- orig/flist.c 2004-09-21 09:40:27
+++ flist.c 2004-08-12 18:59:28
-@@ -39,10 +39,9 @@ extern int module_id;
+@@ -40,10 +40,9 @@ extern int module_id;
extern int ignore_errors;
extern int numeric_ids;
extern char *files_from;
extern int filesfrom_fd;
-@@ -66,7 +65,6 @@ extern int list_only;
+@@ -67,7 +66,6 @@ extern int list_only;
extern struct exclude_list_struct exclude_list;
extern struct exclude_list_struct server_exclude_list;
int io_error;
-@@ -221,8 +219,6 @@ int link_stat(const char *path, STRUCT_S
+@@ -223,8 +221,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;
-@@ -244,10 +240,7 @@ static int check_exclude_file(char *fnam
+@@ -246,10 +242,7 @@ static int check_exclude_file(char *fnam
if (exclude_level != ALL_EXCLUDES)
return 0;
if (exclude_list.head
return 1;
return 0;
}
-@@ -956,15 +949,7 @@ void send_file_name(int f, struct file_l
+@@ -978,15 +971,7 @@ void send_file_name(int f, struct file_l
if (recursive && S_ISDIR(file->mode)
&& !(file->flags & FLAG_MOUNT_POINT)) {
}
}
-@@ -975,6 +960,7 @@ static void send_directory(int f, struct
+@@ -997,6 +982,7 @@ static void send_directory(int f, struct
struct dirent *di;
char fname[MAXPATHLEN];
unsigned int offset;
char *p;
d = opendir(dir);
-@@ -998,18 +984,7 @@ static void send_directory(int f, struct
+@@ -1020,18 +1006,7 @@ 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);
-@@ -1030,6 +1005,8 @@ static void send_directory(int f, struct
+@@ -1052,6 +1027,8 @@ static void send_directory(int f, struct
rsyserr(FERROR, errno, "readdir(%s)", dir);
}
closedir(d);
}
-@@ -1049,6 +1026,7 @@ struct file_list *send_file_list(int f,
+@@ -1071,6 +1048,7 @@ struct file_list *send_file_list(int f,
char *p, *dir, olddir[sizeof curr_dir];
char lastpath[MAXPATHLEN] = "";
struct file_list *flist;
int64 start_write;
int use_ff_fd = 0;
-@@ -1069,6 +1047,10 @@ struct file_list *send_file_list(int f,
+@@ -1091,6 +1069,10 @@ struct file_list *send_file_list(int f,
exit_cleanup(RERR_FILESELECT);
}
use_ff_fd = 1;
}
}
-@@ -1099,6 +1081,15 @@ struct file_list *send_file_list(int f,
+@@ -1121,6 +1103,15 @@ struct file_list *send_file_list(int f,
}
}
if (link_stat(fname, &st, keep_dirlinks) != 0) {
if (f != -1) {
io_error |= IOERR_GENERAL;
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-08-12 18:59:28
@@ -287,6 +287,7 @@ void usage(enum logcode F)
rprintf(F," --include=PATTERN don't exclude files matching PATTERN\n");
{0, 'P', POPT_ARG_NONE, 0, 'P', 0, 0 },
{"config", 0, POPT_ARG_STRING, &config_file, 0, 0, 0 },
{"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 },
-@@ -589,6 +591,11 @@ int parse_arguments(int *argc, const cha
+@@ -585,6 +587,11 @@ int parse_arguments(int *argc, const cha
am_sender = 1;
break;
};
struct exclude_list_struct {
---- orig/rsync.yo 2004-08-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-08-13 00:43:31
@@ -364,6 +364,7 @@ verb(
--include=PATTERN don't exclude files matching PATTERN
-0 --from0 all file lists are delimited by nulls
--version print version number
--daemon run as an rsync daemon
-@@ -1008,24 +1009,32 @@ The exclude and include patterns specifi
+@@ -1025,24 +1026,32 @@ The exclude and include patterns specifi
selection of which files to transfer and which files to skip.
Rsync builds an ordered list of include/exclude options as specified on
Let's say that we want to match two source files, one with an absolute
path of "/home/me/foo/bar", and one with a path of "/home/you/bar/baz".
-@@ -1072,23 +1081,27 @@ because rsync did not descend through th
+@@ -1089,23 +1098,27 @@ because rsync did not descend through th
hierarchy.
Note also that the --include and --exclude options take one pattern
it() if the pattern ends with a / then it will only match a
directory, not a file, link, or device.
-@@ -1101,22 +1114,31 @@ itemize(
+@@ -1118,22 +1131,31 @@ itemize(
single asterisk pattern "*" will stop at slashes.
it() if the pattern contains a / (not counting a trailing /) or a "**"
)
The +/- rules are most useful in a list that was read from a file, allowing
-@@ -1163,8 +1185,160 @@ itemize(
+@@ -1180,8 +1202,160 @@ itemize(
it() --include "*/" --include "*.c" --exclude "*" would include all
directories and C source files
it() --include "foo/" --include "foo/bar.c" --exclude "*" would include
---- orig/flist.c 2004-08-12 18:34:38
+--- orig/flist.c 2004-09-21 09:40:27
+++ flist.c 2004-09-03 14:17:31
-@@ -1056,6 +1056,7 @@ struct file_list *send_file_list(int f,
+@@ -1078,6 +1078,7 @@ struct file_list *send_file_list(int f,
start_filelist_progress("building file list");
start_write = stats.total_written;
flist = flist_new(f == -1 ? WITHOUT_HLINK : WITH_HLINK,
"send_file_list");
-@@ -1202,6 +1203,9 @@ struct file_list *send_file_list(int f,
+@@ -1224,6 +1225,9 @@ struct file_list *send_file_list(int f,
}
}
if (f != -1) {
send_file_entry(NULL, f, 0);
-@@ -1209,6 +1213,8 @@ struct file_list *send_file_list(int f,
+@@ -1231,6 +1235,8 @@ struct file_list *send_file_list(int f,
finish_filelist_progress(flist);
}
if (flist->hlink_pool) {
pool_destroy(flist->hlink_pool);
flist->hlink_pool = NULL;
---- orig/main.c 2004-08-05 18:24:21
+--- orig/main.c 2004-09-18 01:49:33
+++ main.c 2004-09-03 14:18:47
@@ -178,6 +178,10 @@ static void report(int f)
rprintf(FINFO,"Matched data: %.0f bytes\n",
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2004-08-12 18:34:38
+--- orig/flist.c 2004-09-21 09:40:27
+++ flist.c 2004-08-12 18:35:53
-@@ -43,6 +43,7 @@ extern int cvs_exclude;
+@@ -44,6 +44,7 @@ extern int cvs_exclude;
extern int recurse;
extern char curr_dir[MAXPATHLEN];
extern char *files_from;
extern int filesfrom_fd;
-@@ -357,7 +358,10 @@ void send_file_entry(struct file_struct
+@@ -359,7 +360,10 @@ void send_file_entry(struct file_struct
io_write_phase = "send_file_entry";
flags = base_flags;
-@@ -570,6 +574,9 @@ void receive_file_entry(struct file_stru
+@@ -572,6 +576,9 @@ void receive_file_entry(struct file_stru
strlcpy(lastname, thisname, MAXPATHLEN);
clean_fname(thisname, 0);
if (sanitize_paths)
-@@ -1057,6 +1064,9 @@ struct file_list *send_file_list(int f,
+@@ -1079,6 +1086,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");
-@@ -1229,6 +1239,9 @@ struct file_list *send_file_list(int f,
+@@ -1251,6 +1261,9 @@ struct file_list *send_file_list(int f,
stats.num_files = flist->count;
}
if (verbose > 3)
output_flist(flist);
-@@ -1250,6 +1263,9 @@ struct file_list *recv_file_list(int f)
+@@ -1272,6 +1285,9 @@ struct file_list *recv_file_list(int f)
start_read = stats.total_read;
+ init_fname_convert();
+
flist = flist_new(WITH_HLINK, "recv_file_list");
+ received_flist = flist;
- flist->count = 0;
-@@ -1302,6 +1318,9 @@ struct file_list *recv_file_list(int f)
+@@ -1325,6 +1341,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-08-05 18:24:21
+--- orig/generator.c 2004-09-20 19:50:13
+++ generator.c 2004-07-03 20:18:02
-@@ -247,6 +247,12 @@ static void generate_and_send_sums(int f
+@@ -252,6 +252,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.
*/
static void recv_generator(char *fname, struct file_struct *file, int i,
int f_out)
---- orig/log.c 2004-08-12 18:34:38
+--- orig/log.c 2004-09-07 19:54:51
+++ log.c 2004-07-03 20:18:02
@@ -57,6 +57,7 @@ struct {
{ RERR_STREAMIO , "error in rsync protocol data stream" },
{ RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
{ RERR_WAITCHILD , "some error returned by waitpid()" },
{ RERR_MALLOC , "error allocating core memory buffers" },
---- orig/main.c 2004-08-05 18:24:21
+--- orig/main.c 2004-09-18 01:49:33
+++ main.c 2004-07-22 00:31:47
@@ -332,7 +332,7 @@ static pid_t do_cmd(char *cmd, char *mac
whole_file = 1;
if (dir)
free(dir);
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-03 20:18:02
@@ -129,6 +129,7 @@ char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
+
+ return result;
+}
---- orig/util.c 2004-08-13 07:18:59
+--- orig/util.c 2004-09-07 21:45:30
+++ util.c 2004-07-03 20:18:02
@@ -1217,3 +1217,55 @@ void *_realloc_array(void *ptr, unsigned
return malloc(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-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ 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 },
-@@ -1069,6 +1072,9 @@ void server_options(char **args,int *arg
+@@ -1074,6 +1077,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-08-03 15:34:32
+--- orig/receiver.c 2004-09-21 09:40:27
+++ receiver.c 2004-07-16 20:13:31
@@ -36,6 +36,7 @@ extern int preserve_hard_links;
extern int preserve_perms;
extern char *tmpdir;
extern char *partial_dir;
extern char *compare_dest;
-@@ -309,6 +310,12 @@ static int receive_data(int f_in, char *
+@@ -305,6 +306,12 @@ static int receive_data(int f_in, char *
exit_cleanup(RERR_FILEIO);
}
sum_end(file_sum1);
if (mapbuf)
---- orig/util.c 2004-08-13 07:18:59
+--- orig/util.c 2004-09-07 21:45:30
+++ util.c 2004-07-03 20:18:13
@@ -33,6 +33,7 @@ extern int module_id;
extern int modify_window;
Be sure to run "make proto" before "make".
---- orig/generator.c 2004-09-07 21:55:02
+--- orig/generator.c 2004-09-20 19:57:58
+++ generator.c 2004-07-30 18:11:15
@@ -43,6 +43,7 @@ extern int ignore_times;
extern int size_only;
/* 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-09-07 21:45:30
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-16 20:14:12
@@ -85,6 +85,7 @@ int safe_symlinks = 0;
int copy_unsafe_links = 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 },
-@@ -1092,6 +1095,9 @@ void server_options(char **args,int *arg
+@@ -1095,6 +1098,9 @@ void server_options(char **args,int *arg
}
}
--- orig/receiver.c 2004-09-07 21:57:20
+++ receiver.c 2004-07-30 18:21:38
-@@ -323,6 +323,27 @@ static int receive_data(int f_in, char *
+@@ -319,6 +319,27 @@ static int receive_data(int f_in, char *
}
static void discard_receive_data(int f_in, OFF_T length)
{
receive_data(f_in, NULL, -1, 0, NULL, -1, length);
-@@ -452,6 +473,10 @@ int recv_files(int f_in, struct file_lis
+@@ -448,6 +469,10 @@ int recv_files(int f_in, struct file_lis
case G2R_BACKUP:
fnamecmp = get_backup_name(fname);
break;
/* Log-message categories. FLOG is only used on the daemon side to
---- orig/rsync.yo 2004-09-07 19:54:51
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 19:27:25
@@ -356,6 +356,7 @@ verb(
-T --temp-dir=DIR create temporary files in directory DIR
You must run "make proto" before compiling.
---- orig/generator.c 2004-09-07 21:45:30
-+++ generator.c 2004-09-07 21:55:02
+--- orig/generator.c 2004-09-20 19:50:13
++++ generator.c 2004-09-20 19:57:58
@@ -254,14 +254,15 @@ static void generate_and_send_sums(int f
* out. It might be wrong.
*/
} else {
backupptr = NULL;
back_file = NULL;
-@@ -566,20 +567,33 @@ prepare_to_open:
+@@ -566,22 +567,38 @@ prepare_to_open:
if (verbose > 2)
rprintf(FINFO, "generating and sending sums for %d\n", i);
- if (f_copy >= 0) {
- close(f_copy);
- set_perms(backupptr, back_file, NULL, 0);
+- if (verbose > 1)
+- rprintf(FINFO, "backed up %s to %s\n", fname, backupptr);
- free(back_file);
+notify_others:
+ if (f_out_name >= 0) {
+
+ if (statret == 0) {
+ generate_and_send_sums(fd, st.st_size, f_out, f_copy);
-+ close(fd);
+
+ if (f_copy >= 0) {
+ close(f_copy);
+ set_perms(backupptr, back_file, NULL, 0);
++ if (verbose > 1) {
++ rprintf(FINFO, "backed up %s to %s\n",
++ fname, backupptr);
++ }
+ free(back_file);
+ }
++
++ close(fd);
+ } else
+ write_sum_head(f_out, NULL);
}
{
int i;
int phase = 0;
-@@ -620,7 +634,7 @@ void generate_files(int f_out, struct fi
+@@ -622,7 +639,7 @@ void generate_files(int f_out, struct fi
}
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
}
phase++;
-@@ -637,7 +651,7 @@ void generate_files(int f_out, struct fi
+@@ -639,7 +656,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++;
-@@ -656,7 +670,7 @@ void generate_files(int f_out, struct fi
+@@ -658,7 +675,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-08-05 18:24:21
+--- orig/main.c 2004-09-18 01:49:33
+++ main.c 2004-07-22 00:10:43
@@ -59,6 +59,7 @@ extern int filesfrom_fd;
extern pid_t cleanup_child_pid;
get_redo_num(); /* Read final MSG_DONE and any prior messages. */
report(-1);
---- orig/receiver.c 2004-09-07 21:45:30
+--- orig/receiver.c 2004-09-21 09:40:27
+++ receiver.c 2004-09-07 21:57:20
-@@ -333,7 +333,8 @@ static void discard_receive_data(int f_i
+@@ -329,7 +329,8 @@ static void discard_receive_data(int f_i
* main routine for receiver process.
*
* Receiver process runs on the same host as the generator process. */
{
int next_gen_i = -1;
int fd1,fd2;
-@@ -362,8 +363,13 @@ int recv_files(int f_in, struct file_lis
+@@ -358,8 +359,13 @@ int recv_files(int f_in, struct file_lis
i = read_int(f_in);
if (i == -1) {
if (read_batch) {
next_gen_i = -1;
}
-@@ -411,6 +417,8 @@ int recv_files(int f_in, struct file_lis
+@@ -407,6 +413,8 @@ int recv_files(int f_in, struct file_lis
if (read_batch) {
while (i > next_gen_i) {
next_gen_i = read_int(batch_gen_fd);
if (next_gen_i == -1)
next_gen_i = flist->count;
-@@ -421,6 +429,7 @@ int recv_files(int f_in, struct file_lis
+@@ -417,6 +425,7 @@ int recv_files(int f_in, struct file_lis
discard_receive_data(f_in, file->length);
continue;
}
}
if (server_exclude_list.head
-@@ -430,35 +439,31 @@ int recv_files(int f_in, struct file_lis
+@@ -426,35 +435,31 @@ int recv_files(int f_in, struct file_lis
exit_cleanup(RERR_PROTOCOL);
}
case '?':
/* Match anything but '/'. */
if (*text == '/')
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ 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 },
-@@ -1037,6 +1040,9 @@ void server_options(char **args,int *arg
+@@ -1042,6 +1045,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
char *partial_dir;
struct exclude_list_struct server_exclude_list;
---- orig/util.c 2004-08-13 07:18:59
+--- orig/util.c 2004-09-07 21:45:30
+++ util.c 2004-08-13 16:40:34
@@ -31,6 +31,7 @@ extern int verbose;
extern int dry_run;
+}
+
+#endif
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-08-13 18:13:18
@@ -126,6 +126,7 @@ char *log_format = NULL;
char *password_file = NULL;
/* 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 },
-@@ -620,6 +623,22 @@ int parse_arguments(int *argc, const cha
+@@ -616,6 +619,22 @@ 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). */
-@@ -1078,6 +1097,11 @@ void server_options(char **args,int *arg
+@@ -1083,6 +1102,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-08-03 15:34:32
+--- orig/receiver.c 2004-09-21 09:40:27
+++ receiver.c 2004-07-20 21:44:05
@@ -39,6 +39,7 @@ extern int io_error;
extern char *tmpdir;
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
-@@ -206,12 +207,13 @@ static int get_tmpname(char *fnametmp, c
+@@ -202,12 +203,13 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -231,6 +233,9 @@ static int receive_data(int f_in, char *
+@@ -227,6 +229,9 @@ static int receive_data(int f_in, char *
} else
mapbuf = NULL;
sum_init(checksum_seed);
while ((i = recv_token(f_in, &data)) != 0) {
-@@ -247,6 +252,8 @@ static int receive_data(int f_in, char *
+@@ -243,6 +248,8 @@ static int receive_data(int f_in, char *
cleanup_got_literal = 1;
sum_update(data,i);
if (fd != -1 && write_file(fd,data,i) != i)
goto report_write_error;
-@@ -271,6 +278,8 @@ static int receive_data(int f_in, char *
+@@ -267,6 +274,8 @@ static int receive_data(int f_in, char *
see_token(map, len);
sum_update(map,len);
}
if (inplace) {
-@@ -310,6 +319,8 @@ static int receive_data(int f_in, char *
+@@ -306,6 +315,8 @@ static int receive_data(int f_in, char *
}
sum_end(file_sum1);
if (mapbuf)
unmap_file(mapbuf);
-@@ -325,7 +336,7 @@ static int receive_data(int f_in, char *
+@@ -321,7 +332,7 @@ static int receive_data(int f_in, char *
static void discard_receive_data(int f_in, OFF_T length)
{
}
-@@ -541,8 +552,12 @@ int recv_files(int f_in, struct file_lis
+@@ -542,8 +553,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
log_recv(file, &initial_stats);
---- orig/rsync.c 2004-08-09 21:07:10
+--- orig/rsync.c 2004-09-07 21:45:30
+++ rsync.c 2004-08-13 18:14:34
@@ -34,6 +34,7 @@ extern int force_delete;
extern int recurse;
handle relative symlinks properly, and that has not yet been fixed
in this modified version.
---- orig/flist.c 2004-08-12 18:34:38
+--- orig/flist.c 2004-09-21 09:40:27
+++ flist.c 2004-07-16 16:58:04
-@@ -49,6 +49,7 @@ extern int filesfrom_fd;
+@@ -50,6 +50,7 @@ extern int filesfrom_fd;
extern int one_file_system;
extern int keep_dirlinks;
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_devices;
-@@ -724,6 +725,30 @@ void receive_file_entry(struct file_stru
+@@ -726,6 +727,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
-@@ -843,7 +868,13 @@ skip_excludes:
+@@ -845,7 +870,13 @@ skip_excludes:
basename_len = strlen(basename) + 1; /* count the '\0' */
#if SUPPORT_LINKS
#else
linkname_len = 0;
#endif
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-16 16:12:29
@@ -42,6 +42,7 @@ int archive_mode = 0;
int keep_dirlinks = 0;
---- orig/generator.c 2004-08-05 18:24:21
+--- orig/generator.c 2004-09-20 19:50:13
+++ generator.c 2004-07-03 20:20:46
-@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
+@@ -41,6 +41,7 @@ extern int make_backups;
extern int csum_length;
extern int ignore_times;
extern int size_only;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -333,6 +334,10 @@ static void recv_generator(char *fname,
+@@ -339,6 +340,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-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-08-13 18:26:04
@@ -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 },
-@@ -604,6 +608,33 @@ int parse_arguments(int *argc, const cha
+@@ -600,6 +604,33 @@ 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;
-@@ -983,6 +1014,11 @@ void server_options(char **args,int *arg
+@@ -989,6 +1020,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-08-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 20:20:46
@@ -345,6 +345,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-08-09 21:07:09
+--- orig/Makefile.in 2004-08-13 07:18:58
+++ 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 (*line == '#') {
/* it's some sort of command that I don't understand */
io_printf(f_out, "@ERROR: Unknown command '%s'\n", line);
---- orig/configure.in 2004-08-02 21:56:58
+--- orig/configure.in 2004-08-13 07:18:59
+++ configure.in 2004-07-03 20:22:28
@@ -271,6 +271,21 @@ yes
AC_SEARCH_LIBS(getaddrinfo, inet6)
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
---- orig/main.c 2004-08-05 18:24:21
+--- orig/main.c 2004-09-18 01:49:33
+++ main.c 2004-07-15 02:40:51
@@ -56,6 +56,9 @@ extern int write_batch;
extern int batch_fd;
+ host = argv[0] + url_prefix;
p = strchr(host,'/');
if (p) {
- *p = 0;
-@@ -820,12 +837,27 @@ static int start_client(int argc, char *
+ *p = '\0';
+@@ -825,12 +842,27 @@ static int start_client(int argc, char *
argv++;
} else { /* source is local */
am_sender = 1;
+ host = argv[argc-1] + url_prefix;
p = strchr(host,'/');
if (p) {
- *p = 0;
---- orig/options.c 2004-08-11 23:42:23
+ *p = '\0';
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-16 20:19:50
@@ -135,6 +135,14 @@ int quiet = 0;
int always_checksum = 0;
{0,0,0,0, 0, 0, 0}
};
-@@ -620,6 +647,12 @@ int parse_arguments(int *argc, const cha
+@@ -616,6 +643,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). */
-@@ -811,6 +844,17 @@ int parse_arguments(int *argc, const cha
+@@ -807,6 +840,17 @@ int parse_arguments(int *argc, const cha
if (do_progress && !verbose)
verbose = 1;
+ preserve_gid = 2;
+ }
}
---- orig/options.c 2004-09-18 01:49:33
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-09-09 01:59:08
@@ -358,8 +358,8 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
preserve_devices = 1;
}
-@@ -934,10 +942,16 @@ void server_options(char **args,int *arg
+@@ -938,10 +946,16 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
case MSG_INFO:
case MSG_ERROR:
if (remaining >= sizeof line) {
---- orig/main.c 2004-08-05 18:24:21
+--- orig/main.c 2004-09-18 01:49:33
+++ main.c 2004-08-13 08:24:23
@@ -42,6 +42,7 @@ extern int list_only;
extern int local_server;
if (argc == 0)
list_only = 1;
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-16 20:09:54
@@ -87,8 +87,10 @@ int size_only = 0;
int bwlimit = 0;
+ break;
+
case OPT_EXCLUDE:
- if (am_server || sanitize_paths)
- return 0; /* Impossible... */
-@@ -1090,6 +1099,9 @@ void server_options(char **args,int *arg
+ add_exclude(&exclude_list, poptGetOptArg(pc), 0);
+ break;
+@@ -1095,6 +1104,9 @@ void server_options(char **args,int *arg
}
}
*argc = ac;
return;
---- orig/receiver.c 2004-08-03 15:34:32
+--- orig/receiver.c 2004-09-21 09:40:27
+++ receiver.c 2004-08-13 08:38:51
@@ -45,6 +45,7 @@ extern char *backup_dir;
extern char *backup_suffix;
extern int module_id;
extern int ignore_errors;
extern int orig_umask;
-@@ -341,7 +342,7 @@ int recv_files(int f_in, struct file_lis
+@@ -337,7 +338,7 @@ int recv_files(int f_in, struct file_lis
char *fname, fbuf[MAXPATHLEN];
char template[MAXPATHLEN];
char fnametmp[MAXPATHLEN];
char fnamecmpbuf[MAXPATHLEN];
struct file_struct *file;
struct stats initial_stats;
-@@ -571,7 +572,12 @@ int recv_files(int f_in, struct file_lis
+@@ -572,7 +573,12 @@ int recv_files(int f_in, struct file_lis
cleanup_disable();
int msgtype = csum_length == SUM_LENGTH || read_batch ?
FERROR : FINFO;
if (msgtype == FERROR || verbose) {
-@@ -595,9 +601,8 @@ int recv_files(int f_in, struct file_lis
+@@ -596,9 +602,8 @@ int recv_files(int f_in, struct file_lis
keptstr, redostr);
}
if (csum_length != SUM_LENGTH) {
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-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-03 20:17:10
@@ -343,6 +343,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-08-03 15:34:32
+--- orig/sender.c 2004-09-20 05:10:48
+++ sender.c 2004-07-26 16:49:19
@@ -26,6 +26,7 @@ extern int io_error;
extern int dry_run;
extern int am_daemon;
+extern int delete_sent_files;
extern int protocol_version;
+ extern int make_backups;
extern struct stats stats;
-
-@@ -107,7 +108,29 @@ static struct sum_struct *receive_sums(i
+@@ -108,7 +109,29 @@ static struct sum_struct *receive_sums(i
return s;
}
void send_files(struct file_list *flist, int f_out, int f_in)
{
-@@ -125,6 +148,8 @@ void send_files(struct file_list *flist,
+@@ -127,6 +150,8 @@ void send_files(struct file_list *flist,
if (verbose > 2)
rprintf(FINFO, "send_files starting\n");
while (1) {
unsigned int offset;
-@@ -252,6 +277,9 @@ void send_files(struct file_list *flist,
+@@ -257,6 +282,9 @@ void send_files(struct file_list *flist,
rprintf(FINFO, "sender finished %s\n",
safe_fname(fname));
}
+ /* Flag that we actually sent this entry. */
+ file->flags |= FLAG_SENT;
}
+ make_backups = save_make_backups;
- if (verbose > 2)
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds - exiting\n",
(int)(t-last_io));
---- orig/options.c 2004-08-12 18:34:38
+--- orig/options.c 2004-09-20 05:10:48
+++ options.c 2004-07-15 17:06:09
@@ -96,6 +96,7 @@ int blocking_io = -1;
int checksum_seed = 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 },
-@@ -620,6 +626,36 @@ int parse_arguments(int *argc, const cha
+@@ -616,6 +622,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). */
-@@ -995,6 +1031,15 @@ void server_options(char **args,int *arg
+@@ -1001,6 +1037,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-08-13 07:18:59
+--- orig/rsync.yo 2004-09-20 05:10:48
+++ rsync.yo 2004-07-15 02:44:40
@@ -378,6 +378,8 @@ verb(
--log-format=FORMAT log file transfers using specified format
--write-batch=FILE write a batch to FILE
--read-batch=FILE read a batch from FILE
--checksum-seed=NUM set block/file checksum seed
-@@ -972,6 +974,19 @@ transfer was too fast, it will wait befo
+@@ -989,6 +991,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-08-13 07:18:59
+--- orig/util.c 2004-09-07 21:45:30
+++ util.c 2004-07-03 20:23:22
@@ -126,6 +126,132 @@ void overflow(char *str)
exit_cleanup(RERR_MALLOC);
the real dir (if it is present in the list) because that one
entry can't be turned into a symlink.
---- flist.c 12 Aug 2004 18:20:07 -0000 1.236
-+++ flist.c 31 Aug 2004 20:44:33 -0000
-@@ -724,6 +724,43 @@ void receive_file_entry(struct file_stru
+--- orig/flist.c 2004-09-21 09:40:27
++++ flist.c 2004-08-31 20:44:33
+@@ -726,6 +726,43 @@ 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
-@@ -802,9 +839,17 @@ struct file_struct *make_file(char *fnam
+@@ -804,9 +841,17 @@ struct file_struct *make_file(char *fnam
if (exclude_level == NO_EXCLUDES)
goto skip_excludes;