Updated patches to work with the current trunk.
authorWayne Davison <wayned@samba.org>
Tue, 8 Dec 2009 00:16:03 +0000 (16:16 -0800)
committerWayne Davison <wayned@samba.org>
Tue, 8 Dec 2009 00:16:03 +0000 (16:16 -0800)
42 files changed:
acls.diff
adaptec_acl_mods.diff
atimes.diff
backup-dir-dels.diff
catch_crash_signals.diff
checksum-reading.diff
checksum-updating.diff
checksum-xattr.diff
copy-devices.diff
crtimes.diff
cvs-entries.diff
daemon-forward-lookup.diff
date-only.diff
db.diff
detect-renamed-lax.diff
detect-renamed.diff
downdate.diff
drop-cache.diff
fileflags.diff
filter-attribute-mods.diff
fsync.diff
group-auth.diff
ignore-case.diff
link-by-hash.diff
nameconverter.diff
netgroup-auth.diff
omit-dir-changes.diff
openssl-support.diff
osx-xattr-nodev.diff
preallocate.diff
slow-down.diff
slp.diff
soften-links.diff
source-backup.diff
source-filter_dest-filter.diff
sparse-block.diff
stdout.diff
time-limit.diff
transliterate.diff
tru64.diff
write-devices.diff
xattrs.diff

index e59a344..87ad3d0 100644 (file)
--- 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: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/acls.c b/acls.c
 --- a/acls.c
 +++ b/acls.c
@@ -325,7 +325,7 @@ diff --git a/acls.c b/acls.c
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -192,13 +192,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -189,13 +189,6 @@ void setup_protocol(int f_out,int f_in)
        if (protocol_version < 30) {
                if (append_mode == 1)
                        append_mode = 2;
index fca8569..bd6ed31 100644 (file)
@@ -24,7 +24,7 @@ Todo:
 Fix a bug that could lose some bits when stripping some (supposedly)
 superfluous ACL info.
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/lib/sysacls.c b/lib/sysacls.c
 --- a/lib/sysacls.c
 +++ b/lib/sysacls.c
index 2157fd9..ed33c74 100644 (file)
@@ -4,11 +4,11 @@ To use this patch, run these commands for a successful build:
     ./configure                      (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -45,6 +45,7 @@ extern int protocol_version;
+@@ -43,6 +43,7 @@ extern int protocol_version;
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
@@ -16,7 +16,7 @@ diff --git a/compat.c b/compat.c
  extern int preserve_acls;
  extern int preserve_xattrs;
  extern int need_messages_from_generator;
-@@ -62,7 +63,7 @@ extern char *iconv_opt;
+@@ -60,7 +61,7 @@ extern char *iconv_opt;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -25,7 +25,7 @@ diff --git a/compat.c b/compat.c
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
  int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -139,6 +140,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -136,6 +137,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -37,7 +37,7 @@ diff --git a/compat.c b/compat.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -55,6 +55,7 @@ extern int missing_args;
+@@ -54,6 +54,7 @@ extern int missing_args;
  extern int uid_ndx;
  extern int gid_ndx;
  extern int eol_nulls;
@@ -45,7 +45,7 @@ diff --git a/flist.c b/flist.c
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -405,7 +406,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -404,7 +405,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  #endif
                            int ndx, int first_ndx)
  {
@@ -54,7 +54,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
-@@ -505,6 +506,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -504,6 +505,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                modtime = file->modtime;
        if (NSEC_BUMP(file) && protocol_version >= 31)
                xflags |= XMIT_MOD_NSEC;
@@ -68,7 +68,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -591,6 +599,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -590,6 +598,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                write_varint(f, F_MOD_NSEC(file));
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -77,7 +77,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -676,7 +686,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -675,7 +685,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  
  static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
  {
@@ -86,7 +86,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
-@@ -820,6 +830,16 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -819,6 +829,16 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
                modtime_nsec = 0;
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -103,7 +103,7 @@ diff --git a/flist.c b/flist.c
  
        if (chmod_modes && !S_ISLNK(mode) && mode)
                mode = tweak_mode(mode, chmod_modes);
-@@ -980,6 +1000,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -979,6 +999,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -112,7 +112,7 @@ diff --git a/flist.c b/flist.c
        if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1375,6 +1397,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1374,6 +1396,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
                F_GROUP(file) = st.st_gid;
@@ -124,7 +124,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -456,6 +456,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -455,6 +455,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                 : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
                  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                        iflags |= ITEM_REPORT_TIME;
@@ -134,7 +134,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -826,6 +829,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -825,6 +828,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                if (link_dest) {
                        if (!hard_link_one(file, fname, cmpbuf, 1))
                                goto try_a_copy;
@@ -143,7 +143,7 @@ diff --git a/generator.c b/generator.c
                        if (preserve_hard_links && F_IS_HLINKED(file))
                                finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
                        if (!maybe_ATTRS_REPORT && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) {
-@@ -1018,6 +1023,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1017,6 +1022,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  static void list_file_entry(struct file_struct *f)
  {
        char permbuf[PERMSTRING_SIZE];
@@ -151,7 +151,7 @@ diff --git a/generator.c b/generator.c
        int64 len;
        int colwidth = human_readable ? 14 : 11;
  
-@@ -1033,10 +1039,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1032,10 +1038,11 @@ static void list_file_entry(struct file_struct *f)
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -166,7 +166,7 @@ diff --git a/generator.c b/generator.c
        } else
  #endif
        if (missing_args == 2 && f->mode == 0) {
-@@ -1044,9 +1051,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1043,9 +1050,11 @@ static void list_file_entry(struct file_struct *f)
                        colwidth + 31, "*missing",
                        f_name(f, NULL));
        } else {
@@ -180,7 +180,7 @@ diff --git a/generator.c b/generator.c
        }
  }
  
-@@ -1923,7 +1932,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1925,7 +1934,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        STRUCT_STAT st;
                        if (link_stat(fname, &st, 0) == 0
                         && cmp_time(st.st_mtime, file->modtime) != 0)
@@ -192,8 +192,8 @@ diff --git a/generator.c b/generator.c
 diff --git a/ifuncs.h b/ifuncs.h
 --- a/ifuncs.h
 +++ b/ifuncs.h
-@@ -35,6 +35,28 @@ realloc_xbuf(xbuf *xb, size_t sz)
-       xb->size = sz;
+@@ -43,6 +43,28 @@ free_xbuf(xbuf *xb)
+       memset(xb, 0, sizeof (xbuf));
  }
  
 +static inline time_t
@@ -224,7 +224,7 @@ diff --git a/ifuncs.h b/ifuncs.h
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -715,7 +715,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -733,7 +733,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -263,7 +263,7 @@ diff --git a/options.c b/options.c
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },
    {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
    {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
-@@ -2307,6 +2312,8 @@ void server_options(char **args, int *argc_p)
+@@ -2326,6 +2331,8 @@ void server_options(char **args, int *argc_p)
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -275,7 +275,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -434,6 +434,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -451,6 +451,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;
@@ -283,7 +283,7 @@ diff --git a/rsync.c b/rsync.c
        mode_t new_mode = file->mode;
        int inherit;
  
-@@ -472,20 +473,38 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -489,20 +490,38 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                set_xattr(fname, file, fnamecmp, sxp);
  #endif
  
@@ -326,7 +326,7 @@ diff --git a/rsync.c b/rsync.c
        }
  
        change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
-@@ -622,7 +641,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -639,7 +658,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,
@@ -335,7 +335,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
-@@ -649,7 +668,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -666,7 +685,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -355,7 +355,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These flags are used in the live flist data. */
  
-@@ -158,6 +159,7 @@
+@@ -160,6 +161,7 @@
  
  #define ATTRS_REPORT          (1<<0)
  #define ATTRS_SKIP_MTIME      (1<<1)
@@ -363,7 +363,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -660,12 +662,14 @@ extern int file_extra_cnt;
+@@ -664,12 +666,14 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -402,7 +402,7 @@ diff --git a/rsync.yo b/rsync.yo
  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
-@@ -1930,7 +1937,10 @@ quote(itemization(
+@@ -1931,7 +1938,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).
@@ -439,7 +439,7 @@ new file mode 100644
 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
 --- a/testsuite/rsync.fns
 +++ b/testsuite/rsync.fns
-@@ -215,6 +215,10 @@ checkit() {
+@@ -214,6 +214,10 @@ checkit() {
      # We can just write everything to stdout/stderr, because the
      # wrapper hides it unless there is a problem.
  
@@ -450,7 +450,7 @@ diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
      echo "Running: \"$1\""  
      eval "$1" 
      status=$?
-@@ -222,10 +226,13 @@ checkit() {
+@@ -221,10 +225,13 @@ checkit() {
        failed="YES";
      fi
  
index 6927985..3b1282e 100644 (file)
@@ -19,7 +19,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/backup.c b/backup.c
 --- a/backup.c
 +++ b/backup.c
@@ -230,7 +230,7 @@ diff --git a/options.c b/options.c
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1972,6 +1982,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1991,6 +2001,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
@@ -239,7 +239,7 @@ diff --git a/options.c b/options.c
        }
        if (daemon_filter_list.head && !am_sender) {
                filter_rule_list *elp = &daemon_filter_list;
-@@ -1993,6 +2005,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2012,6 +2024,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        if (check_filter(elp, FLOG, dir, 1) < 0)
                                goto options_rejected;
                }
@@ -254,7 +254,7 @@ diff --git a/options.c b/options.c
        }
  
        if (!backup_suffix)
-@@ -2004,6 +2024,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2023,6 +2043,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        backup_suffix);
                return 0;
        }
@@ -275,7 +275,7 @@ diff --git a/options.c b/options.c
        if (backup_dir) {
                while (*backup_dir == '.' && backup_dir[1] == '/')
                        backup_dir += 2;
-@@ -2037,6 +2071,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2056,6 +2090,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        "P *%s", backup_suffix);
                parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
        }
@@ -310,7 +310,7 @@ diff --git a/options.c b/options.c
  
        if (make_backups && !backup_dir) {
                omit_dir_times = 0; /* Implied, so avoid -O to sender. */
-@@ -2450,6 +2512,10 @@ void server_options(char **args, int *argc_p)
+@@ -2469,6 +2531,10 @@ void server_options(char **args, int *argc_p)
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -321,7 +321,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) {
-@@ -2458,7 +2524,14 @@ void server_options(char **args, int *argc_p)
+@@ -2477,7 +2543,14 @@ void server_options(char **args, int *argc_p)
                        goto oom;
                args[ac++] = arg;
        }
index 63a611f..4229422 100644 (file)
@@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                  (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/errcode.h b/errcode.h
 --- a/errcode.h
 +++ b/errcode.h
@@ -41,7 +41,7 @@ diff --git a/errcode.h b/errcode.h
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -88,6 +88,7 @@ struct {
+@@ -93,6 +93,7 @@ struct {
        { RERR_TERMINATED , "sibling process terminated abnormally" },
        { RERR_SIGNAL1    , "received SIGUSR1" },
        { RERR_SIGNAL     , "received SIGINT, SIGTERM, or SIGHUP" },
@@ -52,7 +52,7 @@ diff --git a/log.c b/log.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -175,8 +175,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -176,8 +176,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
                        *exit_code_ptr = RERR_TERMINATED;
                else
                        *exit_code_ptr = RERR_WAITCHILD;
@@ -65,7 +65,7 @@ diff --git a/main.c b/main.c
  }
  
  void write_del_stats(int f)
-@@ -1407,6 +1410,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
+@@ -1416,6 +1419,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
                                break;
                        }
                }
@@ -80,7 +80,7 @@ diff --git a/main.c b/main.c
        }
  #endif
  #ifndef HAVE_SIGACTION
-@@ -1465,6 +1476,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
+@@ -1474,6 +1485,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
  }
  #endif
  
@@ -93,7 +93,7 @@ diff --git a/main.c b/main.c
  
  int main(int argc,char *argv[])
  {
-@@ -1487,6 +1504,11 @@ int main(int argc,char *argv[])
+@@ -1496,6 +1513,11 @@ int main(int argc,char *argv[])
        SIGACTMASK(SIGFPE, rsync_panic_handler);
        SIGACTMASK(SIGABRT, rsync_panic_handler);
        SIGACTMASK(SIGBUS, rsync_panic_handler);
index 3e8748d..214f8a4 100644 (file)
@@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/checksum.c b/checksum.c
 --- a/checksum.c
 +++ b/checksum.c
@@ -41,7 +41,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern int io_timeout;
  extern int no_detach;
  extern int write_batch;
-@@ -871,6 +873,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -874,6 +876,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        } else if (am_root < 0) /* Treat --fake-super from client as --super. */
                am_root = 2;
  
