From dc8e49198e2a72faf80075fbea95024dcce41757 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 23 Feb 2005 02:59:32 +0000 Subject: [PATCH] Updated to apply cleanly. --- ODBC-dblog.diff | 8 ++++---- acls.diff | 30 +++++++++++++++--------------- append.diff | 30 +++++++++++++++--------------- atimes.diff | 30 +++++++++++++++--------------- backup-dir-dels.diff | 28 ++++++++++++++-------------- chmod-option.diff | 18 +++++++++--------- date-only.diff | 16 ++++++++-------- fname-convert.diff | 24 ++++++++++++------------ fsync.diff | 10 +++++----- ignore-case.diff | 12 ++++++------ link-by-hash.diff | 28 ++++++++++++++-------------- links-depth.diff | 10 +++++----- openssl-support.diff | 34 +++++++++++++++++----------------- owner-group-mod.diff | 10 +++++----- source-cd.diff | 18 +++++++++--------- time-limit.diff | 22 +++++++++++----------- 16 files changed, 164 insertions(+), 164 deletions(-) diff --git a/ODBC-dblog.diff b/ODBC-dblog.diff index 1003719..b7e6015 100644 --- a/ODBC-dblog.diff +++ b/ODBC-dblog.diff @@ -697,9 +697,9 @@ This patch adds the following options: { int i; for (i = 0; rerr_names[i].name; i++) { ---- orig/main.c 2005-02-20 01:12:42 +--- orig/main.c 2005-02-23 02:57:26 +++ main.c 2004-07-03 20:22:18 -@@ -137,6 +137,9 @@ static void report(int f) +@@ -139,6 +139,9 @@ static void report(int f) if (am_daemon) { log_exit(0, __FILE__, __LINE__); @@ -721,9 +721,9 @@ This patch adds the following options: if (fd1 != -1) close(fd1); ---- orig/sender.c 2005-02-20 01:12:43 +--- orig/sender.c 2005-02-23 02:57:27 +++ sender.c 2005-02-16 15:40:44 -@@ -295,6 +295,9 @@ void send_files(struct file_list *flist, +@@ -294,6 +294,9 @@ void send_files(struct file_list *flist, match_sums(f_out, s, mbuf, st.st_size); if (!log_before_transfer) log_send(file, &initial_stats, iflags); diff --git a/acls.diff b/acls.diff index 303f865..6e7dd84 100644 --- a/acls.diff +++ b/acls.diff @@ -1285,7 +1285,7 @@ ACLs to a non-ACL-supporting disk should complain. AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT ---- orig/flist.c 2005-02-22 02:10:16 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2005-02-14 02:45:34 @@ -979,6 +979,8 @@ void send_file_name(int f, struct file_l file = make_file(fname, flist, f == -2 ? SERVER_FILTERS : ALL_FILTERS); @@ -1325,9 +1325,9 @@ ACLs to a non-ACL-supporting disk should complain. if (f >= 0) { /* Now send the uid/gid list. This was introduced in * protocol version 15 */ ---- orig/generator.c 2005-02-20 22:13:19 +--- orig/generator.c 2005-02-23 02:57:26 +++ generator.c 2005-02-20 00:02:51 -@@ -489,6 +489,10 @@ static void recv_generator(char *fname, +@@ -491,6 +491,10 @@ static void recv_generator(char *fname, if (set_perms(fname, file, statret ? NULL : &st, 0) && verbose && code && f_out != -1) rprintf(code, "%s/\n", safe_fname(fname)); @@ -4597,7 +4597,7 @@ ACLs to a non-ACL-supporting disk should complain. next; } ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-14 02:46:05 @@ -44,6 +44,7 @@ int keep_dirlinks = 0; int copy_links = 0; @@ -4607,7 +4607,7 @@ ACLs to a non-ACL-supporting disk should complain. int preserve_perms = 0; int preserve_devices = 0; int preserve_uid = 0; -@@ -178,6 +179,7 @@ static void print_rsync_version(enum log +@@ -177,6 +178,7 @@ static void print_rsync_version(enum log char const *got_socketpair = "no "; char const *have_inplace = "no "; char const *hardlinks = "no "; @@ -4615,7 +4615,7 @@ ACLs to a non-ACL-supporting disk should complain. char const *links = "no "; char const *ipv6 = "no "; STRUCT_STAT *dumstat; -@@ -194,6 +196,10 @@ static void print_rsync_version(enum log +@@ -193,6 +195,10 @@ static void print_rsync_version(enum log hardlinks = ""; #endif @@ -4626,7 +4626,7 @@ ACLs to a non-ACL-supporting disk should complain. #ifdef SUPPORT_LINKS links = ""; #endif -@@ -208,9 +214,9 @@ static void print_rsync_version(enum log +@@ -207,9 +213,9 @@ static void print_rsync_version(enum log "Copyright (C) 1996-2005 by Andrew Tridgell and others\n"); rprintf(f, "\n"); rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, " @@ -4638,7 +4638,7 @@ ACLs to a non-ACL-supporting disk should complain. /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature -@@ -280,6 +286,7 @@ void usage(enum logcode F) +@@ -279,6 +285,7 @@ void usage(enum logcode F) rprintf(F," -H, --hard-links preserve hard links\n"); rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n"); rprintf(F," -p, --perms preserve permissions\n"); @@ -4646,7 +4646,7 @@ ACLs to a non-ACL-supporting disk should complain. 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"); -@@ -403,6 +410,7 @@ static struct poptOption long_options[] +@@ -401,6 +408,7 @@ static struct poptOption long_options[] {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, {"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 }, {"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 }, @@ -4654,7 +4654,7 @@ ACLs to a non-ACL-supporting disk should complain. {"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 }, {"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 }, {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, -@@ -860,6 +868,24 @@ int parse_arguments(int *argc, const cha +@@ -852,6 +860,24 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -4679,7 +4679,7 @@ ACLs to a non-ACL-supporting disk should complain. default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -1266,6 +1292,8 @@ void server_options(char **args,int *arg +@@ -1258,6 +1284,8 @@ void server_options(char **args,int *arg if (preserve_hard_links) argstr[x++] = 'H'; @@ -4705,9 +4705,9 @@ ACLs to a non-ACL-supporting disk should complain. if (verbose > 1 && flags & PERMS_REPORT) { enum logcode code = daemon_log_format_has_i || dry_run ? FCLIENT : FINFO; ---- orig/rsync.h 2005-02-20 00:02:23 +--- orig/rsync.h 2005-02-23 02:57:27 +++ rsync.h 2004-07-03 20:11:58 -@@ -627,6 +627,40 @@ struct stats { +@@ -628,6 +628,40 @@ struct stats { #include "lib/permstring.h" #include "lib/addrinfo.h" @@ -4748,7 +4748,7 @@ ACLs to a non-ACL-supporting disk should complain. #include "proto.h" /* We have replacement versions of these if they're missing. */ ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2004-07-03 20:11:58 @@ -317,6 +317,7 @@ to the detailed description below for a -H, --hard-links preserve hard links @@ -4758,7 +4758,7 @@ ACLs to a non-ACL-supporting disk should complain. -o, --owner preserve owner (root only) -g, --group preserve group -D, --devices preserve devices (root only) -@@ -625,6 +626,11 @@ source file's permissions and the umask +@@ -624,6 +625,11 @@ source file's permissions and the umask other files (including updated files) retain their existing permissions (which is the same behavior as other file-copy utilities, such as cp). diff --git a/append.diff b/append.diff index d4eea7c..45e19b5 100644 --- a/append.diff +++ b/append.diff @@ -1,7 +1,7 @@ This patch adds the --append option, which works like a "resume" mode in an ftp client, appending new data onto the end of the files it updates. ---- orig/generator.c 2005-02-20 22:13:19 +--- orig/generator.c 2005-02-23 02:57:26 +++ generator.c 2005-02-15 19:31:13 @@ -46,6 +46,7 @@ extern int remove_sent_files; extern int update_only; @@ -11,7 +11,7 @@ an ftp client, appending new data onto the end of the files it updates. extern int make_backups; extern int csum_length; extern int ignore_times; -@@ -243,35 +244,42 @@ static void generate_and_send_sums(int f +@@ -245,35 +246,42 @@ static void generate_and_send_sums(int f OFF_T offset = 0; sum_sizes_sqroot(&sum, len); @@ -61,7 +61,7 @@ an ftp client, appending new data onto the end of the files it updates. } if (mapbuf) -@@ -731,6 +739,9 @@ static void recv_generator(char *fname, +@@ -733,6 +741,9 @@ static void recv_generator(char *fname, return; } @@ -71,7 +71,7 @@ an ftp client, appending new data onto the end of the files it updates. if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH) ; else if (fnamecmp_type == FNAMECMP_FUZZY) -@@ -757,7 +768,7 @@ prepare_to_open: +@@ -759,7 +770,7 @@ prepare_to_open: if (dry_run || read_batch) goto notify_others; @@ -80,7 +80,7 @@ an ftp client, appending new data onto the end of the files it updates. if (statret == 0) statret = 1; goto notify_others; -@@ -923,6 +934,9 @@ void generate_files(int f_out, struct fi +@@ -926,6 +937,9 @@ void generate_files(int f_out, struct fi csum_length = SUM_LENGTH; only_existing = max_size = opt_ignore_existing = 0; update_only = always_checksum = size_only = 0; @@ -131,7 +131,7 @@ an ftp client, appending new data onto the end of the files it updates. matched(f, s, buf, j, -2); matched(f, s, buf, len, -1); } ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-16 15:36:40 @@ -39,6 +39,7 @@ int make_backups = 0; **/ @@ -141,7 +141,7 @@ an ftp client, appending new data onto the end of the files it updates. int archive_mode = 0; int keep_dirlinks = 0; int copy_links = 0; -@@ -163,6 +164,7 @@ static int F_option_cnt = 0; +@@ -162,6 +163,7 @@ static int F_option_cnt = 0; static int modify_window_set; static int refused_delete, refused_archive_part; static int refused_partial, refused_progress, refused_delete_before; @@ -149,7 +149,7 @@ an ftp client, appending new data onto the end of the files it updates. static char *dest_option = NULL; static char *max_size_arg; static char partialdir_for_delayupdate[] = ".~tmp~"; -@@ -272,6 +274,7 @@ void usage(enum logcode F) +@@ -271,6 +273,7 @@ void usage(enum logcode F) rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); rprintf(F," -u, --update skip files that are newer on the receiver\n"); rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n"); @@ -157,7 +157,7 @@ an ftp client, appending new data onto the end of the files it updates. rprintf(F," -d, --dirs transfer directories without recursing\n"); rprintf(F," -l, --links copy symlinks as symlinks\n"); rprintf(F," -L, --copy-links transform symlink into referent file/dir\n"); -@@ -399,6 +402,7 @@ static struct poptOption long_options[] +@@ -397,6 +400,7 @@ static struct poptOption long_options[] {"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 }, {"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 }, {"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 }, @@ -165,7 +165,7 @@ an ftp client, appending new data onto the end of the files it updates. {"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 }, {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, {"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 }, -@@ -573,6 +577,8 @@ static void set_refuse_options(char *bp) +@@ -570,6 +574,8 @@ static void set_refuse_options(char *bp) refused_partial = op->val; else if (wildmatch("progress", op->longName)) refused_progress = op->val; @@ -174,7 +174,7 @@ an ftp client, appending new data onto the end of the files it updates. break; } if (!is_wild) -@@ -1123,6 +1129,14 @@ int parse_arguments(int *argc, const cha +@@ -1115,6 +1121,14 @@ int parse_arguments(int *argc, const cha bwlimit_writemax = 512; } @@ -189,7 +189,7 @@ an ftp client, appending new data onto the end of the files it updates. if (delay_updates && !partial_dir) partial_dir = partialdir_for_delayupdate; -@@ -1420,7 +1434,9 @@ void server_options(char **args,int *arg +@@ -1412,7 +1426,9 @@ void server_options(char **args,int *arg if (opt_ignore_existing && am_sender) args[ac++] = "--ignore-existing"; @@ -247,7 +247,7 @@ an ftp client, appending new data onto the end of the files it updates. continue; } ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-02-11 20:36:38 @@ -309,6 +309,7 @@ to the detailed description below for a --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) @@ -257,7 +257,7 @@ an ftp client, appending new data onto the end of the files it updates. -d, --dirs transfer directories without recursing -l, --links copy symlinks as symlinks -L, --copy-links transform symlink into referent file/dir -@@ -565,6 +566,14 @@ should not use this option to update fil +@@ -564,6 +565,14 @@ should not use this option to update fil rsync will be unable to update a file in-place that is not writable by the receiving user. @@ -272,7 +272,7 @@ an ftp client, appending new data onto the end of the files it updates. dit(bf(-d, --dirs)) Tell the sending side to include any directories that are encountered. Unlike bf(--recursive), a directory's contents are not copied unless the directory was specified on the command-line as either "." or a ---- orig/sender.c 2005-02-20 01:12:43 +--- orig/sender.c 2005-02-23 02:57:27 +++ sender.c 2005-02-20 00:17:01 @@ -28,6 +28,7 @@ extern int log_format_has_i; extern int daemon_log_format_has_i; diff --git a/atimes.diff b/atimes.diff index 0966b12..7e35ba1 100644 --- a/atimes.diff +++ b/atimes.diff @@ -15,7 +15,7 @@ command before "make": rprintf(FINFO, "flist->length=%.0f\n", (double) fptr[i]->length); rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode); ---- orig/flist.c 2005-02-22 02:10:16 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2005-02-07 21:06:04 @@ -56,6 +56,7 @@ extern int relative_paths; extern int implied_dirs; @@ -127,9 +127,9 @@ command before "make": file->length = st.st_size; file->mode = st.st_mode; file->uid = st.st_uid; ---- orig/generator.c 2005-02-20 22:13:19 +--- orig/generator.c 2005-02-23 02:57:26 +++ generator.c 2004-11-03 23:02:12 -@@ -150,7 +150,7 @@ static int unchanged_file(char *fn, stru +@@ -152,7 +152,7 @@ static int unchanged_file(char *fn, stru if (ignore_times) return 0; @@ -138,7 +138,7 @@ command before "make": } -@@ -725,7 +725,7 @@ static void recv_generator(char *fname, +@@ -727,7 +727,7 @@ static void recv_generator(char *fname, } if (update_only && fnamecmp_type == FNAMECMP_FNAME @@ -147,7 +147,7 @@ command before "make": if (verbose > 1) rprintf(FINFO, "%s is newer\n", safe_fname(fname)); return; ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-21 10:53:28 @@ -50,6 +50,7 @@ int preserve_uid = 0; int preserve_gid = 0; @@ -157,7 +157,7 @@ command before "make": int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -284,6 +285,7 @@ void usage(enum logcode F) +@@ -283,6 +284,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"); @@ -165,7 +165,7 @@ command before "make": rprintf(F," -O, --omit-dir-times omit directories when preserving times\n"); rprintf(F," -S, --sparse handle sparse files efficiently\n"); rprintf(F," -n, --dry-run show what would have been transferred\n"); -@@ -408,6 +410,7 @@ static struct poptOption long_options[] +@@ -406,6 +408,7 @@ static struct poptOption long_options[] {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 }, {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, @@ -173,7 +173,7 @@ command before "make": {"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 }, -@@ -1274,6 +1277,8 @@ void server_options(char **args,int *arg +@@ -1266,6 +1269,8 @@ void server_options(char **args,int *arg argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; @@ -234,7 +234,7 @@ command before "make": } change_uid = am_root && preserve_uid && st->st_uid != file->uid; ---- orig/rsync.h 2005-02-20 00:02:23 +--- orig/rsync.h 2005-02-23 02:57:27 +++ rsync.h 2004-07-03 20:15:41 @@ -54,6 +54,7 @@ #define XMIT_HAS_IDEV_DATA (1<<9) @@ -252,7 +252,7 @@ command before "make": #define FULL_FLUSH 1 #define NORMAL_FLUSH 0 -@@ -498,6 +500,7 @@ struct file_struct { +@@ -499,6 +501,7 @@ struct file_struct { struct hlink *links; } link_u; time_t modtime; @@ -260,7 +260,7 @@ command before "make": uid_t uid; gid_t gid; mode_t mode; ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-01-24 01:57:18 @@ -322,6 +322,7 @@ to the detailed description below for a -D, --devices preserve devices (root only) @@ -270,7 +270,7 @@ command before "make": -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy files whole (without rsync algorithm) -@@ -654,6 +655,11 @@ dit(bf(-O, --omit-dir-times)) This tells +@@ -653,6 +654,11 @@ dit(bf(-O, --omit-dir-times)) This tells it is preserving modification times (see bf(--times)). If NFS is sharing the directories on the receiving side, it is a good idea to use bf(-O). @@ -469,7 +469,7 @@ command before "make": return 0; } ---- orig/util.c 2005-02-20 19:17:49 +--- orig/util.c 2005-02-23 02:57:27 +++ util.c 2005-02-07 21:09:12 @@ -128,12 +128,17 @@ void overflow(char *str) @@ -513,7 +513,7 @@ command before "make": t[0].tv_usec = 0; t[1].tv_sec = modtime; t[1].tv_usec = 0; -@@ -1149,8 +1154,8 @@ int msleep(int t) +@@ -1145,8 +1150,8 @@ int msleep(int t) /** @@ -524,7 +524,7 @@ command before "make": * --modify-window). * * @retval 0 if the times should be treated as the same -@@ -1159,7 +1164,7 @@ int msleep(int t) +@@ -1155,7 +1160,7 @@ int msleep(int t) * * @retval -1 if the 2nd is later **/ diff --git a/backup-dir-dels.diff b/backup-dir-dels.diff index 179bc76..5c66634 100644 --- a/backup-dir-dels.diff +++ b/backup-dir-dels.diff @@ -106,7 +106,7 @@ Marc St-Onge + deleting = 0; + return ret; +} ---- orig/flist.c 2005-02-22 02:10:16 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2005-02-22 02:12:20 @@ -67,6 +67,9 @@ extern char *log_format; extern char *backup_dir; @@ -118,7 +118,7 @@ Marc St-Onge extern char curr_dir[MAXPATHLEN]; -@@ -1773,10 +1776,14 @@ struct file_list *get_dirlist(const char +@@ -1775,10 +1778,14 @@ struct file_list *get_dirlist(const char static int deletion_count = 0; /* used to implement --max-delete */ @@ -134,7 +134,7 @@ Marc St-Onge } -@@ -1815,9 +1822,9 @@ int delete_file(char *fname, int mode, i +@@ -1818,9 +1825,9 @@ int delete_file(char *fname, int mode, i if (dry_run && zap_dir) { ok = 0; errno = ENOTEMPTY; @@ -146,7 +146,7 @@ Marc St-Onge else ok = do_rmdir(fname) == 0; if (ok) { ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-21 11:02:45 @@ -126,10 +126,14 @@ int no_detach int write_batch = 0; @@ -172,8 +172,8 @@ Marc St-Onge +char backup_dir_rm_buf[MAXPATHLEN]; int rsync_port = 0; int compare_dest = 0; - int copy_dest = 0; -@@ -270,6 +276,8 @@ void usage(enum logcode F) + int link_dest = 0; +@@ -269,6 +275,8 @@ void usage(enum logcode F) rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n"); rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n"); rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); @@ -182,7 +182,7 @@ Marc St-Onge rprintf(F," -u, --update skip files that are newer on the receiver\n"); rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n"); rprintf(F," -d, --dirs transfer directories without recursing\n"); -@@ -365,6 +373,7 @@ static struct poptOption long_options[] +@@ -363,6 +371,7 @@ static struct poptOption long_options[] /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ {"version", 0, POPT_ARG_NONE, 0, OPT_VERSION, 0, 0}, {"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 }, @@ -190,7 +190,7 @@ Marc St-Onge {"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 }, {"password-file", 0, POPT_ARG_STRING, &password_file, 0, 0, 0 }, {"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 }, -@@ -445,6 +454,7 @@ static struct poptOption long_options[] +@@ -442,6 +451,7 @@ static struct poptOption long_options[] {"itemize-changes", 'i', POPT_ARG_NONE, &itemize_changes, 0, 0, 0 }, {"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 }, {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, @@ -198,7 +198,7 @@ Marc St-Onge {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 }, {"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 }, {"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 }, -@@ -1013,6 +1023,8 @@ int parse_arguments(int *argc, const cha +@@ -1005,6 +1015,8 @@ int parse_arguments(int *argc, const cha partial_dir = sanitize_path(NULL, partial_dir, NULL, 0); if (backup_dir) backup_dir = sanitize_path(NULL, backup_dir, NULL, 0); @@ -207,7 +207,7 @@ Marc St-Onge if (files_from) files_from = sanitize_path(NULL, files_from, NULL, 0); } -@@ -1045,6 +1057,12 @@ int parse_arguments(int *argc, const cha +@@ -1037,6 +1049,12 @@ int parse_arguments(int *argc, const cha if (check_filter(elp, backup_dir, 1) < 0) goto options_rejected; } @@ -220,7 +220,7 @@ Marc St-Onge } if (server_filter_list.head && files_from) { if (!*files_from) -@@ -1067,6 +1085,16 @@ int parse_arguments(int *argc, const cha +@@ -1059,6 +1077,16 @@ int parse_arguments(int *argc, const cha backup_suffix); return 0; } @@ -237,7 +237,7 @@ Marc St-Onge if (backup_dir) { backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf); backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len; -@@ -1088,6 +1116,31 @@ int parse_arguments(int *argc, const cha +@@ -1080,6 +1108,31 @@ int parse_arguments(int *argc, const cha "--suffix cannot be a null string without --backup-dir\n"); return 0; } @@ -269,7 +269,7 @@ Marc St-Onge if (make_backups && !backup_dir) omit_dir_times = 1; -@@ -1353,6 +1406,10 @@ void server_options(char **args,int *arg +@@ -1345,6 +1398,10 @@ void server_options(char **args,int *arg args[ac++] = "--backup-dir"; args[ac++] = backup_dir; } @@ -280,7 +280,7 @@ Marc St-Onge /* Only send --suffix if it specifies a non-default value. */ if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) { -@@ -1361,7 +1418,13 @@ void server_options(char **args,int *arg +@@ -1353,7 +1410,13 @@ void server_options(char **args,int *arg goto oom; args[ac++] = arg; } diff --git a/chmod-option.diff b/chmod-option.diff index e41fa73..7f52ff5 100644 --- a/chmod-option.diff +++ b/chmod-option.diff @@ -202,7 +202,7 @@ command before "make": + } + return 0; +} ---- orig/flist.c 2005-02-22 02:10:16 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2004-09-18 01:51:11 @@ -70,6 +70,8 @@ extern int backup_suffix_len; @@ -225,7 +225,7 @@ command before "make": file->uid = st.st_uid; file->gid = st.st_gid; ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-16 15:38:40 @@ -139,6 +139,7 @@ char *log_format = NULL; char *password_file = NULL; @@ -235,7 +235,7 @@ command before "make": char backup_dir_buf[MAXPATHLEN]; int rsync_port = 0; int compare_dest = 0; -@@ -158,6 +159,8 @@ int list_only = 0; +@@ -157,6 +158,8 @@ int list_only = 0; #define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */ char *batch_name = NULL; @@ -244,7 +244,7 @@ command before "make": static int daemon_opt; /* sets am_daemon after option error-reporting */ static int F_option_cnt = 0; static int modify_window_set; -@@ -285,6 +288,7 @@ void usage(enum logcode F) +@@ -284,6 +287,7 @@ void usage(enum logcode F) rprintf(F," -D, --devices preserve devices (root only)\n"); rprintf(F," -t, --times preserve times\n"); rprintf(F," -O, --omit-dir-times omit directories when preserving times\n"); @@ -252,7 +252,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 files whole (without rsync algorithm)\n"); -@@ -405,6 +409,7 @@ static struct poptOption long_options[] +@@ -403,6 +407,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 }, @@ -260,7 +260,7 @@ command before "make": {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 }, {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, -@@ -1091,6 +1096,13 @@ int parse_arguments(int *argc, const cha +@@ -1083,6 +1088,13 @@ int parse_arguments(int *argc, const cha if (make_backups && !backup_dir) omit_dir_times = 1; @@ -274,7 +274,7 @@ command before "make": if (log_format) { if (strstr(log_format, "%i") != NULL) log_format_has_i = 1; -@@ -1440,6 +1452,11 @@ void server_options(char **args,int *arg +@@ -1432,6 +1444,11 @@ void server_options(char **args,int *arg } } @@ -286,7 +286,7 @@ command before "make": if (files_from && (!am_sender || remote_filesfrom_file)) { if (remote_filesfrom_file) { args[ac++] = "--files-from"; ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-01-24 01:48:43 @@ -322,6 +322,7 @@ to the detailed description below for a -D, --devices preserve devices (root only) @@ -296,7 +296,7 @@ command before "make": -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy files whole (without rsync algorithm) -@@ -654,6 +655,14 @@ dit(bf(-O, --omit-dir-times)) This tells +@@ -653,6 +654,14 @@ dit(bf(-O, --omit-dir-times)) This tells it is preserving modification times (see bf(--times)). If NFS is sharing the directories on the receiving side, it is a good idea to use bf(-O). diff --git a/date-only.diff b/date-only.diff index 754c619..4cde7e4 100644 --- a/date-only.diff +++ b/date-only.diff @@ -15,7 +15,7 @@ Jeremy Bornstein [Patched update to have context and apply to latest CVS source.] ---- orig/generator.c 2005-02-20 22:13:19 +--- orig/generator.c 2005-02-23 02:57:26 +++ generator.c 2004-11-11 22:15:27 @@ -49,6 +49,7 @@ extern int inplace; extern int make_backups; @@ -25,7 +25,7 @@ Jeremy Bornstein extern int size_only; extern OFF_T max_size; extern int io_timeout; -@@ -132,6 +133,8 @@ static void itemize(struct file_struct * +@@ -134,6 +135,8 @@ static void itemize(struct file_struct * /* Perform our quick-check heuristic for determining if a file is unchanged. */ static int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st) { @@ -34,7 +34,7 @@ Jeremy Bornstein if (st->st_size != file->length) return 0; ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-01-28 19:14:15 @@ -88,6 +88,7 @@ int keep_partial = 0; int safe_symlinks = 0; @@ -44,7 +44,7 @@ Jeremy Bornstein int daemon_bwlimit = 0; int bwlimit = 0; int fuzzy_basis = 0; -@@ -313,6 +314,7 @@ void usage(enum logcode F) +@@ -312,6 +313,7 @@ void usage(enum logcode F) rprintf(F," --timeout=TIME set I/O timeout in seconds\n"); rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n"); rprintf(F," --size-only skip files that match in 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," -y, --fuzzy find similar file for basis if no dest file\n"); -@@ -369,6 +371,7 @@ static struct poptOption long_options[] +@@ -367,6 +369,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 }, {"existing", 0, POPT_ARG_NONE, &only_existing, 0, 0, 0 }, -@@ -1380,6 +1383,9 @@ void server_options(char **args,int *arg +@@ -1372,6 +1375,9 @@ void server_options(char **args,int *arg if (size_only) args[ac++] = "--size-only"; @@ -70,7 +70,7 @@ Jeremy Bornstein if (modify_window_set) { if (asprintf(&arg, "--modify-window=%d", modify_window) < 0) goto oom; ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-02-11 22:49:10 @@ -350,6 +350,7 @@ to the detailed description below for a --timeout=TIME set I/O timeout in seconds @@ -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 -y, --fuzzy find similar file for basis if no dest file -@@ -446,6 +447,12 @@ regardless of timestamp. This is useful +@@ -445,6 +446,12 @@ regardless of timestamp. This is useful after using another mirroring system which may not preserve timestamps exactly. diff --git a/fname-convert.diff b/fname-convert.diff index dbfeea0..3807df6 100644 --- a/fname-convert.diff +++ b/fname-convert.diff @@ -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-02-22 02:10:16 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2005-02-21 11:04:00 @@ -63,6 +63,7 @@ extern int force_delete; extern int orig_umask; @@ -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-02-20 22:13:19 +--- orig/generator.c 2005-02-23 02:57:26 +++ generator.c 2005-02-03 02:07:33 -@@ -340,7 +340,13 @@ static int find_fuzzy(struct file_struct +@@ -342,7 +342,13 @@ static int find_fuzzy(struct file_struct * start sending checksums. * * Note that f_out is set to -1 when doing final directory-permission and @@ -409,9 +409,9 @@ 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-02-20 01:12:42 +--- orig/main.c 2005-02-23 02:57:26 +++ main.c 2004-07-22 00:31:47 -@@ -361,7 +361,7 @@ static pid_t do_cmd(char *cmd, char *mac +@@ -363,7 +363,7 @@ static pid_t do_cmd(char *cmd, char *mac whole_file = 1; ret = local_child(argc, args, f_in, f_out, child_main); } else @@ -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-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-14 02:50:32 @@ -136,6 +136,7 @@ char *basis_dir[MAX_BASIS_DIRS+1]; char *config_file = NULL; @@ -430,16 +430,16 @@ 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; -@@ -319,6 +320,7 @@ void usage(enum logcode F) +@@ -317,6 +318,7 @@ void usage(enum logcode F) + rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n"); 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"); -@@ -428,6 +430,7 @@ static struct poptOption long_options[] - {"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 }, +@@ -425,6 +427,7 @@ static struct poptOption long_options[] + {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_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 }, @@ -514,9 +514,9 @@ Note that you'll need to run 'make proto' after applying this patch. + + return result; +} ---- orig/util.c 2005-02-20 19:17:49 +--- orig/util.c 2005-02-23 02:57:27 +++ util.c 2004-07-03 20:18:02 -@@ -1331,3 +1331,55 @@ uint32 fuzzy_distance(const char *s1, in +@@ -1327,3 +1327,55 @@ uint32 fuzzy_distance(const char *s1, in return a[len2-1]; } diff --git a/fsync.diff b/fsync.diff index 464f72e..943c286 100644 --- a/fsync.diff +++ b/fsync.diff @@ -1,7 +1,7 @@ This patch from Sami Farin lets you specify --fsync if you want fsync() to be called on every file we write. ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-01-28 19:30:47 @@ -39,6 +39,7 @@ int make_backups = 0; **/ @@ -11,7 +11,7 @@ to be called on every file we write. int archive_mode = 0; int keep_dirlinks = 0; int copy_links = 0; -@@ -309,6 +310,7 @@ void usage(enum logcode F) +@@ -308,6 +309,7 @@ void usage(enum logcode F) rprintf(F," --partial keep partially transferred files\n"); rprintf(F," --partial-dir=DIR put a partially transferred file into DIR\n"); rprintf(F," --delay-updates put all updated files into place at transfer's end\n"); @@ -19,7 +19,7 @@ to be called on every file we write. rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n"); rprintf(F," --timeout=TIME set I/O timeout in seconds\n"); rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n"); -@@ -390,6 +392,7 @@ static struct poptOption long_options[] +@@ -388,6 +390,7 @@ static struct poptOption long_options[] {"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 }, @@ -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 }, -@@ -1428,6 +1431,9 @@ void server_options(char **args,int *arg +@@ -1420,6 +1423,9 @@ void server_options(char **args,int *arg args[ac++] = tmpdir; } @@ -70,7 +70,7 @@ to be called on every file we write. char *partial_dir; struct filter_list_struct server_filter_list; ---- orig/util.c 2005-02-20 19:17:49 +--- orig/util.c 2005-02-23 02:57:27 +++ util.c 2004-07-03 20:18:13 @@ -33,6 +33,7 @@ extern int module_id; extern int modify_window; diff --git a/ignore-case.diff b/ignore-case.diff index d973306..6b7f19b 100644 --- a/ignore-case.diff +++ b/ignore-case.diff @@ -35,7 +35,7 @@ in a case-insensitive manner. case '?': /* Match anything but '/'. */ if (*text == '/') ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2004-10-14 17:22:51 @@ -99,6 +99,7 @@ int max_delete = 0; OFF_T max_size = 0; @@ -45,7 +45,7 @@ in a case-insensitive manner. int blocking_io = -1; int checksum_seed = 0; int inplace = 0; -@@ -330,6 +331,7 @@ void usage(enum logcode F) +@@ -328,6 +329,7 @@ void usage(enum logcode F) rprintf(F," --include-from=FILE read include patterns from FILE\n"); rprintf(F," --files-from=FILE read list of source-file names from FILE\n"); rprintf(F," -0, --from0 all *-from file lists are delimited by nulls\n"); @@ -53,7 +53,7 @@ in a case-insensitive manner. rprintf(F," --version print version number\n"); rprintf(F," --port=PORT specify double-colon alternate port number\n"); rprintf(F," --blocking-io use blocking I/O for the remote shell\n"); -@@ -387,6 +389,7 @@ static struct poptOption long_options[] +@@ -385,6 +387,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 }, @@ -61,7 +61,7 @@ in a case-insensitive manner. {"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 }, -@@ -1392,6 +1395,9 @@ void server_options(char **args,int *arg +@@ -1384,6 +1387,9 @@ void server_options(char **args,int *arg args[ac++] = arg; } @@ -81,7 +81,7 @@ in a case-insensitive manner. char *partial_dir; struct filter_list_struct server_filter_list; ---- orig/util.c 2005-02-20 19:17:49 +--- orig/util.c 2005-02-23 02:57:27 +++ util.c 2004-08-13 16:40:34 @@ -31,6 +31,7 @@ extern int verbose; extern int dry_run; @@ -91,7 +91,7 @@ in a case-insensitive manner. extern char *partial_dir; extern struct filter_list_struct server_filter_list; -@@ -1022,11 +1023,23 @@ int u_strcmp(const char *cs1, const char +@@ -1018,11 +1019,23 @@ int u_strcmp(const char *cs1, const char { const uchar *s1 = (const uchar *)cs1; const uchar *s2 = (const uchar *)cs2; diff --git a/link-by-hash.diff b/link-by-hash.diff index 5589bd5..5cd8306 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -365,7 +365,7 @@ the file's name. +} + +#endif ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-14 02:52:09 @@ -139,6 +139,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; -@@ -319,6 +320,7 @@ void usage(enum logcode F) +@@ -317,6 +318,7 @@ void usage(enum logcode F) + rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n"); 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"); -@@ -358,7 +360,7 @@ void usage(enum logcode F) +@@ -356,7 +358,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_COPY_DEST, OPT_LINK_DEST, + OPT_FILTER, OPT_COMPARE_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[] = { -@@ -427,6 +429,7 @@ static struct poptOption long_options[] +@@ -424,6 +426,7 @@ static struct poptOption long_options[] + {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, {"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 }, -@@ -860,6 +863,21 @@ int parse_arguments(int *argc, const cha +@@ -852,6 +855,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. */ -@@ -1440,6 +1458,11 @@ void server_options(char **args,int *arg +@@ -1432,6 +1450,11 @@ void server_options(char **args,int *arg } } @@ -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-20 00:02:23 +--- orig/rsync.h 2005-02-23 02:57:27 +++ rsync.h 2004-07-03 20:20:15 -@@ -620,6 +620,14 @@ struct stats { +@@ -621,6 +621,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-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-02-13 06:58:47 -@@ -356,6 +356,7 @@ to the detailed description below for a +@@ -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/links-depth.diff b/links-depth.diff index 8abbab0..27937d7 100644 --- a/links-depth.diff +++ b/links-depth.diff @@ -6,7 +6,7 @@ with the latest codebase, but even in its original form it didn't handle relative symlinks properly, and that has not yet been fixed in this modified version. ---- orig/flist.c 2005-02-22 02:10:16 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2004-07-16 16:58:04 @@ -47,6 +47,7 @@ extern int filesfrom_fd; extern int one_file_system; @@ -62,7 +62,7 @@ in this modified version. #else linkname_len = 0; #endif ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-01-28 19:33:24 @@ -43,6 +43,7 @@ int archive_mode = 0; int keep_dirlinks = 0; @@ -72,7 +72,7 @@ in this modified version. int preserve_hard_links = 0; int preserve_perms = 0; int preserve_devices = 0; -@@ -274,6 +275,7 @@ void usage(enum logcode F) +@@ -273,6 +274,7 @@ void usage(enum logcode F) rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n"); rprintf(F," -d, --dirs transfer directories without recursing\n"); rprintf(F," -l, --links copy symlinks as symlinks\n"); @@ -80,7 +80,7 @@ in this modified version. rprintf(F," -L, --copy-links transform symlink into referent file/dir\n"); rprintf(F," --copy-unsafe-links only \"unsafe\" symlinks are transformed\n"); rprintf(F," --safe-links ignore symlinks that point outside the source tree\n"); -@@ -397,6 +399,7 @@ static struct poptOption long_options[] +@@ -395,6 +397,7 @@ static struct poptOption long_options[] {"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 }, {"dirs", 'd', POPT_ARG_VAL, &xfer_dirs, 2, 0, 0 }, {"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 }, @@ -88,7 +88,7 @@ in this modified version. {"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 }, {"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 }, {"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 }, ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-01-28 19:33:40 @@ -311,6 +311,7 @@ to the detailed description below for a --inplace update destination files in-place diff --git a/openssl-support.diff b/openssl-support.diff index 17ae13e..2c1b169 100644 --- a/openssl-support.diff +++ b/openssl-support.diff @@ -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/main.c 2005-02-20 01:12:42 +--- orig/main.c 2005-02-23 02:57:26 +++ main.c 2004-10-08 20:15:28 -@@ -54,6 +54,9 @@ extern int write_batch; +@@ -56,6 +56,9 @@ extern int write_batch; extern int batch_fd; extern int batch_gen_fd; extern int filesfrom_fd; @@ -235,7 +235,7 @@ can't say if I've left any cleanup/compatibility errors in the code. extern pid_t cleanup_child_pid; extern struct stats stats; extern char *files_from; -@@ -836,33 +839,48 @@ static int start_client(int argc, char * +@@ -838,33 +841,48 @@ static int start_client(int argc, char * if ((rc = copy_argv(argv))) return rc; @@ -308,7 +308,7 @@ can't say if I've left any cleanup/compatibility errors in the code. p = find_colon(argv[0]); if (p) { /* source is remote */ if (remote_filesfrom_file -@@ -894,12 +912,26 @@ static int start_client(int argc, char * +@@ -896,12 +914,26 @@ static int start_client(int argc, char * argv++; } else { /* source is local */ am_sender = 1; @@ -338,9 +338,9 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(host,'/'); if (p) { *p = '\0'; ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2004-11-27 18:31:46 -@@ -155,6 +155,14 @@ int log_format_has_o_or_i = 0; +@@ -154,6 +154,14 @@ int log_format_has_o_or_i = 0; int always_checksum = 0; int list_only = 0; @@ -355,7 +355,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 +@@ -179,6 +187,7 @@ static void print_rsync_version(enum log char const *hardlinks = "no "; char const *links = "no "; char const *ipv6 = "no "; @@ -363,7 +363,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 +@@ -201,6 +210,10 @@ static void print_rsync_version(enum log ipv6 = ""; #endif @@ -374,7 +374,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 +@@ -214,10 +227,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. */ @@ -387,7 +387,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()); -@@ -348,6 +361,13 @@ void usage(enum logcode F) +@@ -346,6 +359,13 @@ void usage(enum logcode F) rprintf(F," -4, --ipv4 prefer IPv4\n"); rprintf(F," -6, --ipv6 prefer IPv6\n"); #endif @@ -401,16 +401,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"); -@@ -358,7 +378,7 @@ void usage(enum logcode F) +@@ -356,7 +376,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_COPY_DEST, OPT_LINK_DEST, + OPT_FILTER, OPT_COMPARE_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[] = { -@@ -457,6 +477,13 @@ static struct poptOption long_options[] +@@ -454,6 +474,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 @@ -424,7 +424,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 }, -@@ -860,6 +887,12 @@ int parse_arguments(int *argc, const cha +@@ -852,6 +879,12 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -437,7 +437,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. */ -@@ -1126,6 +1159,17 @@ int parse_arguments(int *argc, const cha +@@ -1118,6 +1151,17 @@ int parse_arguments(int *argc, const cha if (delay_updates && !partial_dir) partial_dir = partialdir_for_delayupdate; @@ -455,7 +455,7 @@ can't say if I've left any cleanup/compatibility errors in the code. if (inplace) { #ifdef HAVE_FTRUNCATE if (partial_dir) { ---- orig/rsync.h 2005-02-20 00:02:23 +--- orig/rsync.h 2005-02-23 02:57:27 +++ rsync.h 2004-10-08 21:01:33 @@ -32,6 +32,7 @@ @@ -465,7 +465,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #define BACKUP_SUFFIX "~" -@@ -399,6 +400,11 @@ enum msgcode { +@@ -400,6 +401,11 @@ enum msgcode { # define SIZEOF_INT64 SIZEOF_OFF_T #endif diff --git a/owner-group-mod.diff b/owner-group-mod.diff index f3a7971..c376d2e 100644 --- a/owner-group-mod.diff +++ b/owner-group-mod.diff @@ -34,9 +34,9 @@ groups, even if they weren't returned by getgroups(). E.g.: + preserve_gid = 2; + } } ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2004-09-09 01:59:08 -@@ -403,8 +403,8 @@ static struct poptOption long_options[] +@@ -401,8 +401,8 @@ static struct poptOption long_options[] {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, {"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 }, {"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 }, @@ -47,7 +47,7 @@ groups, even if they weren't returned by getgroups(). E.g.: {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 }, {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, -@@ -745,6 +745,14 @@ int parse_arguments(int *argc, const cha +@@ -742,6 +742,14 @@ int parse_arguments(int *argc, const cha usage(FINFO); exit_cleanup(0); @@ -62,7 +62,7 @@ groups, even if they weren't returned by getgroups(). E.g.: case 'v': verbose++; break; -@@ -955,8 +963,8 @@ int parse_arguments(int *argc, const cha +@@ -947,8 +955,8 @@ int parse_arguments(int *argc, const cha #endif preserve_perms = 1; preserve_times = 1; @@ -73,7 +73,7 @@ groups, even if they weren't returned by getgroups(). E.g.: preserve_devices = 1; } -@@ -1266,10 +1274,16 @@ void server_options(char **args,int *arg +@@ -1258,10 +1266,16 @@ void server_options(char **args,int *arg if (preserve_hard_links) argstr[x++] = 'H'; diff --git a/source-cd.diff b/source-cd.diff index da08f64..c1603cf 100644 --- a/source-cd.diff +++ b/source-cd.diff @@ -6,7 +6,7 @@ rsync -avR --source-cd=/usr local/bin host:/ For two systems where one uses /usr/local/bin and the other /local/bin. ---- orig/flist.c 2005-02-22 03:37:32 +--- orig/flist.c 2005-02-23 02:57:26 +++ flist.c 2005-02-22 18:06:57 @@ -63,6 +63,7 @@ extern int force_delete; extern int orig_umask; @@ -36,7 +36,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. while (1) { char fname2[MAXPATHLEN]; ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-02-22 18:06:58 @@ -80,6 +80,7 @@ char *remote_filesfrom_file = NULL; int eol_nulls = 0; @@ -46,7 +46,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. int am_daemon = 0; int daemon_over_rsh = 0; int do_stats = 0; -@@ -267,6 +268,7 @@ void usage(enum logcode F) +@@ -266,6 +267,7 @@ void usage(enum logcode F) rprintf(F," -R, --relative use relative path names\n"); rprintf(F," --no-relative turn off --relative\n"); rprintf(F," --no-implied-dirs don't send implied dirs with -R\n"); @@ -54,7 +54,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n"); rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n"); rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); -@@ -418,6 +420,7 @@ static struct poptOption long_options[] +@@ -416,6 +418,7 @@ static struct poptOption long_options[] {"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 }, {"relative", 'R', POPT_ARG_VAL, &relative_paths, 1, 0, 0 }, {"no-relative", 0, POPT_ARG_VAL, &relative_paths, 0, 0, 0 }, @@ -62,7 +62,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. {"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 }, {"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 }, {"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 }, -@@ -919,6 +922,11 @@ int parse_arguments(int *argc, const cha +@@ -911,6 +914,11 @@ int parse_arguments(int *argc, const cha batch_name = NULL; } } @@ -74,7 +74,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. if (read_batch && files_from) { snprintf(err_buf, sizeof err_buf, "--read-batch cannot be used with --files-from\n"); -@@ -1015,6 +1023,14 @@ int parse_arguments(int *argc, const cha +@@ -1007,6 +1015,14 @@ int parse_arguments(int *argc, const cha backup_dir = sanitize_path(NULL, backup_dir, NULL, 0); if (files_from) files_from = sanitize_path(NULL, files_from, NULL, 0); @@ -89,7 +89,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. } if (server_filter_list.head && !am_sender) { struct filter_list_struct *elp = &server_filter_list; -@@ -1402,6 +1418,11 @@ void server_options(char **args,int *arg +@@ -1394,6 +1410,11 @@ void server_options(char **args,int *arg } else if (keep_partial) args[ac++] = "--partial"; @@ -101,7 +101,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. if (ignore_errors) args[ac++] = "--ignore-errors"; ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-02-22 18:20:24 @@ -304,6 +304,7 @@ to the detailed description below for a -R, --relative use relative path names @@ -111,7 +111,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin. -b, --backup make backups (see --suffix & --backup-dir) --backup-dir=DIR make backups into hierarchy based in DIR --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) -@@ -511,6 +512,11 @@ the bf(--no-implied-dirs) option would o +@@ -510,6 +511,11 @@ the bf(--no-implied-dirs) option would o which means that if "/path" was a real directory on one machine and a symlink of the other machine, rsync would not try to change this. diff --git a/time-limit.diff b/time-limit.diff index db83cea..213b05d 100644 --- a/time-limit.diff +++ b/time-limit.diff @@ -41,7 +41,7 @@ Do we need configure support for mktime()? if (!am_server && !am_daemon) { rprintf(FERROR, "io timeout after %d seconds -- exiting\n", (int)(t-last_io)); ---- orig/options.c 2005-02-21 10:51:52 +--- orig/options.c 2005-02-23 02:57:26 +++ options.c 2005-01-28 19:35:23 @@ -104,6 +104,7 @@ int checksum_seed = 0; int inplace = 0; @@ -51,7 +51,7 @@ Do we need configure support for mktime()? /** Network address family. **/ -@@ -342,6 +343,8 @@ void usage(enum logcode F) +@@ -340,6 +341,8 @@ void usage(enum logcode F) rprintf(F," --password-file=FILE read password from FILE\n"); rprintf(F," --list-only list the files instead of copying them\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n"); @@ -60,15 +60,15 @@ Do we need configure support for mktime()? rprintf(F," --write-batch=FILE write a batched update to FILE\n"); rprintf(F," --read-batch=FILE read a batched update from FILE\n"); #ifdef INET6 -@@ -359,6 +362,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP - OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, +@@ -357,6 +360,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP + OPT_FILTER, OPT_COMPARE_DEST, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, + OPT_STOP_AT, OPT_TIME_LIMIT, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -444,6 +448,8 @@ static struct poptOption long_options[] +@@ -441,6 +445,8 @@ static struct poptOption long_options[] {"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 }, {"itemize-changes", 'i', POPT_ARG_NONE, &itemize_changes, 0, 0, 0 }, {"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 }, @@ -77,7 +77,7 @@ Do we need configure support for mktime()? {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 }, {"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 }, -@@ -860,6 +866,36 @@ int parse_arguments(int *argc, const cha +@@ -852,6 +858,36 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -114,7 +114,7 @@ Do we need configure support for mktime()? default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -1349,6 +1385,15 @@ void server_options(char **args,int *arg +@@ -1341,6 +1377,15 @@ void server_options(char **args,int *arg args[ac++] = arg; } @@ -130,9 +130,9 @@ Do we need configure support for mktime()? if (backup_dir) { args[ac++] = "--backup-dir"; args[ac++] = backup_dir; ---- orig/rsync.yo 2005-02-20 01:12:43 +--- orig/rsync.yo 2005-02-23 02:57:27 +++ rsync.yo 2005-02-01 10:46:35 -@@ -379,6 +379,8 @@ to the detailed description below for a +@@ -378,6 +378,8 @@ to the detailed description below for a --password-file=FILE read password from FILE --list-only list the files instead of copying them --bwlimit=KBPS limit I/O bandwidth; KBytes per second @@ -141,7 +141,7 @@ Do we need configure support for mktime()? --write-batch=FILE write a batched update to FILE --read-batch=FILE read a batched update from FILE --checksum-seed=NUM set block/file checksum seed (advanced) -@@ -1180,6 +1182,19 @@ transfer was too fast, it will wait befo +@@ -1169,6 +1171,19 @@ transfer was too fast, it will wait befo result is an average transfer rate equaling the specified limit. A value of zero specifies no limit. @@ -161,7 +161,7 @@ Do we need configure support for mktime()? dit(bf(--write-batch=FILE)) Record a file that can later be applied to another identical destination with bf(--read-batch). See the "BATCH MODE" section for details. ---- orig/util.c 2005-02-20 19:17:49 +--- orig/util.c 2005-02-23 02:57:27 +++ util.c 2004-07-03 20:23:22 @@ -126,6 +126,132 @@ void overflow(char *str) exit_cleanup(RERR_MALLOC); -- 2.34.1