From 7628f1560a56ef7065bedd89cb5b10bb358c4327 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 20 Jun 2004 21:17:38 +0000 Subject: [PATCH] Updated to apply cleanly. --- ODBC-dblog.diff | 46 ++++++++-------- acls.diff | 56 +++++++++---------- atimes.diff | 58 ++++++++++---------- chmod-option.diff | 58 ++++++++++---------- date-only.diff | 40 +++++++------- dir-times.diff | 50 ++++++++--------- filter.diff | 58 ++++++++++---------- fname-convert.diff | 70 ++++++++++++------------ fsync.diff | 18 +++--- fuzzy.diff | 121 +++++++++++++++++++++-------------------- ignore-case.diff | 26 ++++----- inplace.diff | 26 ++++----- link-by-hash.diff | 42 +++++++------- max-size.diff | 14 ++--- openssl-support.diff | 48 ++++++++-------- remove-sent-files.diff | 46 ++++++++-------- time-limit.diff | 18 +++--- tru64.diff | 12 ++-- 18 files changed, 404 insertions(+), 403 deletions(-) diff --git a/ODBC-dblog.diff b/ODBC-dblog.diff index 070a4b8..78ac5bb 100644 --- a/ODBC-dblog.diff +++ b/ODBC-dblog.diff @@ -89,7 +89,7 @@ This patch adds the following options: --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 9 Jun 2004 15:34:50 -0000 ++++ Makefile.in 18 Jun 2004 17:21:24 -0000 @@ -32,7 +32,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \ zlib/zutil.o zlib/adler32.o @@ -100,7 +100,7 @@ This patch adds the following options: fileio.o batch.o clientname.o OBJS3=progress.o pipe.o --- cleanup.c 13 May 2004 07:08:18 -0000 1.22 -+++ cleanup.c 9 Jun 2004 15:34:50 -0000 ++++ cleanup.c 18 Jun 2004 17:21:24 -0000 @@ -140,7 +140,12 @@ void _exit_cleanup(int code, const char code = RERR_VANISHED; } @@ -115,9 +115,9 @@ This patch adds the following options: if (verbose > 2) { rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n", ---- clientserver.c 7 Jun 2004 22:33:01 -0000 1.124 -+++ clientserver.c 9 Jun 2004 15:34:50 -0000 -@@ -313,6 +313,9 @@ static int rsync_module(int f_in, int f_ +--- clientserver.c 13 Jun 2004 14:18:48 -0000 1.127 ++++ clientserver.c 18 Jun 2004 17:21:24 -0000 +@@ -315,6 +315,9 @@ static int rsync_module(int f_in, int f_ exclude_path_prefix = NULL; log_init(); @@ -127,7 +127,7 @@ This patch adds the following options: if (use_chroot) { /* -@@ -426,6 +429,9 @@ static int rsync_module(int f_in, int f_ +@@ -433,6 +436,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); @@ -138,7 +138,7 @@ This patch adds the following options: rprintf(FLOG, "rsync %s %s from %s (%s)\n", am_sender ? "on" : "to", --- configure.in 30 Apr 2004 18:03:33 -0000 1.196 -+++ configure.in 9 Jun 2004 15:34:50 -0000 ++++ configure.in 18 Jun 2004 17:21:24 -0000 @@ -94,6 +94,8 @@ AC_ARG_WITH(rsync-path, [ --with-rsync-path=PATH set default --rsync-path to PATH (default: rsync)], [ RSYNC_PATH="$with_rsync_path" ], @@ -164,7 +164,7 @@ This patch adds the following options: if test x"$with_included_popt" = x"yes" then --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ dblog-tables-mysql.sql 9 Jun 2004 15:34:50 -0000 ++++ dblog-tables-mysql.sql 18 Jun 2004 17:21:24 -0000 @@ -0,0 +1,43 @@ +drop table transfer; +drop table exit; @@ -210,7 +210,7 @@ This patch adds the following options: + foreign key (session_id) references session (id) +); --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ dblog-tables-postgresql.sql 9 Jun 2004 15:34:50 -0000 ++++ dblog-tables-postgresql.sql 18 Jun 2004 17:21:24 -0000 @@ -0,0 +1,45 @@ +drop table transfer; +drop table exit; @@ -258,7 +258,7 @@ This patch adds the following options: + foreign key (session_id) references session (id) +); --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ dblog.c 9 Jun 2004 15:34:50 -0000 ++++ dblog.c 18 Jun 2004 17:21:24 -0000 @@ -0,0 +1,352 @@ +/* + * ODBC Database logging functions @@ -613,7 +613,7 @@ This patch adds the following options: + } +} --- loadparm.c 19 May 2004 22:19:19 -0000 1.51 -+++ loadparm.c 9 Jun 2004 15:34:51 -0000 ++++ loadparm.c 18 Jun 2004 17:21:25 -0000 @@ -123,6 +123,17 @@ typedef struct BOOL list; BOOL use_chroot; @@ -687,7 +687,7 @@ This patch adds the following options: FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable) FN_LOCAL_STRING(lp_uid, uid) --- log.c 7 Jun 2004 22:51:14 -0000 1.74 -+++ log.c 9 Jun 2004 15:34:51 -0000 ++++ log.c 18 Jun 2004 17:21:25 -0000 @@ -75,7 +75,7 @@ struct { /* * Map from rsync error code to name, or return NULL. @@ -697,21 +697,21 @@ This patch adds the following options: { int i; for (i = 0; rerr_names[i].name; i++) { ---- main.c 19 May 2004 22:19:19 -0000 1.195 -+++ main.c 9 Jun 2004 15:34:51 -0000 -@@ -120,6 +120,9 @@ static void report(int f) +--- main.c 18 Jun 2004 16:50:20 -0000 1.198 ++++ main.c 18 Jun 2004 17:21:25 -0000 +@@ -121,6 +121,9 @@ static void report(int f) if (am_daemon) { log_exit(0, __FILE__, __LINE__); +#ifdef HAVE_LIBODBC + db_log_exit(0,__FILE__,__LINE__); +#endif - if (f == -1 || !am_sender) return; + if (f == -1 || !am_sender) + return; } - ---- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 9 Jun 2004 15:34:51 -0000 -@@ -456,7 +456,9 @@ int recv_files(int f_in,struct file_list +--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82 ++++ receiver.c 18 Jun 2004 17:21:25 -0000 +@@ -461,7 +461,9 @@ int recv_files(int f_in,struct file_list recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length); log_recv(file, &initial_stats); @@ -722,10 +722,10 @@ This patch adds the following options: if (mapbuf) unmap_file(mapbuf); if (fd1 != -1) { close(fd1); ---- sender.c 15 May 2004 19:31:10 -0000 1.40 -+++ sender.c 9 Jun 2004 15:34:51 -0000 +--- sender.c 18 Jun 2004 16:55:12 -0000 1.41 ++++ sender.c 18 Jun 2004 17:21:25 -0000 @@ -281,6 +281,9 @@ void send_files(struct file_list *flist, - } else { + } else { /* not read_batch */ match_sums(f_out, s, mbuf, st.st_size); log_send(file, &initial_stats); +#ifdef HAVE_LIBODBC diff --git a/acls.diff b/acls.diff index 8b1a978..81f8bd8 100644 --- a/acls.diff +++ b/acls.diff @@ -8,7 +8,7 @@ After applying this patch, run these commands for a successful build: --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 6 Jun 2004 21:11:46 -0000 ++++ Makefile.in 18 Jun 2004 17:21:45 -0000 @@ -25,7 +25,7 @@ VERSION=@VERSION@ .SUFFIXES: .SUFFIXES: .c .o @@ -28,7 +28,7 @@ After applying this patch, run these commands for a successful build: 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 \ --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ acls.c 6 Jun 2004 21:11:46 -0000 ++++ acls.c 18 Jun 2004 17:21:45 -0000 @@ -0,0 +1,1119 @@ +/* -*- c-file-style: "linux" -*- + Copyright (C) Andrew Tridgell 1996 @@ -1149,8 +1149,8 @@ After applying this patch, run these commands for a successful build: + + +#endif /* SUPPORT_ACLS */ ---- backup.c 15 May 2004 19:31:10 -0000 1.31 -+++ backup.c 6 Jun 2004 21:11:46 -0000 +--- backup.c 10 Jun 2004 16:43:52 -0000 1.32 ++++ backup.c 18 Jun 2004 17:21:45 -0000 @@ -105,6 +105,7 @@ static int make_bak_dir(char *fullpath) } else { do_lchown(fullpath, st.st_uid, st.st_gid); @@ -1159,7 +1159,7 @@ After applying this patch, run these commands for a successful build: } } *p = '/'; -@@ -165,6 +166,8 @@ static int keep_backup(char *fname) +@@ -167,6 +168,8 @@ static int keep_backup(char *fname) return 0; } @@ -1168,7 +1168,7 @@ After applying this patch, run these commands for a successful build: #ifdef HAVE_MKNOD /* Check to see if this is a device file, or link */ if (IS_DEVICE(file->mode)) { -@@ -235,6 +238,7 @@ static int keep_backup(char *fname) +@@ -237,6 +240,7 @@ static int keep_backup(char *fname) } } set_perms(backup_dir_buf, file, NULL, 0); @@ -1177,7 +1177,7 @@ After applying this patch, run these commands for a successful build: if (verbose > 1) --- configure.in 30 Apr 2004 18:03:33 -0000 1.196 -+++ configure.in 6 Jun 2004 21:11:46 -0000 ++++ configure.in 18 Jun 2004 17:21:45 -0000 @@ -434,6 +434,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no AC_CHECK_LIB(resolv, strcasecmp) fi @@ -1265,9 +1265,9 @@ After applying this patch, run these commands for a successful build: AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT ---- flist.c 29 May 2004 21:21:17 -0000 1.226 -+++ flist.c 6 Jun 2004 21:11:47 -0000 -@@ -927,6 +927,8 @@ void send_file_name(int f, struct file_l +--- flist.c 18 Jun 2004 16:29:21 -0000 1.231 ++++ flist.c 18 Jun 2004 17:21:46 -0000 +@@ -945,6 +945,8 @@ void send_file_name(int f, struct file_l if (!file) return; @@ -1276,7 +1276,7 @@ After applying this patch, run these commands for a successful build: maybe_emit_filelist_progress(flist); -@@ -938,6 +940,10 @@ void send_file_name(int f, struct file_l +@@ -956,6 +958,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); @@ -1287,7 +1287,7 @@ After applying this patch, run these commands for a successful build: } if (recursive && S_ISDIR(file->mode) -@@ -1255,6 +1261,8 @@ struct file_list *recv_file_list(int f) +@@ -1274,6 +1280,8 @@ struct file_list *recv_file_list(int f) flags |= read_byte(f) << 8; receive_file_entry(&flist->files[i], flags, flist, f); @@ -1296,7 +1296,7 @@ After applying this patch, run these commands for a successful build: if (S_ISREG(flist->files[i]->mode)) stats.total_size += flist->files[i]->length; -@@ -1277,6 +1285,8 @@ struct file_list *recv_file_list(int f) +@@ -1296,6 +1304,8 @@ struct file_list *recv_file_list(int f) clean_flist(flist, relative_paths, 1); @@ -1305,9 +1305,9 @@ After applying this patch, run these commands for a successful build: if (f != -1) { /* Now send the uid/gid list. This was introduced in * protocol version 15 */ ---- generator.c 5 Jun 2004 16:16:30 -0000 1.86 -+++ generator.c 6 Jun 2004 21:11:47 -0000 -@@ -353,6 +353,10 @@ void recv_generator(char *fname, struct +--- generator.c 18 Jun 2004 16:30:24 -0000 1.88 ++++ generator.c 18 Jun 2004 17:21:46 -0000 +@@ -345,6 +345,10 @@ void recv_generator(char *fname, struct if (set_perms(fname, file, statret ? NULL : &st, 0) && verbose && f_out != -1) rprintf(FINFO,"%s/\n",fname); @@ -1319,7 +1319,7 @@ After applying this patch, run these commands for a successful build: } --- mkproto.awk 1 Jan 2004 21:10:50 -0000 1.6 -+++ mkproto.awk 6 Jun 2004 21:11:47 -0000 ++++ mkproto.awk 18 Jun 2004 17:21:46 -0000 @@ -58,7 +58,7 @@ BEGIN { next; } @@ -1329,8 +1329,8 @@ After applying this patch, run these commands for a successful build: next; } ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:11:47 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:21:46 -0000 @@ -43,6 +43,7 @@ int keep_dirlinks = 0; int copy_links = 0; int preserve_links = 0; @@ -1386,7 +1386,7 @@ After applying this patch, run these commands for a successful build: {"read-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_READ_BATCH, 0, 0 }, {"write-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_WRITE_BATCH, 0, 0 }, {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 }, -@@ -601,6 +609,31 @@ int parse_arguments(int *argc, const cha +@@ -596,6 +604,31 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -1418,7 +1418,7 @@ After applying this patch, run these commands for a successful build: default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -838,6 +871,8 @@ void server_options(char **args,int *arg +@@ -833,6 +866,8 @@ void server_options(char **args,int *arg if (preserve_hard_links) argstr[x++] = 'H'; @@ -1427,8 +1427,8 @@ After applying this patch, run these commands for a successful build: if (preserve_uid) argstr[x++] = 'o'; if (preserve_gid) ---- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 6 Jun 2004 21:11:47 -0000 +--- rsync.c 11 Jun 2004 07:40:45 -0000 1.141 ++++ rsync.c 18 Jun 2004 17:21:46 -0000 @@ -204,6 +204,14 @@ int set_perms(char *fname,struct file_st } #endif @@ -1445,7 +1445,7 @@ After applying this patch, run these commands for a successful build: if (updated) rprintf(FINFO,"%s\n",fname); --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 6 Jun 2004 21:11:47 -0000 ++++ rsync.h 18 Jun 2004 17:21:47 -0000 @@ -538,6 +538,40 @@ static inline int flist_up(struct file_l #include "lib/permstring.h" #include "lib/addrinfo.h" @@ -1488,7 +1488,7 @@ After applying this patch, run these commands for a successful build: /* We have replacement versions of these if they're missing. */ --- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 -+++ rsync.yo 6 Jun 2004 21:11:48 -0000 ++++ rsync.yo 18 Jun 2004 17:21:47 -0000 @@ -296,6 +296,7 @@ verb( --safe-links ignore "unsafe" symlinks -H, --hard-links preserve hard links @@ -1510,7 +1510,7 @@ After applying this patch, run these commands for a successful build: destination file to be the same as the source file. On most systems, only the super-user can set file ownership. By default, the preservation --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ smb_acls.h 6 Jun 2004 21:11:48 -0000 ++++ smb_acls.h 18 Jun 2004 17:21:47 -0000 @@ -0,0 +1,277 @@ +/* + Unix SMB/Netbios implementation. @@ -1790,7 +1790,7 @@ After applying this patch, run these commands for a successful build: +#endif /* No ACLs. */ +#endif /* _SMB_ACLS_H */ --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ sysacls.c 6 Jun 2004 21:11:49 -0000 ++++ sysacls.c 18 Jun 2004 17:21:48 -0000 @@ -0,0 +1,3117 @@ +/* + Unix SMB/Netbios implementation. @@ -4910,7 +4910,7 @@ After applying this patch, run these commands for a successful build: + +#endif /* No ACLs. */ --- uidlist.c 28 Apr 2004 17:31:31 -0000 1.24 -+++ uidlist.c 6 Jun 2004 21:11:49 -0000 ++++ uidlist.c 18 Jun 2004 17:21:48 -0000 @@ -34,6 +34,7 @@ extern int verbose; extern int preserve_uid; diff --git a/atimes.diff b/atimes.diff index 4260779..271557f 100644 --- a/atimes.diff +++ b/atimes.diff @@ -5,7 +5,7 @@ command before "make": --- batch.c 15 May 2004 19:31:10 -0000 1.32 -+++ batch.c 9 Jun 2004 21:57:00 -0000 ++++ batch.c 18 Jun 2004 17:23:13 -0000 @@ -335,6 +335,8 @@ void show_flist(int index, struct file_s rprintf(FINFO, "flist->flags=%#x\n", fptr[i]->flags); rprintf(FINFO, "flist->modtime=%#lx\n", @@ -15,17 +15,17 @@ command before "make": rprintf(FINFO, "flist->length=%.0f\n", (double) fptr[i]->length); rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode); ---- flist.c 9 Jun 2004 19:23:56 -0000 1.228 -+++ flist.c 9 Jun 2004 21:57:00 -0000 -@@ -57,6 +57,7 @@ extern int relative_paths; +--- flist.c 18 Jun 2004 16:29:21 -0000 1.231 ++++ flist.c 18 Jun 2004 17:23:13 -0000 +@@ -58,6 +58,7 @@ extern int relative_paths; extern int implied_dirs; extern int copy_links; extern int copy_unsafe_links; +extern int copy_atimes; extern int protocol_version; extern int sanitize_paths; - -@@ -140,17 +141,17 @@ static void list_file_entry(struct file_ + extern int delete_excluded; +@@ -144,17 +145,17 @@ static void list_file_entry(struct file_ #if SUPPORT_LINKS if (preserve_links && S_ISLNK(f->mode)) { @@ -47,7 +47,7 @@ command before "make": } } -@@ -324,6 +325,7 @@ void send_file_entry(struct file_struct +@@ -335,6 +336,7 @@ void send_file_entry(struct file_struct { unsigned short flags; static time_t modtime; @@ -55,7 +55,7 @@ command before "make": static mode_t mode; static uint64 dev; static dev_t rdev; -@@ -339,7 +341,7 @@ void send_file_entry(struct file_struct +@@ -350,7 +352,7 @@ void send_file_entry(struct file_struct if (!file) { write_byte(f, 0); @@ -64,7 +64,7 @@ command before "make": dev = 0, rdev = makedev(0, 0); rdev_major = 0; uid = 0, gid = 0; -@@ -388,6 +390,12 @@ void send_file_entry(struct file_struct +@@ -399,6 +401,12 @@ void send_file_entry(struct file_struct flags |= XMIT_SAME_TIME; else modtime = file->modtime; @@ -77,7 +77,7 @@ command before "make": #if SUPPORT_HARD_LINKS if (file->link_u.idev) { -@@ -443,6 +451,8 @@ void send_file_entry(struct file_struct +@@ -454,6 +462,8 @@ void send_file_entry(struct file_struct write_int(f, modtime); if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); @@ -86,15 +86,15 @@ command before "make": if (preserve_uid && !(flags & XMIT_SAME_UID)) { if (!numeric_ids) add_uid(uid); -@@ -516,6 +526,7 @@ void receive_file_entry(struct file_stru - struct file_list *flist, int f) +@@ -527,6 +537,7 @@ void receive_file_entry(struct file_stru + struct file_list *flist, int f) { static time_t modtime; + static time_t atime; static mode_t mode; static uint64 dev; static dev_t rdev; -@@ -532,7 +543,7 @@ void receive_file_entry(struct file_stru +@@ -543,7 +554,7 @@ void receive_file_entry(struct file_stru struct file_struct *file; if (!fptr) { @@ -103,7 +103,7 @@ command before "make": dev = 0, rdev = makedev(0, 0); rdev_major = 0; uid = 0, gid = 0; -@@ -587,6 +598,8 @@ void receive_file_entry(struct file_stru +@@ -598,6 +609,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)); @@ -112,7 +112,7 @@ command before "make": if (preserve_uid && !(flags & XMIT_SAME_UID)) uid = (uid_t)read_int(f); -@@ -637,6 +650,7 @@ void receive_file_entry(struct file_stru +@@ -648,6 +661,7 @@ void receive_file_entry(struct file_stru file->flags = flags & XMIT_TOP_DIR ? FLAG_TOP_DIR : 0; file->modtime = modtime; @@ -120,7 +120,7 @@ command before "make": file->length = file_length; file->mode = mode; file->uid = uid; -@@ -857,6 +871,7 @@ skip_excludes: +@@ -867,6 +881,7 @@ skip_excludes: file->flags = flags; file->modtime = st.st_mtime; @@ -128,9 +128,9 @@ command before "make": file->length = st.st_size; file->mode = st.st_mode; file->uid = st.st_uid; ---- generator.c 5 Jun 2004 16:16:30 -0000 1.86 -+++ generator.c 9 Jun 2004 21:57:00 -0000 -@@ -101,7 +101,7 @@ static int skip_file(char *fname, struct +--- generator.c 18 Jun 2004 16:30:24 -0000 1.88 ++++ generator.c 18 Jun 2004 17:23:14 -0000 +@@ -102,7 +102,7 @@ static int skip_file(char *fname, struct return 0; } @@ -139,7 +139,7 @@ command before "make": } -@@ -491,7 +491,7 @@ void recv_generator(char *fname, struct +@@ -485,7 +485,7 @@ void recv_generator(char *fname, struct return; } @@ -149,7 +149,7 @@ command before "make": rprintf(FINFO,"%s is newer\n",fname); return; --- options.c 7 Jun 2004 22:05:22 -0000 1.156 -+++ options.c 9 Jun 2004 21:57:01 -0000 ++++ options.c 18 Jun 2004 17:23:14 -0000 @@ -48,6 +48,7 @@ int preserve_devices = 0; int preserve_uid = 0; int preserve_gid = 0; @@ -183,8 +183,8 @@ command before "make": if (preserve_perms) argstr[x++] = 'p'; if (recurse) ---- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 9 Jun 2004 21:57:01 -0000 +--- rsync.c 11 Jun 2004 07:40:45 -0000 1.141 ++++ rsync.c 18 Jun 2004 17:23:14 -0000 @@ -25,6 +25,7 @@ extern int verbose; extern int dry_run; @@ -230,7 +230,7 @@ command before "make": change_uid = am_root && preserve_uid && st->st_uid != file->uid; --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 9 Jun 2004 21:57:01 -0000 ++++ rsync.h 18 Jun 2004 17:23:14 -0000 @@ -54,6 +54,7 @@ #define XMIT_HAS_IDEV_DATA (1<<9) #define XMIT_SAME_DEV (1<<10) @@ -256,7 +256,7 @@ command before "make": gid_t gid; mode_t mode; --- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 -+++ rsync.yo 9 Jun 2004 21:57:02 -0000 ++++ rsync.yo 18 Jun 2004 17:23:15 -0000 @@ -300,6 +300,7 @@ verb( -g, --group preserve group -D, --devices preserve devices (root only) @@ -278,7 +278,7 @@ command before "make": instead it will just report the actions it would have taken. --- tls.c 15 May 2004 19:09:42 -0000 1.20 -+++ tls.c 9 Jun 2004 21:57:02 -0000 ++++ tls.c 18 Jun 2004 17:23:15 -0000 @@ -39,6 +39,7 @@ @@ -415,7 +415,7 @@ command before "make": return 0; } --- util.c 9 Jun 2004 21:51:07 -0000 1.149 -+++ util.c 9 Jun 2004 21:57:02 -0000 ++++ util.c 18 Jun 2004 17:23:15 -0000 @@ -127,31 +127,39 @@ void overflow(char *str) @@ -483,7 +483,7 @@ command before "make": if (file2 > file1) { if (file2 - file1 <= modify_window) --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ testsuite/copy-atimes.test 9 Jun 2004 21:57:02 -0000 ++++ testsuite/copy-atimes.test 18 Jun 2004 17:23:15 -0000 @@ -0,0 +1,19 @@ +#! /bin/sh + @@ -505,7 +505,7 @@ command before "make": +# The script would have aborted on error, so getting here means we've won. +exit 0 --- testsuite/rsync.fns 18 May 2004 00:41:55 -0000 1.60 -+++ testsuite/rsync.fns 9 Jun 2004 21:57:02 -0000 ++++ testsuite/rsync.fns 18 Jun 2004 17:23:15 -0000 @@ -50,7 +50,7 @@ printmsg() { diff --git a/chmod-option.diff b/chmod-option.diff index 0886dbc..3fb8615 100644 --- a/chmod-option.diff +++ b/chmod-option.diff @@ -4,8 +4,8 @@ command before "make": make proto ---- Makefile.in 2 May 2004 17:04:14 -0000 1.100 -+++ Makefile.in 13 May 2004 18:36:43 -0000 +--- Makefile.in 15 May 2004 00:48:11 -0000 1.101 ++++ Makefile.in 18 Jun 2004 17:22:08 -0000 @@ -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 \ main.o checksum.o match.o syscall.o log.o backup.o @@ -16,7 +16,7 @@ command before "make": 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 \ --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ chmod.c 13 May 2004 18:36:43 -0000 ++++ chmod.c 18 Jun 2004 17:22:08 -0000 @@ -0,0 +1,184 @@ +#include "rsync.h" + @@ -202,8 +202,8 @@ command before "make": + } + return 0; +} ---- flist.c 11 May 2004 17:25:16 -0000 1.221 -+++ flist.c 13 May 2004 18:36:43 -0000 +--- flist.c 18 Jun 2004 16:29:21 -0000 1.231 ++++ flist.c 18 Jun 2004 17:22:08 -0000 @@ -33,6 +33,7 @@ extern int verbose; extern int do_progress; extern int am_root; @@ -212,7 +212,7 @@ command before "make": extern int am_daemon; extern int always_checksum; extern int module_id; -@@ -63,6 +64,8 @@ extern int sanitize_paths; +@@ -67,6 +68,8 @@ extern int list_only; extern int read_batch; extern int write_batch; @@ -221,7 +221,7 @@ command before "make": extern struct exclude_list_struct exclude_list; extern struct exclude_list_struct server_exclude_list; extern struct exclude_list_struct local_exclude_list; -@@ -853,7 +856,10 @@ skip_excludes: +@@ -868,7 +871,10 @@ skip_excludes: file->flags = flags; file->modtime = st.st_mtime; file->length = st.st_size; @@ -233,9 +233,9 @@ command before "make": file->uid = st.st_uid; file->gid = st.st_gid; ---- options.c 6 May 2004 21:08:01 -0000 1.148 -+++ options.c 13 May 2004 18:36:43 -0000 -@@ -121,6 +121,7 @@ char *log_format = NULL; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:22:08 -0000 +@@ -124,6 +124,7 @@ char *log_format = NULL; char *password_file = NULL; char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; @@ -243,7 +243,7 @@ command before "make": char backup_dir_buf[MAXPATHLEN]; int rsync_port = RSYNC_PORT; int link_dest = 0; -@@ -134,6 +135,8 @@ int list_only = 0; +@@ -137,6 +138,8 @@ int list_only = 0; #define MAX_BATCH_PREFIX_LEN 256 /* Must be less than MAXPATHLEN-13 */ char *batch_prefix = NULL; @@ -252,7 +252,7 @@ command before "make": static int daemon_opt; /* sets am_daemon after option error-reporting */ static int modify_window_set; -@@ -241,6 +244,7 @@ void usage(enum logcode F) +@@ -245,6 +248,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"); @@ -260,7 +260,7 @@ command before "make": 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"); -@@ -344,6 +348,7 @@ static struct poptOption long_options[] +@@ -350,6 +354,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 }, @@ -268,7 +268,7 @@ command before "make": {"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 }, -@@ -720,6 +725,13 @@ int parse_arguments(int *argc, const cha +@@ -730,6 +735,13 @@ int parse_arguments(int *argc, const cha exit_cleanup(RERR_SYNTAX); } @@ -282,21 +282,21 @@ command before "make": if (do_progress && !verbose) verbose = 1; -@@ -951,6 +963,11 @@ void server_options(char **args,int *arg - */ - args[ac++] = link_dest ? "--link-dest" : "--compare-dest"; +@@ -977,6 +989,11 @@ void server_options(char **args,int *arg args[ac++] = compare_dest; -+ } -+ + } + + if (chmod_mode && !am_sender) { + args[ac++] = "--chmod"; + args[ac++] = chmod_mode; - } - ++ } ++ if (files_from && (!am_sender || remote_filesfrom_file)) { ---- rsync.yo 7 May 2004 00:18:37 -0000 1.169 -+++ rsync.yo 13 May 2004 18:36:44 -0000 -@@ -299,6 +299,7 @@ verb( + if (remote_filesfrom_file) { + args[ac++] = "--files-from"; +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 18 Jun 2004 17:22:09 -0000 +@@ -300,6 +300,7 @@ verb( -g, --group preserve group -D, --devices preserve devices (root only) -t, --times preserve times @@ -304,11 +304,10 @@ command before "make": -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy whole files, no incremental checks -@@ -545,6 +546,14 @@ modified cannot be effective; in other w - cause the next transfer to behave as if it used -I, and all files will have +@@ -552,6 +553,14 @@ cause the next transfer to behave as if their checksums compared and show up in log messages even if they haven't changed. -+ + +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 +parsing rules specified in the chmod manpage, you can specify an item that @@ -316,11 +315,12 @@ command before "make": +item that should only apply to a file by prefixing it with a 'F'. For example: + +quote(--chmod=Dg+s,ug+w,Fo-w,+X) - ++ 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. + --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ testsuite/chmod.test 13 May 2004 18:36:44 -0000 ++++ testsuite/chmod.test 18 Jun 2004 17:22:09 -0000 @@ -0,0 +1,43 @@ +#! /bin/sh + diff --git a/date-only.diff b/date-only.diff index 03e83dc..10e70ff 100644 --- a/date-only.diff +++ b/date-only.diff @@ -15,17 +15,17 @@ Jeremy Bornstein [Patched update to have context and apply to latest CVS source.] ---- generator.c 18 May 2004 08:50:17 -0000 1.85 -+++ generator.c 4 Jun 2004 05:20:27 -0000 -@@ -51,6 +51,7 @@ extern int list_only; - extern int only_existing; - extern int orig_umask; - extern int safe_symlinks; +--- generator.c 18 Jun 2004 16:30:24 -0000 1.88 ++++ generator.c 18 Jun 2004 17:23:46 -0000 +@@ -39,6 +39,7 @@ extern int opt_ignore_existing; + extern int csum_length; + extern int ignore_times; + extern int size_only; +extern int date_only; - - extern struct exclude_list_struct server_exclude_list; - -@@ -58,6 +59,8 @@ extern struct exclude_list_struct server + extern int io_timeout; + extern int protocol_version; + extern int always_checksum; +@@ -60,6 +61,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) { @@ -34,9 +34,9 @@ Jeremy Bornstein if (st->st_size != file->length) { return 0; } ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 4 Jun 2004 05:20:27 -0000 -@@ -82,6 +82,7 @@ int keep_partial = 0; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:23:47 -0000 +@@ -84,6 +84,7 @@ int keep_partial = 0; int safe_symlinks = 0; int copy_unsafe_links = 0; int size_only = 0; @@ -44,7 +44,7 @@ Jeremy Bornstein int bwlimit = 0; size_t bwlimit_writemax = 0; int delete_after = 0; -@@ -263,6 +264,7 @@ void usage(enum logcode F) +@@ -266,6 +267,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"); @@ -52,7 +52,7 @@ Jeremy Bornstein 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"); -@@ -318,6 +320,7 @@ static struct poptOption long_options[] +@@ -321,6 +323,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 }, @@ -60,7 +60,7 @@ Jeremy Bornstein {"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 }, -@@ -918,6 +921,9 @@ void server_options(char **args,int *arg +@@ -924,6 +927,9 @@ void server_options(char **args,int *arg if (size_only) args[ac++] = "--size-only"; @@ -70,9 +70,9 @@ Jeremy Bornstein if (modify_window_set) { if (asprintf(&arg, "--modify-window=%d", modify_window) < 0) goto oom; ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 4 Jun 2004 05:20:28 -0000 -@@ -320,6 +320,7 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 18 Jun 2004 17:23:47 -0000 +@@ -321,6 +321,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) @@ -80,7 +80,7 @@ Jeremy Bornstein --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 -@@ -394,6 +395,12 @@ regardless of timestamp. This is useful +@@ -395,6 +396,12 @@ regardless of timestamp. This is useful after using another mirroring system which may not preserve timestamps exactly. diff --git a/dir-times.diff b/dir-times.diff index 064014e..ec7e23b 100644 --- a/dir-times.diff +++ b/dir-times.diff @@ -1,6 +1,6 @@ ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 4 Jun 2004 05:26:50 -0000 -@@ -46,6 +46,7 @@ int preserve_devices = 0; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:25:12 -0000 +@@ -48,6 +48,7 @@ int preserve_devices = 0; int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; @@ -8,7 +8,7 @@ int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -241,7 +242,8 @@ void usage(enum logcode F) +@@ -244,7 +245,8 @@ void usage(enum logcode F) rprintf(F," -o, --owner preserve owner (root only)\n"); rprintf(F," -g, --group preserve group\n"); rprintf(F," -D, --devices preserve devices (root only)\n"); @@ -18,7 +18,7 @@ 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"); -@@ -348,6 +350,7 @@ static struct poptOption long_options[] +@@ -352,6 +354,7 @@ static struct poptOption long_options[] {"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 }, {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 }, @@ -26,7 +26,7 @@ {"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 }, -@@ -835,6 +838,8 @@ void server_options(char **args,int *arg +@@ -841,6 +844,8 @@ void server_options(char **args,int *arg argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; @@ -35,8 +35,8 @@ if (preserve_perms) argstr[x++] = 'p'; if (recurse) ---- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 4 Jun 2004 05:26:50 -0000 +--- rsync.c 11 Jun 2004 07:40:45 -0000 1.141 ++++ rsync.c 18 Jun 2004 17:25:12 -0000 @@ -25,6 +25,7 @@ extern int verbose; extern int dry_run; @@ -69,9 +69,9 @@ rsyserr(FERROR, errno, "failed to set times on %s", full_fname(fname)); return 0; ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 4 Jun 2004 05:26:51 -0000 -@@ -298,7 +298,8 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 18 Jun 2004 17:25:13 -0000 +@@ -299,7 +299,8 @@ verb( -o, --owner preserve owner (root only) -g, --group preserve group -D, --devices preserve devices (root only) @@ -81,7 +81,7 @@ -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy whole files, no incremental checks -@@ -539,14 +540,23 @@ dit(bf(-D, --devices)) This option cause +@@ -544,14 +545,23 @@ dit(bf(-D, --devices)) This option cause block device information to the remote system to recreate these devices. This option is only available to the super-user. @@ -108,7 +108,7 @@ instead it will just report the actions it would have taken. --- testsuite/chgrp.test 21 May 2004 10:06:09 -0000 1.12 -+++ testsuite/chgrp.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/chgrp.test 18 Jun 2004 17:25:13 -0000 @@ -26,7 +26,7 @@ do done sleep 2 @@ -119,7 +119,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/chown.test 18 May 2004 00:41:35 -0000 1.5 -+++ testsuite/chown.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/chown.test 18 Jun 2004 17:25:13 -0000 @@ -28,7 +28,7 @@ chown 5001 "$name2" || test_skipped "Can chgrp 5002 "$name1" || test_skipped "Can't chgrp (probably need root)" chgrp 5003 "$name2" || test_skipped "Can't chgrp (probably need root)" @@ -130,7 +130,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/daemon-gzip-download.test 18 May 2004 00:41:51 -0000 1.7 -+++ testsuite/daemon-gzip-download.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/daemon-gzip-download.test 18 Jun 2004 17:25:13 -0000 @@ -29,9 +29,9 @@ export RSYNC_CONNECT_PROG hands_setup @@ -144,7 +144,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/daemon-gzip-upload.test 18 May 2004 00:41:51 -0000 1.7 -+++ testsuite/daemon-gzip-upload.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/daemon-gzip-upload.test 18 Jun 2004 17:25:13 -0000 @@ -23,9 +23,9 @@ export RSYNC_CONNECT_PROG hands_setup @@ -158,7 +158,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/devices.test 18 May 2004 00:41:35 -0000 1.8 -+++ testsuite/devices.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/devices.test 18 Jun 2004 17:25:13 -0000 @@ -29,7 +29,7 @@ mknod "$fromdir/block" b 42 69 || test_s mknod "$fromdir/block2" b 42 73 || test_skipped "Can't create block device node unless root" mknod "$fromdir/block3" b 105 73 || test_skipped "Can't create block device node unless root" @@ -169,7 +169,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/duplicates.test 18 May 2004 00:41:35 -0000 1.10 -+++ testsuite/duplicates.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/duplicates.test 18 Jun 2004 17:25:13 -0000 @@ -33,7 +33,7 @@ ln -s "$name1" "$name2" || fail "can't c outfile="$scratchdir/rsync.out" @@ -180,7 +180,7 @@ # Make sure each file was only copied once... --- testsuite/exclude.test 24 May 2004 00:16:07 -0000 1.8 -+++ testsuite/exclude.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/exclude.test 18 Jun 2004 17:25:13 -0000 @@ -66,7 +66,7 @@ EOF # Create the chk dir with what we expect to be excluded @@ -220,7 +220,7 @@ # The script would have aborted on error, so getting here means we've won. --- testsuite/hands.test 18 May 2004 00:41:46 -0000 1.13 -+++ testsuite/hands.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/hands.test 18 Jun 2004 17:25:13 -0000 @@ -11,19 +11,19 @@ hands_setup # Main script starts here @@ -247,7 +247,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/hardlinks.test 18 May 2004 00:41:40 -0000 1.5 -+++ testsuite/hardlinks.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/hardlinks.test 18 Jun 2004 17:25:13 -0000 @@ -31,7 +31,7 @@ ln "$name1" "$name2" || fail "Can't crea ln "$name2" "$name3" || fail "Can't create hardlink" cp "$name2" "$name4" || fail "Can't copy file" @@ -258,7 +258,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/longdir.test 18 May 2004 09:47:42 -0000 1.11 -+++ testsuite/longdir.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/longdir.test 18 Jun 2004 17:25:13 -0000 @@ -18,7 +18,7 @@ makepath "$longdir" || test_skipped "una touch "$longdir/1" || test_skipped "unable to create files in long directory" date > "$longdir/1" @@ -269,7 +269,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/merge.test 18 May 2004 00:41:38 -0000 1.6 -+++ testsuite/merge.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/merge.test 18 Jun 2004 17:25:13 -0000 @@ -40,9 +40,9 @@ cp -p "$from2dir"/sub1/uno "$from3dir"/s cp -p "$from3dir"/sub2/subby "$chkdir"/sub2 @@ -283,7 +283,7 @@ # The script would have aborted on error, so getting here means we've won. exit 0 --- testsuite/ssh-basic.test 18 May 2004 00:41:46 -0000 1.7 -+++ testsuite/ssh-basic.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/ssh-basic.test 18 Jun 2004 17:25:13 -0000 @@ -28,7 +28,7 @@ fi # nothing to do. hands_setup @@ -300,7 +300,7 @@ -runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -advH -e ssh --rsync-path=$RSYNC \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' --- testsuite/unsafe-links.test 18 May 2004 00:41:43 -0000 1.7 -+++ testsuite/unsafe-links.test 4 Jun 2004 05:26:51 -0000 ++++ testsuite/unsafe-links.test 18 Jun 2004 17:25:13 -0000 @@ -35,33 +35,33 @@ ln -s ../../unsafe/unsafefile "from/safe set -x diff --git a/filter.diff b/filter.diff index 52fc1ca..fb2abca 100644 --- a/filter.diff +++ b/filter.diff @@ -31,7 +31,7 @@ contained a slash. ..wayne.. --- exclude.c 22 May 2004 05:32:20 -0000 1.82 -+++ exclude.c 4 Jun 2004 07:07:33 -0000 ++++ exclude.c 11 Jun 2004 07:55:58 -0000 @@ -30,13 +30,59 @@ extern int verbose; extern int eol_nulls; extern int list_only; @@ -459,8 +459,8 @@ contained a slash. add_exclude(&exclude_list, default_cvsignore, XFLG_WORD_SPLIT | XFLG_WORDS_ONLY); ---- flist.c 29 May 2004 21:21:17 -0000 1.226 -+++ flist.c 4 Jun 2004 07:07:33 -0000 +--- flist.c 11 Jun 2004 07:40:57 -0000 1.230 ++++ flist.c 11 Jun 2004 07:55:58 -0000 @@ -39,8 +39,6 @@ extern int module_id; extern int ignore_errors; extern int numeric_ids; @@ -470,15 +470,15 @@ contained a slash. extern int recurse; extern char curr_dir[MAXPATHLEN]; extern char *files_from; -@@ -58,6 +56,7 @@ extern int implied_dirs; +@@ -59,6 +57,7 @@ extern int implied_dirs; extern int copy_links; extern int copy_unsafe_links; extern int protocol_version; +extern int inherit_exclude_levels; extern int sanitize_paths; - - extern int read_batch; -@@ -65,7 +64,6 @@ extern int write_batch; + extern int delete_excluded; + extern int orig_umask; +@@ -69,7 +68,6 @@ extern int write_batch; extern struct exclude_list_struct exclude_list; extern struct exclude_list_struct server_exclude_list; @@ -486,7 +486,7 @@ contained a slash. int io_error; -@@ -210,8 +208,6 @@ int link_stat(const char *path, STRUCT_S +@@ -224,8 +222,6 @@ int link_stat(const char *path, STRUCT_S */ static int check_exclude_file(char *fname, int is_dir, int exclude_level) { @@ -495,7 +495,7 @@ contained a slash. #if 0 /* This currently never happens, so avoid a useless compare. */ if (exclude_level == NO_EXCLUDES) return 0; -@@ -233,10 +229,7 @@ static int check_exclude_file(char *fnam +@@ -247,10 +243,7 @@ static int check_exclude_file(char *fnam if (exclude_level != ALL_EXCLUDES) return 0; if (exclude_list.head @@ -507,7 +507,7 @@ contained a slash. return 1; return 0; } -@@ -942,15 +935,7 @@ void send_file_name(int f, struct file_l +@@ -960,15 +953,7 @@ void send_file_name(int f, struct file_l if (recursive && S_ISDIR(file->mode) && !(file->flags & FLAG_MOUNT_POINT)) { @@ -523,7 +523,7 @@ contained a slash. } } -@@ -961,6 +946,7 @@ static void send_directory(int f, struct +@@ -979,6 +964,7 @@ static void send_directory(int f, struct struct dirent *di; char fname[MAXPATHLEN]; unsigned int offset; @@ -531,7 +531,7 @@ contained a slash. char *p; d = opendir(dir); -@@ -984,19 +970,13 @@ static void send_directory(int f, struct +@@ -1002,19 +988,13 @@ static void send_directory(int f, struct offset++; } @@ -556,7 +556,7 @@ contained a slash. for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) { char *dname = d_name(di); if (dname[0] == '.' && (dname[1] == '\0' -@@ -1016,6 +996,8 @@ static void send_directory(int f, struct +@@ -1034,6 +1014,8 @@ static void send_directory(int f, struct rsyserr(FERROR, errno, "readdir(%s)", dir); } @@ -565,9 +565,9 @@ contained a slash. closedir(d); } ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 4 Jun 2004 07:07:34 -0000 -@@ -48,6 +48,7 @@ int preserve_gid = 0; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 11 Jun 2004 07:55:59 -0000 +@@ -50,6 +50,7 @@ int preserve_gid = 0; int preserve_times = 0; int update_only = 0; int cvs_exclude = 0; @@ -575,7 +575,7 @@ contained a slash. int dry_run = 0; int local_server = 0; int ignore_times = 0; -@@ -306,7 +307,7 @@ void usage(enum logcode F) +@@ -309,7 +310,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, @@ -584,7 +584,7 @@ contained a slash. OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_REFUSED_BASE = 9000}; -@@ -331,6 +332,7 @@ static struct poptOption long_options[] +@@ -334,6 +335,7 @@ static struct poptOption long_options[] {"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 }, {"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 }, {"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 0 }, @@ -592,7 +592,7 @@ contained a slash. {"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 }, -@@ -543,6 +545,31 @@ int parse_arguments(int *argc, const cha +@@ -542,6 +544,31 @@ int parse_arguments(int *argc, const cha XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE); break; @@ -624,7 +624,7 @@ contained a slash. case 'h': usage(FINFO); exit_cleanup(0); -@@ -767,6 +794,9 @@ int parse_arguments(int *argc, const cha +@@ -771,6 +798,9 @@ int parse_arguments(int *argc, const cha } } @@ -634,7 +634,7 @@ contained a slash. return 1; } -@@ -866,6 +896,12 @@ void server_options(char **args,int *arg +@@ -872,6 +902,12 @@ void server_options(char **args,int *arg if (x != 1) args[ac++] = argstr; @@ -648,7 +648,7 @@ contained a slash. if (asprintf(&arg, "-B%u", block_size) < 0) goto oom; --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 4 Jun 2004 07:07:34 -0000 ++++ rsync.h 11 Jun 2004 07:55:59 -0000 @@ -108,6 +108,7 @@ #define XFLG_DEF_INCLUDE (1<<1) #define XFLG_WORDS_ONLY (1<<2) @@ -675,9 +675,9 @@ contained a slash. }; struct exclude_list_struct { ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 4 Jun 2004 07:07:35 -0000 -@@ -331,6 +331,7 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 11 Jun 2004 07:56:00 -0000 +@@ -332,6 +332,7 @@ verb( --exclude-from=FILE exclude patterns listed in FILE --include=PATTERN don't exclude files matching PATTERN --include-from=FILE don't exclude patterns listed in FILE @@ -685,7 +685,7 @@ contained a slash. --files-from=FILE read FILE for list of source-file names -0 --from0 all file lists are delimited by nulls --version print version number -@@ -683,6 +684,28 @@ dit(bf(--include-from=FILE)) This specif +@@ -688,6 +689,28 @@ dit(bf(--include-from=FILE)) This specif from a file. If em(FILE) is bf(-) the list will be read from standard input. @@ -714,7 +714,7 @@ contained a slash. dit(bf(--files-from=FILE)) Using this option allows you to specify the exact list of files to transfer (as read from the specified FILE or "-" for stdin). It also tweaks the default behavior of rsync to make -@@ -1038,6 +1061,11 @@ itemize( +@@ -1043,6 +1066,11 @@ itemize( then it is always considered an exclude pattern, even if specified as part of an include option. The prefix is discarded before matching. @@ -726,7 +726,7 @@ contained a slash. it() if the pattern is a single exclamation mark ! then the current include/exclude list is reset, removing all previously defined patterns. ) -@@ -1090,6 +1118,67 @@ itemize( +@@ -1095,6 +1123,67 @@ itemize( it would be excluded by the "*") ) @@ -795,7 +795,7 @@ contained a slash. bf(Note:) Batch mode should be considered experimental in this version --- testsuite/exclude.test 24 May 2004 00:16:07 -0000 1.8 -+++ testsuite/exclude.test 4 Jun 2004 07:07:35 -0000 ++++ testsuite/exclude.test 11 Jun 2004 07:56:00 -0000 @@ -23,19 +23,47 @@ export HOME CVSIGNORE makepath "$fromdir/foo/down/to/you" makepath "$fromdir/bar/down/to/foo/too" diff --git a/fname-convert.diff b/fname-convert.diff index 6622906..b38b894 100644 --- a/fname-convert.diff +++ b/fname-convert.diff @@ -48,7 +48,7 @@ autoconf and 'make proto'. --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 29 May 2004 21:31:45 -0000 ++++ Makefile.in 18 Jun 2004 17:25:38 -0000 @@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle main.o checksum.o match.o syscall.o log.o backup.o OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \ @@ -59,7 +59,7 @@ autoconf and 'make proto'. popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o --- cleanup.c 13 May 2004 07:08:18 -0000 1.22 -+++ cleanup.c 29 May 2004 21:31:45 -0000 ++++ cleanup.c 18 Jun 2004 17:25:38 -0000 @@ -24,6 +24,7 @@ extern int io_error; extern int keep_partial; @@ -78,7 +78,7 @@ autoconf and 'make proto'. do_unlink(cleanup_fname); if (code) { --- errcode.h 15 Dec 2003 08:04:14 -0000 1.8 -+++ errcode.h 29 May 2004 21:31:45 -0000 ++++ errcode.h 18 Jun 2004 17:25:38 -0000 @@ -34,6 +34,7 @@ #define RERR_STREAMIO 12 /* error in rsync protocol data stream */ #define RERR_MESSAGEIO 13 /* errors with program diagnostics */ @@ -87,8 +87,8 @@ autoconf and 'make proto'. #define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */ #define RERR_WAITCHILD 21 /* some error returned by waitpid() */ ---- flist.c 29 May 2004 21:21:17 -0000 1.226 -+++ flist.c 29 May 2004 21:31:46 -0000 +--- flist.c 18 Jun 2004 16:29:21 -0000 1.231 ++++ flist.c 18 Jun 2004 17:25:38 -0000 @@ -43,6 +43,7 @@ extern int cvs_exclude; extern int recurse; @@ -97,7 +97,7 @@ autoconf and 'make proto'. extern char *files_from; extern int filesfrom_fd; -@@ -346,7 +347,10 @@ void send_file_entry(struct file_struct +@@ -360,7 +361,10 @@ void send_file_entry(struct file_struct io_write_phase = "send_file_entry"; @@ -109,7 +109,7 @@ autoconf and 'make proto'. flags = base_flags; -@@ -559,6 +563,9 @@ void receive_file_entry(struct file_stru +@@ -573,6 +577,9 @@ void receive_file_entry(struct file_stru strlcpy(lastname, thisname, MAXPATHLEN); @@ -119,7 +119,7 @@ autoconf and 'make proto'. clean_fname(thisname); if (sanitize_paths) -@@ -1041,6 +1048,9 @@ struct file_list *send_file_list(int f, +@@ -1061,6 +1068,9 @@ struct file_list *send_file_list(int f, start_write = stats.total_written; @@ -129,7 +129,7 @@ autoconf and 'make proto'. flist = flist_new(f == -1 ? WITHOUT_HLINK : WITH_HLINK, "send_file_list"); -@@ -1215,6 +1225,9 @@ struct file_list *send_file_list(int f, +@@ -1235,6 +1245,9 @@ struct file_list *send_file_list(int f, write_batch_flist_info(flist->count, flist->files); } @@ -139,7 +139,7 @@ autoconf and 'make proto'. if (verbose > 3) output_flist(flist); -@@ -1237,6 +1250,9 @@ struct file_list *recv_file_list(int f) +@@ -1256,6 +1269,9 @@ struct file_list *recv_file_list(int f) start_read = stats.total_read; @@ -149,7 +149,7 @@ autoconf and 'make proto'. flist = flist_new(WITH_HLINK, "recv_file_list"); flist->count = 0; -@@ -1291,6 +1307,9 @@ struct file_list *recv_file_list(int f) +@@ -1310,6 +1326,9 @@ struct file_list *recv_file_list(int f) } } @@ -160,7 +160,7 @@ autoconf and 'make proto'. output_flist(flist); --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ fnameconv.c 29 May 2004 21:31:46 -0000 ++++ fnameconv.c 18 Jun 2004 17:25:38 -0000 @@ -0,0 +1,220 @@ +/* -*- c-file-style: "linux" -*- + * @@ -382,9 +382,9 @@ autoconf and 'make proto'. + if (verbose > 2) + rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest); +} ---- generator.c 18 May 2004 08:50:17 -0000 1.85 -+++ generator.c 29 May 2004 21:31:46 -0000 -@@ -267,6 +267,12 @@ static void generate_and_send_sums(struc +--- generator.c 18 Jun 2004 16:30:24 -0000 1.88 ++++ generator.c 18 Jun 2004 17:25:38 -0000 +@@ -268,6 +268,12 @@ static void generate_and_send_sums(struc * * @note This comment was added later by mbp who was trying to work it * out. It might be wrong. @@ -397,8 +397,8 @@ autoconf and 'make proto'. **/ void recv_generator(char *fname, struct file_struct *file, int i, int f_out) { ---- log.c 15 May 2004 19:31:16 -0000 1.73 -+++ log.c 29 May 2004 21:31:47 -0000 +--- log.c 7 Jun 2004 22:51:14 -0000 1.74 ++++ log.c 18 Jun 2004 17:25:39 -0000 @@ -57,6 +57,7 @@ struct { { RERR_STREAMIO , "error in rsync protocol data stream" }, { RERR_MESSAGEIO , "errors with program diagnostics" }, @@ -407,9 +407,9 @@ autoconf and 'make proto'. { RERR_SIGNAL , "received SIGUSR1 or SIGINT" }, { RERR_WAITCHILD , "some error returned by waitpid()" }, { RERR_MALLOC , "error allocating core memory buffers" }, ---- main.c 19 May 2004 22:19:19 -0000 1.195 -+++ main.c 29 May 2004 21:31:47 -0000 -@@ -217,7 +217,7 @@ static pid_t do_cmd(char *cmd, char *mac +--- main.c 18 Jun 2004 16:50:20 -0000 1.198 ++++ main.c 18 Jun 2004 17:25:39 -0000 +@@ -219,7 +219,7 @@ static pid_t do_cmd(char *cmd, char *mac int *f_in, int *f_out) { int i, argc = 0; @@ -418,7 +418,7 @@ autoconf and 'make proto'. pid_t ret; char *tok, *dir = NULL; int dash_l_set = 0; -@@ -232,8 +232,13 @@ static pid_t do_cmd(char *cmd, char *mac +@@ -234,8 +234,13 @@ static pid_t do_cmd(char *cmd, char *mac if (!cmd) goto oom; @@ -433,7 +433,7 @@ autoconf and 'make proto'. /* check to see if we've already been given '-l user' in * the remote-shell command */ -@@ -296,7 +301,7 @@ static pid_t do_cmd(char *cmd, char *mac +@@ -298,7 +303,7 @@ static pid_t do_cmd(char *cmd, char *mac create_flist_from_batch(); /* sets batch_flist */ ret = local_child(argc, args, f_in, f_out, child_main); } else { @@ -442,9 +442,9 @@ autoconf and 'make proto'. } if (dir) free(dir); ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 29 May 2004 21:31:48 -0000 -@@ -125,6 +125,7 @@ char *backup_dir = NULL; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:25:39 -0000 +@@ -127,6 +127,7 @@ char *backup_dir = NULL; char backup_dir_buf[MAXPATHLEN]; int rsync_port = RSYNC_PORT; int link_dest = 0; @@ -452,7 +452,7 @@ autoconf and 'make proto'. int verbose = 0; int quiet = 0; -@@ -268,6 +269,7 @@ void usage(enum logcode F) +@@ -271,6 +272,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"); @@ -460,7 +460,7 @@ autoconf and 'make proto'. 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"); -@@ -364,6 +366,7 @@ static struct poptOption long_options[] +@@ -368,6 +370,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 }, @@ -468,8 +468,8 @@ autoconf and 'make proto'. /* 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 }, ---- pipe.c 15 May 2004 19:31:10 -0000 1.7 -+++ pipe.c 29 May 2004 21:31:48 -0000 +--- pipe.c 18 Jun 2004 16:00:33 -0000 1.8 ++++ pipe.c 18 Jun 2004 17:25:39 -0000 @@ -23,7 +23,6 @@ extern int am_sender; @@ -490,17 +490,17 @@ autoconf and 'make proto'. { pid_t pid; int to_child_pipe[2]; -@@ -57,7 +58,7 @@ pid_t piped_child(char **command, int *f +@@ -56,7 +57,7 @@ pid_t piped_child(char **command, int *f + exit_cleanup(RERR_IPC); } - - pid = do_fork(); + pid = register_child ? do_fork() : fork(); if (pid == -1) { rsyserr(FERROR, errno, "fork"); exit_cleanup(RERR_IPC); --- syscall.c 18 Feb 2004 22:33:21 -0000 1.30 -+++ syscall.c 29 May 2004 21:31:48 -0000 ++++ syscall.c 18 Jun 2004 17:25:39 -0000 @@ -231,3 +231,34 @@ char *d_name(struct dirent *di) return di->d_name; #endif @@ -536,9 +536,9 @@ autoconf and 'make proto'. + + return result; +} ---- util.c 24 May 2004 22:59:16 -0000 1.147 -+++ util.c 29 May 2004 21:31:48 -0000 -@@ -1135,3 +1135,52 @@ void *_realloc_array(void *ptr, unsigned +--- util.c 9 Jun 2004 21:51:07 -0000 1.149 ++++ util.c 18 Jun 2004 17:25:40 -0000 +@@ -1153,3 +1153,52 @@ void *_realloc_array(void *ptr, unsigned return malloc(size * num); return realloc(ptr, size * num); } diff --git a/fsync.diff b/fsync.diff index fab45ed..5dad440 100644 --- a/fsync.diff +++ b/fsync.diff @@ -1,8 +1,8 @@ This patch from Sami Farin lets you specify --fsync if you want fsync() to be called on every file we write. ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:20:05 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:26:45 -0000 @@ -38,6 +38,7 @@ int make_backups = 0; **/ int whole_file = -1; @@ -27,7 +27,7 @@ to be called on every file we write. {"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 }, -@@ -973,6 +976,9 @@ void server_options(char **args,int *arg +@@ -968,6 +971,9 @@ void server_options(char **args,int *arg args[ac++] = tmpdir; } @@ -37,9 +37,9 @@ to be called on every file we write. 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 ---- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 6 Jun 2004 21:20:05 -0000 -@@ -47,6 +47,7 @@ extern int ignore_errors; +--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82 ++++ receiver.c 18 Jun 2004 17:26:45 -0000 +@@ -48,6 +48,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; extern int checksum_seed; @@ -47,7 +47,7 @@ to be called on every file we write. static void delete_one(char *fn, int is_dir) { -@@ -271,6 +272,12 @@ static int receive_data(int f_in,struct +@@ -276,6 +277,12 @@ static int receive_data(int f_in,struct exit_cleanup(RERR_FILEIO); } @@ -60,8 +60,8 @@ to be called on every file we write. sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); ---- util.c 5 Jun 2004 20:26:56 -0000 1.148 -+++ util.c 6 Jun 2004 21:20:06 -0000 +--- util.c 9 Jun 2004 21:51:07 -0000 1.149 ++++ util.c 18 Jun 2004 17:26:46 -0000 @@ -32,6 +32,7 @@ extern int dry_run; extern int module_id; extern int modify_window; diff --git a/fuzzy.diff b/fuzzy.diff index 3568814..34020a9 100644 --- a/fuzzy.diff +++ b/fuzzy.diff @@ -13,7 +13,7 @@ test suite, but otherwise UNTESTED.] Anyone who quotes me in their sig is an idiot. -- Rusty Russell. --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 21 May 2004 09:51:19 -0000 ++++ Makefile.in 18 Jun 2004 17:32:53 -0000 @@ -32,7 +32,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \ zlib/zutil.o zlib/adler32.o @@ -23,17 +23,17 @@ test suite, but otherwise UNTESTED.] 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 ---- generator.c 18 May 2004 08:50:17 -0000 1.85 -+++ generator.c 21 May 2004 09:51:19 -0000 -@@ -51,6 +51,7 @@ extern int list_only; - extern int only_existing; - extern int orig_umask; - extern int safe_symlinks; +--- generator.c 18 Jun 2004 16:30:24 -0000 1.88 ++++ generator.c 18 Jun 2004 17:32:53 -0000 +@@ -41,6 +41,7 @@ extern int ignore_times; + extern int size_only; + extern int io_timeout; + extern int protocol_version; +extern int fuzzy; - - extern struct exclude_list_struct server_exclude_list; - -@@ -258,7 +259,61 @@ static void generate_and_send_sums(struc + extern int always_checksum; + extern char *compare_dest; + extern int link_dest; +@@ -259,7 +260,61 @@ static void generate_and_send_sums(struc } } @@ -42,7 +42,7 @@ test suite, but otherwise UNTESTED.] + STRUCT_STAT *st) +{ + int fd = -1; -+ + + if (statret == 0) { + if (S_ISREG(st->st_mode)) { + if (update_only @@ -89,13 +89,13 @@ test suite, but otherwise UNTESTED.] + rsyserr(FERROR, errno, "fstat %s", full_fname(fname)); + } + } - ++ + return fd; +} /** * Acts on file number @p i from @p flist, whose name is @p fname. -@@ -274,8 +329,6 @@ void recv_generator(char *fname, struct +@@ -275,8 +330,6 @@ void recv_generator(char *fname, struct STRUCT_STAT st; struct map_struct *mapbuf; int statret; @@ -104,7 +104,7 @@ test suite, but otherwise UNTESTED.] if (list_only) return; -@@ -413,107 +466,39 @@ void recv_generator(char *fname, struct +@@ -416,109 +469,39 @@ void recv_generator(char *fname, struct } #endif @@ -122,7 +122,7 @@ test suite, but otherwise UNTESTED.] - /* try the file at compare_dest instead */ - int saveerrno = errno; - pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, compare_dest, fname); -- statret = link_stat(fnamecmpbuf,&st); +- statret = link_stat(fnamecmpbuf, &st, 0); - if (!S_ISREG(st.st_mode)) - statret = -1; - if (statret == -1) @@ -147,7 +147,8 @@ test suite, but otherwise UNTESTED.] - return; - if (errno == ENOENT) { - write_int(f_out,i); -- if (!dry_run) write_sum_head(f_out, NULL); +- if (!dry_run) +- write_sum_head(f_out, NULL); - } else if (verbose > 1) { + /* Failed to stat for some reason besides "not found". */ + if (statret == -1 && errno != ENOENT) { @@ -164,12 +165,23 @@ test suite, but otherwise UNTESTED.] - if (delete_file(fname) != 0) { - return; - } -- ++ if ((fd = open_base_file(file, fname, statret, &st)) == -2) ++ return; + - /* now pretend the file didn't exist */ -- if (preserve_hard_links && hard_link_check(file, HL_SKIP)) -- return; ++ if ((disable_deltas_p() || dry_run) && fd != -1) { ++ close(fd); ++ fd = -1; ++ } ++ ++ if (fd == -1) { ++ /* the file didn't exist, or we can pretend it doesn't */ + if (preserve_hard_links && hard_link_check(file, HL_SKIP)) + return; - write_int(f_out,i); -- if (!dry_run) write_sum_head(f_out, NULL); ++ write_int(f_out, i); + if (!dry_run) + write_sum_head(f_out, NULL); - return; - } - @@ -178,7 +190,9 @@ test suite, but otherwise UNTESTED.] - rprintf(FINFO,"%s exists\n",fname); - return; - } -- ++ return; ++ } + - if (update_only && cmp_modtime(st.st_mtime,file->modtime)>0 && fnamecmp == fname) { - if (verbose > 1) - rprintf(FINFO,"%s is newer\n",fname); @@ -193,46 +207,33 @@ test suite, but otherwise UNTESTED.] - - if (dry_run) { - write_int(f_out,i); -+ if ((fd = open_base_file(file, fname, statret, &st)) == -2) - return; +- return; - } - +- - if (disable_deltas_p()) { - write_int(f_out,i); - write_sum_head(f_out, NULL); -- return; -+ if ((disable_deltas_p() || dry_run) && fd != -1) { -+ close(fd); -+ fd = -1; - } ++ if (preserve_hard_links && hard_link_check(file, HL_CHECK_MASTER)) + return; +- } - /* open the file */ - fd = do_open(fnamecmp, O_RDONLY, 0); - - if (fd == -1) { +- if (fd == -1) { - rsyserr(FERROR, errno, "failed to open %s, continuing", - full_fname(fnamecmp)); - /* pretend the file didn't exist */ -+ /* the file didn't exist, or we can pretend it doesn't */ - if (preserve_hard_links && hard_link_check(file, HL_SKIP)) - return; +- if (preserve_hard_links && hard_link_check(file, HL_SKIP)) +- return; - write_int(f_out,i); - write_sum_head(f_out, NULL); -+ write_int(f_out, i); -+ if (!dry_run) -+ write_sum_head(f_out, NULL); -+ return; -+ } -+ -+ if (preserve_hard_links && hard_link_check(file, HL_CHECK_MASTER)) -+ return; -+ + if (!S_ISREG(file->mode)) { + rprintf(FINFO, "skipping non-regular file \"%s\"\n",fname); return; } -@@ -523,7 +508,7 @@ void recv_generator(char *fname, struct +@@ -528,7 +511,7 @@ void recv_generator(char *fname, struct mapbuf = NULL; if (verbose > 3) { @@ -241,9 +242,9 @@ test suite, but otherwise UNTESTED.] (double)st.st_size); } ---- options.c 21 May 2004 09:44:32 -0000 1.150 -+++ options.c 21 May 2004 09:51:20 -0000 -@@ -91,6 +91,7 @@ int ignore_errors = 0; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:32:54 -0000 +@@ -94,6 +94,7 @@ int ignore_errors = 0; int modify_window = 0; int blocking_io = -1; int checksum_seed = 0; @@ -251,7 +252,7 @@ test suite, but otherwise UNTESTED.] unsigned int block_size = 0; -@@ -266,6 +267,7 @@ void usage(enum logcode F) +@@ -270,6 +271,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"); @@ -259,7 +260,7 @@ test suite, but otherwise UNTESTED.] 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"); -@@ -363,6 +365,7 @@ static struct poptOption long_options[] +@@ -368,6 +370,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 }, @@ -267,7 +268,7 @@ test suite, but otherwise UNTESTED.] /* 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 }, -@@ -972,6 +975,9 @@ void server_options(char **args,int *arg +@@ -989,6 +992,9 @@ void server_options(char **args,int *arg } } @@ -277,9 +278,9 @@ test suite, but otherwise UNTESTED.] *argc = ac; return; ---- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 21 May 2004 09:51:20 -0000 -@@ -47,6 +47,7 @@ extern int ignore_errors; +--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82 ++++ receiver.c 18 Jun 2004 17:32:54 -0000 +@@ -48,6 +48,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; extern int checksum_seed; @@ -287,16 +288,16 @@ test suite, but otherwise UNTESTED.] static void delete_one(char *fn, int is_dir) { -@@ -295,8 +296,6 @@ int recv_files(int f_in,struct file_list +@@ -300,8 +301,6 @@ int recv_files(int f_in,struct file_list char *fname, fbuf[MAXPATHLEN]; char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; - char *fnamecmp; - char fnamecmpbuf[MAXPATHLEN]; struct map_struct *mapbuf; - int i; struct file_struct *file; -@@ -359,35 +358,31 @@ int recv_files(int f_in,struct file_list + struct stats initial_stats; +@@ -364,35 +363,31 @@ int recv_files(int f_in,struct file_list if (verbose > 2) rprintf(FINFO,"recv_files(%s)\n",fname); @@ -341,7 +342,7 @@ test suite, but otherwise UNTESTED.] receive_data(f_in, NULL, -1, NULL, file->length); close(fd1); continue; -@@ -408,8 +403,10 @@ int recv_files(int f_in,struct file_list +@@ -413,8 +408,10 @@ int recv_files(int f_in,struct file_list if (fd1 != -1 && st.st_size > 0) { mapbuf = map_file(fd1,st.st_size); @@ -354,9 +355,9 @@ test suite, but otherwise UNTESTED.] } else mapbuf = NULL; ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 21 May 2004 09:51:21 -0000 -@@ -324,6 +324,7 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 18 Jun 2004 17:32:54 -0000 +@@ -325,6 +325,7 @@ verb( -T --temp-dir=DIR create temporary files in directory DIR --compare-dest=DIR also compare received files relative to DIR --link-dest=DIR create hardlinks to DIR for unchanged files diff --git a/ignore-case.diff b/ignore-case.diff index 206ae68..bc368d5 100644 --- a/ignore-case.diff +++ b/ignore-case.diff @@ -36,9 +36,9 @@ NOTE: patch updated for latest CVS source by Wayne Davison, but UNTESTED! - - - - - - - - - - - - - - - - - - - - - - - - - ---- options.c 17 Apr 2004 17:07:23 -0000 1.147 -+++ options.c 29 Apr 2004 19:50:13 -0000 -@@ -89,6 +89,7 @@ int opt_ignore_existing = 0; +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:26:59 -0000 +@@ -92,6 +92,7 @@ int opt_ignore_existing = 0; int max_delete = 0; int ignore_errors = 0; int modify_window = 0; @@ -46,7 +46,7 @@ NOTE: patch updated for latest CVS source by Wayne Davison, but UNTESTED! int blocking_io = -1; int checksum_seed = 0; unsigned int block_size = 0; -@@ -275,6 +276,7 @@ void usage(enum logcode F) +@@ -279,6 +280,7 @@ void usage(enum logcode F) rprintf(F," --include-from=FILE don't exclude patterns listed in FILE\n"); rprintf(F," --files-from=FILE read FILE for list of source-file names\n"); rprintf(F," -0 --from0 all *-from file lists are delimited by nulls\n"); @@ -54,7 +54,7 @@ NOTE: patch updated for latest CVS source by Wayne Davison, but UNTESTED! rprintf(F," --version print version number\n"); rprintf(F," --daemon run as an rsync daemon\n"); rprintf(F," --no-detach do not detach from the parent\n"); -@@ -329,6 +331,7 @@ static struct poptOption long_options[] +@@ -334,6 +336,7 @@ static struct poptOption long_options[] {"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 }, {"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 }, {"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 0 }, @@ -62,19 +62,19 @@ NOTE: patch updated for latest CVS source by Wayne Davison, but UNTESTED! {"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 }, -@@ -911,6 +914,9 @@ void server_options(char **args,int *arg - goto oom; +@@ -936,6 +939,9 @@ void server_options(char **args,int *arg args[ac++] = arg; } -+ + + if (ignore_case) + args[ac++] = "--ignore-case"; - ++ if (keep_partial) args[ac++] = "--partial"; ---- util.c 27 Apr 2004 19:59:37 -0000 1.141 -+++ util.c 29 Apr 2004 19:50:13 -0000 -@@ -933,6 +933,19 @@ int u_strcmp(const char *cs1, const char + +--- util.c 9 Jun 2004 21:51:07 -0000 1.149 ++++ util.c 18 Jun 2004 17:27:00 -0000 +@@ -951,6 +951,19 @@ int u_strcmp(const char *cs1, const char { const uchar *s1 = (const uchar *)cs1; const uchar *s2 = (const uchar *)cs2; @@ -95,7 +95,7 @@ NOTE: patch updated for latest CVS source by Wayne Davison, but UNTESTED! while (*s1 && *s2 && (*s1 == *s2)) { s1++; s2++; --- lib/wildmatch.c 14 Jul 2003 15:12:59 -0000 1.12 -+++ lib/wildmatch.c 29 Apr 2004 19:50:13 -0000 ++++ lib/wildmatch.c 18 Jun 2004 17:27:00 -0000 @@ -76,8 +76,20 @@ static int domatch(const unsigned char * ch = *++p; /* FALLTHROUGH */ diff --git a/inplace.diff b/inplace.diff index 0a262bb..98e4660 100644 --- a/inplace.diff +++ b/inplace.diff @@ -1,7 +1,7 @@ Patch from Mark Curtis to implement the --inplace option. --- match.c 21 May 2004 08:27:04 -0000 1.62 -+++ match.c 6 Jun 2004 21:23:27 -0000 ++++ match.c 18 Jun 2004 17:27:29 -0000 @@ -23,6 +23,7 @@ extern int verbose; extern int am_server; extern int do_progress; @@ -21,8 +21,8 @@ Patch from Mark Curtis to implement the --inplace option. if (verbose > 3) rprintf(FINFO,"potential match at %.0f target=%.0f %.0f sum=%08x\n", (double)offset,(double)j,(double)i,sum); ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:23:27 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:27:29 -0000 @@ -94,6 +94,7 @@ int ignore_errors = 0; int modify_window = 0; int blocking_io = -1; @@ -47,7 +47,7 @@ Patch from Mark Curtis to implement the --inplace option. {"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 }, {"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 }, {"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 }, -@@ -744,6 +747,9 @@ int parse_arguments(int *argc, const cha +@@ -739,6 +742,9 @@ int parse_arguments(int *argc, const cha bwlimit_writemax = 512; } @@ -57,7 +57,7 @@ Patch from Mark Curtis to implement the --inplace option. if (files_from) { char *colon; if (*argc != 2 && !(am_server && am_sender && *argc == 1)) { -@@ -968,6 +974,9 @@ void server_options(char **args,int *arg +@@ -963,6 +969,9 @@ void server_options(char **args,int *arg if (opt_ignore_existing && am_sender) args[ac++] = "--ignore-existing"; @@ -67,9 +67,9 @@ Patch from Mark Curtis to implement the --inplace option. if (tmpdir) { args[ac++] = "--temp-dir"; args[ac++] = tmpdir; ---- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 6 Jun 2004 21:23:27 -0000 -@@ -47,6 +47,7 @@ extern int ignore_errors; +--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82 ++++ receiver.c 18 Jun 2004 17:27:30 -0000 +@@ -48,6 +48,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; extern int checksum_seed; @@ -77,7 +77,7 @@ Patch from Mark Curtis to implement the --inplace option. static void delete_one(char *fn, int is_dir) { -@@ -252,16 +253,28 @@ static int receive_data(int f_in,struct +@@ -257,16 +258,28 @@ static int receive_data(int f_in,struct sum_update(map,len); } @@ -110,7 +110,7 @@ Patch from Mark Curtis to implement the --inplace option. if (do_progress) end_progress(total_size); -@@ -413,37 +426,50 @@ int recv_files(int f_in,struct file_list +@@ -418,37 +431,50 @@ int recv_files(int f_in,struct file_list } else mapbuf = NULL; @@ -189,8 +189,8 @@ Patch from Mark Curtis to implement the --inplace option. } cleanup_set(fnametmp, fname, file, mapbuf, fd1, fd2); ---- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 6 Jun 2004 21:23:27 -0000 +--- rsync.c 11 Jun 2004 07:40:45 -0000 1.141 ++++ rsync.c 18 Jun 2004 17:27:30 -0000 @@ -34,6 +34,7 @@ extern int force_delete; extern int recurse; extern int make_backups; @@ -212,7 +212,7 @@ Patch from Mark Curtis to implement the --inplace option. ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS); if (ret < 0) { --- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 -+++ rsync.yo 6 Jun 2004 21:23:28 -0000 ++++ rsync.yo 18 Jun 2004 17:27:30 -0000 @@ -289,6 +289,7 @@ verb( --backup-dir make backups into this directory --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) diff --git a/link-by-hash.diff b/link-by-hash.diff index b319873..faa8d70 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -12,7 +12,7 @@ the file's name. --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 6 Jun 2004 21:24:41 -0000 ++++ Makefile.in 18 Jun 2004 17:27:47 -0000 @@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle main.o checksum.o match.o syscall.o log.o backup.o OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \ @@ -23,7 +23,7 @@ the file's name. popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ hashlink.c 6 Jun 2004 21:24:41 -0000 ++++ hashlink.c 18 Jun 2004 17:27:47 -0000 @@ -0,0 +1,342 @@ +/* + Copyright (C) Cronosys, LLC 2004 @@ -367,8 +367,8 @@ the file's name. +} + +#endif ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:24:41 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:27:47 -0000 @@ -124,6 +124,7 @@ char *log_format = NULL; char *password_file = NULL; char *rsync_path = RSYNC_PATH; @@ -402,7 +402,7 @@ the file's name. /* 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 }, -@@ -601,6 +604,19 @@ int parse_arguments(int *argc, const cha +@@ -596,6 +599,19 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -422,7 +422,7 @@ the file's name. default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -982,6 +998,11 @@ void server_options(char **args,int *arg +@@ -977,6 +993,11 @@ void server_options(char **args,int *arg args[ac++] = compare_dest; } @@ -434,9 +434,9 @@ the file's name. if (files_from && (!am_sender || remote_filesfrom_file)) { if (remote_filesfrom_file) { args[ac++] = "--files-from"; ---- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 6 Jun 2004 21:24:41 -0000 -@@ -47,6 +47,7 @@ extern int ignore_errors; +--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82 ++++ receiver.c 18 Jun 2004 17:27:47 -0000 +@@ -48,6 +48,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; extern int checksum_seed; @@ -444,7 +444,7 @@ the file's name. static void delete_one(char *fn, int is_dir) { -@@ -193,10 +194,11 @@ static int get_tmpname(char *fnametmp, c +@@ -198,10 +199,11 @@ static int get_tmpname(char *fnametmp, c static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname, @@ -457,7 +457,7 @@ the file's name. unsigned int len; OFF_T offset = 0; OFF_T offset2; -@@ -207,6 +209,9 @@ static int receive_data(int f_in,struct +@@ -212,6 +214,9 @@ static int receive_data(int f_in,struct read_sum_head(f_in, &sum); @@ -467,7 +467,7 @@ the file's name. sum_init(checksum_seed); while ((i = recv_token(f_in, &data)) != 0) { -@@ -223,6 +228,8 @@ static int receive_data(int f_in,struct +@@ -228,6 +233,8 @@ static int receive_data(int f_in,struct cleanup_got_literal = 1; sum_update(data,i); @@ -476,7 +476,7 @@ the file's name. if (fd != -1 && write_file(fd,data,i) != i) { rsyserr(FERROR, errno, "write failed on %s", -@@ -250,6 +257,8 @@ static int receive_data(int f_in,struct +@@ -255,6 +262,8 @@ static int receive_data(int f_in,struct see_token(map, len); sum_update(map,len); @@ -485,7 +485,7 @@ the file's name. } if (fd != -1 && write_file(fd,map,len) != (int) len) { -@@ -272,6 +281,8 @@ static int receive_data(int f_in,struct +@@ -277,6 +286,8 @@ static int receive_data(int f_in,struct } sum_end(file_sum1); @@ -494,7 +494,7 @@ the file's name. read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { -@@ -375,7 +386,7 @@ int recv_files(int f_in,struct file_list +@@ -380,7 +391,7 @@ int recv_files(int f_in,struct file_list if (fd1 != -1 && do_fstat(fd1,&st) != 0) { rsyserr(FERROR, errno, "fstat %s failed", full_fname(fnamecmp)); @@ -503,7 +503,7 @@ the file's name. close(fd1); continue; } -@@ -388,7 +399,7 @@ int recv_files(int f_in,struct file_list +@@ -393,7 +404,7 @@ int recv_files(int f_in,struct file_list */ rprintf(FERROR,"recv_files: %s is a directory\n", full_fname(fnamecmp)); @@ -512,7 +512,7 @@ the file's name. close(fd1); continue; } -@@ -440,7 +451,7 @@ int recv_files(int f_in,struct file_list +@@ -445,7 +456,7 @@ int recv_files(int f_in,struct file_list if (fd2 == -1) { rsyserr(FERROR, errno, "mkstemp %s failed", full_fname(fnametmp)); @@ -521,7 +521,7 @@ the file's name. if (mapbuf) unmap_file(mapbuf); if (fd1 != -1) close(fd1); continue; -@@ -453,7 +464,11 @@ int recv_files(int f_in,struct file_list +@@ -458,7 +469,11 @@ int recv_files(int f_in,struct file_list } /* recv file data */ @@ -534,8 +534,8 @@ the file's name. log_recv(file, &initial_stats); ---- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 6 Jun 2004 21:24:41 -0000 +--- rsync.c 11 Jun 2004 07:40:45 -0000 1.141 ++++ rsync.c 18 Jun 2004 17:27:47 -0000 @@ -34,6 +34,7 @@ extern int force_delete; extern int recurse; extern int make_backups; @@ -560,7 +560,7 @@ the file's name. rsyserr(FERROR, errno, "%s %s -> \"%s\"", ret == -2 ? "copy" : "rename", --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 6 Jun 2004 21:24:41 -0000 ++++ rsync.h 18 Jun 2004 17:27:48 -0000 @@ -522,6 +522,14 @@ struct stats { int current_file_index; }; diff --git a/max-size.diff b/max-size.diff index 5a81da3..cdf968a 100644 --- a/max-size.diff +++ b/max-size.diff @@ -1,5 +1,5 @@ ---- generator.c 11 Jun 2004 07:40:51 -0000 1.87 -+++ generator.c 15 Jun 2004 16:19:44 -0000 +--- generator.c 18 Jun 2004 16:30:24 -0000 1.88 ++++ generator.c 20 Jun 2004 21:15:50 -0000 @@ -39,6 +39,7 @@ extern int opt_ignore_existing; extern int csum_length; extern int ignore_times; @@ -8,7 +8,7 @@ extern int io_timeout; extern int protocol_version; extern int always_checksum; -@@ -345,6 +346,10 @@ void recv_generator(char *fname, struct +@@ -346,6 +347,10 @@ void recv_generator(char *fname, struct && verbose && f_out != -1) rprintf(FINFO,"%s/\n",fname); return; @@ -19,8 +19,8 @@ } if (preserve_links && S_ISLNK(file->mode)) { ---- options.c 7 Jun 2004 22:05:22 -0000 1.156 -+++ options.c 15 Jun 2004 16:19:44 -0000 +--- options.c 20 Jun 2004 19:47:05 -0000 1.157 ++++ options.c 20 Jun 2004 21:15:50 -0000 @@ -90,6 +90,7 @@ int delete_after = 0; int only_existing = 0; int opt_ignore_existing = 0; @@ -36,7 +36,7 @@ +static char *max_size_arg; /** Local address to bind. As a character string because it's - * interpreted by the IPv6 layer: should be a numeric IP4 or ip6 + * interpreted by the IPv6 layer: should be a numeric IP4 or IP6 @@ -260,6 +262,7 @@ void usage(enum logcode F) rprintf(F," --delete-after receiver deletes after transferring, not before\n"); rprintf(F," --ignore-errors delete even if there are I/O errors\n"); @@ -108,7 +108,7 @@ char *r_or_w = write_batch ? "write" : "read"; if (asprintf(&arg, "--%s-batch=%s", r_or_w, batch_prefix) < 0) --- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 -+++ rsync.yo 15 Jun 2004 16:19:45 -0000 ++++ rsync.yo 20 Jun 2004 21:15:51 -0000 @@ -315,6 +315,7 @@ verb( --delete-after receiver deletes after transfer, not before --ignore-errors delete even if there are I/O errors diff --git a/openssl-support.diff b/openssl-support.diff index fb2b69e..9cb5e01 100644 --- a/openssl-support.diff +++ b/openssl-support.diff @@ -38,7 +38,7 @@ can't say if I've left any cleanup/compatibility errors in the code. --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 6 Jun 2004 21:26:59 -0000 ++++ Makefile.in 18 Jun 2004 17:28:26 -0000 @@ -39,7 +39,7 @@ OBJS3=progress.o pipe.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 \ @@ -49,7 +49,7 @@ can't say if I've left any cleanup/compatibility errors in the code. TLS_OBJ = tls.o syscall.o lib/permstring.o --- cleanup.c 13 May 2004 07:08:18 -0000 1.22 -+++ cleanup.c 6 Jun 2004 21:26:59 -0000 ++++ cleanup.c 18 Jun 2004 17:28:26 -0000 @@ -24,6 +24,9 @@ extern int io_error; extern int keep_partial; @@ -72,8 +72,8 @@ can't say if I've left any cleanup/compatibility errors in the code. if (verbose > 3) { rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n", code, file, line); ---- clientserver.c 5 Jun 2004 19:59:03 -0000 1.123 -+++ clientserver.c 6 Jun 2004 21:26:59 -0000 +--- clientserver.c 13 Jun 2004 14:18:48 -0000 1.127 ++++ clientserver.c 18 Jun 2004 17:28:26 -0000 @@ -46,6 +46,9 @@ extern int io_timeout; extern int orig_umask; extern int no_detach; @@ -104,7 +104,7 @@ can't say if I've left any cleanup/compatibility errors in the code. } int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc) -@@ -147,6 +160,33 @@ int start_inband_exchange(char *user, ch +@@ -148,6 +161,33 @@ int start_inband_exchange(char *user, ch if (protocol_version > remote_protocol) protocol_version = remote_protocol; @@ -138,7 +138,7 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(path,'/'); if (p) *p = 0; io_printf(f_out, "%s\n", path); -@@ -175,6 +215,10 @@ int start_inband_exchange(char *user, ch +@@ -176,6 +216,10 @@ int start_inband_exchange(char *user, ch * server to terminate the listing of modules. * We don't want to go on and transfer * anything; just exit. */ @@ -149,8 +149,8 @@ can't say if I've left any cleanup/compatibility errors in the code. exit(0); } -@@ -182,6 +226,10 @@ int start_inband_exchange(char *user, ch - rprintf(FERROR,"%s\n", line); +@@ -183,6 +227,10 @@ int start_inband_exchange(char *user, ch + rprintf(FERROR, "%s\n", line); /* This is always fatal; the server will now * close the socket. */ +#ifdef HAVE_OPENSSL @@ -160,7 +160,7 @@ can't say if I've left any cleanup/compatibility errors in the code. return RERR_STARTCLIENT; } else { rprintf(FINFO,"%s\n", line); -@@ -481,6 +529,7 @@ static void send_listing(int fd) +@@ -487,6 +535,7 @@ static void send_listing(int fd) io_printf(fd,"@RSYNCD: EXIT\n"); } @@ -168,7 +168,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* this is called when a connection is established to a client and we want to start talking. The setup of the system is done from here */ -@@ -538,6 +587,20 @@ int start_daemon(int f_in, int f_out) +@@ -544,6 +593,20 @@ int start_daemon(int f_in, int f_out) return -1; } @@ -190,7 +190,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* it's some sort of command that I don't understand */ io_printf(f_out, "@ERROR: Unknown command '%s'\n", line); --- config.h.in 29 Apr 2004 19:40:39 -0000 1.90 -+++ config.h.in 6 Jun 2004 21:26:59 -0000 ++++ config.h.in 18 Jun 2004 17:28:26 -0000 @@ -167,6 +167,9 @@ /* */ #undef HAVE_OFF64_T @@ -202,7 +202,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #undef HAVE_READLINK --- configure.in 30 Apr 2004 18:03:33 -0000 1.196 -+++ configure.in 6 Jun 2004 21:26:59 -0000 ++++ configure.in 18 Jun 2004 17:28:26 -0000 @@ -271,6 +271,21 @@ yes AC_SEARCH_LIBS(getaddrinfo, inet6) fi @@ -225,9 +225,9 @@ can't say if I've left any cleanup/compatibility errors in the code. AC_MSG_CHECKING([whether to call shutdown on all sockets]) case $host_os in *cygwin* ) AC_MSG_RESULT(yes) ---- main.c 19 May 2004 22:19:19 -0000 1.195 -+++ main.c 6 Jun 2004 21:27:00 -0000 -@@ -51,6 +51,9 @@ extern int rsync_port; +--- main.c 18 Jun 2004 16:50:20 -0000 1.198 ++++ main.c 18 Jun 2004 17:28:26 -0000 +@@ -52,6 +52,9 @@ extern int rsync_port; extern int read_batch; extern int write_batch; extern int filesfrom_fd; @@ -237,7 +237,7 @@ can't say if I've left any cleanup/compatibility errors in the code. extern pid_t cleanup_child_pid; extern char *files_from; extern char *remote_filesfrom_file; -@@ -705,17 +708,32 @@ static int start_client(int argc, char * +@@ -709,17 +712,32 @@ static int start_client(int argc, char * pid_t pid; int f_in,f_out; int rc; @@ -272,9 +272,9 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(host,'/'); if (p) { *p = 0; -@@ -764,12 +782,27 @@ static int start_client(int argc, char * +@@ -767,12 +785,27 @@ static int start_client(int argc, char * argv++; - } else { + } else { /* source is local */ am_sender = 1; + url_prefix = strlen(URL_PREFIX); + if (strncasecmp(URL_PREFIX, argv[0], url_prefix) != 0) { @@ -302,8 +302,8 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(host,'/'); if (p) { *p = 0; ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:27:00 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:28:27 -0000 @@ -133,6 +133,14 @@ int quiet = 0; int always_checksum = 0; int list_only = 0; @@ -395,7 +395,7 @@ can't say if I've left any cleanup/compatibility errors in the code. {0,0,0,0, 0, 0, 0} }; -@@ -601,6 +627,12 @@ int parse_arguments(int *argc, const cha +@@ -596,6 +622,12 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -408,7 +408,7 @@ can't say if I've left any cleanup/compatibility errors in the code. default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -738,6 +770,17 @@ int parse_arguments(int *argc, const cha +@@ -733,6 +765,17 @@ int parse_arguments(int *argc, const cha if (do_progress && !verbose) verbose = 1; @@ -427,7 +427,7 @@ can't say if I've left any cleanup/compatibility errors in the code. bwlimit_writemax = (size_t)bwlimit * 128; if (bwlimit_writemax < 512) --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 6 Jun 2004 21:27:00 -0000 ++++ rsync.h 18 Jun 2004 17:28:27 -0000 @@ -32,6 +32,7 @@ #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock" @@ -449,7 +449,7 @@ can't say if I've left any cleanup/compatibility errors in the code. * ino_t and dev_t internally, even if this platform does not * allow files to have 64-bit inums. That's because the --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ssl.c 6 Jun 2004 21:27:00 -0000 ++++ ssl.c 18 Jun 2004 17:28:27 -0000 @@ -0,0 +1,366 @@ +/* -*- c-file-style: "linux" -*- + * ssl.c: operations for negotiating SSL rsync connections. diff --git a/remove-sent-files.diff b/remove-sent-files.diff index ded4209..4b21eff 100644 --- a/remove-sent-files.diff +++ b/remove-sent-files.diff @@ -4,8 +4,8 @@ command before "make": make proto ---- io.c 6 Jun 2004 19:15:58 -0000 1.125 -+++ io.c 6 Jun 2004 21:19:26 -0000 +--- io.c 9 Jun 2004 03:07:50 -0000 1.129 ++++ io.c 18 Jun 2004 17:24:12 -0000 @@ -225,6 +225,14 @@ static void read_msg_fd(void) read_loop(fd, buf, 4); redo_list_add(IVAL(buf,0)); @@ -21,7 +21,7 @@ command before "make": case MSG_INFO: case MSG_ERROR: case MSG_LOG: -@@ -639,6 +647,16 @@ static int read_unbuffered(int fd, char +@@ -636,6 +644,16 @@ static int readfd_unbuffered(int fd, cha read_loop(fd, buffer, remaining); bufferIdx = 0; break; @@ -38,26 +38,26 @@ command before "make": case MSG_INFO: case MSG_ERROR: if (remaining >= sizeof line) { ---- main.c 19 May 2004 22:19:19 -0000 1.195 -+++ main.c 6 Jun 2004 21:19:27 -0000 +--- main.c 18 Jun 2004 16:50:20 -0000 1.198 ++++ main.c 18 Jun 2004 17:24:12 -0000 @@ -42,6 +42,7 @@ extern int list_only; extern int local_server; extern int log_got_error; extern int module_id; +extern int need_messages_from_generator; extern int orig_umask; + extern int keep_dirlinks; extern int preserve_hard_links; - extern int protocol_version; -@@ -572,6 +573,8 @@ void start_server(int f_in, int f_out, i - io_start_multiplex_out(f_out); +@@ -575,6 +576,8 @@ void start_server(int f_in, int f_out, i if (am_sender) { + keep_dirlinks = 0; /* Must be disabled on the sender. */ + if (need_messages_from_generator) + io_start_multiplex_in(f_in); if (!read_batch) { recv_exclude_list(f_in); if (cvs_exclude) -@@ -638,6 +641,9 @@ int client_run(int f_in, int f_out, pid_ +@@ -642,6 +645,9 @@ int client_run(int f_in, int f_out, pid_ exit_cleanup(status); } @@ -67,8 +67,8 @@ command before "make": if (argc == 0) list_only = 1; ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:19:27 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:24:12 -0000 @@ -87,6 +87,7 @@ int size_only = 0; int bwlimit = 0; size_t bwlimit_writemax = 0; @@ -112,7 +112,7 @@ command before "make": {"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 }, -@@ -518,6 +522,11 @@ int parse_arguments(int *argc, const cha +@@ -513,6 +517,11 @@ int parse_arguments(int *argc, const cha delete_mode = 1; break; @@ -124,7 +124,7 @@ command before "make": case OPT_EXCLUDE: if (am_server || sanitize_paths) return 0; /* Impossible... */ -@@ -994,6 +1003,9 @@ void server_options(char **args,int *arg +@@ -989,6 +998,9 @@ void server_options(char **args,int *arg } } @@ -134,9 +134,9 @@ command before "make": *argc = ac; return; ---- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 6 Jun 2004 21:19:28 -0000 -@@ -47,6 +47,7 @@ extern int ignore_errors; +--- receiver.c 14 Jun 2004 15:09:36 -0000 1.82 ++++ receiver.c 18 Jun 2004 17:24:13 -0000 +@@ -48,6 +48,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; extern int checksum_seed; @@ -144,7 +144,7 @@ command before "make": static void delete_one(char *fn, int is_dir) { -@@ -295,7 +296,7 @@ int recv_files(int f_in,struct file_list +@@ -300,7 +301,7 @@ int recv_files(int f_in,struct file_list char *fname, fbuf[MAXPATHLEN]; char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; @@ -152,8 +152,8 @@ command before "make": + char *fnamecmp, numbuf[4]; char fnamecmpbuf[MAXPATHLEN]; struct map_struct *mapbuf; - int i; -@@ -477,16 +478,20 @@ int recv_files(int f_in,struct file_list + struct file_struct *file; +@@ -482,16 +483,20 @@ int recv_files(int f_in,struct file_list cleanup_disable(); @@ -179,7 +179,7 @@ command before "make": } } --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 6 Jun 2004 21:19:28 -0000 ++++ rsync.h 18 Jun 2004 17:24:13 -0000 @@ -60,6 +60,7 @@ #define FLAG_TOP_DIR (1<<0) #define FLAG_HLINK_EOL (1<<1) /* generator only */ @@ -197,7 +197,7 @@ command before "make": MSG_REDO=4, /* reprocess indicated flist index */ MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */ --- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 -+++ rsync.yo 6 Jun 2004 21:19:29 -0000 ++++ rsync.yo 18 Jun 2004 17:24:14 -0000 @@ -313,6 +313,7 @@ verb( --delete delete files that don't exist on sender --delete-excluded also delete excluded files on receiver @@ -218,8 +218,8 @@ command before "make": dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files even when there are I/O errors. ---- sender.c 15 May 2004 19:31:10 -0000 1.40 -+++ sender.c 6 Jun 2004 21:19:29 -0000 +--- sender.c 18 Jun 2004 16:55:12 -0000 1.41 ++++ sender.c 18 Jun 2004 17:24:14 -0000 @@ -27,6 +27,7 @@ extern int dry_run; extern int am_server; extern int am_daemon; diff --git a/time-limit.diff b/time-limit.diff index c065bc3..d8e8897 100644 --- a/time-limit.diff +++ b/time-limit.diff @@ -3,8 +3,8 @@ to be simpler and more efficient by Wayne Davison. Do we need configure support for mktime()? ---- io.c 6 Jun 2004 19:15:58 -0000 1.125 -+++ io.c 6 Jun 2004 21:28:20 -0000 +--- io.c 9 Jun 2004 03:07:50 -0000 1.129 ++++ io.c 18 Jun 2004 17:38:20 -0000 @@ -44,6 +44,7 @@ static int io_multiplexing_in; static int multiplex_in_fd = -1; static int multiplex_out_fd = -1; @@ -39,8 +39,8 @@ Do we need configure support for mktime()? if (last_io && io_timeout && (t-last_io) >= io_timeout) { if (!am_server && !am_daemon) { rprintf(FERROR, "io timeout after %d seconds - exiting\n", ---- options.c 6 Jun 2004 19:02:40 -0000 1.155 -+++ options.c 6 Jun 2004 21:28:21 -0000 +--- options.c 7 Jun 2004 22:05:22 -0000 1.156 ++++ options.c 18 Jun 2004 17:38:21 -0000 @@ -95,6 +95,7 @@ int modify_window = 0; int blocking_io = -1; int checksum_seed = 0; @@ -75,7 +75,7 @@ Do we need configure support for mktime()? {"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 +@@ -596,6 +602,36 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -112,7 +112,7 @@ Do we need configure support for mktime()? default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -908,6 +944,15 @@ void server_options(char **args,int *arg +@@ -903,6 +939,15 @@ void server_options(char **args,int *arg args[ac++] = arg; } @@ -129,7 +129,7 @@ Do we need configure support for mktime()? args[ac++] = "--backup-dir"; args[ac++] = backup_dir; --- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 -+++ rsync.yo 6 Jun 2004 21:28:21 -0000 ++++ rsync.yo 18 Jun 2004 17:38:21 -0000 @@ -347,6 +347,8 @@ verb( --log-format=FORMAT log file transfers using specified format --password-file=FILE get password from FILE @@ -159,8 +159,8 @@ Do we need configure support for mktime()? dit(bf(--write-batch=PREFIX)) Generate a set of files that can be transferred as a batch update. Each filename in the set starts with PREFIX. See the "BATCH MODE" section for details. ---- util.c 5 Jun 2004 20:26:56 -0000 1.148 -+++ util.c 6 Jun 2004 21:28:22 -0000 +--- util.c 9 Jun 2004 21:51:07 -0000 1.149 ++++ util.c 18 Jun 2004 17:38:22 -0000 @@ -125,6 +125,132 @@ void overflow(char *str) exit_cleanup(RERR_MALLOC); } diff --git a/tru64.diff b/tru64.diff index 2376aab..2447d46 100644 --- a/tru64.diff +++ b/tru64.diff @@ -1,8 +1,8 @@ This is an adapted version of the original by Zoong Pham. ---- rsync.h 11 Feb 2004 08:01:21 -0000 1.186 -+++ rsync.h 23 Feb 2004 18:56:02 -0000 -@@ -156,6 +156,11 @@ enum msgcode { +--- rsync.h 16 May 2004 07:28:24 -0000 1.204 ++++ rsync.h 18 Jun 2004 17:38:35 -0000 +@@ -159,6 +159,11 @@ enum msgcode { #include #endif @@ -15,7 +15,7 @@ This is an adapted version of the original by Zoong Pham. #include #endif --- syscall.c 18 Feb 2004 22:33:21 -0000 1.30 -+++ syscall.c 23 Feb 2004 18:56:02 -0000 ++++ syscall.c 18 Jun 2004 17:38:35 -0000 @@ -76,6 +76,29 @@ int do_mknod(char *pathname, mode_t mode { if (dry_run) return 0; @@ -46,8 +46,8 @@ This is an adapted version of the original by Zoong Pham. return mknod(pathname, mode, dev); } #endif ---- lib/getaddrinfo.c 10 Jan 2003 22:38:25 -0000 1.17 -+++ lib/getaddrinfo.c 23 Feb 2004 18:56:02 -0000 +--- lib/getaddrinfo.c 16 Mar 2004 01:26:36 -0000 1.20 ++++ lib/getaddrinfo.c 18 Jun 2004 17:38:35 -0000 @@ -41,6 +41,20 @@ #include -- 2.34.1