@@ -70,7 +70,7 @@ diff --git a/flist.c b/flist.c
  extern int module_id;
  extern int ignore_errors;
  extern int numeric_ids;
-@@ -61,6 +63,7 @@ extern int file_extra_cnt;
+@@ -60,6 +62,7 @@ extern int file_extra_cnt;
  extern int ignore_perishable;
  extern int non_perishable_cnt;
  extern int prune_empty_dirs;
@@ -78,7 +78,7 @@ diff --git a/flist.c b/flist.c
  extern int copy_links;
  extern int copy_unsafe_links;
  extern int protocol_version;
-@@ -71,6 +74,7 @@ extern int sender_symlink_iconv;
+@@ -70,6 +73,7 @@ extern int sender_symlink_iconv;
  extern int output_needs_newline;
  extern int sender_keeps_checksum;
  extern int unsort_ndx;
@@ -86,7 +86,7 @@ diff --git a/flist.c b/flist.c
  extern struct stats stats;
  extern char *filesfrom_host;
  extern char *usermap, *groupmap;
-@@ -95,6 +99,12 @@ extern iconv_t ic_send, ic_recv;
+@@ -94,6 +98,12 @@ extern iconv_t ic_send, ic_recv;
  #endif
  #endif
  
@@ -99,7 +99,7 @@ diff --git a/flist.c b/flist.c
  #define PTR_SIZE (sizeof (struct file_struct *))
  
  int io_error;
-@@ -136,7 +146,11 @@ static char tmp_sum[MAX_DIGEST_LEN];
+@@ -135,7 +145,11 @@ static char tmp_sum[MAX_DIGEST_LEN];
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  
@@ -112,7 +112,7 @@ diff --git a/flist.c b/flist.c
  static void output_flist(struct file_list *flist);
  
  void init_flist(void)
-@@ -351,6 +365,238 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -350,6 +364,238 @@ static void flist_done_allocating(struct file_list *flist)
                flist->pool_boundary = ptr;
  }
  
@@ -351,7 +351,7 @@ diff --git a/flist.c b/flist.c
  /* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
   * F_PATHNAME(), or (2) "NULL, dir, dirlen" to chdir() to the supplied dir,
   * with dir == NULL taken to be the starting directory, and dirlen < 0
-@@ -1142,7 +1388,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1141,7 +1387,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                              STRUCT_STAT *stp, int flags, int filter_level)
  {
        static char *lastdir;
@@ -360,7 +360,7 @@ diff --git a/flist.c b/flist.c
        struct file_struct *file;
        char thisname[MAXPATHLEN];
        char linkname[MAXPATHLEN];
-@@ -1288,9 +1534,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1287,9 +1533,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                        memcpy(lastdir, thisname, len);
                        lastdir[len] = '\0';
                        lastdir_len = len;
@@ -378,7 +378,7 @@ diff --git a/flist.c b/flist.c
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
-@@ -1308,11 +1561,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1307,11 +1560,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                extra_len += EXTRA_LEN;
  #endif
  
@@ -392,7 +392,7 @@ diff --git a/flist.c b/flist.c
  
  #if EXTRA_ROUNDING > 0
        if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1395,8 +1645,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1394,8 +1644,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                return NULL;
        }
  
@@ -409,7 +409,7 @@ diff --git a/flist.c b/flist.c
  
        if (unsort_ndx)
                F_NDX(file) = stats.num_dirs;
-@@ -2518,7 +2774,7 @@ struct file_list *recv_file_list(int f)
+@@ -2527,7 +2783,7 @@ struct file_list *recv_file_list(int f)
                        rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
        }
  
@@ -418,7 +418,7 @@ diff --git a/flist.c b/flist.c
  
        if (protocol_version < 30) {
                /* Recv the io_error flag */
-@@ -2741,7 +2997,7 @@ void flist_free(struct file_list *flist)
+@@ -2750,7 +3006,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. */
@@ -427,7 +427,7 @@ diff --git a/flist.c b/flist.c
  {
        char fbuf[MAXPATHLEN];
        int i, prev_i;
-@@ -2792,7 +3048,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2801,7 +3057,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. */
@@ -436,7 +436,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;
-@@ -2808,8 +3064,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2817,8 +3073,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
                        } else
                                keep = j, drop = i;
  
@@ -447,7 +447,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);
-@@ -2831,7 +3087,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2840,7 +3096,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
        }
        flist->high = prev_i;
  
@@ -467,7 +467,7 @@ diff --git a/generator.c b/generator.c
  extern int remove_source_files;
  extern int delay_updates;
  extern int update_only;
-@@ -523,7 +524,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -522,7 +523,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  
  
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
@@ -476,7 +476,7 @@ diff --git a/generator.c b/generator.c
  {
        if (st->st_size != F_LENGTH(file))
                return 0;
-@@ -532,7 +533,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -531,7 +532,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -488,7 +488,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -796,7 +800,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -795,7 +799,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        match_level = 1;
                        /* FALL THROUGH */
                case 1:
@@ -497,7 +497,7 @@ diff --git a/generator.c b/generator.c
                                continue;
                        best_match = j;
                        match_level = 2;
-@@ -1082,7 +1086,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1081,7 +1085,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
         * --ignore-non-existing, daemon exclude, or mkdir failure. */
        static struct file_struct *skip_dir = NULL;
        static struct file_list *fuzzy_dirlist = NULL;
@@ -506,7 +506,7 @@ diff --git a/generator.c b/generator.c
        struct file_struct *fuzzy_file = NULL;
        int fd = -1, f_copy = -1;
        stat_x sx, real_sx;
-@@ -1166,8 +1170,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1165,8 +1169,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                flist_free(fuzzy_dirlist);
                                fuzzy_dirlist = NULL;
                        }
@@ -517,7 +517,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                        if (!preserve_perms)
                                dflt_perms = default_perms_for_dir(dn);
-@@ -1175,10 +1179,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1174,10 +1178,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                parent_dirname = dn;
  
@@ -537,7 +537,7 @@ diff --git a/generator.c b/generator.c
                }
  
                statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
-@@ -1601,7 +1610,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1600,7 +1609,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -549,7 +549,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/hlink.c b/hlink.c
 --- a/hlink.c
 +++ b/hlink.c
-@@ -410,7 +410,7 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname,
+@@ -409,7 +409,7 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname,
                                }
                                break;
                        }
@@ -642,15 +642,15 @@ diff --git a/options.c b/options.c
    rprintf(F," -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)\n");
    rprintf(F,"     --no-OPTION             turn off an implied OPTION (e.g. --no-D)\n");
    rprintf(F," -r, --recursive             recurse into directories\n");
-@@ -799,7 +801,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -798,7 +800,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+       OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_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,
-       OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
--      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN,
-+      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_SUMFILES,
+-      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
++      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_SUMFILES,
+       OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
- static struct poptOption long_options[] = {
 @@ -934,6 +936,7 @@ static struct poptOption long_options[] = {
    {"checksum",        'c', POPT_ARG_VAL,    &always_checksum, 1, 0, 0 },
    {"no-checksum",      0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
@@ -659,7 +659,7 @@ diff --git a/options.c b/options.c
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1632,6 +1635,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1651,6 +1654,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        }
                        break;
  
@@ -683,7 +683,7 @@ diff --git a/options.c b/options.c
                case OPT_INFO:
                        arg = poptGetOptArg(pc);
                        parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
-@@ -1832,6 +1852,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1851,6 +1871,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        }
  #endif
  
@@ -696,7 +696,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -723,6 +723,10 @@ extern int xattrs_ndx;
+@@ -727,6 +727,10 @@ extern int xattrs_ndx;
  #define F_SUM(f) ((char*)OPT_EXTRA(f, START_BUMP(f) + HLINK_BUMP(f) \
                                    + SUM_EXTRA_CNT - 1))
  
@@ -707,7 +707,7 @@ diff --git a/rsync.h b/rsync.h
  /* Some utility defines: */
  #define F_IS_ACTIVE(f) (f)->basename[0]
  #define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -911,6 +915,13 @@ typedef struct {
+@@ -923,6 +927,13 @@ typedef struct {
        char fname[1]; /* has variable size */
  } relnamecache;
  
index 22bf310..a68de7b 100644 (file)
@@ -29,7 +29,7 @@ diff --git a/flist.c b/flist.c
  extern int am_root;
  extern int am_server;
  extern int am_daemon;
-@@ -107,6 +108,9 @@ extern iconv_t ic_send, ic_recv;
+@@ -106,6 +107,9 @@ extern iconv_t ic_send, ic_recv;
  
  #define PTR_SIZE (sizeof (struct file_struct *))
  
@@ -39,7 +39,7 @@ diff --git a/flist.c b/flist.c
  int io_error;
  int checksum_len;
  dev_t filesystem_dev; /* used to implement -x */
-@@ -146,8 +150,13 @@ static char tmp_sum[MAX_DIGEST_LEN];
+@@ -145,8 +149,13 @@ static char tmp_sum[MAX_DIGEST_LEN];
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  
@@ -53,7 +53,7 @@ diff --git a/flist.c b/flist.c
  } *csum_cache = NULL;
  
  static void flist_sort_and_clean(struct file_list *flist, int flags);
-@@ -365,7 +374,79 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -364,7 +373,79 @@ static void flist_done_allocating(struct file_list *flist)
                flist->pool_boundary = ptr;
  }
  
@@ -134,7 +134,7 @@ diff --git a/flist.c b/flist.c
  {
        int slot, slots = am_sender ? 1 : basis_dir_cnt + 1;
  
-@@ -379,6 +460,9 @@ void reset_checksum_cache()
+@@ -378,6 +459,9 @@ void reset_checksum_cache()
                struct file_list *flist = csum_cache[slot].flist;
  
                if (flist) {
@@ -144,7 +144,7 @@ diff --git a/flist.c b/flist.c
                        /* Reset the pool memory and empty the file-list array. */
                        pool_free_old(flist->file_pool,
                                      pool_boundary(flist->file_pool, 0));
-@@ -389,6 +473,10 @@ void reset_checksum_cache()
+@@ -388,6 +472,10 @@ void reset_checksum_cache()
                flist->low = 0;
                flist->high = -1;
                flist->next = NULL;
@@ -155,7 +155,7 @@ diff --git a/flist.c b/flist.c
        }
  }
  
