X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/fc5573623194fab2a331d1ffc8d284c9e25e06e7..7170ca8dba0a407cd0c91b41b48163c7b682abb1:/db.diff diff --git a/db.diff b/db.diff index 65ba736..4cf967e 100644 --- a/db.diff +++ b/db.diff @@ -23,8 +23,8 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make +based-on: 181c9faf928faad08ef095f4667afe460ec3bef6 diff --git a/Makefile.in b/Makefile.in -index feacb90..f9da8eb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,7 +36,7 @@ ZLIBOBJ=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \ @@ -37,7 +37,6 @@ index feacb90..f9da8eb 100644 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 \ diff --git a/checksum.c b/checksum.c -index 811b5b6..a7617af 100644 --- a/checksum.c +++ b/checksum.c @@ -23,6 +23,7 @@ @@ -81,7 +80,6 @@ index 811b5b6..a7617af 100644 unmap_file(buf); } diff --git a/cleanup.c b/cleanup.c -index 19ef072..ca46868 100644 --- a/cleanup.c +++ b/cleanup.c @@ -25,6 +25,7 @@ @@ -106,7 +104,6 @@ index 19ef072..ca46868 100644 int status; int pid = wait_process(cleanup_child_pid, &status, WNOHANG); diff --git a/clientserver.c b/clientserver.c -index b6afe00..37cad54 100644 --- a/clientserver.c +++ b/clientserver.c @@ -42,13 +42,16 @@ extern int numeric_ids; @@ -126,7 +123,7 @@ index b6afe00..37cad54 100644 extern char *bind_address; extern char *config_file; extern char *logfile_format; -@@ -648,6 +651,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char +@@ -642,6 +645,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char log_init(1); @@ -136,7 +133,7 @@ index b6afe00..37cad54 100644 #ifdef HAVE_PUTENV if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) { char *modname, *modpath, *hostaddr, *hostname, *username; -@@ -856,6 +862,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char +@@ -850,6 +856,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char am_server = 1; /* Don't let someone try to be tricky. */ quiet = 0; @@ -148,7 +145,6 @@ index b6afe00..37cad54 100644 ignore_errors = 1; if (write_batch < 0) diff --git a/configure.in b/configure.in -index bc7d4a7..43d51ff 100644 --- a/configure.in +++ b/configure.in @@ -312,7 +312,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \ @@ -192,7 +188,6 @@ index bc7d4a7..43d51ff 100644 AC_DEFINE(FORCE_FD_ZERO_MEMSET, 1, [Used to make "checker" understand that FD_ZERO() clears memory.]) diff --git a/db.c b/db.c new file mode 100644 -index 0000000..6855488 --- /dev/null +++ b/db.c @@ -0,0 +1,566 @@ @@ -763,7 +758,6 @@ index 0000000..6855488 + return 0; +} diff --git a/flist.c b/flist.c -index 09b4fc5..8d280e9 100644 --- a/flist.c +++ b/flist.c @@ -54,6 +54,7 @@ extern int preserve_specials; @@ -774,7 +768,7 @@ index 09b4fc5..8d280e9 100644 extern int eol_nulls; extern int relative_paths; extern int implied_dirs; -@@ -1267,11 +1268,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1276,11 +1277,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, extra_len += EXTRA_LEN; #endif @@ -788,7 +782,7 @@ index 09b4fc5..8d280e9 100644 #if EXTRA_ROUNDING > 0 if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN)) -@@ -1347,8 +1345,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1357,8 +1355,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, return NULL; } @@ -803,7 +797,7 @@ index 09b4fc5..8d280e9 100644 if (unsort_ndx) F_NDX(file) = stats.num_dirs; -@@ -2010,6 +2012,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) +@@ -2020,6 +2022,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) | (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0); int implied_dot_dir = 0; @@ -814,7 +808,6 @@ index 09b4fc5..8d280e9 100644 if (show_filelist_p()) start_filelist_progress("building file list"); diff --git a/generator.c b/generator.c -index 12007a1..315463f 100644 --- a/generator.c +++ b/generator.c @@ -60,6 +60,7 @@ extern int human_readable; @@ -835,7 +828,7 @@ index 12007a1..315463f 100644 return memcmp(sum, F_SUM(file), checksum_len) == 0; } -@@ -2022,6 +2024,9 @@ void generate_files(int f_out, const char *local_name) +@@ -2017,6 +2019,9 @@ void generate_files(int f_out, const char *local_name) : "enabled"); } @@ -846,7 +839,6 @@ index 12007a1..315463f 100644 * waiting for the other 2 processes to do their thing, we don't want * to exit on a timeout. If the data stops flowing, the receiver will diff --git a/loadparm.c b/loadparm.c -index 8e48e6d..e6eaec8 100644 --- a/loadparm.c +++ b/loadparm.c @@ -107,6 +107,7 @@ typedef struct { @@ -882,7 +874,6 @@ index 8e48e6d..e6eaec8 100644 FN_LOCAL_STRING(lp_exclude, exclude) FN_LOCAL_STRING(lp_exclude_from, exclude_from) diff --git a/main.c b/main.c -index 2ef2f47..ac88e12 100644 --- a/main.c +++ b/main.c @@ -49,6 +49,7 @@ extern int copy_unsafe_links; @@ -901,7 +892,7 @@ index 2ef2f47..ac88e12 100644 extern char *shell_cmd; extern char *batch_name; extern char *password_file; -@@ -1565,6 +1567,9 @@ int main(int argc,char *argv[]) +@@ -1577,6 +1579,9 @@ int main(int argc,char *argv[]) exit_cleanup(RERR_SYNTAX); } @@ -912,7 +903,6 @@ index 2ef2f47..ac88e12 100644 set_nonblocking(STDIN_FILENO); set_nonblocking(STDOUT_FILENO); diff --git a/options.c b/options.c -index e7c6c61..d47cb7c 100644 --- a/options.c +++ b/options.c @@ -92,6 +92,7 @@ int use_qsort = 0; @@ -971,7 +961,6 @@ index e7c6c61..d47cb7c 100644 {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 }, {"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 }, diff --git a/pipe.c b/pipe.c -index a33117c..2f6aa21 100644 --- a/pipe.c +++ b/pipe.c @@ -27,6 +27,9 @@ extern int am_server; @@ -1004,7 +993,6 @@ index a33117c..2f6aa21 100644 if (dup2(to_child_pipe[0], STDIN_FILENO) < 0 || diff --git a/rsync.yo b/rsync.yo -index 941f7a5..1b81189 100644 --- a/rsync.yo +++ b/rsync.yo @@ -323,6 +323,7 @@ to the detailed description below for a complete description. verb( @@ -1015,9 +1003,9 @@ index 941f7a5..1b81189 100644 -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X) --no-OPTION turn off an implied OPTION (e.g. --no-D) -r, --recursive recurse into directories -@@ -584,6 +585,47 @@ checksum that is generated as the file is transferred, but that - automatic after-the-transfer verification has nothing to do with this - option's before-the-transfer "Does this file need to be updated?" check. +@@ -587,6 +588,47 @@ option's before-the-transfer "Does this file need to be updated?" check. + For protocol 30 and beyond (first supported in 3.0.0), the checksum used is + MD5. For older protocols, the checksum used is MD4. +dit(bf(--db=CONFIG_FILE)) This option specifies a CONFIG_FILE to read +that holds connection details for a database of checksum information. @@ -1064,7 +1052,6 @@ index 941f7a5..1b81189 100644 way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo -index d4978cd..68c588c 100644 --- a/rsyncd.conf.yo +++ b/rsyncd.conf.yo @@ -281,6 +281,18 @@ is daemon. This setting has no effect if the "log file" setting is a @@ -1088,7 +1075,6 @@ index d4978cd..68c588c 100644 generate (since the information goes into the log file). The default is 1, diff --git a/support/rsyncdb b/support/rsyncdb new file mode 100755 -index 0000000..801068c --- /dev/null +++ b/support/rsyncdb @@ -0,0 +1,331 @@