From 03019e41fc3299020c8acdda06cf57a1e2c57a25 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 1 Nov 2006 21:33:37 +0000 Subject: [PATCH] Updated the opening comments to mention how to apply the patch prior to the build. Also updated to apply cleanly. --- ODBC-dblog.diff | 13 ++++--- acls.diff | 3 +- adaptec_acl_mods.diff | 23 ++++++----- atimes.diff | 33 ++++++++-------- backup-dir-dels.diff | 22 +++++++---- catch_crash_signals.diff | 16 +++++--- cvs-entries.diff | 18 ++++++--- date-only.diff | 25 ++++++------ detect-renamed.diff | 52 ++++++++++++------------- downdate.diff | 16 +++++--- dynamic_hash.diff | 10 ++++- early-checksum.diff | 10 ++++- fake-super.diff | 13 +++---- flags.diff | 27 ++++++------- fsync.diff | 18 ++++++--- id-pair.diff | 14 +++++-- ignore-case.diff | 16 +++++--- link-by-hash.diff | 26 ++++++------- links-depth.diff | 20 ++++++---- md5.diff | 41 ++++++++++++-------- netgroup-auth.diff | 6 +++ omit-dir-changes.diff | 22 +++++++---- openssl-support.diff | 70 +++++++++++++++------------------- slow-down.diff | 18 ++++++--- slp.diff | 29 +++++++------- soften-links.diff | 13 ++++--- source-filter_dest-filter.diff | 31 +++++++-------- threaded-receiver.diff | 36 +++++++++-------- time-limit.diff | 28 ++++++++------ tru64.diff | 8 +++- xattrs.diff | 23 ++++++----- 31 files changed, 403 insertions(+), 297 deletions(-) diff --git a/ODBC-dblog.diff b/ODBC-dblog.diff index 4182aff..7180103 100644 --- a/ODBC-dblog.diff +++ b/ODBC-dblog.diff @@ -1,12 +1,13 @@ Add support for logging daemon messages to an SQL database. -After applying this patch, run these commands for a successful build: +To use this patch, run these commands for a successful build: + patch -p1 users.idas, count = racl->users.count; count--; ida++) { COE( sys_acl_create_entry,(smb_acl, &entry) ); -@@ -463,7 +472,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ +@@ -420,7 +429,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ COE( sys_acl_create_entry,(smb_acl, &entry) ); COE( sys_acl_set_tag_type,(entry, SMB_ACL_GROUP_OBJ) ); @@ -72,7 +71,7 @@ entry. for (ida = racl->groups.idas, count = racl->groups.count; count--; ida++) { COE( sys_acl_create_entry,(smb_acl, &entry) ); -@@ -473,7 +482,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ +@@ -430,7 +439,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ } #ifdef ACLS_NEED_MASK @@ -81,7 +80,7 @@ entry. COE( sys_acl_create_entry,(smb_acl, &entry) ); COE( sys_acl_set_tag_type,(entry, SMB_ACL_MASK) ); COE2( store_access_in_entry,(mask_bits, entry) ); -@@ -487,7 +496,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ +@@ -444,7 +453,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_ COE( sys_acl_create_entry,(smb_acl, &entry) ); COE( sys_acl_set_tag_type,(entry, SMB_ACL_OTHER) ); @@ -90,7 +89,7 @@ entry. #ifdef DEBUG if (sys_acl_valid(*smb_acl) < 0) -@@ -721,7 +730,7 @@ static void receive_rsync_acl(rsync_acl +@@ -649,7 +658,7 @@ static void receive_rsync_acl(rsync_acl while (count--) { char tag = read_byte(f); uchar access = read_byte(f); @@ -99,7 +98,7 @@ entry. rprintf(FERROR, "receive_rsync_acl: bogus permset %o\n", access); exit_cleanup(RERR_STREAMIO); -@@ -797,7 +806,7 @@ static void receive_rsync_acl(rsync_acl +@@ -725,7 +734,7 @@ static void receive_rsync_acl(rsync_acl racl->mask = NO_ENTRY; } } else if (racl->mask == NO_ENTRY) /* Must be non-empty with lists. */ diff --git a/atimes.diff b/atimes.diff index c0fb23b..0ec615a 100644 --- a/atimes.diff +++ b/atimes.diff @@ -1,5 +1,6 @@ -After applying this patch, run these commands for a successful build: +To use this patch, run these commands for a successful build: + patch -p1 = 0) /* don't use changing file as future fuzzy basis */ @@ -309,7 +310,7 @@ After applying this patch, run these commands for a successful build: } /* open the file */ -@@ -1514,7 +1521,7 @@ void generate_files(int f_out, struct fi +@@ -1517,7 +1524,7 @@ void generate_files(int f_out, struct fi continue; if (!need_retouch_dir_times && file->mode & S_IWUSR) continue; @@ -399,7 +400,7 @@ After applying this patch, run these commands for a successful build: int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -309,8 +310,9 @@ void usage(enum logcode F) +@@ -311,8 +312,9 @@ void usage(enum logcode F) rprintf(F," --devices preserve device files (super-user only)\n"); rprintf(F," --specials preserve special files\n"); rprintf(F," -D same as --devices --specials\n"); @@ -411,7 +412,7 @@ After applying this patch, run these commands for a successful build: rprintf(F," --super receiver attempts super-user activities\n"); rprintf(F," -S, --sparse handle sparse files efficiently\n"); rprintf(F," -n, --dry-run show what would have been transferred\n"); -@@ -424,6 +426,9 @@ static struct poptOption long_options[] +@@ -428,6 +430,9 @@ static struct poptOption long_options[] {"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 }, {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, {"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, @@ -421,7 +422,7 @@ After applying this patch, run these commands for a successful build: {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, {"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 }, {"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 }, -@@ -1534,6 +1539,8 @@ void server_options(char **args,int *arg +@@ -1538,6 +1543,8 @@ void server_options(char **args,int *arg argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; @@ -519,7 +520,7 @@ After applying this patch, run these commands for a successful build: * by doubling until FLIST_LINEAR then grow by FLIST_LINEAR --- old/rsync.yo +++ new/rsync.yo -@@ -327,8 +327,9 @@ to the detailed description below for a +@@ -328,8 +328,9 @@ to the detailed description below for a --devices preserve device files (super-user only) --specials preserve special files -D same as --devices --specials @@ -531,7 +532,7 @@ After applying this patch, run these commands for a successful build: --super receiver attempts super-user activities -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -@@ -861,6 +862,12 @@ it is preserving modification times (see +@@ -869,6 +870,12 @@ it is preserving modification times (see the directories on the receiving side, it is a good idea to use bf(-O). This option is inferred if you use bf(--backup) without bf(--backup-dir). @@ -544,7 +545,7 @@ After applying this patch, run these commands for a successful build: dit(bf(--super)) This tells the receiving side to attempt super-user activities even if the receiving rsync wasn't run by the super-user. These activities include: preserving users via the bf(--owner) option, preserving -@@ -1382,7 +1389,7 @@ with older versions of rsync, but that a +@@ -1390,7 +1397,7 @@ with older versions of rsync, but that a verbose messages). The "%i" escape has a cryptic output that is 9 letters long. The general @@ -553,7 +554,7 @@ After applying this patch, run these commands for a successful build: type of update being done, bf(X) is replaced by the file-type, and the other letters represent attributes that may be output if they are being modified. -@@ -1422,7 +1429,7 @@ quote(itemization( +@@ -1430,7 +1437,7 @@ quote(itemization( by the file transfer. it() A bf(t) means the modification time is different and is being updated to the sender's value (requires bf(--times)). An alternate value of bf(T) @@ -562,7 +563,7 @@ After applying this patch, run these commands for a successful build: anytime a symlink is transferred, or when a file or device is transferred without bf(--times). it() A bf(p) means the permissions are different and are being updated to -@@ -1431,7 +1438,10 @@ quote(itemization( +@@ -1439,7 +1446,10 @@ quote(itemization( sender's value (requires bf(--owner) and super-user privileges). it() A bf(g) means the group is different and is being updated to the sender's value (requires bf(--group) and the authority to set the group). @@ -758,10 +759,13 @@ After applying this patch, run these commands for a successful build: - fprintf(stderr, "usage: " PROGRAM " DIR ...\n" - "Trivial file listing program for portably checking rsync\n"); - return 1; +- } + poptContext pc; + const char **extra_args; + int opt; -+ + +- for (argv++; *argv; argv++) { +- list_file(*argv); + pc = poptGetContext(PROGRAM, argc, (const char **)argv, + long_options, 0); + while ((opt = poptGetNextOpt(pc)) != -1) { @@ -777,9 +781,6 @@ After applying this patch, run these commands for a successful build: + } } -- for (argv++; *argv; argv++) { -- list_file(*argv); -- } + extra_args = poptGetArgs(pc); + if (*extra_args == NULL) + tls_usage(1); @@ -787,7 +788,7 @@ After applying this patch, run these commands for a successful build: + for (; *extra_args; extra_args++) + list_file(*extra_args); + poptFreeContext(pc); - ++ return 0; } --- old/util.c diff --git a/backup-dir-dels.diff b/backup-dir-dels.diff index a614e66..51b71cf 100644 --- a/backup-dir-dels.diff +++ b/backup-dir-dels.diff @@ -13,6 +13,12 @@ suffix. Marc St-Onge +To use this patch, run these commands for a successful build: + + patch -p1 head = lp->tail = NULL; @@ -13,7 +19,7 @@ of excludes taken from the .cvsignore file. if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0) out_of_memory("add_rule"); ret->u.mergelist = lp; -@@ -454,6 +456,14 @@ void *push_local_filters(const char *dir +@@ -448,6 +450,14 @@ void *push_local_filters(const char *dir set_filter_dir(dir, dirlen); } @@ -28,7 +34,7 @@ of excludes taken from the .cvsignore file. if (strlcpy(dirbuf + dirbuf_len, ex->pattern, MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) { parse_filter_file(lp, dirbuf, ex->match_flags, -@@ -970,6 +980,7 @@ void parse_filter_file(struct filter_lis +@@ -973,6 +983,7 @@ void parse_filter_file(struct filter_lis char line[BIGPATHBUFLEN]; char *eob = line + sizeof line - 1; int word_split = mflags & MATCHFLG_WORD_SPLIT; @@ -36,7 +42,7 @@ of excludes taken from the .cvsignore file. if (!fname || !*fname) return; -@@ -1016,6 +1027,24 @@ void parse_filter_file(struct filter_lis +@@ -1019,6 +1030,24 @@ void parse_filter_file(struct filter_lis } break; } @@ -61,7 +67,7 @@ of excludes taken from the .cvsignore file. if (word_split && isspace(ch)) break; if (eol_nulls? !ch : (ch == '\n' || ch == '\r')) -@@ -1025,13 +1054,15 @@ void parse_filter_file(struct filter_lis +@@ -1028,13 +1057,15 @@ void parse_filter_file(struct filter_lis else overflow = 1; } @@ -80,7 +86,7 @@ of excludes taken from the .cvsignore file. break; --- old/rsync.h +++ new/rsync.h -@@ -116,6 +116,7 @@ +@@ -117,6 +117,7 @@ #define XFLG_OLD_PREFIXES (1<<1) #define XFLG_ANCHORED2ABS (1<<2) #define XFLG_ABS_IF_SLASH (1<<3) diff --git a/date-only.diff b/date-only.diff index 42315fd..d63b154 100644 --- a/date-only.diff +++ b/date-only.diff @@ -1,4 +1,4 @@ -Greetings, and thanks for all of your work on the wonderful rsync! +Jeremy Bornstein wrote: I recently had the need to transfer files only with different mod dates (and to *not* transfer them based on file size differences). @@ -8,16 +8,15 @@ rsync didn't already have a --date-only flag, so I added one and am enclosing the diffs in case you (as I hope) decide to include this option in future releases. -Again, thanks! +To use this patch, run these commands for a successful build: -Best Regards, -Jeremy Bornstein - -[Patched update to have context and apply to latest CVS source.] + patch -p1 file's ndx'th item, whose name is fname. If a dir, -@@ -910,8 +1052,12 @@ static void recv_generator(char *fname, - && verbose && code && f_out != -1) +@@ -944,8 +1086,12 @@ static void recv_generator(char *fname, + && verbose && code != FNONE && f_out != -1) rprintf(code, "%s/\n", fname); if (delete_during && f_out != -1 && !phase && dry_run < 2 - && (file->flags & FLAG_DEL_HERE)) @@ -436,7 +436,7 @@ TODO: return; } -@@ -1150,8 +1296,14 @@ static void recv_generator(char *fname, +@@ -1201,8 +1347,14 @@ static void recv_generator(char *fname, && hard_link_check(file, ndx, fname, statret, &st, itemizing, code, HL_SKIP)) return; @@ -452,7 +452,7 @@ TODO: rsyserr(FERROR, stat_errno, "recv_generator: failed to stat %s", full_fname(fname)); return; -@@ -1329,11 +1481,17 @@ void generate_files(int f_out, struct fi +@@ -1388,11 +1540,17 @@ void generate_files(int f_out, struct fi (long)getpid(), flist->count); } @@ -471,7 +471,7 @@ TODO: whole_file = 0; if (verbose >= 2) { rprintf(FINFO, "delta-transmission %s\n", -@@ -1388,7 +1546,23 @@ void generate_files(int f_out, struct fi +@@ -1447,7 +1605,23 @@ void generate_files(int f_out, struct fi } recv_generator(NULL, NULL, 0, 0, 0, code, -1); if (delete_during) @@ -498,7 +498,7 @@ TODO: csum_length = SUM_LENGTH; --- old/options.c +++ new/options.c -@@ -76,6 +76,7 @@ int am_generator = 0; +@@ -78,6 +78,7 @@ int am_generator = 0; int am_starting_up = 1; int relative_paths = -1; int implied_dirs = 1; @@ -506,7 +506,7 @@ TODO: int numeric_ids = 0; int allow_8bit_chars = 0; int force_delete = 0; -@@ -334,6 +335,7 @@ void usage(enum logcode F) +@@ -346,6 +347,7 @@ void usage(enum logcode F) 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"); @@ -514,7 +514,7 @@ TODO: 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"); -@@ -481,6 +483,7 @@ static struct poptOption long_options[] +@@ -499,6 +501,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 }, @@ -522,7 +522,7 @@ TODO: {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 }, {"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 }, {"compress-level", 0, POPT_ARG_INT, &def_compress_level, 'z', 0, 0 }, -@@ -1340,7 +1343,7 @@ int parse_arguments(int *argc, const cha +@@ -1362,7 +1365,7 @@ int parse_arguments(int *argc, const cha inplace = 1; } @@ -531,7 +531,7 @@ TODO: partial_dir = tmp_partialdir; if (inplace) { -@@ -1349,6 +1352,7 @@ int parse_arguments(int *argc, const cha +@@ -1371,6 +1374,7 @@ int parse_arguments(int *argc, const cha snprintf(err_buf, sizeof err_buf, "--%s cannot be used with --%s\n", append_mode ? "append" : "inplace", @@ -539,7 +539,7 @@ TODO: delay_updates ? "delay-updates" : "partial-dir"); return 0; } -@@ -1651,6 +1655,8 @@ void server_options(char **args,int *arg +@@ -1674,6 +1678,8 @@ void server_options(char **args,int *arg args[ac++] = "--super"; if (size_only) args[ac++] = "--size-only"; @@ -550,7 +550,7 @@ TODO: if (modify_window_set) { --- old/rsync.yo +++ new/rsync.yo -@@ -362,6 +362,7 @@ to the detailed description below for a +@@ -363,6 +363,7 @@ to the detailed description below for a --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 @@ -558,7 +558,7 @@ TODO: --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 -@@ -1240,6 +1241,15 @@ Note that the use of the bf(--delete) op +@@ -1259,6 +1260,15 @@ Note that the use of the bf(--delete) op fuzzy-match files, so either use bf(--delete-after) or specify some filename exclusions if you need to prevent this. @@ -576,7 +576,7 @@ TODO: files against doing transfers (if the files are missing in the destination --- old/util.c +++ new/util.c -@@ -1013,6 +1013,32 @@ int handle_partial_dir(const char *fname +@@ -1025,6 +1025,32 @@ int handle_partial_dir(const char *fname return 1; } diff --git a/downdate.diff b/downdate.diff index 6a9698e..bbc89a2 100644 --- a/downdate.diff +++ b/downdate.diff @@ -1,17 +1,23 @@ A patch from Stefan Müller to add the --downdate option, which works in the opposite manner as --update. +To use this patch, run these commands for a successful build: + + patch -p1 count; i++) { uint32 t = SUM2HASH(s->sums[i].sum1); -@@ -162,11 +169,11 @@ static void hash_search(int f,struct sum +@@ -165,11 +172,11 @@ static void hash_search(int f,struct sum (double)offset, s2 & 0xFFFF, s1 & 0xFFFF); } diff --git a/early-checksum.diff b/early-checksum.diff index 25aa0de..948b1ed 100644 --- a/early-checksum.diff +++ b/early-checksum.diff @@ -8,6 +8,12 @@ to its checksum pass during its normal find-the-different-files pass. I have benchmarked this a little, and it appears to slow things down for a local copy, so the old algorithm is used for local copies. +To use this patch, run these commands for a successful build: + + patch -p1 mode & ~CHMOD_BITS) || st.st_rdev != file->u.rdev) { if (statret == 0 @@ -205,7 +206,7 @@ After applying this patch, run these commands for a successful build: return; if (preserve_hard_links && file->link_u.links && hard_link_check(file, ndx, fname, -1, &st, -@@ -1145,7 +1161,7 @@ static void recv_generator(char *fname, +@@ -1148,7 +1164,7 @@ static void recv_generator(char *fname, fnamecmp_type = FNAMECMP_FNAME; if (statret == 0 && !S_ISREG(st.st_mode)) { @@ -224,7 +225,7 @@ After applying this patch, run these commands for a successful build: int preserve_executability = 0; int preserve_devices = 0; int preserve_specials = 0; -@@ -200,6 +201,7 @@ static void print_rsync_version(enum log +@@ -201,6 +202,7 @@ static void print_rsync_version(enum log char const *hardlinks = "no "; char const *links = "no "; char const *ipv6 = "no "; @@ -232,7 +233,7 @@ After applying this patch, run these commands for a successful build: STRUCT_STAT *dumstat; #ifdef HAVE_SOCKETPAIR -@@ -222,6 +224,10 @@ static void print_rsync_version(enum log +@@ -223,6 +225,10 @@ static void print_rsync_version(enum log ipv6 = ""; #endif @@ -243,7 +244,7 @@ After applying this patch, run these commands for a successful build: rprintf(f, "%s version %s protocol version %d\n", RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n"); -@@ -234,9 +240,9 @@ static void print_rsync_version(enum log +@@ -235,9 +241,9 @@ 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. */ @@ -255,7 +256,7 @@ After applying this patch, run these commands for a successful build: (int) (sizeof dumstat->st_ino * 8), (int) (sizeof (int64) * 8)); #ifdef MAINTAINER_MODE -@@ -302,6 +308,7 @@ void usage(enum logcode F) +@@ -304,6 +310,7 @@ void usage(enum logcode F) rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n"); rprintf(F," -H, --hard-links preserve hard links\n"); rprintf(F," -p, --perms preserve permissions\n"); @@ -263,7 +264,7 @@ After applying this patch, run these commands for a successful build: rprintf(F," -E, --executability preserve the file's executability\n"); rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n"); rprintf(F," -o, --owner preserve owner (super-user only)\n"); -@@ -420,6 +427,8 @@ static struct poptOption long_options[] +@@ -424,6 +431,8 @@ static struct poptOption long_options[] {"perms", 'p', POPT_ARG_VAL, &preserve_perms, 1, 0, 0 }, {"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 }, {"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 }, @@ -272,7 +273,7 @@ After applying this patch, run these commands for a successful build: {"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 }, {"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 }, {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, -@@ -1124,6 +1133,15 @@ int parse_arguments(int *argc, const cha +@@ -1128,6 +1137,15 @@ int parse_arguments(int *argc, const cha } #endif @@ -288,7 +289,7 @@ After applying this patch, run these commands for a successful build: if (write_batch && read_batch) { snprintf(err_buf, sizeof err_buf, "--write-batch and --read-batch can not be used together\n"); -@@ -1577,6 +1595,9 @@ void server_options(char **args,int *arg +@@ -1581,6 +1599,9 @@ void server_options(char **args,int *arg if (xfer_dirs && !recurse && delete_mode && am_sender) args[ac++] = "--no-r"; @@ -424,7 +425,7 @@ After applying this patch, run these commands for a successful build: mode_t mode; --- old/rsync.yo +++ new/rsync.yo -@@ -320,6 +320,7 @@ to the detailed description below for a +@@ -321,6 +321,7 @@ to the detailed description below for a -K, --keep-dirlinks treat symlinked dir on receiver as dir -H, --hard-links preserve hard links -p, --perms preserve permissions @@ -432,7 +433,7 @@ After applying this patch, run these commands for a successful build: -E, --executability preserve executability --chmod=CHMOD affect file and/or directory permissions -o, --owner preserve owner (super-user only) -@@ -501,7 +502,9 @@ specified, in which case bf(-r) is not i +@@ -509,7 +510,9 @@ specified, in which case bf(-r) is not i Note that bf(-a) bf(does not preserve hardlinks), because finding multiply-linked files is expensive. You must separately @@ -443,7 +444,7 @@ After applying this patch, run these commands for a successful build: dit(--no-OPTION) You may turn off one or more implied options by prefixing the option name with "no-". Not all options may be prefixed with a "no-": -@@ -796,6 +799,13 @@ quote(itemization( +@@ -804,6 +807,13 @@ quote(itemization( If bf(--perms) is enabled, this option is ignored. diff --git a/fsync.diff b/fsync.diff index a7a45c7..42f85a4 100644 --- a/fsync.diff +++ b/fsync.diff @@ -1,6 +1,12 @@ This patch from Sami Farin lets you specify --fsync if you want fsync() to be called on every file we write. +To use this patch, run these commands for a successful build: + + patch -p1 u.link = NULL; } else file->mode = save_mode; -@@ -1383,7 +1381,7 @@ struct file_list *recv_file_list(int f) +@@ -1380,7 +1378,7 @@ struct file_list *recv_file_list(int f) clean_flist(flist, relative_paths, 1); if (f >= 0) { @@ -76,7 +82,7 @@ gets to be really large. /* Recv the io_error flag */ if (lp_ignore_errors(module_id) || ignore_errors) -@@ -1699,13 +1697,15 @@ static void output_flist(struct file_lis +@@ -1696,13 +1694,15 @@ static void output_flist(struct file_lis for (i = 0; i < flist->count; i++) { file = flist->files[i]; @@ -148,7 +154,7 @@ gets to be really large. iflags |= ITEM_IS_NEW; --- old/log.c +++ new/log.c -@@ -47,6 +47,7 @@ extern char *auth_user; +@@ -46,6 +46,7 @@ extern char *auth_user; extern char *stdout_format; extern char *logfile_format; extern char *logfile_name; @@ -156,7 +162,7 @@ gets to be really large. #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H extern iconv_t ic_chck; #endif -@@ -479,16 +480,16 @@ static void log_formatted(enum logcode c +@@ -470,16 +471,16 @@ static void log_formatted(enum logcode c case 'U': strlcat(fmt, "ld", sizeof fmt); snprintf(buf2, sizeof buf2, fmt, diff --git a/ignore-case.diff b/ignore-case.diff index 0ac2402..9b0b881 100644 --- a/ignore-case.diff +++ b/ignore-case.diff @@ -1,6 +1,12 @@ This adds the --ignore-case option, which makes rsync compare filenames in a case-insensitive manner. +To use this patch, run these commands for a successful build: + + patch -p1 len1) { if (buf1) -@@ -65,7 +68,10 @@ void get_checksum2(char *buf, int32 len, +@@ -68,7 +71,10 @@ void get_checksum2(char *buf, int32 len, out_of_memory("get_checksum2"); } @@ -47,7 +56,7 @@ memcpy(buf1,buf,len); if (checksum_seed) { -@@ -74,7 +80,10 @@ void get_checksum2(char *buf, int32 len, +@@ -77,7 +83,10 @@ void get_checksum2(char *buf, int32 len, } for(i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) { @@ -59,7 +68,7 @@ } /* * Prior to version 27 an incorrect MD4 checksum was computed -@@ -83,10 +92,16 @@ void get_checksum2(char *buf, int32 len, +@@ -86,10 +95,16 @@ void get_checksum2(char *buf, int32 len, * even when there are no more bytes. */ if (len - i > 0 || protocol_version >= 27) { @@ -78,7 +87,7 @@ } -@@ -97,6 +112,7 @@ void file_checksum(char *fname,char *sum +@@ -100,6 +115,7 @@ void file_checksum(char *fname,char *sum int fd; OFF_T len = size; struct mdfour m; @@ -86,7 +95,7 @@ memset(sum,0,MD4_SUM_LENGTH); -@@ -106,21 +122,36 @@ void file_checksum(char *fname,char *sum +@@ -109,21 +125,36 @@ void file_checksum(char *fname,char *sum buf = map_file(fd, size, MAX_MAP_SIZE, CSUM_CHUNK); @@ -129,7 +138,7 @@ close(fd); unmap_file(buf); -@@ -130,11 +161,15 @@ void file_checksum(char *fname,char *sum +@@ -133,11 +164,15 @@ void file_checksum(char *fname,char *sum static int32 sumresidue; static char sumrbuf[CSUM_CHUNK]; static struct mdfour md; @@ -146,7 +155,7 @@ sumresidue = 0; SIVAL(s, 0, seed); sum_update(s, 4); -@@ -159,13 +194,19 @@ void sum_update(char *p, int32 len) +@@ -162,13 +197,19 @@ void sum_update(char *p, int32 len) if (sumresidue) { int32 i = CSUM_CHUNK - sumresidue; memcpy(sumrbuf + sumresidue, p, i); @@ -168,7 +177,7 @@ len -= CSUM_CHUNK; p += CSUM_CHUNK; } -@@ -177,8 +218,15 @@ void sum_update(char *p, int32 len) +@@ -180,8 +221,15 @@ void sum_update(char *p, int32 len) void sum_end(char *sum) { @@ -561,7 +570,7 @@ /** Network address family. **/ #ifdef INET6 -@@ -369,6 +370,7 @@ void usage(enum logcode F) +@@ -381,6 +382,7 @@ void usage(enum logcode F) rprintf(F," --only-write-batch=FILE like --write-batch but w/o updating destination\n"); rprintf(F," --read-batch=FILE read a batched update from FILE\n"); rprintf(F," --protocol=NUM force an older protocol version to be used\n"); @@ -569,7 +578,7 @@ #ifdef INET6 rprintf(F," -4, --ipv4 prefer IPv4\n"); rprintf(F," -6, --ipv6 prefer IPv6\n"); -@@ -475,6 +477,7 @@ static struct poptOption long_options[] +@@ -494,6 +496,7 @@ static struct poptOption long_options[] {"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 }, {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, {"no-W", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, @@ -577,7 +586,7 @@ {"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 }, {"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 }, {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 }, -@@ -1610,6 +1613,9 @@ void server_options(char **args,int *arg +@@ -1642,6 +1645,9 @@ void server_options(char **args,int *arg args[ac++] = arg; } diff --git a/netgroup-auth.diff b/netgroup-auth.diff index e31ad3c..5062a82 100644 --- a/netgroup-auth.diff +++ b/netgroup-auth.diff @@ -3,6 +3,12 @@ and hosts deny. This patch still needs autoconf support for portability. +To use this patch, run these commands for a successful build: + + patch -p1 mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; @@ -26,7 +32,7 @@ tells rsync to not affect any attributes on the directories in the transfer. iflags |= ITEM_REPORT_GROUP; } else iflags |= ITEM_IS_NEW; -@@ -895,7 +897,7 @@ static void recv_generator(char *fname, +@@ -892,7 +894,7 @@ static void recv_generator(char *fname, /* If we're not preserving permissions, change the file-list's * mode based on the local permissions and some heuristics. */ @@ -45,7 +51,7 @@ tells rsync to not affect any attributes on the directories in the transfer. int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -311,6 +312,7 @@ void usage(enum logcode F) +@@ -313,6 +314,7 @@ void usage(enum logcode F) rprintf(F," -D same as --devices --specials\n"); rprintf(F," -t, --times preserve times\n"); rprintf(F," -O, --omit-dir-times omit directories when preserving times\n"); @@ -53,7 +59,7 @@ tells rsync to not affect any attributes on the directories in the transfer. rprintf(F," --super receiver attempts super-user activities\n"); rprintf(F," -S, --sparse handle sparse files efficiently\n"); rprintf(F," -n, --dry-run show what would have been transferred\n"); -@@ -425,6 +427,7 @@ static struct poptOption long_options[] +@@ -429,6 +431,7 @@ static struct poptOption long_options[] {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, {"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, @@ -61,7 +67,7 @@ tells rsync to not affect any attributes on the directories in the transfer. {"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 }, {"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 }, {"no-super", 0, POPT_ARG_VAL, &am_root, 0, 0, 0 }, -@@ -1285,6 +1288,9 @@ int parse_arguments(int *argc, const cha +@@ -1287,6 +1290,9 @@ int parse_arguments(int *argc, const cha "P *%s", backup_suffix); parse_rule(&filter_list, backup_dir_buf, 0, 0); } @@ -71,7 +77,7 @@ tells rsync to not affect any attributes on the directories in the transfer. if (make_backups && !backup_dir) omit_dir_times = 1; -@@ -1513,6 +1519,8 @@ void server_options(char **args,int *arg +@@ -1515,6 +1521,8 @@ void server_options(char **args,int *arg argstr[x++] = 'm'; if (omit_dir_times == 2) argstr[x++] = 'O'; @@ -90,7 +96,7 @@ tells rsync to not affect any attributes on the directories in the transfer. extern int basis_dir_cnt; extern int make_backups; extern int cleanup_got_literal; -@@ -541,7 +542,7 @@ int recv_files(int f_in, struct file_lis +@@ -551,7 +552,7 @@ int recv_files(int f_in, struct file_lis /* If we're not preserving permissions, change the file-list's * mode based on the local permissions and some heuristics. */ @@ -109,7 +115,7 @@ tells rsync to not affect any attributes on the directories in the transfer. extern int am_root; extern int am_server; extern int am_sender; -@@ -159,9 +160,11 @@ int set_file_attrs(char *fname, struct f +@@ -162,9 +163,11 @@ int set_file_attrs(char *fname, struct f updated = 1; } diff --git a/openssl-support.diff b/openssl-support.diff index db58b1c..c6c7e40 100644 --- a/openssl-support.diff +++ b/openssl-support.diff @@ -1,10 +1,4 @@ -After applying this patch, run these commands for a successful build: - - ./prepare-source - ./configure - make - -Casey Marshall writes: +Casey Marshall wrote: I've been hacking together a way to use rsync with OpenSSL, and have attached my current patch against a recent CVS tree. The details of @@ -34,6 +28,12 @@ this implementation are: 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. +To use this patch, run these commands for a successful build: + + patch -p1 1) print_child_argv(sargs); @@ -139,7 +139,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); -@@ -195,6 +235,10 @@ int start_inband_exchange(char *user, ch +@@ -196,6 +236,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. */ @@ -150,7 +150,7 @@ can't say if I've left any cleanup/compatibility errors in the code. exit(0); } -@@ -202,6 +246,10 @@ int start_inband_exchange(char *user, ch +@@ -203,6 +247,10 @@ int start_inband_exchange(char *user, ch rprintf(FERROR, "%s\n", line); /* This is always fatal; the server will now * close the socket. */ @@ -161,15 +161,7 @@ can't say if I've left any cleanup/compatibility errors in the code. return -1; } -@@ -718,6 +766,7 @@ static void send_listing(int fd) - io_printf(fd,"@RSYNCD: EXIT\n"); - } - -+ - /* 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 */ -@@ -776,6 +825,9 @@ int start_daemon(int f_in, int f_out) +@@ -780,6 +828,9 @@ int start_daemon(int f_in, int f_out) if (protocol_version > remote_protocol) protocol_version = remote_protocol; @@ -179,7 +171,7 @@ can't say if I've left any cleanup/compatibility errors in the code. line[0] = 0; if (!read_line(f_in, line, sizeof line - 1)) return -1; -@@ -787,6 +839,20 @@ int start_daemon(int f_in, int f_out) +@@ -791,6 +842,20 @@ int start_daemon(int f_in, int f_out) return -1; } @@ -226,7 +218,7 @@ can't say if I've left any cleanup/compatibility errors in the code. *cygwin* ) AC_MSG_RESULT(yes) --- old/options.c +++ new/options.c -@@ -172,6 +172,14 @@ int logfile_format_has_o_or_i = 0; +@@ -173,6 +173,14 @@ int logfile_format_has_o_or_i = 0; int always_checksum = 0; int list_only = 0; @@ -241,7 +233,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; -@@ -200,6 +208,7 @@ static void print_rsync_version(enum log +@@ -201,6 +209,7 @@ static void print_rsync_version(enum log char const *hardlinks = "no "; char const *links = "no "; char const *ipv6 = "no "; @@ -249,7 +241,7 @@ can't say if I've left any cleanup/compatibility errors in the code. STRUCT_STAT *dumstat; #ifdef HAVE_SOCKETPAIR -@@ -222,6 +231,10 @@ static void print_rsync_version(enum log +@@ -223,6 +232,10 @@ static void print_rsync_version(enum log ipv6 = ""; #endif @@ -260,7 +252,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, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n"); -@@ -234,9 +247,9 @@ static void print_rsync_version(enum log +@@ -235,9 +248,9 @@ 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 +264,7 @@ can't say if I've left any cleanup/compatibility errors in the code. (int) (sizeof dumstat->st_ino * 8), (int) (sizeof (int64) * 8)); #ifdef MAINTAINER_MODE -@@ -383,6 +396,13 @@ void usage(enum logcode F) +@@ -385,6 +398,13 @@ void usage(enum logcode F) rprintf(F," -4, --ipv4 prefer IPv4\n"); rprintf(F," -6, --ipv6 prefer IPv6\n"); #endif @@ -286,7 +278,7 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(F," --version print version number\n"); rprintf(F,"(-h) --help show this help (-h works with no other options)\n"); -@@ -396,7 +416,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP +@@ -398,7 +418,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD, OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE, @@ -295,7 +287,7 @@ can't say if I've left any cleanup/compatibility errors in the code. OPT_SERVER, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -541,6 +561,13 @@ static struct poptOption long_options[] +@@ -545,6 +565,13 @@ static struct poptOption long_options[] {"checksum-seed", 0, POPT_ARG_INT, &checksum_seed, 0, 0, 0 }, {"server", 0, POPT_ARG_NONE, 0, OPT_SERVER, 0, 0 }, {"sender", 0, POPT_ARG_NONE, 0, OPT_SENDER, 0, 0 }, @@ -309,7 +301,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* All the following options switch us into daemon-mode option-parsing. */ {"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 }, {"daemon", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 }, -@@ -568,6 +595,13 @@ static void daemon_usage(enum logcode F) +@@ -572,6 +599,13 @@ static void daemon_usage(enum logcode F) rprintf(F," -4, --ipv4 prefer IPv4\n"); rprintf(F," -6, --ipv6 prefer IPv6\n"); #endif @@ -323,7 +315,7 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(F," --help show this help screen\n"); rprintf(F,"\n"); -@@ -594,6 +628,13 @@ static struct poptOption long_daemon_opt +@@ -598,6 +632,13 @@ static struct poptOption long_daemon_opt {"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 }, {"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 }, {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, @@ -337,7 +329,7 @@ can't say if I've left any cleanup/compatibility errors in the code. {"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 }, {"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 }, {"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 }, -@@ -851,6 +892,12 @@ int parse_arguments(int *argc, const cha +@@ -855,6 +896,12 @@ int parse_arguments(int *argc, const cha verbose++; break; @@ -350,7 +342,7 @@ can't say if I've left any cleanup/compatibility errors in the code. default: rprintf(FERROR, "rsync: %s: %s (in daemon mode)\n", -@@ -874,6 +921,17 @@ int parse_arguments(int *argc, const cha +@@ -878,6 +925,17 @@ int parse_arguments(int *argc, const cha exit_cleanup(RERR_SYNTAX); } @@ -368,7 +360,7 @@ can't say if I've left any cleanup/compatibility errors in the code. *argv = poptGetArgs(pc); *argc = count_args(*argv); am_starting_up = 0; -@@ -1085,6 +1143,12 @@ int parse_arguments(int *argc, const cha +@@ -1089,6 +1147,12 @@ int parse_arguments(int *argc, const cha usage(FINFO); exit_cleanup(0); @@ -381,7 +373,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. */ -@@ -1361,6 +1425,17 @@ int parse_arguments(int *argc, const cha +@@ -1365,6 +1429,17 @@ int parse_arguments(int *argc, const cha if (delay_updates && !partial_dir) partial_dir = tmp_partialdir; @@ -399,7 +391,7 @@ can't say if I've left any cleanup/compatibility errors in the code. if (inplace) { #ifdef HAVE_FTRUNCATE if (partial_dir) { -@@ -1778,10 +1853,27 @@ char *check_for_hostspec(char *s, char * +@@ -1782,10 +1857,27 @@ char *check_for_hostspec(char *s, char * char *p; int not_host; int hostlen; diff --git a/slow-down.diff b/slow-down.diff index b14dcf9..e3109fa 100644 --- a/slow-down.diff +++ b/slow-down.diff @@ -8,9 +8,15 @@ should really be a way to affect more of rsync's processing, perhaps by specifying a maximum disk I/O rate (and have that affect a maximum stat() rate or something like that). +To use this patch, run these commands for a successful build: + + patch -p1 -To: mbp@samba.org -Subject: rsync and debian mirrors +Marco d'Itri wrote: I run one of the debian mirrors, and I had to write this patch because my archive is split between more than one disk. Would you accept a more polished version of this patch for inclusion in rsync? -[Updated to latest CVS source by Wayne Davison.] +To use this patch, run these commands for a successful build: + + patch -p1 = 29 ? 2 : 1; int i, recv_ok; @@ -254,7 +255,7 @@ After applying this patch, run these commands for a successful build: if (verbose > 2) rprintf(FINFO,"recv_files(%d) starting\n",flist->count); -@@ -364,6 +367,23 @@ int recv_files(int f_in, struct file_lis +@@ -365,6 +368,23 @@ int recv_files(int f_in, struct file_lis updating_basis = inplace; @@ -278,7 +279,7 @@ After applying this patch, run these commands for a successful build: while (1) { cleanup_disable(); -@@ -606,6 +626,9 @@ int recv_files(int f_in, struct file_lis +@@ -610,6 +630,9 @@ int recv_files(int f_in, struct file_lis else if (!am_server && verbose && do_progress) rprintf(FINFO, "%s\n", fname); @@ -288,7 +289,7 @@ After applying this patch, run these commands for a successful build: /* recv file data */ recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, file->length); -@@ -620,6 +643,16 @@ int recv_files(int f_in, struct file_lis +@@ -624,6 +647,16 @@ int recv_files(int f_in, struct file_lis exit_cleanup(RERR_FILEIO); } @@ -317,7 +318,7 @@ After applying this patch, run these commands for a successful build: --- old/rsync.yo +++ new/rsync.yo -@@ -359,6 +359,7 @@ to the detailed description below for a +@@ -360,6 +360,7 @@ to the detailed description below for a --timeout=TIME set I/O timeout in seconds -I, --ignore-times don't skip files that match size and time --size-only skip files that match in size @@ -325,7 +326,7 @@ After applying this patch, run these commands for a successful build: --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 -@@ -396,6 +397,8 @@ to the detailed description below for a +@@ -397,6 +398,8 @@ to the detailed description below for a --write-batch=FILE write a batched update to FILE --only-write-batch=FILE like --write-batch but w/o updating dest --read-batch=FILE read a batched update from FILE @@ -334,7 +335,7 @@ After applying this patch, run these commands for a successful build: --protocol=NUM force an older protocol version to be used --checksum-seed=NUM set block/file checksum seed (advanced) -4, --ipv4 prefer IPv4 -@@ -1753,6 +1756,33 @@ file previously generated by bf(--write- +@@ -1759,6 +1762,33 @@ file previously generated by bf(--write- If em(FILE) is bf(-), the batch data will be read from standard input. See the "BATCH MODE" section for details. diff --git a/threaded-receiver.diff b/threaded-receiver.diff index d908d9a..7480b0b 100644 --- a/threaded-receiver.diff +++ b/threaded-receiver.diff @@ -18,6 +18,12 @@ NOTE: we still need to duplicate the partial_fname static in util.c! If you try this out, please send some email to wayned@samba.org or the rsync mailing list with your results, build changes, bug reports, etc. Thanks! +To use this patch, run these commands for a successful build: + + patch -p1 = 29) { itemizing = 1; maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT; -@@ -1389,7 +1396,7 @@ void generate_files(int f_out, struct fi +@@ -1392,7 +1399,7 @@ void generate_files(int f_out, struct fi do_delete_pass(flist); do_progress = 0; @@ -172,7 +178,7 @@ mailing list with your results, build changes, bug reports, etc. Thanks! whole_file = 0; if (verbose >= 2) { rprintf(FINFO, "delta-transmission %s\n", -@@ -1398,12 +1405,6 @@ void generate_files(int f_out, struct fi +@@ -1401,12 +1408,6 @@ void generate_files(int f_out, struct fi : "enabled"); } @@ -185,7 +191,7 @@ mailing list with your results, build changes, bug reports, etc. Thanks! for (i = 0; i < flist->count; i++) { struct file_struct *file = flist->files[i]; -@@ -1447,23 +1448,34 @@ void generate_files(int f_out, struct fi +@@ -1450,23 +1451,34 @@ void generate_files(int f_out, struct fi delete_in_dir(NULL, NULL, NULL, NULL); phase++; @@ -226,7 +232,7 @@ mailing list with your results, build changes, bug reports, etc. Thanks! if (local_name) strlcpy(fbuf, local_name, sizeof fbuf); else -@@ -1475,27 +1487,43 @@ void generate_files(int f_out, struct fi +@@ -1478,27 +1490,43 @@ void generate_files(int f_out, struct fi phase++; ignore_non_existing = save_ignore_non_existing; ignore_existing = save_ignore_existing; @@ -854,6 +860,13 @@ mailing list with your results, build changes, bug reports, etc. Thanks! - if (fd_pair(error_pipe) < 0) { - rsyserr(FERROR, errno, "pipe failed in do_recv"); +- exit_cleanup(RERR_IPC); +- } +- +- io_flush(NORMAL_FLUSH); +- +- if ((pid = do_fork()) == -1) { +- rsyserr(FERROR, errno, "fork failed in do_recv"); + args.f_in = f_in; + args.flist = flist; + args.local_name = local_name; @@ -862,13 +875,6 @@ mailing list with your results, build changes, bug reports, etc. Thanks! exit_cleanup(RERR_IPC); } -- io_flush(NORMAL_FLUSH); -- -- if ((pid = do_fork()) == -1) { -- rsyserr(FERROR, errno, "fork failed in do_recv"); -- exit_cleanup(RERR_IPC); -- } -- - if (pid == 0) { - close(error_pipe[0]); - if (f_in != f_out) @@ -1030,7 +1036,7 @@ mailing list with your results, build changes, bug reports, etc. Thanks! int keep_partial = 0; int safe_symlinks = 0; int copy_unsafe_links = 0; -@@ -1302,6 +1302,7 @@ int parse_arguments(int *argc, const cha +@@ -1306,6 +1306,7 @@ int parse_arguments(int *argc, const cha if (do_progress && !verbose && !log_before_transfer && !am_server) verbose = 1; diff --git a/time-limit.diff b/time-limit.diff index 7478534..4658e87 100644 --- a/time-limit.diff +++ b/time-limit.diff @@ -3,9 +3,15 @@ to be simpler and more efficient by Wayne Davison. Do we need configure support for mktime()? +To use this patch, run these commands for a successful build: + + patch -p1 acc_acl; racl_list = &access_acl_list; ndx_ptr = (char*)file + file_struct_len; @@ -71,7 +76,7 @@ TODO: do { if (!racl) ndx = -1; -@@ -921,6 +930,10 @@ int set_acl(const char *fname, const str +@@ -920,6 +929,10 @@ int set_acl(const char *fname, const str type = SMB_ACL_TYPE_ACCESS; ndx_ptr = (char*)file + file_struct_len; @@ -501,7 +506,7 @@ TODO: extern int preserve_perms; extern int preserve_executability; extern int preserve_times; -@@ -219,6 +220,10 @@ int set_file_attrs(char *fname, struct f +@@ -218,6 +219,10 @@ int set_file_attrs(char *fname, struct f if (daemon_chmod_modes && !S_ISLNK(new_mode)) new_mode = tweak_mode(new_mode, daemon_chmod_modes); -- 2.34.1