-@@ -396,7 +484,7 @@ void reset_checksum_cache()
+@@ -395,7 +483,7 @@ void reset_checksum_cache()
  static int add_checksum(struct file_list *flist, const char *dirname,
                        const char *basename, int basename_len, OFF_T file_length,
                        time_t mtime, uint32 ctime, uint32 inode,
@@ -164,7 +164,7 @@ diff --git a/flist.c b/flist.c
  {
        struct file_struct *file;
        int alloc_len, extra_len;
-@@ -413,7 +501,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -412,7 +500,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
        if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
                extra_len = (extra_len | (EXTRA_ROUNDING * EXTRA_LEN)) + EXTRA_LEN;
  #endif
@@ -173,7 +173,7 @@ diff --git a/flist.c b/flist.c
        bp = pool_alloc(flist->file_pool, alloc_len, "add_checksum");
  
        memset(bp, 0, extra_len + FILE_STRUCT_LEN);
-@@ -422,7 +510,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -421,7 +509,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
        bp += FILE_STRUCT_LEN;
  
        memcpy(bp, basename, basename_len);
@@ -188,7 +188,7 @@ diff --git a/flist.c b/flist.c
        file->mode = S_IFREG;
        file->modtime = mtime;
        file->len32 = (uint32)file_length;
-@@ -451,10 +546,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -450,10 +545,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
        char line[MAXPATHLEN+1024], fbuf[MAXPATHLEN], sum[MAX_DIGEST_LEN];
        FILE *fp;
        char *cp;
@@ -201,7 +201,7 @@ diff --git a/flist.c b/flist.c
        int dlen = dirname ? strlcpy(fbuf, dirname, sizeof fbuf) : 0;
  
        if (dlen >= (int)(sizeof fbuf - 1 - RSYNCSUMS_LEN))
-@@ -475,7 +571,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -474,7 +570,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
        while (fgets(line, sizeof line, fp)) {
                cp = line;
                if (protocol_version >= 30) {
@@ -210,7 +210,7 @@ diff --git a/flist.c b/flist.c
                        if (*cp == '=')
                                while (*++cp == '=') {}
                        else
-@@ -486,7 +582,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -485,7 +581,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
                }
  
                if (*cp == '=') {
@@ -226,7 +226,7 @@ diff --git a/flist.c b/flist.c
                } else {
                        for (i = 0; i < checksum_len*2; i++, cp++) {
                                int x;
-@@ -504,13 +607,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -503,13 +606,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
                                else
                                        sum[i/2] = x << 4;
                        }
@@ -242,7 +242,7 @@ diff --git a/flist.c b/flist.c
                        if (*cp == '=')
                                while (*++cp == '=') {}
                        else
-@@ -560,24 +664,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -559,24 +663,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
                        continue;
  
                strlcpy(fbuf+dlen, cp, sizeof fbuf - dlen);
@@ -357,7 +357,7 @@ diff --git a/flist.c b/flist.c
                read_checksums(slot, flist, file->dirname);
        }
  
-@@ -589,12 +781,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
+@@ -588,12 +780,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
                 && (checksum_files & CSF_LAX
                  || (F_CTIME(fp) == (uint32)stp->st_ctime
                   && F_INODE(fp) == (uint32)stp->st_ino))) {
@@ -390,7 +390,7 @@ diff --git a/flist.c b/flist.c
  }
  
  /* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1489,6 +1700,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1488,6 +1699,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
                if (ignore_perishable)
                        non_perishable_cnt++;
@@ -399,7 +399,7 @@ diff --git a/flist.c b/flist.c
                return NULL;
        }
  
-@@ -1535,13 +1748,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1534,13 +1747,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                        lastdir[len] = '\0';
                        lastdir_len = len;
                        if (checksum_files && am_sender && flist)
@@ -415,7 +415,7 @@ diff --git a/flist.c b/flist.c
                }
        }
        basename_len = strlen(basename) + 1; /* count the '\0' */
-@@ -1647,7 +1860,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1646,7 +1859,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
  
        if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
                if (flist && checksum_files)
@@ -424,7 +424,7 @@ diff --git a/flist.c b/flist.c
                else
                        file_checksum(thisname, st.st_size, tmp_sum);
                if (sender_keeps_checksum)
-@@ -2020,6 +2233,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -2019,6 +2232,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
  
        closedir(d);
  
@@ -434,7 +434,7 @@ diff --git a/flist.c b/flist.c
        if (f >= 0 && recurse && !divert_dirs) {
                int i, end = flist->used - 1;
                /* send_if_directory() bumps flist->used, so use "end". */
-@@ -2643,6 +2859,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2652,6 +2868,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                        rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
        }
  
@@ -447,7 +447,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -112,6 +112,7 @@ static int dir_tweaking;
+@@ -111,6 +111,7 @@ static int dir_tweaking;
  static int symlink_timeset_failed_flags;
  static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
@@ -455,7 +455,7 @@ diff --git a/generator.c b/generator.c
  static const char *solo_file = NULL;
  
  enum nonregtype {
-@@ -534,7 +535,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
+@@ -533,7 +534,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
                if (checksum_files && slot >= 0)
@@ -464,7 +464,7 @@ diff --git a/generator.c b/generator.c
                else
                        file_checksum(fn, st->st_size, sum);
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
-@@ -1185,7 +1186,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1184,7 +1185,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                fuzzy_dirlist = get_dirlist(fnamecmpbuf, -1, 1);
                        }
                        if (checksum_files) {
@@ -474,7 +474,7 @@ diff --git a/generator.c b/generator.c
                        }
                        need_new_dirscan = 0;
                }
-@@ -1343,6 +1345,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1342,6 +1344,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        else
                                change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
                }
@@ -482,7 +482,7 @@ diff --git a/generator.c b/generator.c
                goto cleanup;
        }
  
-@@ -1616,6 +1619,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1615,6 +1618,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        handle_partial_dir(partialptr, PDIR_DELETE);
                }
                set_file_attrs(fname, file, &sx, NULL, maybe_ATTRS_REPORT);
@@ -491,7 +491,7 @@ diff --git a/generator.c b/generator.c
                if (itemizing)
                        itemize(fnamecmp, file, ndx, statret, &sx, 0, 0, NULL);
  #ifdef SUPPORT_HARD_LINKS
-@@ -2120,6 +2125,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2122,6 +2127,7 @@ void generate_files(int f_out, const char *local_name)
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
@@ -499,7 +499,7 @@ diff --git a/generator.c b/generator.c
                }
                for (i = cur_flist->low; i <= cur_flist->high; i++) {
                        struct file_struct *file = cur_flist->sorted[i];
-@@ -2214,6 +2220,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2216,6 +2222,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
@@ -520,7 +520,7 @@ diff --git a/io.c b/io.c
  extern int protocol_version;
  extern int remove_source_files;
  extern int preserve_hard_links;
-@@ -875,6 +876,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
+@@ -987,6 +988,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
                                flist_ndx_push(&hlink_list, ndx);
                                flist->in_progress++;
                        }
@@ -547,7 +547,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -1637,7 +1637,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1656,7 +1656,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
  
                case OPT_SUMFILES:
                        arg = poptGetOptArg(pc);
