From 0ce98b2bd37d257b498206c4e40be5d59c6c976b Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 1 May 2015 15:25:15 -0700 Subject: [PATCH] Updating patches. --- acls.diff | 2 +- adaptec_acl_mods.diff | 2 +- atimes.diff | 80 +++++++++++++++++++--------------- backup-deleted.diff | 6 +-- backup-dir-dels.diff | 4 +- catch_crash_signals.diff | 2 +- checksum-reading.diff | 12 ++--- checksum-xattr.diff | 2 +- congestion.diff | 2 +- copy-devices.diff | 4 +- crtimes.diff | 16 +++---- cvs-entries.diff | 2 +- date-only.diff | 4 +- db.diff | 30 ++++++------- detect-renamed-lax.diff | 4 +- detect-renamed.diff | 8 ++-- direct-io.diff | 4 +- downdate.diff | 2 +- fileflags.diff | 38 ++++++++-------- filter-attribute-mods.diff | 10 ++--- fsync.diff | 4 +- hfs-compression.diff | 14 +++--- ignore-case.diff | 10 ++--- kerberos.diff | 6 +-- link-by-hash.diff | 10 ++--- nameconverter.diff | 2 +- netgroup-auth.diff | 2 +- omit-dir-changes.diff | 4 +- slow-down.diff | 2 +- slp.diff | 10 ++--- soften-links.diff | 2 +- source-backup.diff | 6 +-- source-filter_dest-filter.diff | 6 +-- sparse-block.diff | 6 +-- time-limit.diff | 6 +-- transliterate.diff | 8 ++-- tru64.diff | 2 +- write-devices.diff | 4 +- 38 files changed, 173 insertions(+), 165 deletions(-) diff --git a/acls.diff b/acls.diff index dfbf503..8d7378f 100644 --- a/acls.diff +++ b/acls.diff @@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/acls.c b/acls.c --- a/acls.c +++ b/acls.c diff --git a/adaptec_acl_mods.diff b/adaptec_acl_mods.diff index 64292b0..10ac505 100644 --- a/adaptec_acl_mods.diff +++ b/adaptec_acl_mods.diff @@ -24,7 +24,7 @@ Todo: Fix a bug that could lose some bits when stripping some (supposedly) superfluous ACL info. -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/lib/sysacls.c b/lib/sysacls.c --- a/lib/sysacls.c +++ b/lib/sysacls.c diff --git a/atimes.diff b/atimes.diff index 8eaff2e..e440ae4 100644 --- a/atimes.diff +++ b/atimes.diff @@ -4,7 +4,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/compat.c b/compat.c --- a/compat.c +++ b/compat.c @@ -182,12 +182,17 @@ diff --git a/generator.c b/generator.c } } -@@ -2050,7 +2061,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx) +@@ -2049,8 +2060,11 @@ static void touch_up_dirs(struct file_list *flist, int ndx) + if (need_retouch_dir_times) { STRUCT_STAT st; if (link_stat(fname, &st, 0) == 0 - && cmp_time(st.st_mtime, file->modtime) != 0) +- && cmp_time(st.st_mtime, file->modtime) != 0) - set_modtime(fname, file->modtime, F_MOD_NSEC(file), file->mode); -+ set_times(fname, file->modtime, F_MOD_NSEC(file), file->modtime, file->mode); ++ && cmp_time(st.st_mtime, file->modtime) != 0) { ++ st.st_mtime = file->modtime; ++ st.ST_MTIME_NSEC = F_MOD_NSEC(file); ++ set_times(fname, &st); ++ } } if (counter >= loopchk_limit) { if (allowed_lull) @@ -277,15 +282,7 @@ diff --git a/options.c b/options.c diff --git a/rsync.c b/rsync.c --- a/rsync.c +++ b/rsync.c -@@ -458,6 +458,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, - int updated = 0; - stat_x sx2; - int change_uid, change_gid; -+ time_t atime, mtime; - mode_t new_mode = file->mode; - int inherit; - -@@ -543,22 +544,40 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, +@@ -543,26 +543,42 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, set_xattr(fname, file, fnamecmp, sxp); #endif @@ -298,23 +295,25 @@ diff --git a/rsync.c b/rsync.c + if (!atimes_ndx || S_ISDIR(sxp->st.st_mode)) + flags |= ATTRS_SKIP_ATIME; if (!(flags & ATTRS_SKIP_MTIME) - && cmp_time(sxp->st.st_mtime, file->modtime) != 0) { + && (sxp->st.st_mtime != file->modtime + #ifdef ST_MTIME_NSEC + || (NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file)) + #endif + )) { - int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode); -+ mtime = file->modtime; ++ sxp->st.st_mtime = file->modtime; ++ sxp->st.ST_MTIME_NSEC = F_MOD_NSEC(file); + updated = 1; -+ } else -+ mtime = sxp->st.st_mtime; ++ } + if (!(flags & ATTRS_SKIP_ATIME)) { + time_t file_atime = f_atime(file); + if (cmp_time(sxp->st.st_atime, file_atime) != 0) { -+ atime = file_atime; ++ sxp->st.st_atime = file_atime; + updated = 1; -+ } else -+ atime = sxp->st.st_atime; ++ } + } else -+ atime = sxp->st.st_atime; + if (updated) { -+ int ret = set_times(fname, mtime, F_MOD_NSEC(file), atime, sxp->st.st_mode); ++ int ret = set_times(fname, &sxp->st); if (ret < 0) { rsyserr(FERROR_XFER, errno, "failed to set times on %s", full_fname(fname)); @@ -330,7 +329,7 @@ diff --git a/rsync.c b/rsync.c } #ifdef SUPPORT_ACLS -@@ -662,7 +681,7 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -666,7 +682,7 @@ int finish_transfer(const char *fname, const char *fnametmp, /* Change permissions before putting the file into place. */ set_file_attrs(fnametmp, file, NULL, fnamecmp, @@ -339,7 +338,7 @@ diff --git a/rsync.c b/rsync.c /* move tmp file over real file */ if (DEBUG_GTE(RECV, 1)) -@@ -687,7 +706,7 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -691,7 +707,7 @@ int finish_transfer(const char *fname, const char *fnametmp, do_set_file_attrs: set_file_attrs(fnametmp, file, NULL, fnamecmp, @@ -393,7 +392,7 @@ diff --git a/rsync.yo b/rsync.yo -O, --omit-dir-times omit directories from --times -J, --omit-link-times omit symlinks from --times --super receiver attempts super-user activities -@@ -1173,6 +1174,12 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be +@@ -1178,6 +1179,12 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be updated (though rsync's delta-transfer algorithm will make the update fairly efficient if the files haven't actually changed, you're much better off using bf(-t)). @@ -406,7 +405,7 @@ diff --git a/rsync.yo b/rsync.yo dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when 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). -@@ -2130,7 +2137,10 @@ quote(itemization( +@@ -2135,7 +2142,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). @@ -697,27 +696,28 @@ diff --git a/util.c b/util.c /* This returns 0 for success, 1 for a symlink if symlink time-setting * is not possible, or -1 for any other error. */ -int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode) -+int set_times(const char *fname, time_t modtime, uint32 mod_nsec, time_t atime, mode_t mode) ++int set_times(const char *fname, STRUCT_STAT *stp) { static int switch_step = 0; if (DEBUG_GTE(TIME, 1)) { - rprintf(FINFO, "set modtime of %s to (%ld) %s", +- fname, (long)modtime, +- asctime(localtime(&modtime))); + char mtimebuf[200]; + -+ strlcpy(mtimebuf, timestring(modtime), sizeof mtimebuf); ++ strlcpy(mtimebuf, timestring(stp->st_mtime), sizeof mtimebuf); + rprintf(FINFO, + "set modtime, atime of %s to (%ld) %s, (%ld) %s\n", - fname, (long)modtime, -- asctime(localtime(&modtime))); -+ mtimebuf, (long)atime, timestring(atime)); ++ fname, (long)stp->st_mtime, ++ mtimebuf, (long)stp->st_atime, timestring(stp->st_atime)); } switch (switch_step) { #ifdef HAVE_UTIMENSAT #include "case_N.h" - if (do_utimensat(fname, modtime, mod_nsec) == 0) -+ if (do_utimensat(fname, modtime, mod_nsec, atime, 0) == 0) ++ if (do_utimensat(fname, stp->st_mtime, stp->ST_MTIME_NSEC, stp->st_atime, 0) == 0) break; if (errno != ENOSYS) return -1; @@ -726,20 +726,28 @@ diff --git a/util.c b/util.c #ifdef HAVE_LUTIMES #include "case_N.h" - if (do_lutimes(fname, modtime, mod_nsec) == 0) -+ if (do_lutimes(fname, modtime, mod_nsec, atime, 0) == 0) ++ if (do_lutimes(fname, stp->st_mtime, stp->ST_MTIME_NSEC, stp->st_atime, 0) == 0) break; if (errno != ENOSYS) return -1; -@@ -159,10 +163,10 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode) +@@ -152,17 +156,17 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode) + switch_step++; + if (preserve_times & PRESERVE_LINK_TIMES) { + preserve_times &= ~PRESERVE_LINK_TIMES; +- if (S_ISLNK(mode)) ++ if (S_ISLNK(stp->st_mode)) + return 1; + } + /* FALLTHROUGH */ #include "case_N.h" #ifdef HAVE_UTIMES - if (do_utimes(fname, modtime, mod_nsec) == 0) -+ if (do_utimes(fname, modtime, mod_nsec, atime, 0) == 0) ++ if (do_utimes(fname, stp->st_mtime, stp->ST_MTIME_NSEC, stp->st_atime, 0) == 0) break; #else - if (do_utime(fname, modtime, mod_nsec) == 0) -+ if (do_utime(fname, modtime, mod_nsec, atime, 0) == 0) ++ if (do_utime(fname, stp->st_mtime, stp->ST_MTIME_NSEC, stp->st_atime, 0) == 0) break; #endif diff --git a/backup-deleted.diff b/backup-deleted.diff index 884e7a5..da24ba5 100644 --- a/backup-deleted.diff +++ b/backup-deleted.diff @@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c @@ -59,7 +59,7 @@ diff --git a/options.c b/options.c {"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 }, {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, {"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 }, -@@ -2596,6 +2598,10 @@ void server_options(char **args, int *argc_p) +@@ -2599,6 +2601,10 @@ void server_options(char **args, int *argc_p) } if (am_sender) { @@ -94,7 +94,7 @@ diff --git a/receiver.c b/receiver.c diff --git a/rsync.c b/rsync.c --- a/rsync.c +++ b/rsync.c -@@ -652,7 +652,7 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -656,7 +656,7 @@ int finish_transfer(const char *fname, const char *fnametmp, goto do_set_file_attrs; } diff --git a/backup-dir-dels.diff b/backup-dir-dels.diff index e798864..8a6cfd4 100644 --- a/backup-dir-dels.diff +++ b/backup-dir-dels.diff @@ -322,7 +322,7 @@ diff --git a/options.c b/options.c if (preserve_times) { preserve_times = PRESERVE_FILE_TIMES; -@@ -2588,6 +2650,10 @@ void server_options(char **args, int *argc_p) +@@ -2591,6 +2653,10 @@ void server_options(char **args, int *argc_p) args[ac++] = "--backup-dir"; args[ac++] = backup_dir; } @@ -333,7 +333,7 @@ diff --git a/options.c b/options.c /* Only send --suffix if it specifies a non-default value. */ if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) { -@@ -2596,7 +2662,14 @@ void server_options(char **args, int *argc_p) +@@ -2599,7 +2665,14 @@ void server_options(char **args, int *argc_p) goto oom; args[ac++] = arg; } diff --git a/catch_crash_signals.diff b/catch_crash_signals.diff index 974baab..5b0cca9 100644 --- a/catch_crash_signals.diff +++ b/catch_crash_signals.diff @@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/errcode.h b/errcode.h --- a/errcode.h +++ b/errcode.h diff --git a/checksum-reading.diff b/checksum-reading.diff index c0d786e..3c2dc37 100644 --- a/checksum-reading.diff +++ b/checksum-reading.diff @@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/clientserver.c b/clientserver.c --- a/clientserver.c +++ b/clientserver.c @@ -405,7 +405,7 @@ diff --git a/flist.c b/flist.c if (unsort_ndx) F_NDX(file) = stats.num_dirs; -@@ -2566,7 +2830,7 @@ struct file_list *recv_file_list(int f) +@@ -2584,7 +2848,7 @@ struct file_list *recv_file_list(int f, int dir_ndx) /* The --relative option sends paths with a leading slash, so we need * to specify the strip_root option here. We rejected leading slashes * for a non-relative transfer in recv_file_entry(). */ @@ -414,7 +414,7 @@ diff --git a/flist.c b/flist.c if (protocol_version < 30) { /* Recv the io_error flag */ -@@ -2789,7 +3053,7 @@ void flist_free(struct file_list *flist) +@@ -2807,7 +3071,7 @@ void flist_free(struct file_list *flist) /* This routine ensures we don't have any duplicate names in our file list. * duplicate names can cause corruption because of the pipelining. */ @@ -423,7 +423,7 @@ diff --git a/flist.c b/flist.c { char fbuf[MAXPATHLEN]; int i, prev_i; -@@ -2840,7 +3104,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root) +@@ -2858,7 +3122,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root) /* If one is a dir and the other is not, we want to * keep the dir because it might have contents in the * list. Otherwise keep the first one. */ @@ -432,7 +432,7 @@ diff --git a/flist.c b/flist.c struct file_struct *fp = flist->sorted[j]; if (!S_ISDIR(fp->mode)) keep = i, drop = j; -@@ -2856,8 +3120,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root) +@@ -2874,8 +3138,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root) } else keep = j, drop = i; @@ -443,7 +443,7 @@ diff --git a/flist.c b/flist.c rprintf(FINFO, "removing duplicate name %s from file list (%d)\n", f_name(file, fbuf), drop + flist->ndx_start); -@@ -2879,7 +3143,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root) +@@ -2897,7 +3161,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root) } flist->high = prev_i; diff --git a/checksum-xattr.diff b/checksum-xattr.diff index 35e510e..b839a64 100644 --- a/checksum-xattr.diff +++ b/checksum-xattr.diff @@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/flist.c b/flist.c --- a/flist.c +++ b/flist.c diff --git a/congestion.diff b/congestion.diff index 6971c04..0b5b7aa 100644 --- a/congestion.diff +++ b/congestion.diff @@ -27,7 +27,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/loadparm.c b/loadparm.c --- a/loadparm.c +++ b/loadparm.c diff --git a/copy-devices.diff b/copy-devices.diff index b2d8db3..83c2b0d 100644 --- a/copy-devices.diff +++ b/copy-devices.diff @@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c @@ -56,7 +56,7 @@ diff --git a/options.c b/options.c {"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 }, {"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 }, {"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 }, -@@ -2760,6 +2763,9 @@ void server_options(char **args, int *argc_p) +@@ -2763,6 +2766,9 @@ void server_options(char **args, int *argc_p) else if (remove_source_files) args[ac++] = "--remove-sent-files"; diff --git a/crtimes.diff b/crtimes.diff index 1b7e7a2..dcf62e2 100644 --- a/crtimes.diff +++ b/crtimes.diff @@ -329,9 +329,9 @@ diff --git a/rsync.c b/rsync.c + if (sxp->st.st_ino == 2 && S_ISDIR(sxp->st.st_mode)) + flags |= ATTRS_SKIP_CRTIME; if (!(flags & ATTRS_SKIP_MTIME) - && cmp_time(sxp->st.st_mtime, file->modtime) != 0) { - int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode, ST_FLAGS(sxp->st)); -@@ -594,6 +597,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, + && (sxp->st.st_mtime != file->modtime + #ifdef ST_MTIME_NSEC +@@ -598,6 +601,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, else file->flags |= FLAG_TIME_FAILED; } @@ -346,7 +346,7 @@ diff --git a/rsync.c b/rsync.c #ifdef SUPPORT_ACLS /* It's OK to call set_acl() now, even for a dir, as the generator -@@ -710,7 +721,7 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -714,7 +725,7 @@ int finish_transfer(const char *fname, const char *fnametmp, /* Change permissions before putting the file into place. */ set_file_attrs(fnametmp, file, NULL, fnamecmp, ATTRS_DELAY_IMMUTABLE @@ -355,7 +355,7 @@ diff --git a/rsync.c b/rsync.c /* move tmp file over real file */ if (DEBUG_GTE(RECV, 1)) -@@ -739,7 +750,7 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -743,7 +754,7 @@ int finish_transfer(const char *fname, const char *fnametmp, do_set_file_attrs: set_file_attrs(fnametmp, file, NULL, fnamecmp, @@ -429,7 +429,7 @@ diff --git a/rsync.yo b/rsync.yo -O, --omit-dir-times omit directories from --times -J, --omit-link-times omit symlinks from --times --super receiver attempts super-user activities -@@ -1201,6 +1202,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be +@@ -1206,6 +1207,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be updated (though rsync's delta-transfer algorithm will make the update fairly efficient if the files haven't actually changed, you're much better off using bf(-t)). @@ -439,7 +439,7 @@ diff --git a/rsync.yo b/rsync.yo dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when 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). -@@ -2103,7 +2107,7 @@ with older versions of rsync, but that also turns on the output of other +@@ -2108,7 +2112,7 @@ with older versions of rsync, but that also turns on the output of other verbose messages). The "%i" escape has a cryptic output that is 11 letters long. The general @@ -448,7 +448,7 @@ diff --git a/rsync.yo b/rsync.yo 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. -@@ -2162,6 +2166,8 @@ quote(itemization( +@@ -2167,6 +2171,8 @@ quote(itemization( it() The bf(f) means that the fileflags information changed. it() The bf(a) means that the ACL information changed. it() The bf(x) means that the extended attribute information changed. diff --git a/cvs-entries.diff b/cvs-entries.diff index e9df0f4..941cdb7 100644 --- a/cvs-entries.diff +++ b/cvs-entries.diff @@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/exclude.c b/exclude.c --- a/exclude.c +++ b/exclude.c diff --git a/date-only.diff b/date-only.diff index 55a048b..758a598 100644 --- a/date-only.diff +++ b/date-only.diff @@ -14,7 +14,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c @@ -63,7 +63,7 @@ diff --git a/options.c b/options.c {"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 }, {"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 }, {"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 }, -@@ -2647,6 +2650,9 @@ void server_options(char **args, int *argc_p) +@@ -2650,6 +2653,9 @@ void server_options(char **args, int *argc_p) else if (missing_args == 1 && !am_sender) args[ac++] = "--ignore-missing-args"; diff --git a/db.diff b/db.diff index b44898f..d7e0cd3 100644 --- a/db.diff +++ b/db.diff @@ -21,11 +21,11 @@ To use this patch, run these commands for a successful build: ./configure make -based-on: 6fe798392bdbdeb34d01b15de7f0123df3bbe850 +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore -@@ -15,6 +15,7 @@ config.status +@@ -16,6 +16,7 @@ aclocal.m4 /proto.h /proto.h-tstamp /rsync.1 @@ -33,7 +33,7 @@ diff --git a/.gitignore b/.gitignore /rsyncd.conf.5 /autom4te*.cache /confdefs.h -@@ -23,6 +24,7 @@ config.status +@@ -24,6 +25,7 @@ aclocal.m4 /getgroups /gmon.out /rsync @@ -52,16 +52,16 @@ diff --git a/Makefile.in b/Makefile.in mandir=@mandir@ LIBS=@LIBS@ -@@ -28,7 +29,7 @@ VERSION=@RSYNC_VERSION@ +@@ -29,7 +30,7 @@ VERSION=@RSYNC_VERSION@ .SUFFIXES: .SUFFIXES: .c .o --GENFILES=configure.sh config.h.in proto.h proto.h-tstamp rsync.1 rsyncd.conf.5 -+GENFILES=configure.sh config.h.in proto.h proto.h-tstamp rsync.1 rsyncdb.1 rsyncd.conf.5 +-GENFILES=configure.sh aclocal.m4 config.h.in proto.h proto.h-tstamp rsync.1 rsyncd.conf.5 ++GENFILES=configure.sh aclocal.m4 config.h.in proto.h proto.h-tstamp rsync.1 rsyncdb.1 rsyncd.conf.5 HEADERS=byteorder.h config.h errcode.h proto.h rsync.h ifuncs.h itypes.h inums.h \ lib/pool_alloc.h LIBOBJ=lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o \ -@@ -38,7 +39,7 @@ zlib_OBJS=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \ +@@ -39,7 +40,7 @@ zlib_OBJS=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o delete.o OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \ @@ -70,7 +70,7 @@ diff --git a/Makefile.in b/Makefile.in OBJS3=progress.o pipe.o DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ -@@ -62,14 +63,17 @@ CHECK_OBJS=tls.o testrun.o getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash. +@@ -63,14 +64,17 @@ CHECK_OBJS=tls.o testrun.o getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash. $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@ @OBJ_RESTORE@ @@ -90,7 +90,7 @@ diff --git a/Makefile.in b/Makefile.in if test -f rsyncd.conf.5; then ${INSTALLMAN} -m 644 rsyncd.conf.5 ${DESTDIR}${mandir}/man5; fi install-ssl-client: rsync-ssl stunnel-rsync -@@ -92,6 +96,9 @@ install-strip: +@@ -93,6 +97,9 @@ install-strip: rsync$(EXEEXT): $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) @@ -100,7 +100,7 @@ diff --git a/Makefile.in b/Makefile.in $(OBJS): $(HEADERS) $(CHECK_OBJS): $(HEADERS) -@@ -208,22 +215,27 @@ proto.h: proto.h-tstamp +@@ -212,22 +219,27 @@ proto.h: proto.h-tstamp proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h perl $(srcdir)/mkproto.pl $(srcdir)/*.c $(srcdir)/lib/compat.c @@ -164,7 +164,7 @@ diff --git a/checksum.c b/checksum.c diff --git a/cleanup.c b/cleanup.c --- a/cleanup.c +++ b/cleanup.c -@@ -26,6 +26,7 @@ extern int am_server; +@@ -27,6 +27,7 @@ extern int am_server; extern int am_daemon; extern int am_receiver; extern int io_error; @@ -172,7 +172,7 @@ diff --git a/cleanup.c b/cleanup.c extern int keep_partial; extern int got_xfer_error; extern int protocol_version; -@@ -141,6 +142,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line) +@@ -142,6 +143,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line) #include "case_N.h" switch_step++; @@ -228,7 +228,7 @@ diff --git a/clientserver.c b/clientserver.c diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac -@@ -345,6 +345,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \ +@@ -351,6 +351,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \ unistd.h utime.h grp.h compat.h sys/param.h ctype.h sys/wait.h \ sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h \ sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \ @@ -236,7 +236,7 @@ diff --git a/configure.ac b/configure.ac netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \ sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \ popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \ -@@ -1100,6 +1101,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x" +@@ -1103,6 +1104,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x" fi fi @@ -2905,7 +2905,7 @@ diff --git a/rsync.c b/rsync.c extern int am_starting_up; extern int allow_8bit_chars; extern int protocol_version; -@@ -738,6 +739,8 @@ struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc) +@@ -742,6 +743,8 @@ struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc) const char *who_am_i(void) { diff --git a/detect-renamed-lax.diff b/detect-renamed-lax.diff index d908e62..803f987 100644 --- a/detect-renamed-lax.diff +++ b/detect-renamed-lax.diff @@ -80,7 +80,7 @@ diff --git a/options.c b/options.c {"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 }, {"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 }, {"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 }, -@@ -2634,8 +2638,14 @@ void server_options(char **args, int *argc_p) +@@ -2637,8 +2641,14 @@ void server_options(char **args, int *argc_p) args[ac++] = "--super"; if (size_only) args[ac++] = "--size-only"; @@ -109,7 +109,7 @@ diff --git a/rsync.yo b/rsync.yo --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 -@@ -1809,6 +1811,17 @@ the bf(--partial-dir) option, that directory will be used instead. These +@@ -1814,6 +1816,17 @@ the bf(--partial-dir) option, that directory will be used instead. These potential alternate-basis files will be removed as the transfer progresses. This option conflicts with bf(--inplace) and bf(--append). diff --git a/detect-renamed.diff b/detect-renamed.diff index 4d452bd..262a250 100644 --- a/detect-renamed.diff +++ b/detect-renamed.diff @@ -38,7 +38,7 @@ TODO: a file that can't use it, while missing out on giving it to a file that could use it. -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/compat.c b/compat.c --- a/compat.c +++ b/compat.c @@ -183,7 +183,7 @@ diff --git a/flist.c b/flist.c static void send_directory(int f, struct file_list *flist, char *fbuf, int len, int flags); -@@ -2568,6 +2610,25 @@ struct file_list *recv_file_list(int f) +@@ -2586,6 +2628,25 @@ struct file_list *recv_file_list(int f, int dir_ndx) * for a non-relative transfer in recv_file_entry(). */ flist_sort_and_clean(flist, relative_paths); @@ -630,7 +630,7 @@ diff --git a/options.c b/options.c delay_updates ? "delay-updates" : "partial-dir"); return 0; } -@@ -2630,6 +2634,8 @@ void server_options(char **args, int *argc_p) +@@ -2633,6 +2637,8 @@ void server_options(char **args, int *argc_p) args[ac++] = "--super"; if (size_only) args[ac++] = "--size-only"; @@ -682,7 +682,7 @@ diff --git a/rsync.yo b/rsync.yo --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 -@@ -1793,6 +1794,21 @@ Note that the use of the bf(--delete) option might get rid of any potential +@@ -1798,6 +1799,21 @@ Note that the use of the bf(--delete) option might get rid of any potential fuzzy-match files, so either use bf(--delete-after) or specify some filename exclusions if you need to prevent this. diff --git a/direct-io.diff b/direct-io.diff index 1d10e11..96d971d 100644 --- a/direct-io.diff +++ b/direct-io.diff @@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/options.c b/options.c --- a/options.c +++ b/options.c @@ -50,7 +50,7 @@ diff --git a/rsync.yo b/rsync.yo -m, --prune-empty-dirs prune empty directory chains from file-list --numeric-ids don't map uid/gid values by user/group name --usermap=STRING custom username mapping -@@ -2362,6 +2363,14 @@ See also the "atomic-rsync" perl script in the "support" subdir for an +@@ -2367,6 +2368,14 @@ See also the "atomic-rsync" perl script in the "support" subdir for an update algorithm that is even more atomic (it uses bf(--link-dest) and a parallel hierarchy of files). diff --git a/downdate.diff b/downdate.diff index a297c7b..52a7d06 100644 --- a/downdate.diff +++ b/downdate.diff @@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c diff --git a/fileflags.diff b/fileflags.diff index cec7418..3771bfc 100644 --- a/fileflags.diff +++ b/fileflags.diff @@ -8,11 +8,11 @@ To use this patch, run these commands for a successful build: ./configure make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in -@@ -45,7 +45,7 @@ popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ +@@ -46,7 +46,7 @@ popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@ @@ -21,7 +21,7 @@ diff --git a/Makefile.in b/Makefile.in # Programs we must have to run the test cases CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \ -@@ -127,7 +127,7 @@ getgroups$(EXEEXT): getgroups.o +@@ -128,7 +128,7 @@ getgroups$(EXEEXT): getgroups.o getfsdev$(EXEEXT): getfsdev.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS) @@ -66,7 +66,7 @@ diff --git a/compat.c b/compat.c diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac -@@ -597,6 +597,7 @@ AC_FUNC_UTIME_NULL +@@ -600,6 +600,7 @@ AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \ fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \ @@ -470,7 +470,7 @@ diff --git a/options.c b/options.c {"ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 1, 0, 0 }, {"no-ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 0, 0, 0 }, {"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 }, -@@ -2537,6 +2563,9 @@ void server_options(char **args, int *argc_p) +@@ -2540,6 +2566,9 @@ void server_options(char **args, int *argc_p) if (xfer_dirs && !recurse && delete_mode && am_sender) args[ac++] = "--no-r"; @@ -480,7 +480,7 @@ diff --git a/options.c b/options.c if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) { if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0) goto oom; -@@ -2624,6 +2653,16 @@ void server_options(char **args, int *argc_p) +@@ -2627,6 +2656,16 @@ void server_options(char **args, int *argc_p) args[ac++] = "--delete-excluded"; if (force_delete) args[ac++] = "--force"; @@ -557,16 +557,16 @@ diff --git a/rsync.c b/rsync.c /* We shouldn't have attempted to change uid * or gid unless have the privilege. */ rsyserr(FERROR_XFER, errno, "%s %s failed", -@@ -549,7 +583,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, - flags |= ATTRS_SKIP_MTIME; - if (!(flags & ATTRS_SKIP_MTIME) - && cmp_time(sxp->st.st_mtime, file->modtime) != 0) { +@@ -553,7 +587,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, + || (NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file)) + #endif + )) { - int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode); + int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode, ST_FLAGS(sxp->st)); if (ret < 0) { rsyserr(FERROR_XFER, errno, "failed to set times on %s", full_fname(fname)); -@@ -576,7 +610,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, +@@ -580,7 +614,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, #ifdef HAVE_CHMOD if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) { @@ -575,7 +575,7 @@ diff --git a/rsync.c b/rsync.c if (ret < 0) { rsyserr(FERROR_XFER, errno, "failed to set permissions on %s", -@@ -588,6 +622,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, +@@ -592,6 +626,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, } #endif @@ -595,7 +595,7 @@ diff --git a/rsync.c b/rsync.c if (INFO_GTE(NAME, 2) && flags & ATTRS_REPORT) { if (updated) rprintf(FCLIENT, "%s\n", fname); -@@ -662,7 +709,8 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -666,7 +713,8 @@ int finish_transfer(const char *fname, const char *fnametmp, /* Change permissions before putting the file into place. */ set_file_attrs(fnametmp, file, NULL, fnamecmp, @@ -605,7 +605,7 @@ diff --git a/rsync.c b/rsync.c /* move tmp file over real file */ if (DEBUG_GTE(RECV, 1)) -@@ -679,6 +727,10 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -683,6 +731,10 @@ int finish_transfer(const char *fname, const char *fnametmp, } if (ret == 0) { /* The file was moved into place (not copied), so it's done. */ @@ -725,7 +725,7 @@ diff --git a/rsync.yo b/rsync.yo 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-": -@@ -943,7 +948,7 @@ they would be using bf(--copy-links). +@@ -948,7 +953,7 @@ they would be using bf(--copy-links). Without this option, if the sending side has replaced a directory with a symlink to a directory, the receiving side will delete anything that is in the way of the new symlink, including a directory hierarchy (as long as @@ -734,7 +734,7 @@ diff --git a/rsync.yo b/rsync.yo See also bf(--keep-dirlinks) for an analogous option for the receiving side. -@@ -1106,6 +1111,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those +@@ -1111,6 +1116,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those used by bf(--fake-super)) unless you repeat the option (e.g. -XX). This "copy all xattrs" mode cannot be used with bf(--fake-super). @@ -764,7 +764,7 @@ diff --git a/rsync.yo b/rsync.yo dit(bf(--chmod)) This option tells rsync to apply one or more comma-separated "chmod" modes to the permission of the files in the transfer. The resulting value is treated as though it were the permissions -@@ -1435,12 +1463,13 @@ display as a "*missing" entry in the bf(--list-only) output. +@@ -1440,12 +1468,13 @@ display as a "*missing" entry in the bf(--list-only) output. dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files even when there are I/O errors. @@ -781,7 +781,7 @@ diff --git a/rsync.yo b/rsync.yo bf(--recursive) option was also enabled. dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM -@@ -2074,7 +2103,7 @@ with older versions of rsync, but that also turns on the output of other +@@ -2079,7 +2108,7 @@ with older versions of rsync, but that also turns on the output of other verbose messages). The "%i" escape has a cryptic output that is 11 letters long. The general @@ -790,7 +790,7 @@ diff --git a/rsync.yo b/rsync.yo 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. -@@ -2130,7 +2159,7 @@ quote(itemization( +@@ -2135,7 +2164,7 @@ 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). diff --git a/filter-attribute-mods.diff b/filter-attribute-mods.diff index f47f2e7..bec6a52 100644 --- a/filter-attribute-mods.diff +++ b/filter-attribute-mods.diff @@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/exclude.c b/exclude.c --- a/exclude.c +++ b/exclude.c @@ -386,7 +386,7 @@ diff --git a/rsync.h b/rsync.h diff --git a/rsync.yo b/rsync.yo --- a/rsync.yo +++ b/rsync.yo -@@ -1128,6 +1128,8 @@ quote(--chmod=D2775,F664) +@@ -1133,6 +1133,8 @@ quote(--chmod=D2775,F664) It is also legal to specify multiple bf(--chmod) options, as each additional option is just appended to the list of changes to make. @@ -395,7 +395,7 @@ diff --git a/rsync.yo b/rsync.yo See the bf(--perms) and bf(--executability) options for how the resulting permission value can be applied to the files in the transfer. -@@ -2024,6 +2026,10 @@ be omitted, but if USER is empty, a leading colon must be supplied. +@@ -2029,6 +2031,10 @@ be omitted, but if USER is empty, a leading colon must be supplied. If you specify "--chown=foo:bar, this is exactly the same as specifying "--usermap=*:foo --groupmap=*:bar", only easier. @@ -406,7 +406,7 @@ diff --git a/rsync.yo b/rsync.yo dit(bf(--timeout=TIMEOUT)) This option allows you to set a maximum I/O timeout in seconds. If no data is transferred for the specified time then rsync will exit. The default is 0, which means no timeout. -@@ -2883,6 +2889,15 @@ itemization( +@@ -2888,6 +2894,15 @@ itemization( option's default rules that exclude things like "CVS" and "*.o" are marked as perishable, and will not prevent a directory that was removed on the source from being deleted on the destination. @@ -422,7 +422,7 @@ diff --git a/rsync.yo b/rsync.yo ) manpagesection(MERGE-FILE FILTER RULES) -@@ -2944,6 +2959,12 @@ itemization( +@@ -2949,6 +2964,12 @@ itemization( a rule prefix such as bf(hide)). ) diff --git a/fsync.diff b/fsync.diff index 13cbe2a..6e2867d 100644 --- a/fsync.diff +++ b/fsync.diff @@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/options.c b/options.c --- a/options.c +++ b/options.c @@ -35,7 +35,7 @@ diff --git a/options.c b/options.c {"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 }, {"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 }, {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, -@@ -2709,6 +2712,9 @@ void server_options(char **args, int *argc_p) +@@ -2712,6 +2715,9 @@ void server_options(char **args, int *argc_p) args[ac++] = tmpdir; } diff --git a/hfs-compression.diff b/hfs-compression.diff index 1ca904b..7be3541 100644 --- a/hfs-compression.diff +++ b/hfs-compression.diff @@ -296,7 +296,7 @@ diff --git a/options.c b/options.c if (block_size > MAX_BLOCK_SIZE) { snprintf(err_buf, sizeof err_buf, "--block-size=%lu is too large (max: %u)\n", block_size, MAX_BLOCK_SIZE); -@@ -2573,6 +2593,11 @@ void server_options(char **args, int *argc_p) +@@ -2576,6 +2596,11 @@ void server_options(char **args, int *argc_p) if (preserve_fileflags) args[ac++] = "--fileflags"; @@ -332,12 +332,12 @@ diff --git a/rsync.c b/rsync.c flags |= ATTRS_SKIP_CRTIME; if (!(flags & ATTRS_SKIP_MTIME) +#ifdef SUPPORT_HFS_COMPRESSION -+ && !(sxp->st.st_flags & UF_COMPRESSED) /* setting this alters mtime, so defer to after set_fileflags */ ++ && !(sxp->st.st_flags & UF_COMPRESSED) /* setting this alters mtime, so defer to after set_fileflags */ +#endif - && cmp_time(sxp->st.st_mtime, file->modtime) != 0) { - int ret = set_modtime(fname, file->modtime, F_MOD_NSEC(file), sxp->st.st_mode, ST_FLAGS(sxp->st)); - if (ret < 0) { -@@ -643,6 +652,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, + && (sxp->st.st_mtime != file->modtime + #ifdef ST_MTIME_NSEC + || (NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file)) +@@ -647,6 +656,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, && !set_fileflags(fname, fileflags)) goto cleanup; updated = 1; @@ -387,7 +387,7 @@ diff --git a/rsync.yo b/rsync.yo -o, --owner preserve owner (super-user only) -g, --group preserve group --devices preserve device files (super-user only) -@@ -1135,6 +1137,42 @@ flags on files and directories that are being updated or deleted on the +@@ -1140,6 +1142,42 @@ flags on files and directories that are being updated or deleted on the receiving side. It does not try to affect user flags. This option overrides bf(--force-change) and bf(--force-uchange). diff --git a/ignore-case.diff b/ignore-case.diff index 518a68a..32e8922 100644 --- a/ignore-case.diff +++ b/ignore-case.diff @@ -12,7 +12,7 @@ TODO: - Make this code handle multibyte character encodings, and honor the --iconv setting when converting case. -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/exclude.c b/exclude.c --- a/exclude.c +++ b/exclude.c @@ -56,7 +56,7 @@ diff --git a/flist.c b/flist.c extern int ignore_errors; extern int numeric_ids; extern int recurse; -@@ -3030,6 +3031,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2) +@@ -3048,6 +3049,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2) { int dif; const uchar *c1, *c2; @@ -64,7 +64,7 @@ diff --git a/flist.c b/flist.c enum fnc_state state1, state2; enum fnc_type type1, type2; enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM; -@@ -3140,7 +3142,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2) +@@ -3158,7 +3160,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2) if (type1 != type2) return type1 == t_PATH ? 1 : -1; } @@ -237,7 +237,7 @@ diff --git a/options.c b/options.c {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 }, {"from0", '0', POPT_ARG_VAL, &eol_nulls, 1, 0, 0}, {"no-from0", 0, POPT_ARG_VAL, &eol_nulls, 0, 0, 0}, -@@ -2659,6 +2663,9 @@ void server_options(char **args, int *argc_p) +@@ -2662,6 +2666,9 @@ void server_options(char **args, int *argc_p) args[ac++] = arg; } @@ -258,7 +258,7 @@ diff --git a/rsync.yo b/rsync.yo --address=ADDRESS bind address for outgoing socket to daemon --port=PORT specify double-colon alternate port number --sockopts=OPTIONS specify custom TCP options -@@ -1744,6 +1745,10 @@ default (with is overridden by both the environment and the command-line). +@@ -1749,6 +1750,10 @@ default (with is overridden by both the environment and the command-line). This option will eventually become a new default setting at some as-yet-undetermined point in the future. diff --git a/kerberos.diff b/kerberos.diff index e2b80a6..861716e 100644 --- a/kerberos.diff +++ b/kerberos.diff @@ -9,11 +9,11 @@ To use this patch, run these commands for a successful build: ./configure make -based-on: 962f8b90045ab331fc04c9e65f80f1a53e68243b +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in -@@ -39,7 +39,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ +@@ -40,7 +40,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o delete.o OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \ fileio.o batch.o clientname.o chmod.o acls.o xattrs.o @@ -78,7 +78,7 @@ diff --git a/clientserver.c b/clientserver.c diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac -@@ -675,6 +675,31 @@ if test x"$enable_iconv" != x"no"; then +@@ -678,6 +678,31 @@ if test x"$enable_iconv" != x"no"; then AC_DEFINE(UTF8_CHARSET, "UTF-8", [String to pass to iconv() for the UTF-8 charset.]) fi diff --git a/link-by-hash.diff b/link-by-hash.diff index caff5f5..8a608c9 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -12,11 +12,11 @@ To use this patch, run these commands for a successful build: ./configure make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in -@@ -39,7 +39,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ +@@ -40,7 +40,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o delete.o OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \ fileio.o batch.o clientname.o chmod.o acls.o xattrs.o @@ -336,7 +336,7 @@ diff --git a/options.c b/options.c } if (daemon_filter_list.head && !am_sender) { filter_rule_list *elp = &daemon_filter_list; -@@ -2738,6 +2762,12 @@ void server_options(char **args, int *argc_p) +@@ -2741,6 +2765,12 @@ void server_options(char **args, int *argc_p) } else if (inplace) args[ac++] = "--inplace"; @@ -360,7 +360,7 @@ diff --git a/rsync.c b/rsync.c extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION -@@ -679,6 +680,10 @@ int finish_transfer(const char *fname, const char *fnametmp, +@@ -683,6 +684,10 @@ int finish_transfer(const char *fname, const char *fnametmp, } if (ret == 0) { /* The file was moved into place (not copied), so it's done. */ @@ -395,7 +395,7 @@ diff --git a/rsync.yo b/rsync.yo -z, --compress compress file data during the transfer --compress-level=NUM explicitly set compression level --skip-compress=LIST skip compressing files with suffix in LIST -@@ -1874,6 +1875,48 @@ bf(--link-dest) from working properly for a non-super-user when bf(-o) was +@@ -1879,6 +1880,48 @@ bf(--link-dest) from working properly for a non-super-user when bf(-o) was specified (or implied by bf(-a)). You can work-around this bug by avoiding the bf(-o) option when sending to an old rsync. diff --git a/nameconverter.diff b/nameconverter.diff index f808dd8..7ee33f1 100644 --- a/nameconverter.diff +++ b/nameconverter.diff @@ -20,7 +20,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/authenticate.c b/authenticate.c --- a/authenticate.c +++ b/authenticate.c diff --git a/netgroup-auth.diff b/netgroup-auth.diff index 63b0fab..15df3ba 100644 --- a/netgroup-auth.diff +++ b/netgroup-auth.diff @@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/access.c b/access.c --- a/access.c +++ b/access.c diff --git a/omit-dir-changes.diff b/omit-dir-changes.diff index 445c1fe..650c5eb 100644 --- a/omit-dir-changes.diff +++ b/omit-dir-changes.diff @@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c @@ -133,7 +133,7 @@ diff --git a/rsync.yo b/rsync.yo --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently -@@ -1192,6 +1193,10 @@ directories. +@@ -1197,6 +1198,10 @@ directories. dit(bf(-J, --omit-link-times)) This tells rsync to omit symlinks when it is preserving modification times (see bf(--times)). diff --git a/slow-down.diff b/slow-down.diff index ec16a4f..8f73ab4 100644 --- a/slow-down.diff +++ b/slow-down.diff @@ -14,7 +14,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/flist.c b/flist.c --- a/flist.c +++ b/flist.c diff --git a/slp.diff b/slp.diff index 97d977c..5f22680 100644 --- a/slp.diff +++ b/slp.diff @@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build: TODO: the configure changes should abort if the user requests --enable-slp and we can't honor that request. -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/Makefile.in b/Makefile.in --- a/Makefile.in +++ b/Makefile.in @@ -20,10 +20,10 @@ diff --git a/Makefile.in b/Makefile.in LDFLAGS=@LDFLAGS@ +LIBSLP=@LIBSLP@ +SLPOBJ=@SLPOBJ@ + LIBOBJDIR=lib/ INSTALLCMD=@INSTALL@ - INSTALLMAN=@INSTALL@ -@@ -40,7 +42,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ +@@ -41,7 +43,7 @@ OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \ OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \ fileio.o batch.o clientname.o chmod.o acls.o xattrs.o OBJS3=progress.o pipe.o @@ -32,7 +32,7 @@ diff --git a/Makefile.in b/Makefile.in popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@ -@@ -90,7 +92,7 @@ install-strip: +@@ -91,7 +93,7 @@ install-strip: $(MAKE) INSTALL_STRIP='-s' install rsync$(EXEEXT): $(OBJS) @@ -61,7 +61,7 @@ diff --git a/clientserver.c b/clientserver.c diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac -@@ -734,6 +734,29 @@ if test $rsync_cv_can_hardlink_special = yes; then +@@ -737,6 +737,29 @@ if test $rsync_cv_can_hardlink_special = yes; then AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.]) fi diff --git a/soften-links.diff b/soften-links.diff index 91268fc..895519a 100644 --- a/soften-links.diff +++ b/soften-links.diff @@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/syscall.c b/syscall.c --- a/syscall.c +++ b/syscall.c diff --git a/source-backup.diff b/source-backup.diff index f2b6dfa..ecb2d42 100644 --- a/source-backup.diff +++ b/source-backup.diff @@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build: -- Matt McCutchen -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/options.c b/options.c --- a/options.c +++ b/options.c @@ -37,7 +37,7 @@ diff --git a/options.c b/options.c {"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 }, {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, {"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 }, -@@ -2638,6 +2641,8 @@ void server_options(char **args, int *argc_p) +@@ -2641,6 +2644,8 @@ void server_options(char **args, int *argc_p) goto oom; args[ac++] = arg; } @@ -57,7 +57,7 @@ diff --git a/rsync.yo b/rsync.yo --del an alias for --delete-during --delete delete extraneous files from dest dirs --delete-before receiver deletes before xfer, not during -@@ -1332,6 +1333,14 @@ bf(--exclude='*.new') for the rsync transfer). +@@ -1337,6 +1338,14 @@ bf(--exclude='*.new') for the rsync transfer). Starting with 3.1.0, rsync will skip the sender-side removal (and output an error) if the file's size or modify time has not stayed unchanged. diff --git a/source-filter_dest-filter.diff b/source-filter_dest-filter.diff index c750d2d..a3727d4 100644 --- a/source-filter_dest-filter.diff +++ b/source-filter_dest-filter.diff @@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c @@ -134,7 +134,7 @@ diff --git a/options.c b/options.c if (files_from) { char *h, *p; int q; -@@ -2647,6 +2666,25 @@ void server_options(char **args, int *argc_p) +@@ -2650,6 +2669,25 @@ void server_options(char **args, int *argc_p) else if (missing_args == 1 && !am_sender) args[ac++] = "--ignore-missing-args"; @@ -351,7 +351,7 @@ diff --git a/rsync.yo b/rsync.yo --protocol=NUM force an older protocol version to be used --iconv=CONVERT_SPEC request charset conversion of filenames --checksum-seed=NUM set block/file checksum seed (advanced) -@@ -2543,6 +2546,33 @@ file previously generated by bf(--write-batch). +@@ -2548,6 +2551,33 @@ file previously generated by bf(--write-batch). If em(FILE) is bf(-), the batch data will be read from standard input. See the "BATCH MODE" section for details. diff --git a/sparse-block.diff b/sparse-block.diff index 4c6b75c..45cd62e 100644 --- a/sparse-block.diff +++ b/sparse-block.diff @@ -18,7 +18,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/fileio.c b/fileio.c --- a/fileio.c +++ b/fileio.c @@ -66,7 +66,7 @@ diff --git a/options.c b/options.c {"preallocate", 0, POPT_ARG_NONE, &preallocate_files, 0, 0, 0}, {"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 }, {"no-inplace", 0, POPT_ARG_VAL, &inplace, 0, 0, 0 }, -@@ -2570,6 +2573,12 @@ void server_options(char **args, int *argc_p) +@@ -2573,6 +2576,12 @@ void server_options(char **args, int *argc_p) args[ac++] = arg; } @@ -90,7 +90,7 @@ diff --git a/rsync.yo b/rsync.yo --preallocate allocate dest files before writing -n, --dry-run perform a trial run with no changes made -W, --whole-file copy files whole (w/o delta-xfer algorithm) -@@ -1248,6 +1249,15 @@ filesystem, but with this option rsync will probably copy more slowly. If the +@@ -1253,6 +1254,15 @@ filesystem, but with this option rsync will probably copy more slowly. If the destination is not an extent-supporting filesystem (such as ext4, xfs, NTFS, etc.), this option may have no positive effect at all. diff --git a/time-limit.diff b/time-limit.diff index 15c28dd..560accf 100644 --- a/time-limit.diff +++ b/time-limit.diff @@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/io.c b/io.c --- a/io.c +++ b/io.c @@ -116,7 +116,7 @@ diff --git a/options.c b/options.c default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -2582,6 +2618,15 @@ void server_options(char **args, int *argc_p) +@@ -2585,6 +2621,15 @@ void server_options(char **args, int *argc_p) args[ac++] = arg; } @@ -144,7 +144,7 @@ diff --git a/rsync.yo b/rsync.yo --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 -@@ -2517,6 +2519,19 @@ files can show up as being rapidly sent when the data is quickly buffered, +@@ -2522,6 +2524,19 @@ files can show up as being rapidly sent when the data is quickly buffered, while other can show up as very slow when the flushing of the output buffer occurs. This may be fixed in a future version. diff --git a/transliterate.diff b/transliterate.diff index 19d6393..0ba878e 100644 --- a/transliterate.diff +++ b/transliterate.diff @@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/flist.c b/flist.c --- a/flist.c +++ b/flist.c @@ -69,7 +69,7 @@ diff --git a/flist.c b/flist.c if (*thisname && (clean_fname(thisname, CFN_REFUSE_DOT_DOT_DIRS) < 0 || (!relative_paths && *thisname == '/'))) { rprintf(FERROR, "ABORTING due to unsafe pathname from sender: %s\n", thisname); -@@ -2451,6 +2475,15 @@ struct file_list *recv_file_list(int f) +@@ -2452,6 +2476,15 @@ struct file_list *recv_file_list(int f, int dir_ndx) parse_name_map(usermap, True); if (groupmap) parse_name_map(groupmap, False); @@ -137,7 +137,7 @@ diff --git a/options.c b/options.c am_starting_up = 0; return 1; -@@ -2755,6 +2776,12 @@ void server_options(char **args, int *argc_p) +@@ -2758,6 +2779,12 @@ void server_options(char **args, int *argc_p) if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30)) args[ac++] = "--no-implied-dirs"; @@ -161,7 +161,7 @@ diff --git a/rsync.yo b/rsync.yo --checksum-seed=NUM set block/file checksum seed (advanced) -4, --ipv4 prefer IPv4 -6, --ipv6 prefer IPv6 -@@ -2581,6 +2582,22 @@ daemon uses the charset specified in its "charset" configuration parameter +@@ -2586,6 +2587,22 @@ daemon uses the charset specified in its "charset" configuration parameter regardless of the remote charset you actually pass. Thus, you may feel free to specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)). diff --git a/tru64.diff b/tru64.diff index 410432f..8418ab8 100644 --- a/tru64.diff +++ b/tru64.diff @@ -6,7 +6,7 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/syscall.c b/syscall.c --- a/syscall.c +++ b/syscall.c diff --git a/write-devices.diff b/write-devices.diff index aff513a..38a8966 100644 --- a/write-devices.diff +++ b/write-devices.diff @@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build: This patch has not yet been tested by me (Wayne), but was provided Darryl Dixon. Thanks! -based-on: 7cb0de6326c915a72253fd103dae93308031ec3f +based-on: 2ac35b45071c7bfd8be6be41bfd45326f1f57bce diff --git a/generator.c b/generator.c --- a/generator.c +++ b/generator.c @@ -70,7 +70,7 @@ diff --git a/options.c b/options.c default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -2755,6 +2763,9 @@ void server_options(char **args, int *argc_p) +@@ -2758,6 +2766,9 @@ void server_options(char **args, int *argc_p) if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30)) args[ac++] = "--no-implied-dirs"; -- 2.34.1