From 6ba1be7d830605f1394e344e12117ac8d991eabf Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 11 Mar 2005 17:38:25 +0000 Subject: [PATCH] Got rid of patch fuzz. --- fname-convert.diff | 36 ++++++++++++++++++------------------ link-by-hash.diff | 38 +++++++++++++++++++------------------- openssl-support.diff | 36 ++++++++++++++++++------------------ 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/fname-convert.diff b/fname-convert.diff index aed07a7..7980cbf 100644 --- a/fname-convert.diff +++ b/fname-convert.diff @@ -47,7 +47,7 @@ some utility functions. Note that you'll need to run 'make proto' after applying this patch. ---- orig/Makefile.in 2004-11-03 11:56:03 +--- orig/Makefile.in 2004-11-02 16:47:15 +++ Makefile.in 2004-07-03 20:18:02 @@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle main.o checksum.o match.o syscall.o log.o backup.o @@ -58,7 +58,7 @@ Note that you'll need to run 'make proto' after applying this patch. DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o ---- orig/cleanup.c 2005-02-07 20:41:56 +--- orig/cleanup.c 2005-03-05 18:58:38 +++ cleanup.c 2005-01-10 10:40:51 @@ -25,6 +25,7 @@ extern int io_error; extern int keep_partial; @@ -77,7 +77,7 @@ Note that you'll need to run 'make proto' after applying this patch. if (cleanup_fname) do_unlink(cleanup_fname); if (code) ---- orig/errcode.h 2003-12-15 08:04:14 +--- orig/errcode.h 2005-03-05 18:58:32 +++ errcode.h 2004-07-02 21:38:59 @@ -34,6 +34,7 @@ #define RERR_STREAMIO 12 /* error in rsync protocol data stream */ @@ -87,7 +87,7 @@ Note that you'll need to run 'make proto' after applying this patch. #define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */ #define RERR_WAITCHILD 21 /* some error returned by waitpid() */ ---- orig/flist.c 2005-03-04 08:27:33 +--- orig/flist.c 2005-03-03 18:44:42 +++ flist.c 2005-03-05 00:29:08 @@ -57,6 +57,7 @@ extern int copy_unsafe_links; extern int protocol_version; @@ -382,9 +382,9 @@ Note that you'll need to run 'make proto' after applying this patch. + if (verbose > 2) + rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest); +} ---- orig/generator.c 2005-03-05 00:25:24 +--- orig/generator.c 2005-03-11 17:36:35.384170106 +++ generator.c 2005-03-05 00:29:37 -@@ -572,7 +572,13 @@ void check_for_finished_hlinks(int itemi +@@ -579,7 +579,13 @@ static int phase = 0; * start sending checksums. * * Note that f_out is set to -1 when doing final directory-permission and @@ -398,8 +398,8 @@ Note that you'll need to run 'make proto' after applying this patch. + * reporting to the sender. */ static void recv_generator(char *fname, struct file_struct *file, int ndx, int itemizing, int maybe_PERMS_REPORT, - enum logcode code, int f_out, int f_out_name) ---- orig/log.c 2005-03-05 00:25:25 + enum logcode code, int f_out) +--- orig/log.c 2005-03-09 18:53:58 +++ log.c 2004-07-03 20:18:02 @@ -63,6 +63,7 @@ struct { { RERR_STREAMIO , "error in rsync protocol data stream" }, @@ -409,7 +409,7 @@ Note that you'll need to run 'make proto' after applying this patch. { RERR_SIGNAL , "received SIGUSR1 or SIGINT" }, { RERR_WAITCHILD , "some error returned by waitpid()" }, { RERR_MALLOC , "error allocating core memory buffers" }, ---- orig/main.c 2005-03-05 00:25:25 +--- orig/main.c 2005-03-09 18:54:09 +++ main.c 2004-07-22 00:31:47 @@ -363,7 +363,7 @@ static pid_t do_cmd(char *cmd, char *mac whole_file = 1; @@ -420,7 +420,7 @@ Note that you'll need to run 'make proto' after applying this patch. if (dir) free(dir); ---- orig/options.c 2005-03-02 09:52:06 +--- orig/options.c 2005-03-11 17:36:35.507159655 +++ options.c 2005-02-14 02:50:32 @@ -137,6 +137,7 @@ char *basis_dir[MAX_BASIS_DIRS+1]; char *config_file = NULL; @@ -430,23 +430,23 @@ Note that you'll need to run 'make proto' after applying this patch. char *password_file = NULL; char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; -@@ -318,6 +319,7 @@ void usage(enum logcode F) - rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n"); +@@ -320,6 +321,7 @@ void usage(enum logcode F) rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n"); + rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n"); rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n"); + rprintf(F," --fname-convert=CMD invoke CMD for filename conversion\n"); rprintf(F," -z, --compress compress file data during the transfer\n"); rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n"); rprintf(F," -f, --filter=RULE add a file-filtering RULE\n"); -@@ -426,6 +428,7 @@ static struct poptOption long_options[] - {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 }, +@@ -429,6 +431,7 @@ static struct poptOption long_options[] + {"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 }, {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 }, + {"fname-convert", 0, POPT_ARG_STRING, &fname_convert_cmd, 0, 0, 0 }, /* TODO: Should this take an optional int giving the compression level? */ {"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 }, {"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 }, ---- orig/pipe.c 2005-02-07 20:41:56 +--- orig/pipe.c 2005-02-07 20:36:43 +++ pipe.c 2004-07-03 20:18:02 @@ -23,7 +23,6 @@ @@ -477,7 +477,7 @@ Note that you'll need to run 'make proto' after applying this patch. if (pid == -1) { rsyserr(FERROR, errno, "fork"); exit_cleanup(RERR_IPC); ---- orig/syscall.c 2005-02-14 02:45:11 +--- orig/syscall.c 2005-02-14 00:58:10 +++ syscall.c 2004-07-02 21:39:00 @@ -259,3 +259,34 @@ char *d_name(struct dirent *di) return di->d_name; @@ -514,9 +514,9 @@ Note that you'll need to run 'make proto' after applying this patch. + + return result; +} ---- orig/util.c 2005-02-23 02:57:27 +--- orig/util.c 2005-03-11 17:36:35.798134929 +++ util.c 2004-07-03 20:18:02 -@@ -1327,3 +1327,55 @@ uint32 fuzzy_distance(const char *s1, in +@@ -1328,3 +1328,55 @@ uint32 fuzzy_distance(const char *s1, in return a[len2-1]; } diff --git a/link-by-hash.diff b/link-by-hash.diff index eb6cf59..a76a52e 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -11,7 +11,7 @@ will only store one copy of the unique contents of each file, regardless of the file's name. ---- orig/Makefile.in 2004-11-03 11:56:03 +--- orig/Makefile.in 2004-11-02 16:47:15 +++ Makefile.in 2004-07-03 20:20:15 @@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle main.o checksum.o match.o syscall.o log.o backup.o @@ -365,7 +365,7 @@ the file's name. +} + +#endif ---- orig/options.c 2005-03-01 05:49:24 +--- orig/options.c 2005-03-11 17:36:35.507159655 +++ options.c 2005-03-01 01:27:55 @@ -140,6 +140,7 @@ char *log_format = NULL; char *password_file = NULL; @@ -375,32 +375,32 @@ the file's name. char backup_dir_buf[MAXPATHLEN]; int rsync_port = 0; int compare_dest = 0; -@@ -318,6 +319,7 @@ void usage(enum logcode F) - rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n"); +@@ -320,6 +321,7 @@ void usage(enum logcode F) rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n"); + rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n"); rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n"); + rprintf(F," --link-by-hash=DIR create hardlinks by hash into DIR\n"); rprintf(F," -z, --compress compress file data during the transfer\n"); rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n"); rprintf(F," -f, --filter=RULE add a file-filtering RULE\n"); -@@ -357,7 +359,7 @@ void usage(enum logcode F) +@@ -359,7 +361,7 @@ void usage(enum logcode F) enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, - OPT_FILTER, OPT_COMPARE_DEST, OPT_LINK_DEST, + OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, - OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, + OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, OPT_LINK_BY_HASH, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -425,6 +427,7 @@ static struct poptOption long_options[] - {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, +@@ -428,6 +430,7 @@ static struct poptOption long_options[] {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 }, + {"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 }, {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, + {"link-by-hash", 0, POPT_ARG_STRING, 0, OPT_LINK_BY_HASH, 0, 0}, {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 }, /* TODO: Should this take an optional int giving the compression level? */ {"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 }, -@@ -854,6 +857,21 @@ int parse_arguments(int *argc, const cha +@@ -862,6 +865,21 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -422,7 +422,7 @@ the file's name. default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -1435,6 +1453,11 @@ void server_options(char **args,int *arg +@@ -1443,6 +1461,11 @@ void server_options(char **args,int *arg } } @@ -434,7 +434,7 @@ the file's name. if (files_from && (!am_sender || filesfrom_host)) { if (filesfrom_host) { args[ac++] = "--files-from"; ---- orig/receiver.c 2005-02-26 19:27:54 +--- orig/receiver.c 2005-03-10 00:06:01 +++ receiver.c 2005-01-15 21:29:13 @@ -51,6 +51,7 @@ extern int delay_updates; extern struct stats stats; @@ -496,7 +496,7 @@ the file's name. if (mapbuf) unmap_file(mapbuf); -@@ -335,7 +346,7 @@ static void read_gen_name(int fd, char * +@@ -305,7 +316,7 @@ static int receive_data(int f_in, char * static void discard_receive_data(int f_in, OFF_T length) { @@ -505,7 +505,7 @@ the file's name. } -@@ -602,8 +613,12 @@ int recv_files(int f_in, struct file_lis +@@ -572,8 +583,12 @@ int recv_files(int f_in, struct file_lis rprintf(FINFO, "%s\n", safe_fname(fname)); /* recv file data */ @@ -518,8 +518,8 @@ the file's name. + fname, fd2, file->length, file->u.sum); if (!log_before_transfer) - log_recv(file, &initial_stats, iflags); ---- orig/rsync.c 2005-02-25 18:44:31 + log_item(file, &initial_stats, iflags, NULL); +--- orig/rsync.c 2005-02-25 17:08:57 +++ rsync.c 2005-02-21 11:04:36 @@ -39,6 +39,7 @@ extern int recurse; extern int keep_dirlinks; @@ -543,9 +543,9 @@ the file's name. if (ret < 0) { rsyserr(FERROR, errno, "%s %s -> \"%s\"", ret == -2 ? "copy" : "rename", ---- orig/rsync.h 2005-02-23 02:57:27 +--- orig/rsync.h 2005-03-09 18:53:49 +++ rsync.h 2004-07-03 20:20:15 -@@ -621,6 +621,14 @@ struct stats { +@@ -631,6 +631,14 @@ struct stats { int current_file_index; }; @@ -560,11 +560,11 @@ the file's name. #include "byteorder.h" #include "lib/mdfour.h" ---- orig/rsync.yo 2005-03-01 01:22:59 +--- orig/rsync.yo 2005-03-11 17:36:35.726141047 +++ rsync.yo 2005-02-13 06:58:47 @@ -355,6 +355,7 @@ to the detailed description below for a - -y, --fuzzy find similar file for basis if no dest file --compare-dest=DIR also compare received files relative to DIR + --copy-dest=DIR ... and include copies of unchanged files --link-dest=DIR hardlink to files in DIR when unchanged + --link-by-hash=DIR create hardlinks by hash into DIR -z, --compress compress file data during the transfer diff --git a/openssl-support.diff b/openssl-support.diff index 9487113..0a76308 100644 --- a/openssl-support.diff +++ b/openssl-support.diff @@ -37,7 +37,7 @@ All warnings apply; I don't do C programming all that often, so I can't say if I've left any cleanup/compatibility errors in the code. ---- orig/Makefile.in 2004-11-03 11:56:03 +--- orig/Makefile.in 2004-11-02 16:47:15 +++ Makefile.in 2004-10-08 20:17:06 @@ -39,7 +39,7 @@ OBJS3=progress.o pipe.o DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o @@ -48,7 +48,7 @@ can't say if I've left any cleanup/compatibility errors in the code. TLS_OBJ = tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o ---- orig/cleanup.c 2005-02-07 20:41:56 +--- orig/cleanup.c 2005-03-05 18:58:38 +++ cleanup.c 2005-01-10 10:43:22 @@ -22,6 +22,9 @@ #include "rsync.h" @@ -72,7 +72,7 @@ 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, safe_fname(file), line); ---- orig/clientserver.c 2005-03-01 03:39:47 +--- orig/clientserver.c 2005-03-01 03:39:32 +++ clientserver.c 2004-10-08 20:44:59 @@ -45,6 +45,9 @@ extern int select_timeout; extern int orig_umask; @@ -199,7 +199,7 @@ can't say if I've left any cleanup/compatibility errors in the code. if (*line == '#') { /* it's some sort of command that I don't understand */ io_printf(f_out, "@ERROR: Unknown command '%s'\n", line); ---- orig/configure.in 2005-02-25 18:44:31 +--- orig/configure.in 2005-03-01 06:22:19 +++ configure.in 2004-07-03 20:22:28 @@ -271,6 +271,21 @@ yes AC_SEARCH_LIBS(getaddrinfo, inet6) @@ -223,9 +223,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) ---- orig/options.c 2005-03-01 05:49:24 +--- orig/options.c 2005-03-11 17:36:35.507159655 +++ options.c 2005-03-01 01:34:42 -@@ -155,6 +155,14 @@ int log_format_has_o_or_i = 0; +@@ -157,6 +157,14 @@ int log_format_has_o_or_i = 0; int always_checksum = 0; int list_only = 0; @@ -240,7 +240,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */ char *batch_name = NULL; -@@ -180,6 +188,7 @@ static void print_rsync_version(enum log +@@ -181,6 +189,7 @@ static void print_rsync_version(enum log char const *hardlinks = "no "; char const *links = "no "; char const *ipv6 = "no "; @@ -248,7 +248,7 @@ can't say if I've left any cleanup/compatibility errors in the code. STRUCT_STAT *dumstat; #ifdef HAVE_SOCKETPAIR -@@ -202,6 +211,10 @@ static void print_rsync_version(enum log +@@ -203,6 +212,10 @@ static void print_rsync_version(enum log ipv6 = ""; #endif @@ -259,7 +259,7 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(f, "%s version %s protocol version %d\n", RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); rprintf(f, -@@ -215,10 +228,10 @@ static void print_rsync_version(enum log +@@ -216,10 +229,10 @@ static void print_rsync_version(enum log /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature * macros. */ @@ -272,7 +272,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #ifdef MAINTAINER_MODE rprintf(f, " panic action: \"%s\"\n", get_panic_action()); -@@ -347,6 +360,13 @@ void usage(enum logcode F) +@@ -349,6 +362,13 @@ void usage(enum logcode F) rprintf(F," -4, --ipv4 prefer IPv4\n"); rprintf(F," -6, --ipv6 prefer IPv6\n"); #endif @@ -286,16 +286,16 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(F," -h, --help show this help screen\n"); rprintf(F,"\nUse \"rsync --daemon --help\" to see the daemon-mode command-line options.\n"); -@@ -357,7 +377,7 @@ void usage(enum logcode F) +@@ -359,7 +379,7 @@ void usage(enum logcode F) enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, - OPT_FILTER, OPT_COMPARE_DEST, OPT_LINK_DEST, + OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, - OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, + OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, OPT_USE_SSL, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -455,6 +475,13 @@ static struct poptOption long_options[] +@@ -458,6 +478,13 @@ static struct poptOption long_options[] {"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 }, {"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 }, #endif @@ -309,7 +309,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* All these options switch us into daemon-mode option-parsing. */ {"address", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 }, {"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 }, -@@ -854,6 +881,12 @@ int parse_arguments(int *argc, const cha +@@ -862,6 +889,12 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -322,7 +322,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. */ -@@ -1108,6 +1141,17 @@ int parse_arguments(int *argc, const cha +@@ -1116,6 +1149,17 @@ int parse_arguments(int *argc, const cha if (delay_updates && !partial_dir) partial_dir = partialdir_for_delayupdate; @@ -340,7 +340,7 @@ can't say if I've left any cleanup/compatibility errors in the code. if (inplace) { #ifdef HAVE_FTRUNCATE if (partial_dir) { -@@ -1475,11 +1519,28 @@ char *check_for_hostspec(char *s, char * +@@ -1483,11 +1527,28 @@ char *check_for_hostspec(char *s, char * { char *p; int not_host; @@ -371,7 +371,7 @@ can't say if I've left any cleanup/compatibility errors in the code. if ((p = strchr(s, '/')) != NULL) { hostlen = p - s; path = p + 1; ---- orig/rsync.h 2005-02-23 02:57:27 +--- orig/rsync.h 2005-03-09 18:53:49 +++ rsync.h 2004-10-08 21:01:33 @@ -32,6 +32,7 @@ @@ -381,7 +381,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #define BACKUP_SUFFIX "~" -@@ -400,6 +401,11 @@ enum msgcode { +@@ -410,6 +411,11 @@ enum msgcode { # define SIZEOF_INT64 SIZEOF_OFF_T #endif -- 2.34.1