@@ -596,7 +596,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -917,6 +917,8 @@ typedef struct {
+@@ -929,6 +929,8 @@ typedef struct {
  
  #define CSF_ENABLE (1<<1)
  #define CSF_LAX (1<<2)
index 23febb9..7c0e828 100644 (file)
@@ -8,11 +8,11 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -1309,7 +1309,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1308,7 +1308,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
  #endif
  
        if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
@@ -25,7 +25,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -532,7 +532,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -531,7 +531,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
index 45a237c..7646790 100644 (file)
@@ -4,10 +4,11 @@ the data inside a device instead of duplicating the device node.
 To use this patch, run these commands for a successful build:
 
     patch -p1 <patches/copy-devices.diff
+    ./prepare-source
     ./configure                      (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -19,7 +20,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_specials;
  extern int preserve_hard_links;
  extern int preserve_executability;
-@@ -1496,7 +1497,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1495,7 +1496,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
@@ -55,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 },
-@@ -2627,6 +2630,9 @@ void server_options(char **args, int *argc_p)
+@@ -2646,6 +2649,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -76,7 +77,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -380,7 +381,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
+@@ -397,7 +398,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
  
        if (iflags & ITEM_TRANSFER) {
                int i = ndx - cur_flist->ndx_start;
@@ -89,8 +90,8 @@ diff --git a/rsync.c b/rsync.c
 diff --git a/sender.c b/sender.c
 --- a/sender.c
 +++ b/sender.c
-@@ -336,6 +336,20 @@ void send_files(int f_in, int f_out)
-                       exit_cleanup(RERR_PROTOCOL);
+@@ -340,6 +340,20 @@ void send_files(int f_in, int f_out)
+                       exit_cleanup(RERR_FILEIO);
                }
  
 +              /* On Matt's computer, st_size is falsely 0 for most devices.
index fb0116c..72afa70 100644 (file)
@@ -12,7 +12,7 @@ based-on: patch/fileflags
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -46,6 +46,7 @@ extern int force_change;
+@@ -44,6 +44,7 @@ extern int force_change;
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
@@ -20,7 +20,7 @@ diff --git a/compat.c b/compat.c
  extern int preserve_fileflags;
  extern int preserve_acls;
  extern int preserve_xattrs;
-@@ -64,7 +65,7 @@ extern char *iconv_opt;
+@@ -62,7 +63,7 @@ extern char *iconv_opt;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -29,7 +29,7 @@ diff --git a/compat.c b/compat.c
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
  int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -141,6 +142,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -138,6 +139,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -41,7 +41,7 @@ diff --git a/compat.c b/compat.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -56,6 +56,7 @@ extern int missing_args;
+@@ -55,6 +55,7 @@ extern int missing_args;
  extern int uid_ndx;
  extern int gid_ndx;
  extern int eol_nulls;
@@ -49,7 +49,7 @@ diff --git a/flist.c b/flist.c
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -406,7 +407,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -405,7 +406,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  #endif
                            int ndx, int first_ndx)
  {
@@ -58,7 +58,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -517,6 +518,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -516,6 +517,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                modtime = file->modtime;
        if (NSEC_BUMP(file) && protocol_version >= 31)
                xflags |= XMIT_MOD_NSEC;
@@ -72,7 +72,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -601,6 +609,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -600,6 +608,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
        }
        if (xflags & XMIT_MOD_NSEC)
                write_varint(f, F_MOD_NSEC(file));
@@ -81,7 +81,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
  #ifdef SUPPORT_FILEFLAGS
-@@ -692,7 +702,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -691,7 +701,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  
  static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
  {
@@ -90,7 +90,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -837,6 +847,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -836,6 +846,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
                modtime_nsec = read_varint(f);
        else
                modtime_nsec = 0;
@@ -110,7 +110,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
  
-@@ -1007,6 +1030,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1006,6 +1029,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -119,7 +119,7 @@ diff --git a/flist.c b/flist.c
        if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1406,6 +1431,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1405,6 +1430,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
                F_GROUP(file) = st.st_gid;
@@ -139,7 +139,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_hard_links;
  extern int preserve_executability;
  extern int preserve_fileflags;
-@@ -420,6 +421,13 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -419,6 +420,13 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
        if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
                return 0;
  
@@ -153,7 +153,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
        if (preserve_acls && !S_ISLNK(file->mode)) {
                if (!ACL_READY(*sxp))
-@@ -463,6 +471,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -462,6 +470,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                 : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
                  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                        iflags |= ITEM_REPORT_TIME;
@@ -166,7 +166,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -1030,6 +1044,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1029,6 +1043,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  static void list_file_entry(struct file_struct *f)
  {
        char permbuf[PERMSTRING_SIZE];
@@ -174,7 +174,7 @@ diff --git a/generator.c b/generator.c
        int64 len;
        int colwidth = human_readable ? 14 : 11;
  
-@@ -1045,10 +1060,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1044,10 +1059,11 @@ static void list_file_entry(struct file_struct *f)
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -189,7 +189,7 @@ diff --git a/generator.c b/generator.c
        } else
  #endif
        if (missing_args == 2 && f->mode == 0) {
-@@ -1056,9 +1072,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1055,9 +1071,11 @@ static void list_file_entry(struct file_struct *f)
                        colwidth + 31, "*missing",
                        f_name(f, NULL));
        } else {
@@ -203,7 +203,7 @@ diff --git a/generator.c b/generator.c
        }
  }
  
-@@ -1149,6 +1167,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1148,6 +1166,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        return;
                }
        }
@@ -214,8 +214,8 @@ diff --git a/generator.c b/generator.c
 diff --git a/ifuncs.h b/ifuncs.h
 --- a/ifuncs.h
 +++ b/ifuncs.h
-@@ -35,6 +35,28 @@ realloc_xbuf(xbuf *xb, size_t sz)
-       xb->size = sz;
+@@ -43,6 +43,28 @@ free_xbuf(xbuf *xb)
+       memset(xb, 0, sizeof (xbuf));
  }
  
 +static inline time_t
@@ -246,7 +246,7 @@ diff --git a/ifuncs.h b/ifuncs.h
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -718,7 +718,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -736,7 +736,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
                        c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
                        c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
@@ -285,7 +285,7 @@ diff --git a/options.c b/options.c
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },
    {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
    {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
-@@ -2333,6 +2338,8 @@ void server_options(char **args, int *argc_p)
+@@ -2352,6 +2357,8 @@ void server_options(char **args, int *argc_p)
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -297,7 +297,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -521,6 +521,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -538,6 +538,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                else
                        file->flags |= FLAG_TIME_FAILED;
        }
@@ -312,7 +312,7 @@ diff --git a/rsync.c b/rsync.c
  
        change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
        change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
-@@ -671,7 +679,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -688,7 +696,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
@@ -321,7 +321,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
-@@ -702,7 +710,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -719,7 +727,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -343,7 +343,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These flags are used in the live flist data. */
  
-@@ -160,6 +161,7 @@
+@@ -162,6 +163,7 @@
  #define ATTRS_REPORT          (1<<0)
  #define ATTRS_SKIP_MTIME      (1<<1)
  #define ATTRS_DELAY_IMMUTABLE (1<<2)
@@ -351,7 +351,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -176,7 +178,7 @@
+@@ -178,7 +180,7 @@
  #define FNAMECMP_FUZZY                0x83
  
  /* For use by the itemize_changes code */
@@ -360,7 +360,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_REPORT_CHANGE (1<<1)
  #define ITEM_REPORT_SIZE (1<<2)     /* regular files only */
  #define ITEM_REPORT_TIMEFAIL (1<<2) /* symlinks only */
-@@ -685,6 +687,7 @@ extern int file_extra_cnt;
+@@ -689,6 +691,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -368,7 +368,7 @@ diff --git a/rsync.h b/rsync.h
  extern int fileflags_ndx;
  extern int acls_ndx;
  extern int xattrs_ndx;
-@@ -692,6 +695,7 @@ extern int xattrs_ndx;
+@@ -696,6 +699,7 @@ extern int xattrs_ndx;
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
  #define PTR_EXTRA_CNT ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
@@ -376,7 +376,7 @@ diff --git a/rsync.h b/rsync.h
  #define DEV_EXTRA_CNT 2
  #define DIRNODE_EXTRA_CNT 3
  #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
-@@ -963,6 +967,7 @@ typedef struct {
+@@ -975,6 +979,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
@@ -405,7 +405,7 @@ diff --git a/rsync.yo b/rsync.yo
  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
-@@ -1903,7 +1907,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1904,7 +1908,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
@@ -414,7 +414,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.
-@@ -1962,6 +1966,8 @@ quote(itemization(
+@@ -1963,6 +1967,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.
@@ -504,7 +504,7 @@ new file mode 100644
 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
 --- a/testsuite/rsync.fns
 +++ b/testsuite/rsync.fns
-@@ -24,9 +24,9 @@ todir="$tmpdir/to"
+@@ -23,9 +23,9 @@ todir="$tmpdir/to"
  chkdir="$tmpdir/chk"
  
  # For itemized output:
index 74db784..851f89b 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
@@ -88,7 +88,7 @@ diff --git a/exclude.c b/exclude.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -155,6 +155,7 @@
+@@ -157,6 +157,7 @@
  #define XFLG_ANCHORED2ABS     (1<<2) /* leading slash indicates absolute */
  #define XFLG_ABS_IF_SLASH     (1<<3) /* leading or interior slash is absolute */
  #define XFLG_DIR2WILD3                (1<<4) /* dir/ match gets trailing *** added */
index b0e4ded..802d10b 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/access.c b/access.c
 --- a/access.c
 +++ b/access.c
index 863d073..681c4df 100644 (file)
@@ -14,7 +14,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -26,7 +26,7 @@ diff --git a/generator.c b/generator.c
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -525,6 +526,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -524,6 +525,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
  int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
  {
@@ -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",'x',POPT_ARG_VAL,   &one_file_system, 0, 0, 0 },
    {"no-x",            'x', POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
-@@ -2511,6 +2514,9 @@ void server_options(char **args, int *argc_p)
+@@ -2530,6 +2533,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 7b5b19b..6320cba 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -23,7 +23,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -82,15 +82,15 @@ diff --git a/checksum.c b/checksum.c
 diff --git a/cleanup.c b/cleanup.c
 --- a/cleanup.c
 +++ b/cleanup.c
-@@ -25,6 +25,7 @@
- extern int am_server;
- extern int am_daemon;
+@@ -27,6 +27,7 @@ extern int am_daemon;
+ extern int am_sender;
+ extern int am_generator;
  extern int io_error;
 +extern int use_db;
  extern int keep_partial;
  extern int got_xfer_error;
- extern int output_needs_newline;
-@@ -130,6 +131,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
+ extern int protocol_version;
+@@ -139,6 +140,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                /* FALLTHROUGH */
  #include "case_N.h"
  
@@ -123,7 +123,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern char *bind_address;
  extern char *config_file;
  extern char *logfile_format;
-@@ -668,6 +671,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -667,6 +670,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        log_init(1);
  
@@ -133,7 +133,7 @@ diff --git a/clientserver.c b/clientserver.c
  #ifdef HAVE_PUTENV
        if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) {
                int status;
-@@ -859,6 +865,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -862,6 +868,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        am_server = 1; /* Don't let someone try to be tricky. */
        quiet = 0;
@@ -147,7 +147,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -322,7 +322,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
+@@ -331,7 +331,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
      sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
      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 \
@@ -156,7 +156,7 @@ diff --git a/configure.in b/configure.in
  AC_HEADER_MAJOR
  
  AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
-@@ -1004,6 +1004,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1013,6 +1013,29 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
      fi
  fi
  
@@ -761,7 +761,7 @@ new file mode 100644
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -54,6 +54,7 @@ extern int preserve_specials;
+@@ -53,6 +53,7 @@ extern int preserve_specials;
  extern int missing_args;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -769,7 +769,7 @@ diff --git a/flist.c b/flist.c
  extern int eol_nulls;
  extern int relative_paths;
  extern int implied_dirs;
-@@ -1308,11 +1309,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1307,11 +1308,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                extra_len += EXTRA_LEN;
  #endif
  
@@ -783,7 +783,7 @@ diff --git a/flist.c b/flist.c
  
  #if EXTRA_ROUNDING > 0
        if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1395,8 +1393,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1394,8 +1392,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                return NULL;
        }
  
@@ -798,7 +798,7 @@ diff --git a/flist.c b/flist.c
  
        if (unsort_ndx)
                F_NDX(file) = stats.num_dirs;
-@@ -2061,6 +2063,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2060,6 +2062,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                     | (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0);
        int implied_dot_dir = 0;
  
@@ -819,7 +819,7 @@ diff --git a/generator.c b/generator.c
  extern int append_mode;
  extern int make_backups;
  extern int csum_length;
-@@ -532,7 +533,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -531,7 +532,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -829,7 +829,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -2074,6 +2076,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2076,6 +2078,9 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
@@ -877,7 +877,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -50,6 +50,7 @@ extern int copy_unsafe_links;
+@@ -51,6 +51,7 @@ extern int copy_unsafe_links;
  extern int keep_dirlinks;
  extern int preserve_hard_links;
  extern int protocol_version;
@@ -885,7 +885,7 @@ diff --git a/main.c b/main.c
  extern int file_total;
  extern int recurse;
  extern int xfer_dirs;
-@@ -79,6 +80,7 @@ extern char *filesfrom_host;
+@@ -80,6 +81,7 @@ extern char *filesfrom_host;
  extern char *partial_dir;
  extern char *dest_option;
  extern char *rsync_path;
@@ -893,7 +893,7 @@ diff --git a/main.c b/main.c
  extern char *shell_cmd;
  extern char *batch_name;
  extern char *password_file;
-@@ -1584,6 +1586,9 @@ int main(int argc,char *argv[])
+@@ -1593,6 +1595,9 @@ int main(int argc,char *argv[])
                exit_cleanup(RERR_SYNTAX);
        }
  
index 7b2b4c1..0332365 100644 (file)
@@ -24,7 +24,7 @@ based-on: patch/detect-renamed
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -470,7 +470,9 @@ static int fattr_find(struct file_struct *f, char *fname)
+@@ -469,7 +469,9 @@ static int fattr_find(struct file_struct *f, char *fname)
                                continue;
                        }
                }
@@ -35,7 +35,7 @@ diff --git a/generator.c b/generator.c
                diff = u_strcmp(fmid->basename, f->basename);
                if (diff == 0) {
                        good_match = mid;
-@@ -1785,6 +1787,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1784,6 +1786,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                fnamecmp = partialptr;
                fnamecmp_type = FNAMECMP_PARTIAL_DIR;
                statret = 0;
@@ -80,7 +80,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_VAL,    &fuzzy_basis, 1, 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -2498,8 +2502,14 @@ void server_options(char **args, int *argc_p)
+@@ -2517,8 +2521,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
-@@ -1641,6 +1643,17 @@ the bf(--partial-dir) option, that directory will be used instead.  These
+@@ -1642,6 +1644,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).
  
index f881083..7d4682d 100644 (file)
@@ -32,11 +32,11 @@ TODO:
   a file that can't use it, while missing out on giving it to a file
   that could use it.
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -42,6 +42,7 @@ extern int checksum_seed;
+@@ -40,6 +40,7 @@ extern int checksum_seed;
  extern int basis_dir_cnt;
  extern int prune_empty_dirs;
  extern int protocol_version;
@@ -44,7 +44,7 @@ diff --git a/compat.c b/compat.c
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
-@@ -122,6 +123,7 @@ void set_allow_inc_recurse(void)
+@@ -119,6 +120,7 @@ void set_allow_inc_recurse(void)
                allow_inc_recurse = 0;
        else if (!am_sender
         && (delete_before || delete_after
@@ -104,7 +104,7 @@ diff --git a/delete.c b/delete.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -63,6 +63,7 @@ extern int non_perishable_cnt;
+@@ -62,6 +62,7 @@ extern int non_perishable_cnt;
  extern int prune_empty_dirs;
  extern int copy_links;
  extern int copy_unsafe_links;
@@ -112,7 +112,7 @@ diff --git a/flist.c b/flist.c
  extern int protocol_version;
  extern int sanitize_paths;
  extern int munge_symlinks;
-@@ -133,6 +134,8 @@ static int64 tmp_dev, tmp_ino;
+@@ -132,6 +133,8 @@ static int64 tmp_dev, tmp_ino;
  #endif
  static char tmp_sum[MAX_DIGEST_LEN];
  
@@ -121,7 +121,7 @@ diff --git a/flist.c b/flist.c
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  
-@@ -300,6 +303,45 @@ static int is_excluded(const char *fname, int is_dir, int filter_level)
+@@ -299,6 +302,45 @@ static int is_excluded(const char *fname, int is_dir, int filter_level)
        return 0;
  }
  
@@ -167,7 +167,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);
  
-@@ -2520,6 +2562,25 @@ struct file_list *recv_file_list(int f)
+@@ -2529,6 +2571,25 @@ struct file_list *recv_file_list(int f)
  
        flist_sort_and_clean(flist, relative_paths);
  
@@ -204,7 +204,7 @@ diff --git a/generator.c b/generator.c
  extern int whole_file;
  extern int list_only;
  extern int read_batch;
-@@ -99,10 +100,12 @@ extern char *tmpdir;
+@@ -98,10 +99,12 @@ extern char *tmpdir;
  extern char *basis_dir[MAX_BASIS_DIRS+1];
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern filter_rule_list filter_list, daemon_filter_list;
@@ -217,7 +217,7 @@ diff --git a/generator.c b/generator.c
  static int deldelay_size = 0, deldelay_cnt = 0;
  static char *deldelay_buf = NULL;
  static int deldelay_fd = -1;
-@@ -182,6 +185,8 @@ static int remember_delete(struct file_struct *file, const char *fname, int flag
+@@ -181,6 +184,8 @@ static int remember_delete(struct file_struct *file, const char *fname, int flag
                if (!flush_delete_delay())
                        return 0;
        }
@@ -226,7 +226,7 @@ diff --git a/generator.c b/generator.c
  
        return 1;
  }
-@@ -273,13 +278,18 @@ static void do_delayed_deletions(char *delbuf)
+@@ -272,13 +277,18 @@ static void do_delayed_deletions(char *delbuf)
   * all the --delete-WHEN options.  Note that the fbuf pointer must point to a
   * MAXPATHLEN buffer with the name of the directory in it (the functions we
   * call will append names onto the end, but the old dir value will be restored
@@ -249,7 +249,7 @@ diff --git a/generator.c b/generator.c
        int save_uid_ndx = uid_ndx;
  
        if (!fbuf) {
-@@ -294,17 +304,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -293,17 +303,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                maybe_send_keepalive();
  
        if (io_error && !ignore_errors) {
@@ -277,7 +277,7 @@ diff --git a/generator.c b/generator.c
        if (one_file_system) {
                if (file->flags & FLAG_TOP_DIR)
                        filesystem_dev = *fs_dev;
-@@ -317,6 +332,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -316,6 +331,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
  
        dirlist = get_dirlist(fbuf, dlen, 0);
  
@@ -292,7 +292,7 @@ diff --git a/generator.c b/generator.c
        /* If an item in dirlist is not found in flist, delete it
         * from the filesystem. */
        for (i = dirlist->used; i--; ) {
-@@ -329,6 +352,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -328,6 +351,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                                        f_name(fp, NULL));
                        continue;
                }
@@ -303,7 +303,7 @@ diff --git a/generator.c b/generator.c
                /* Here we want to match regardless of file type.  Replacement
                 * of a file with one of another type is handled separately by
                 * a delete_item call with a DEL_MAKE_ROOM flag. */
-@@ -337,14 +364,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -336,14 +363,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                        if (!(fp->mode & S_IWUSR) && !am_root && (uid_t)F_OWNER(fp) == our_uid)
                                flags |= DEL_NO_UID_WRITE;
                        f_name(fp, delbuf);
@@ -327,7 +327,7 @@ diff --git a/generator.c b/generator.c
        flist_free(dirlist);
  
        if (!save_uid_ndx) {
-@@ -382,14 +414,122 @@ static void do_delete_pass(void)
+@@ -381,14 +413,122 @@ static void do_delete_pass(void)
                 || !S_ISDIR(st.st_mode))
                        continue;
  
@@ -452,7 +452,7 @@ diff --git a/generator.c b/generator.c
  int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
  {
  #ifndef CAN_SET_SYMLINK_TIMES
-@@ -1050,6 +1190,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1049,6 +1189,7 @@ static void list_file_entry(struct file_struct *f)
        }
  }
  
@@ -460,7 +460,7 @@ diff --git a/generator.c b/generator.c
  static int phase = 0;
  static int dflt_perms;
  
-@@ -1329,9 +1470,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1328,9 +1469,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                else if (delete_during && f_out != -1 && !phase
                    && !(file->flags & FLAG_MISSING_DIR)) {
@@ -476,7 +476,7 @@ diff --git a/generator.c b/generator.c
                                change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
                }
                goto cleanup;
-@@ -1590,8 +1734,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1589,8 +1733,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        goto cleanup;
                }
  #endif
@@ -492,7 +492,7 @@ diff --git a/generator.c b/generator.c
                rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                goto cleanup;
-@@ -2055,6 +2205,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2057,6 +2207,12 @@ void generate_files(int f_out, const char *local_name)
        if (DEBUG_GTE(GENR, 1))
                rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
  
@@ -505,7 +505,7 @@ diff --git a/generator.c b/generator.c
        if (delete_before && !solo_file && cur_flist->used > 0)
                do_delete_pass();
        if (delete_during == 2) {
-@@ -2065,7 +2221,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2067,7 +2223,7 @@ void generate_files(int f_out, const char *local_name)
        }
        info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
  
@@ -514,7 +514,7 @@ diff --git a/generator.c b/generator.c
                whole_file = 0;
        if (DEBUG_GTE(FLIST, 1)) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -2107,7 +2263,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2109,7 +2265,7 @@ void generate_files(int f_out, const char *local_name)
                                                dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                        } else
                                                dirdev = MAKEDEV(0, 0);
@@ -523,7 +523,7 @@ diff --git a/generator.c b/generator.c
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
-@@ -2154,7 +2310,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2156,7 +2312,21 @@ void generate_files(int f_out, const char *local_name)
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -573,7 +573,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_VAL,    &fuzzy_basis, 1, 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -2123,7 +2126,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2142,7 +2145,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                inplace = 1;
        }
  
@@ -582,7 +582,7 @@ diff --git a/options.c b/options.c
                partial_dir = tmp_partialdir;
  
        if (inplace) {
-@@ -2132,6 +2135,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2151,6 +2154,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        snprintf(err_buf, sizeof err_buf,
                                 "--%s cannot be used with --%s\n",
                                 append_mode ? "append" : "inplace",
@@ -590,7 +590,7 @@ diff --git a/options.c b/options.c
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -2494,6 +2498,8 @@ void server_options(char **args, int *argc_p)
+@@ -2513,6 +2517,8 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -602,7 +602,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -242,7 +242,7 @@ enum msgcode {
+@@ -246,7 +246,7 @@ enum msgcode {
  #define NDX_DEL_STATS -3
  #define NDX_FLIST_OFFSET -101
  
@@ -611,7 +611,7 @@ diff --git a/rsync.h b/rsync.h
  #define DEL_NO_UID_WRITE      (1<<0) /* file/dir has our uid w/o write perm */
  #define DEL_RECURSE           (1<<1) /* if dir, delete all contents */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -252,6 +252,7 @@ enum msgcode {
+@@ -256,6 +256,7 @@ enum msgcode {
  #define DEL_FOR_DEVICE                (1<<6) /* making room for a replacement device */
  #define DEL_FOR_SPECIAL       (1<<7) /* making room for a replacement special */
  #define DEL_FOR_BACKUP                (1<<8) /* the delete is for a backup operation */
@@ -630,7 +630,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
-@@ -1625,6 +1626,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1626,6 +1627,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.
  
index bf3cce5..af9e881 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -19,7 +19,7 @@ diff --git a/generator.c b/generator.c
  extern int human_readable;
  extern int ignore_existing;
  extern int ignore_non_existing;
-@@ -1531,6 +1532,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1530,6 +1531,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
@@ -33,7 +33,7 @@ diff --git a/generator.c b/generator.c
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
-@@ -1961,6 +1969,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -1963,6 +1971,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
                        ignore_existing = -ignore_existing;
                        ignore_non_existing = -ignore_non_existing;
                        update_only = -update_only;
@@ -41,7 +41,7 @@ diff --git a/generator.c b/generator.c
                        always_checksum = -always_checksum;
                        size_only = -size_only;
                        append_mode = -append_mode;
-@@ -1986,6 +1995,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -1988,6 +1997,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
                        ignore_existing = -ignore_existing;
                        ignore_non_existing = -ignore_non_existing;
                        update_only = -update_only;
index b7028da..0fb8d67 100644 (file)
@@ -69,7 +69,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/checksum.c b/checksum.c
 --- a/checksum.c
 +++ b/checksum.c
@@ -87,7 +87,7 @@ diff --git a/checksum.c b/checksum.c
 diff --git a/cleanup.c b/cleanup.c
 --- a/cleanup.c
 +++ b/cleanup.c
-@@ -47,7 +47,13 @@ void close_all(void)
+@@ -50,7 +50,13 @@ void close_all(void)
        int fd;
        int ret;
        STRUCT_STAT st;
@@ -104,9 +104,9 @@ diff --git a/cleanup.c b/cleanup.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -574,7 +574,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
+@@ -583,7 +583,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
      setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
-     strerror putenv iconv_open locale_charset nl_langinfo getxattr \
+     seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
      extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
 -    initgroups utimensat)
 +    initgroups utimensat posix_fadvise64)
@@ -132,7 +132,7 @@ diff --git a/fileio.c b/fileio.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -113,6 +113,10 @@ static int need_retouch_dir_times;
+@@ -112,6 +112,10 @@ static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
@@ -174,7 +174,7 @@ diff --git a/options.c b/options.c
    {"existing",         0,  POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
    {"ignore-non-existing",0,POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
    {"ignore-existing",  0,  POPT_ARG_NONE,   &ignore_existing, 0, 0, 0 },
-@@ -2253,6 +2260,11 @@ void server_options(char **args, int *argc_p)
+@@ -2272,6 +2279,11 @@ void server_options(char **args, int *argc_p)
        if (!am_sender)
                args[ac++] = "--sender";
  
@@ -225,7 +225,7 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/sender.c b/sender.c
 --- a/sender.c
 +++ b/sender.c
-@@ -47,6 +47,10 @@ extern struct file_list *cur_flist, *first_flist, *dir_flist;
+@@ -48,6 +48,10 @@ extern struct file_list *cur_flist, *first_flist, *dir_flist;
  
  BOOL extra_flist_sending_enabled;
  
index 6f60dca..5668f56 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -33,7 +33,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -42,9 +42,11 @@ extern int checksum_seed;
+@@ -40,9 +40,11 @@ extern int checksum_seed;
  extern int basis_dir_cnt;
  extern int prune_empty_dirs;
  extern int protocol_version;
@@ -45,7 +45,7 @@ diff --git a/compat.c b/compat.c
  extern int preserve_acls;
  extern int preserve_xattrs;
  extern int need_messages_from_generator;
-@@ -62,7 +64,7 @@ extern char *iconv_opt;
+@@ -60,7 +62,7 @@ extern char *iconv_opt;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -54,7 +54,7 @@ diff --git a/compat.c b/compat.c
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
  int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -139,6 +141,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -136,6 +138,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -66,9 +66,9 @@ diff --git a/compat.c b/compat.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -574,7 +574,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
+@@ -583,7 +583,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
      setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
-     strerror putenv iconv_open locale_charset nl_langinfo getxattr \
+     seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
      extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
 -    initgroups utimensat)
 +    initgroups utimensat chflags)
@@ -126,7 +126,7 @@ diff --git a/delete.c b/delete.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -51,6 +51,7 @@ extern int preserve_links;
+@@ -50,6 +50,7 @@ extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
  extern int preserve_specials;
@@ -134,7 +134,7 @@ diff --git a/flist.c b/flist.c
  extern int missing_args;
  extern int uid_ndx;
  extern int gid_ndx;
-@@ -407,6 +408,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -406,6 +407,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  {
        static time_t modtime;
        static mode_t mode;
@@ -144,7 +144,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -450,6 +454,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -449,6 +453,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_MODE;
        else
                mode = file->mode;
@@ -159,7 +159,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_devices && IS_DEVICE(mode)) {
                if (protocol_version < 28) {
-@@ -591,6 +603,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -590,6 +602,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                write_varint(f, F_MOD_NSEC(file));
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -170,7 +170,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -678,6 +694,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -677,6 +693,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
  {
        static int64 modtime;
        static mode_t mode;
@@ -180,7 +180,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -823,6 +842,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -822,6 +841,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
  
        if (chmod_modes && !S_ISLNK(mode) && mode)
                mode = tweak_mode(mode, chmod_modes);
@@ -191,7 +191,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -974,6 +997,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -973,6 +996,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
        }
  #endif
        file->mode = mode;
@@ -202,7 +202,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid) {
-@@ -1371,6 +1398,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1370,6 +1397,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        }
  #endif
        file->mode = st.st_mode;
@@ -227,7 +227,7 @@ diff --git a/generator.c b/generator.c
  extern int uid_ndx;
  extern int gid_ndx;
  extern int delete_mode;
-@@ -407,6 +409,11 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -406,6 +408,11 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
         && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
                return 0;
  
@@ -239,7 +239,7 @@ diff --git a/generator.c b/generator.c
        if (am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file))
                return 0;
  
-@@ -472,6 +479,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -471,6 +478,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
                    && sxp->st.st_gid != (gid_t)F_GROUP(file))
                        iflags |= ITEM_REPORT_GROUP;
@@ -251,7 +251,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
                        if (!ACL_READY(*sxp))
-@@ -1266,6 +1278,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1265,6 +1277,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        file->mode = dest_mode(file->mode, sx.st.st_mode,
                                               dflt_perms, statret == 0);
                }
@@ -262,7 +262,7 @@ diff --git a/generator.c b/generator.c
                if (statret != 0 && basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
                                              itemizing, code);
-@@ -1306,10 +1322,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1305,10 +1321,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                /* We need to ensure that the dirs in the transfer have writable
                 * permissions during the time we are putting files within them.
                 * This is then fixed after the transfer is done. */
@@ -279,7 +279,7 @@ diff --git a/generator.c b/generator.c
                                rsyserr(FERROR_XFER, errno,
                                        "failed to modify permissions on %s",
                                        full_fname(fname));
-@@ -1344,6 +1365,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1343,6 +1364,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms,
                                       exists);
        }
@@ -290,10 +290,10 @@ diff --git a/generator.c b/generator.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -1918,13 +1943,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1920,13 +1945,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
-               if (!(file->mode & S_IWUSR))
+               if (fix_dir_perms)
 -                      do_chmod(fname, file->mode);
 +                      do_chmod(fname, file->mode, 0);
                if (need_retouch_dir_times) {
@@ -313,7 +313,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -715,7 +715,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -733,7 +733,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -420,7 +420,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 },
-@@ -2401,6 +2427,9 @@ void server_options(char **args, int *argc_p)
+@@ -2420,6 +2446,9 @@ void server_options(char **args, int *argc_p)
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -430,7 +430,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;
-@@ -2488,6 +2517,16 @@ void server_options(char **args, int *argc_p)
+@@ -2507,6 +2536,16 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--delete-excluded";
                if (force_delete)
                        args[ac++] = "--force";
@@ -458,7 +458,7 @@ diff --git a/rsync.c b/rsync.c
  extern int preserve_executability;
  extern int preserve_times;
  extern int am_root;
-@@ -428,6 +429,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
+@@ -445,6 +446,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
        return new_mode;
  }
  
@@ -498,7 +498,7 @@ diff --git a/rsync.c b/rsync.c
  int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                   const char *fnamecmp, int flags)
  {
-@@ -476,7 +510,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -493,7 +527,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) {
@@ -507,7 +507,7 @@ diff --git a/rsync.c b/rsync.c
                if (ret < 0) {
                        rsyserr(FERROR_XFER, errno, "failed to set times on %s",
                                full_fname(fname));
-@@ -512,7 +546,8 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -529,7 +563,8 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                if (am_root >= 0) {
                        if (do_lchown(fname,
                            change_uid ? (uid_t)F_OWNER(file) : sxp->st.st_uid,
@@ -517,7 +517,7 @@ 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",
-@@ -546,7 +581,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -563,7 +598,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)) {
@@ -526,7 +526,7 @@ diff --git a/rsync.c b/rsync.c
                if (ret < 0) {
                        rsyserr(FERROR_XFER, errno,
                                "failed to set permissions on %s",
-@@ -558,6 +593,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -575,6 +610,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
        }
  #endif
  
@@ -546,7 +546,7 @@ diff --git a/rsync.c b/rsync.c
        if (INFO_GTE(NAME, 2) && flags & ATTRS_REPORT) {
                if (updated)
                        rprintf(FCLIENT, "%s\n", fname);
-@@ -622,7 +670,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -639,7 +687,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,
@@ -556,7 +556,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
-@@ -641,6 +690,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -658,6 +707,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. */
@@ -578,7 +578,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These flags are used in the live flist data. */
  
-@@ -158,6 +159,7 @@
+@@ -160,6 +161,7 @@
  
  #define ATTRS_REPORT          (1<<0)
  #define ATTRS_SKIP_MTIME      (1<<1)
@@ -586,7 +586,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -184,6 +186,7 @@
+@@ -186,6 +188,7 @@
  #define ITEM_REPORT_GROUP (1<<6)
  #define ITEM_REPORT_ACL (1<<7)
  #define ITEM_REPORT_XATTR (1<<8)
@@ -594,7 +594,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
  #define ITEM_XNAME_FOLLOWS (1<<12)
  #define ITEM_IS_NEW (1<<13)
-@@ -490,6 +493,28 @@ typedef unsigned int size_t;
+@@ -494,6 +497,28 @@ typedef unsigned int size_t;
  #endif
  #endif
  
@@ -623,7 +623,7 @@ diff --git a/rsync.h b/rsync.h
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -660,6 +685,7 @@ extern int file_extra_cnt;
+@@ -664,6 +689,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -631,7 +631,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -701,6 +727,11 @@ extern int xattrs_ndx;
+@@ -705,6 +731,11 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
@@ -732,7 +732,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
-@@ -1874,7 +1903,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1875,7 +1904,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
@@ -741,7 +741,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.
-@@ -1930,7 +1959,7 @@ quote(itemization(
+@@ -1931,7 +1960,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).
index 47a968f..212a9bd 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
@@ -238,7 +238,7 @@ diff --git a/exclude.c b/exclude.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -81,6 +81,7 @@ extern struct chmod_mode_struct *chmod_modes;
+@@ -80,6 +80,7 @@ extern struct chmod_mode_struct *chmod_modes;
  
  extern filter_rule_list filter_list;
  extern filter_rule_list daemon_filter_list;
@@ -246,7 +246,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef ICONV_OPTION
  extern int filesfrom_convert;
-@@ -283,7 +284,8 @@ static inline int path_is_daemon_excluded(char *path, int ignore_filename)
+@@ -282,7 +283,8 @@ static inline int path_is_daemon_excluded(char *path, int ignore_filename)
  
  /* This function is used to check if a file should be included/excluded
   * from the list of files based on its name and type etc.  The value of
@@ -256,7 +256,7 @@ diff --git a/flist.c b/flist.c
  static int is_excluded(const char *fname, int is_dir, int filter_level)
  {
  #if 0 /* This currently never happens, so avoid a useless compare. */
-@@ -292,6 +294,8 @@ static int is_excluded(const char *fname, int is_dir, int filter_level)
+@@ -291,6 +293,8 @@ static int is_excluded(const char *fname, int is_dir, int filter_level)
  #endif
        if (is_daemon_excluded(fname, is_dir))
                return 1;
@@ -265,7 +265,7 @@ diff --git a/flist.c b/flist.c
        if (filter_level != ALL_FILTERS)
                return 0;
        if (filter_list.head
-@@ -1170,7 +1174,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1169,7 +1173,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        } else if (readlink_stat(thisname, &st, linkname) != 0) {
                int save_errno = errno;
                /* See if file is excluded before reporting an error. */
@@ -274,7 +274,7 @@ diff --git a/flist.c b/flist.c
                 && (is_excluded(thisname, 0, filter_level)
                  || is_excluded(thisname, 1, filter_level))) {
                        if (ignore_perishable && save_errno != ENOENT)
-@@ -1215,6 +1219,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1214,6 +1218,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
  
        if (filter_level == NO_FILTERS)
                goto skip_filters;
@@ -287,7 +287,7 @@ diff --git a/flist.c b/flist.c
  
        if (S_ISDIR(st.st_mode)) {
                if (!xfer_dirs) {
-@@ -1415,12 +1425,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1414,12 +1424,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
                                          int flags, int filter_level)
  {
        struct file_struct *file;
@@ -312,7 +312,7 @@ diff --git a/flist.c b/flist.c
                file->mode = tweak_mode(file->mode, chmod_modes);
  
        if (f >= 0) {
-@@ -2280,7 +2301,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2285,7 +2306,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                        struct file_struct *file;
                        file = send_file_name(f, flist, fbuf, &st,
                                              FLAG_TOP_DIR | FLAG_CONTENT_DIR | flags,
@@ -321,7 +321,7 @@ diff --git a/flist.c b/flist.c
                        if (!file)
                                continue;
                        if (inc_recurse) {
-@@ -2294,7 +2315,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2299,7 +2320,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                        } else
                                send_if_directory(f, flist, file, fbuf, len, flags);
                } else
@@ -329,11 +329,11 @@ diff --git a/flist.c b/flist.c
 +                      send_file_name(f, flist, fbuf, &st, flags, ALL_FILTERS_NO_EXCLUDE);
        }
  
-       gettimeofday(&end_tv, NULL);
+       if (reenable_multiplex >= 0)
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -149,6 +149,9 @@
+@@ -151,6 +151,9 @@
  #define NO_FILTERS    0
  #define SERVER_FILTERS        1
  #define ALL_FILTERS   2
@@ -343,7 +343,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define XFLG_FATAL_ERRORS     (1<<0)
  #define XFLG_OLD_PREFIXES     (1<<1)
-@@ -805,6 +808,8 @@ struct map_struct {
+@@ -809,6 +812,8 @@ struct map_struct {
        int status;             /* first errno from read errors         */
  };
  
@@ -352,7 +352,7 @@ diff --git a/rsync.h b/rsync.h
  #define FILTRULE_WILD         (1<<0) /* pattern has '*', '[', and/or '?' */
  #define FILTRULE_WILD2                (1<<1) /* pattern has '**' */
  #define FILTRULE_WILD2_PREFIX (1<<2) /* pattern starts with "**" */
-@@ -825,8 +830,18 @@ struct map_struct {
+@@ -829,8 +834,18 @@ struct map_struct {
  #define FILTRULE_RECEIVER_SIDE        (1<<17)/* rule applies to the receiving side */
  #define FILTRULE_CLEAR_LIST   (1<<18)/* this item is the "!" token */
  #define FILTRULE_PERISHABLE   (1<<19)/* perishable if parent dir goes away */
@@ -371,7 +371,7 @@ diff --git a/rsync.h b/rsync.h
  
  typedef struct filter_struct {
        struct filter_struct *next;
-@@ -836,6 +851,11 @@ typedef struct filter_struct {
+@@ -840,6 +855,11 @@ typedef struct filter_struct {
                int slash_cnt;
                struct filter_list_struct *mergelist;
        } u;
@@ -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.
-@@ -1831,6 +1833,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
+@@ -1832,6 +1834,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.
-@@ -2643,6 +2649,15 @@ itemization(
+@@ -2657,6 +2663,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)
-@@ -2704,6 +2719,12 @@ itemization(
+@@ -2718,6 +2733,12 @@ itemization(
    a rule prefix such as bf(hide)).
  )
  
index f684b7f..61891a2 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 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 },
-@@ -2573,6 +2576,9 @@ void server_options(char **args, int *argc_p)
+@@ -2592,6 +2595,9 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = tmpdir;
                }
  
index 0764dfe..f478946 100644 (file)
@@ -11,7 +11,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/authenticate.c b/authenticate.c
 --- a/authenticate.c
 +++ b/authenticate.c
@@ -244,7 +244,7 @@ diff --git a/authenticate.c b/authenticate.c
 +                      if (group_match >= 0)
 +                              break;
 +#else
-+                      rprintf(FLOG, "This computer doesn't support getgrouplist(), so no @group authorization is possible.\n");
++                      rprintf(FLOG, "your computer doesn't support getgrouplist(), so no @group authorization is possible.\n");
 +#endif
 +              }
        }
@@ -308,7 +308,7 @@ diff --git a/authenticate.c b/authenticate.c
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -546,6 +546,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -545,6 +545,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
                return -1;
        }
  
@@ -316,7 +316,7 @@ diff --git a/clientserver.c b/clientserver.c
        auth_user = auth_server(f_in, f_out, i, host, addr, "@RSYNCD: AUTHREQD ");
  
        if (!auth_user) {
-@@ -556,9 +557,6 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -555,9 +556,6 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        module_id = i;
  
@@ -374,7 +374,7 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 +
 +verb(  auth users = joe:deny @guest:deny admin:rw @rsync:ro susan )
 +
-+In the auth above, user joe will be denied access no matter what.  Any user
++In the above rule, user joe will be denied access no matter what.  Any user
 +that is in the group "guest" is also denied access.  The user "admin" gets
 +access in read/write mode, even if the admin user is in group rsync (because
 +the admin user-matching rule is before the rsync group-matching rule).
index abedb9e..4b9d833 100644 (file)
@@ -12,7 +12,7 @@ TODO:
  - Make this code handle multibyte character encodings, and honor the
    --iconv setting when converting case.
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 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;
-@@ -2982,6 +2983,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -2991,6 +2992,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;
-@@ -3092,7 +3094,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3101,7 +3103,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
                        if (type1 != type2)
                                return type1 == t_PATH ? 1 : -1;
                }
@@ -84,7 +84,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/ifuncs.h b/ifuncs.h
 --- a/ifuncs.h
 +++ b/ifuncs.h
-@@ -77,3 +77,38 @@ init_stat_x(stat_x *sx_p)
+@@ -85,3 +85,38 @@ init_stat_x(stat_x *sx_p)
        sx_p->xattr = NULL;
  #endif
  }
@@ -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},
-@@ -2523,6 +2527,9 @@ void server_options(char **args, int *argc_p)
+@@ -2542,6 +2546,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
-@@ -1583,6 +1584,10 @@ If you use this option with bf(--iconv), the args will also be translated
+@@ -1584,6 +1585,10 @@ side will also be translated
  from the local to the remote character-set.  The translation happens before
  wild-cards are expanded.  See also the bf(--files-from) option.
  
index f697067..2d6b6d4 100644 (file)
@@ -12,7 +12,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -28,7 +28,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -73,6 +73,7 @@ extern int sender_keeps_checksum;
+@@ -72,6 +72,7 @@ extern int sender_keeps_checksum;
  extern int unsort_ndx;
  extern struct stats stats;
  extern char *filesfrom_host;
@@ -36,7 +36,7 @@ diff --git a/flist.c b/flist.c
  extern char *usermap, *groupmap;
  
  extern char curr_dir[MAXPATHLEN];
-@@ -909,7 +910,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -908,7 +909,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
                extra_len += EXTRA_LEN;
  #endif
  
@@ -408,15 +408,15 @@ diff --git a/options.c b/options.c
    rprintf(F," -z, --compress              compress file data during the transfer\n");
    rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");
    rprintf(F,"     --skip-compress=LIST    skip compressing files with a suffix in LIST\n");
-@@ -799,7 +801,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -798,7 +800,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+       OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_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,
-       OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
--      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN,
-+      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_LINK_BY_HASH,
+-      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
++      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_LINK_BY_HASH,
+       OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
- static struct poptOption long_options[] = {
 @@ -938,6 +940,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 },
@@ -425,7 +425,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_VAL,    &fuzzy_basis, 1, 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -1744,6 +1747,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1763,6 +1766,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -447,7 +447,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2602,6 +2620,11 @@ void server_options(char **args, int *argc_p)
+@@ -2621,6 +2639,11 @@ void server_options(char **args, int *argc_p)
        } else if (inplace)
                args[ac++] = "--inplace";
  
@@ -531,20 +531,20 @@ diff --git a/receiver.c b/receiver.c
 -                                     fname, fd2, F_LENGTH(file));
 +                                     fname, fd2, F_LENGTH(file), F_SUM(file));
  
-               log_item(log_code, file, &initial_stats, iflags, NULL);
+               log_item(log_code, file, iflags, NULL);
  
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -49,6 +49,7 @@ extern int file_old_total;
- extern int msgs2stderr;
+@@ -48,6 +48,7 @@ extern int flist_eof;
+ extern int file_old_total;
  extern int keep_dirlinks;
  extern int make_backups;
 +extern char *link_by_hash_dir;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  #ifdef ICONV_OPTION
-@@ -627,8 +628,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -644,8 +645,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
@@ -565,7 +565,7 @@ diff --git a/rsync.c b/rsync.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -861,6 +861,14 @@ struct stats {
+@@ -865,6 +865,14 @@ struct stats {
        int xferred_files;
  };
  
index 73b2cf0..b198507 100644 (file)
@@ -20,11 +20,11 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -67,6 +67,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -66,6 +66,7 @@ extern iconv_t ic_send, ic_recv;
  char *auth_user;
  int read_only = 0;
  int module_id = -1;
@@ -32,7 +32,7 @@ diff --git a/clientserver.c b/clientserver.c
  struct chmod_mode_struct *daemon_chmod_modes;
  
  /* module_dirlen is the length of the module_dir string when in daemon
-@@ -78,6 +79,7 @@ unsigned int module_dirlen = 0;
+@@ -77,6 +78,7 @@ unsigned int module_dirlen = 0;
  char *full_module_path;
  
  static int rl_nulls = 0;
@@ -40,7 +40,7 @@ diff --git a/clientserver.c b/clientserver.c
  
  #ifdef HAVE_SIGACTION
  static struct sigaction sigact;
-@@ -669,7 +671,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -668,7 +670,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        log_init(1);
  
  #ifdef HAVE_PUTENV
@@ -49,7 +49,7 @@ diff --git a/clientserver.c b/clientserver.c
                int status;
  
                umask(orig_umask);
-@@ -741,6 +743,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -740,6 +742,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
                        set_blocking(fds[1]);
                        pre_exec_fd = fds[1];
                }
@@ -94,7 +94,7 @@ diff --git a/clientserver.c b/clientserver.c
                umask(0);
        }
  #endif
-@@ -968,6 +1008,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -971,6 +1011,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        return 0;
  }
  
index 18ebb53..d118132 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/access.c b/access.c
 --- a/access.c
 +++ b/access.c
index 2533782..92dc4c3 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                              (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -19,7 +19,7 @@ diff --git a/generator.c b/generator.c
  extern int uid_ndx;
  extern int gid_ndx;
  extern int delete_mode;
-@@ -438,6 +439,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -437,6 +438,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
             const char *xname)
  {
        if (statret >= 0) { /* A from-dest-dir statret can == 1! */
@@ -27,7 +27,7 @@ diff --git a/generator.c b/generator.c
                int keep_time = !preserve_times ? 0
                    : S_ISDIR(file->mode) ? preserve_times > 1 :
  #ifdef CAN_SET_SYMLINK_TIMES
-@@ -467,10 +469,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -466,10 +468,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                } else if (preserve_executability
                 && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
                        iflags |= ITEM_REPORT_PERMS;
@@ -42,7 +42,7 @@ diff --git a/generator.c b/generator.c
                        iflags |= ITEM_REPORT_GROUP;
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
-@@ -1262,7 +1265,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1261,7 +1264,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                real_sx = sx;
                if (file->flags & FLAG_DIR_CREATED)
                        statret = -1;
@@ -78,7 +78,7 @@ diff --git a/options.c b/options.c
    {"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 },
-@@ -2038,6 +2041,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2057,6 +2060,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
        }
  
@@ -87,7 +87,7 @@ diff --git a/options.c b/options.c
        if (make_backups && !backup_dir) {
                omit_dir_times = 0; /* Implied, so avoid -O to sender. */
                if (preserve_times > 1)
-@@ -2281,6 +2286,8 @@ void server_options(char **args, int *argc_p)
+@@ -2300,6 +2305,8 @@ void server_options(char **args, int *argc_p)
                        argstr[x++] = 'm';
                if (omit_dir_times)
                        argstr[x++] = 'O';
@@ -107,7 +107,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -488,9 +489,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -505,9 +506,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                        file->flags |= FLAG_TIME_FAILED;
        }
  
index a86af0b..cc70ab5 100644 (file)
@@ -35,7 +35,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -51,17 +51,17 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/cleanup.c b/cleanup.c
 --- a/cleanup.c
 +++ b/cleanup.c
-@@ -25,6 +25,9 @@
- extern int am_server;
- extern int am_daemon;
+@@ -27,6 +27,9 @@ extern int am_daemon;
+ extern int am_sender;
+ extern int am_generator;
  extern int io_error;
 +#ifdef HAVE_OPENSSL
 +extern int use_ssl;
 +#endif
  extern int keep_partial;
  extern int got_xfer_error;
- extern int output_needs_newline;
-@@ -127,6 +130,14 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
+ extern int protocol_version;
+@@ -136,6 +139,14 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                                code, file, line);
                }
  
@@ -89,7 +89,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern int rsync_port;
  extern int protect_args;
  extern int ignore_errors;
-@@ -134,8 +137,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -133,8 +136,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
  #endif
  
        ret = start_inband_exchange(fd, fd, user, remote_argc, remote_argv);
@@ -109,7 +109,7 @@ diff --git a/clientserver.c b/clientserver.c
  }
  
  static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int am_client)
-@@ -278,6 +291,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -277,6 +290,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
        if (DEBUG_GTE(CMD, 1))
                print_child_argv("sending daemon args:", sargs);
  
@@ -142,7 +142,7 @@ diff --git a/clientserver.c b/clientserver.c
        io_printf(f_out, "%.*s\n", modlen, modname);
  
        /* Old servers may just drop the connection here,
-@@ -303,6 +342,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -302,6 +341,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
                         * server to terminate the listing of modules.
                         * We don't want to go on and transfer
                         * anything; just exit. */
@@ -153,7 +153,7 @@ diff --git a/clientserver.c b/clientserver.c
                        exit(0);
                }
  
-@@ -310,6 +353,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -309,6 +352,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
                        rprintf(FERROR, "%s\n", line);
                        /* This is always fatal; the server will now
                         * close the socket. */
@@ -164,7 +164,7 @@ diff --git a/clientserver.c b/clientserver.c
                        return -1;
                }
  
-@@ -1025,6 +1072,9 @@ int start_daemon(int f_in, int f_out)
+@@ -1028,6 +1075,9 @@ int start_daemon(int f_in, int f_out)
        if (exchange_protocols(f_in, f_out, line, sizeof line, 0) < 0)
                return -1;
  
@@ -174,7 +174,7 @@ diff --git a/clientserver.c b/clientserver.c
        line[0] = 0;
        if (!read_line_old(f_in, line, sizeof line))
                return -1;
-@@ -1036,6 +1086,20 @@ int start_daemon(int f_in, int f_out)
+@@ -1039,6 +1089,20 @@ int start_daemon(int f_in, int f_out)
                return -1;
        }
  
@@ -198,7 +198,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -303,6 +303,21 @@ if test x"$enable_locale" != x"no"; then
+@@ -312,6 +312,21 @@ if test x"$enable_locale" != x"no"; then
        AC_DEFINE(CONFIG_LOCALE)
  fi
  
@@ -281,15 +281,15 @@ diff --git a/options.c b/options.c
    rprintf(F,"     --version               print version number\n");
    rprintf(F,"(-h) --help                  show this help (-h works with no other options)\n");
  
-@@ -799,7 +818,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -798,7 +817,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+       OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_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,
-       OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
--      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN,
-+      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_USE_SSL,
+-      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
++      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_USE_SSL,
+       OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
- static struct poptOption long_options[] = {
 @@ -1013,6 +1032,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 },
@@ -363,7 +363,7 @@ diff --git a/options.c b/options.c
                        *argv_p = argv = poptGetArgs(pc);
                        *argc_p = argc = count_args(argv);
                        am_starting_up = 0;
-@@ -1744,6 +1801,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1763,6 +1820,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -376,7 +376,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2126,6 +2189,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2145,6 +2208,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        if (delay_updates && !partial_dir)
                partial_dir = tmp_partialdir;
  
@@ -394,7 +394,7 @@ diff --git a/options.c b/options.c
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -2716,9 +2790,18 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
+@@ -2735,9 +2809,18 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
  {
        char *path;
  
@@ -427,7 +427,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define SYMLINK_PREFIX "/rsyncd-munged/"  /* This MUST have a trailing slash! */
  #define SYMLINK_PREFIX_LEN ((int)sizeof SYMLINK_PREFIX - 1)
-@@ -577,6 +578,11 @@ typedef unsigned int size_t;
+@@ -581,6 +582,11 @@ typedef unsigned int size_t;
  # define SIZEOF_INT64 SIZEOF_OFF_T
  #endif
  
index eb60cd7..c84c1ee 100644 (file)
@@ -8,4 +8,4 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
index e2429ad..026c8f9 100644 (file)
@@ -9,11 +9,11 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -34,6 +34,7 @@ extern int inplace;
+@@ -32,6 +32,7 @@ extern int inplace;
  extern int recurse;
  extern int use_qsort;
  extern int allow_inc_recurse;
@@ -21,7 +21,7 @@ diff --git a/compat.c b/compat.c
  extern int append_mode;
  extern int fuzzy_basis;
  extern int read_batch;
-@@ -189,6 +190,15 @@ void setup_protocol(int f_out,int f_in)
+@@ -186,6 +187,15 @@ void setup_protocol(int f_out,int f_in)
        if (read_batch)
                check_batch_flags();
  
@@ -40,9 +40,9 @@ diff --git a/compat.c b/compat.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -574,13 +574,40 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
+@@ -583,13 +583,40 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
      setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
-     strerror putenv iconv_open locale_charset nl_langinfo getxattr \
+     seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
      extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
 -    initgroups utimensat)
 +    initgroups utimensat fallocate posix_fallocate)
@@ -140,7 +140,7 @@ diff --git a/options.c b/options.c
    {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },
    {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },
    {"append",           0,  POPT_ARG_NONE,   0, OPT_APPEND, 0, 0 },
-@@ -2627,6 +2636,9 @@ void server_options(char **args, int *argc_p)
+@@ -2646,6 +2655,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -200,7 +200,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -642,6 +642,13 @@ struct ht_int64_node {
+@@ -646,6 +646,13 @@ struct ht_int64_node {
  #define ACLS_NEED_MASK 1
  #endif
  
index 6c0236a..de149d0 100644 (file)
@@ -14,11 +14,11 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -71,6 +71,7 @@ extern int sender_symlink_iconv;
+@@ -70,6 +70,7 @@ extern int sender_symlink_iconv;
  extern int output_needs_newline;
  extern int sender_keeps_checksum;
  extern int unsort_ndx;
@@ -26,7 +26,7 @@ diff --git a/flist.c b/flist.c
  extern struct stats stats;
  extern char *filesfrom_host;
  extern char *usermap, *groupmap;
-@@ -1753,6 +1754,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1752,6 +1753,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
                }
  
                send_file_name(f, flist, fbuf, NULL, flags, filter_level);
@@ -50,7 +50,7 @@ diff --git a/options.c b/options.c
 @@ -776,6 +777,7 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
-   rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
+   rprintf(F,"     --bwlimit=RATE          limit socket I/O bandwidth\n");
 +  rprintf(F,"     --slow-down=USECs       sleep N usec while creating the filelist\n");
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    rprintf(F,"     --only-write-batch=FILE like --write-batch but w/o updating destination\n");
@@ -60,6 +60,6 @@ diff --git a/options.c b/options.c
    {"no-itemize-changes",0, POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
    {"no-i",             0,  POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
 +  {"slow-down",        0,  POPT_ARG_LONG,   &sleep_asec, 0, 0, 0 },
-   {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
+   {"bwlimit",          0,  POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
index 4d6baa9..492939e 100644 (file)
--- 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: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -44,7 +44,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -1156,6 +1156,13 @@ int daemon_main(void)
+@@ -1159,6 +1159,13 @@ int daemon_main(void)
         * address too.  In fact, why not just do inet_ntop on the
         * local address??? */
  
@@ -61,7 +61,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -668,6 +668,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -677,6 +677,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
  
@@ -127,7 +127,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -1213,6 +1213,18 @@ static int start_client(int argc, char *argv[])
+@@ -1222,6 +1222,18 @@ static int start_client(int argc, char *argv[])
  
        if (!read_batch) { /* for read_batch, NO source is specified */
                char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
@@ -181,7 +181,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -197,6 +197,10 @@
+@@ -199,6 +199,10 @@
  #define SIGNIFICANT_ITEM_FLAGS (~(\
        ITEM_BASIS_TYPE_FOLLOWS | ITEM_XNAME_FOLLOWS | ITEM_LOCAL_CHANGE))
  
index 124d983..1e99f0e 100644 (file)
@@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/syscall.c b/syscall.c
 --- a/syscall.c
 +++ b/syscall.c
index 436aa12..0ed2653 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
 
 -- Matt McCutchen <hashproduct@gmail.com>
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -30,14 +30,14 @@ diff --git a/options.c b/options.c
    rprintf(F,"     --delete                delete extraneous files from destination dirs\n");
    rprintf(F,"     --delete-before         receiver deletes before transfer, not during\n");
 @@ -967,6 +969,7 @@ static struct poptOption long_options[] = {
-   {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
+   {"bwlimit",          0,  POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
 +  {"source-backup",    0,  POPT_ARG_NONE,   &make_source_backups, 0, 0, 0},
    {"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 },
-@@ -2502,6 +2505,8 @@ void server_options(char **args, int *argc_p)
+@@ -2521,6 +2524,8 @@ void server_options(char **args, int *argc_p)
                                goto oom;
                        args[ac++] = arg;
                }
@@ -83,7 +83,7 @@ diff --git a/sender.c b/sender.c
  extern int inplace;
  extern int batch_fd;
  extern int write_batch;
-@@ -124,6 +125,7 @@ void successful_send(int ndx)
+@@ -125,6 +126,7 @@ void successful_send(int ndx)
        char fname[MAXPATHLEN];
        struct file_struct *file;
        struct file_list *flist;
@@ -91,7 +91,7 @@ diff --git a/sender.c b/sender.c
  
        if (!remove_source_files)
                return;
-@@ -134,7 +136,11 @@ void successful_send(int ndx)
+@@ -135,7 +137,11 @@ void successful_send(int ndx)
                return;
        f_name(file, fname);
  
index acbe698..65f77cd 100644 (file)
@@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -42,7 +42,7 @@ diff --git a/generator.c b/generator.c
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -525,7 +526,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -524,7 +525,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
  int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
  {
@@ -54,7 +54,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -148,7 +148,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
+@@ -149,7 +149,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
  }
  
  /* Wait for a process to exit, calling io_flush while waiting. */
@@ -117,7 +117,7 @@ diff --git a/options.c b/options.c
    {"remote-option",   'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
-@@ -2167,6 +2176,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2186,6 +2195,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                }
        }
  
@@ -134,7 +134,7 @@ diff --git a/options.c b/options.c
        if (files_from) {
                char *h, *p;
                int q;
-@@ -2511,6 +2530,25 @@ void server_options(char **args, int *argc_p)
+@@ -2530,6 +2549,25 @@ void server_options(char **args, int *argc_p)
        else if (missing_args == 1 && !am_sender)
                args[ac++] = "--ignore-missing-args";
  
@@ -252,7 +252,7 @@ diff --git a/receiver.c b/receiver.c
  extern char *partial_dir;
  extern char *basis_dir[MAX_BASIS_DIRS+1];
  extern char sender_file_sum[MAX_DIGEST_LEN];
-@@ -476,6 +477,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -475,6 +476,8 @@ int recv_files(int f_in, int f_out, char *local_name)
        const char *parent_dirname = "";
  #endif
        int ndx, recv_ok;
@@ -261,7 +261,7 @@ diff --git a/receiver.c b/receiver.c
  
        if (DEBUG_GTE(RECV, 1))
                rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used);
-@@ -483,6 +486,23 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -482,6 +485,23 @@ int recv_files(int f_in, int f_out, char *local_name)
        if (delay_updates)
                delayed_bits = bitbag_create(cur_flist->used + 1);
  
@@ -315,7 +315,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -141,6 +141,7 @@
+@@ -143,6 +143,7 @@
  #define IOERR_DEL_LIMIT (1<<2)
  
  #define MAX_ARGS 1000
@@ -343,7 +343,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)
-@@ -2306,6 +2309,33 @@ file previously generated by bf(--write-batch).
+@@ -2321,6 +2324,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.
  
@@ -380,10 +380,10 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/sender.c b/sender.c
 --- a/sender.c
 +++ b/sender.c
-@@ -42,6 +42,7 @@ extern int make_backups;
- extern int inplace;
+@@ -43,6 +43,7 @@ extern int inplace;
  extern int batch_fd;
  extern int write_batch;
+ extern int file_old_total;
 +extern char *source_filter;
  extern struct stats stats;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
@@ -415,7 +415,7 @@ diff --git a/sender.c b/sender.c
  
        if (DEBUG_GTE(SEND, 1))
                rprintf(FINFO, "send_files starting\n");
-@@ -306,6 +327,7 @@ void send_files(int f_in, int f_out)
+@@ -310,6 +331,7 @@ void send_files(int f_in, int f_out)
                        exit_cleanup(RERR_PROTOCOL);
                }
  
@@ -423,7 +423,7 @@ diff --git a/sender.c b/sender.c
                fd = do_open(fname, O_RDONLY, 0);
                if (fd == -1) {
                        if (errno == ENOENT) {
-@@ -327,6 +349,33 @@ void send_files(int f_in, int f_out)
+@@ -331,6 +353,33 @@ void send_files(int f_in, int f_out)
                        continue;
                }
  
@@ -457,7 +457,7 @@ diff --git a/sender.c b/sender.c
                /* map the local file */
                if (do_fstat(fd, &st) != 0) {
                        io_error |= IOERR_GENERAL;
-@@ -377,6 +426,8 @@ void send_files(int f_in, int f_out)
+@@ -381,6 +430,8 @@ void send_files(int f_in, int f_out)
                        }
                }
                close(fd);
index f188f1f..5dbbe34 100644 (file)
@@ -18,7 +18,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 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
    {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },
    {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },
    {"append",           0,  POPT_ARG_NONE,   0, OPT_APPEND, 0, 0 },
-@@ -2434,6 +2437,12 @@ void server_options(char **args, int *argc_p)
+@@ -2453,6 +2456,12 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
index 3d62b9a..31289fa 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                            (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -16,13 +16,13 @@ diff --git a/options.c b/options.c
  static int refused_inplace, refused_no_iconv;
  static BOOL usermap_via_chown, groupmap_via_chown;
 +static char *stdout_buffering;
- static char *max_size_arg, *min_size_arg;
+ static char *bwlimit_arg, *max_size_arg, *min_size_arg;
  static char tmp_partialdir[] = ".~tmp~";
  
 @@ -776,6 +777,7 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
-   rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
+   rprintf(F,"     --bwlimit=RATE          limit socket I/O bandwidth\n");
 +  rprintf(F,"     --stdout=line|unbuf     change buffering of stdout\n");
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    rprintf(F,"     --only-write-batch=FILE like --write-batch but w/o updating destination\n");
@@ -35,7 +35,7 @@ diff --git a/options.c b/options.c
    {"remote-option",   'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
-@@ -1759,6 +1762,13 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1778,6 +1781,13 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                }
        }
  
index 161e734..3548942 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                              (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/io.c b/io.c
 --- a/io.c
 +++ b/io.c
@@ -21,7 +21,7 @@ diff --git a/io.c b/io.c
  extern struct file_list *cur_flist;
  #ifdef ICONV_OPTION
  extern int filesfrom_convert;
-@@ -137,16 +138,24 @@ static void check_timeout(void)
+@@ -154,16 +155,24 @@ static void check_timeout(void)
  {
        time_t t;
  
@@ -63,22 +63,21 @@ diff --git a/options.c b/options.c
 @@ -776,6 +777,8 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
-   rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
+   rprintf(F,"     --bwlimit=RATE          limit socket I/O bandwidth\n");
 +  rprintf(F,"     --stop-at=y-m-dTh:m     Stop rsync at year-month-dayThour:minute\n");
 +  rprintf(F,"     --time-limit=MINS       Stop rsync after MINS minutes have elapsed\n");
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    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");
-@@ -799,7 +802,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
-       OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
+@@ -800,6 +803,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
        OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
--      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN,
-+      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_STOP_AT, OPT_TIME_LIMIT,
+       OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
++      OPT_STOP_AT, OPT_TIME_LIMIT,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -989,6 +992,8 @@ static struct poptOption long_options[] = {
+@@ -989,6 +993,8 @@ static struct poptOption long_options[] = {
    {"no-timeout",       0,  POPT_ARG_VAL,    &io_timeout, 0, 0, 0 },
    {"contimeout",       0,  POPT_ARG_INT,    &connect_timeout, 0, 0, 0 },
    {"no-contimeout",    0,  POPT_ARG_VAL,    &connect_timeout, 0, 0, 0 },
@@ -87,7 +86,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 },
-@@ -1744,6 +1749,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1763,6 +1769,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -124,7 +123,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2446,6 +2481,15 @@ void server_options(char **args, int *argc_p)
+@@ -2465,6 +2501,15 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
@@ -146,15 +145,15 @@ diff --git a/rsync.yo b/rsync.yo
 @@ -431,6 +431,8 @@ to the detailed description below for a complete description.  verb(
       --password-file=FILE    read daemon-access password from FILE
       --list-only             list the files instead of copying them
-      --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
+      --bwlimit=RATE          limit socket I/O bandwidth
 +     --stop-at=y-m-dTh:m     Stop rsync at year-month-dayThour:minute
 +     --time-limit=MINS       Stop rsync after MINS minutes have elapsed
       --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
-@@ -2280,6 +2282,19 @@ transfer was too fast, it will wait before sending the next data block. The
- result is an average transfer rate equaling the specified limit. A value
- of zero specifies no limit.
+@@ -2295,6 +2297,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.
  
 +dit(bf(--stop-at=y-m-dTh:m)) This option allows you to specify at what
 +time to stop rsync, in year-month-dayThour:minute numeric format (e.g.
index 05ef8e1..77f9ed8 100644 (file)
@@ -13,11 +13,11 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -87,6 +87,9 @@ extern int filesfrom_convert;
+@@ -86,6 +86,9 @@ extern int filesfrom_convert;
  extern iconv_t ic_send, ic_recv;
  #endif
  
@@ -27,7 +27,7 @@ diff --git a/flist.c b/flist.c
  #ifdef HAVE_UTIMENSAT
  #ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
  #define ST_MTIME_NSEC st_mtim.tv_nsec
-@@ -674,6 +677,24 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -673,6 +676,24 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                stats.total_size += F_LENGTH(file);
  }
  
@@ -52,7 +52,7 @@ diff --git a/flist.c b/flist.c
  static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
  {
        static int64 modtime;
-@@ -742,6 +763,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -741,6 +762,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
        }
  #endif
  
@@ -90,7 +90,7 @@ diff --git a/options.c b/options.c
    {"ipv4",            '4', POPT_ARG_VAL,    &default_af_hint, AF_INET, 0, 0 },
    {"ipv6",            '6', POPT_ARG_VAL,    &default_af_hint, AF_INET6, 0, 0 },
    {"8-bit-output",    '8', POPT_ARG_VAL,    &allow_8bit_chars, 1, 0, 0 },
-@@ -2213,6 +2217,31 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2232,6 +2236,31 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                }
        }
  
@@ -122,7 +122,7 @@ diff --git a/options.c b/options.c
        am_starting_up = 0;
  
        return 1;
-@@ -2627,6 +2656,12 @@ void server_options(char **args, int *argc_p)
+@@ -2646,6 +2675,12 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -146,7 +146,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
-@@ -2344,6 +2345,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2359,6 +2360,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)).
  
index 53e3791..869ae19 100644 (file)
@@ -6,7 +6,7 @@ To use this patch, run these commands for a successful build:
     ./configure                          (optional if already run)
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/syscall.c b/syscall.c
 --- a/syscall.c
 +++ b/syscall.c
index 42d9c80..dddd37a 100644 (file)
@@ -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: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -22,7 +22,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_specials;
  extern int preserve_hard_links;
  extern int preserve_executability;
-@@ -1534,7 +1535,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1533,7 +1534,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
@@ -58,7 +58,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 },
-@@ -1744,6 +1747,11 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1763,6 +1766,11 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -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. */
-@@ -2627,6 +2635,9 @@ void server_options(char **args, int *argc_p)
+@@ -2646,6 +2654,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
index 80c283a..635d852 100644 (file)
@@ -14,7 +14,7 @@ based-on: patch/acls
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -192,13 +192,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -189,13 +189,6 @@ void setup_protocol(int f_out,int f_in)
        if (protocol_version < 30) {
                if (append_mode == 1)
                        append_mode = 2;
@@ -139,7 +139,7 @@ diff --git a/xattrs.c b/xattrs.c
 +
        if (F_XATTR(file) < 0) {
                rprintf(FERROR, "recv_xattr_request: internal data error!\n");
-               exit_cleanup(RERR_STREAMIO);
+               exit_cleanup(RERR_PROTOCOL);
 @@ -649,7 +666,22 @@ void receive_xattr(int f, struct file_struct *file)
  #else
        int need_sort = 1;