Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Tue, 31 Jan 2006 03:35:59 +0000 (03:35 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 31 Jan 2006 03:35:59 +0000 (03:35 +0000)
atimes.diff
backup-dir-dels.diff
cvs-entries.diff
fsync.diff
id-pair.diff
link-by-hash.diff
openssl-support.diff
threaded-receiver.diff
time-limit.diff
xattrs.diff

index 90e933f..f099b13 100644 (file)
@@ -4,17 +4,17 @@ command before "make":
     make proto
 
 
---- orig/flist.c       2006-01-25 17:15:12
-+++ flist.c    2006-01-25 17:46:37
-@@ -50,6 +50,7 @@ extern int preserve_perms;
- extern int preserve_devices;
+--- orig/flist.c       2006-01-31 02:30:18
++++ flist.c    2006-01-27 00:33:39
+@@ -51,6 +51,7 @@ extern int preserve_devices;
+ extern int preserve_specials;
  extern int preserve_uid;
  extern int preserve_gid;
 +extern int preserve_atimes;
  extern int relative_paths;
  extern int implied_dirs;
- extern int copy_links;
-@@ -83,7 +84,13 @@ void init_flist(void)
+ extern int prune_empty_dirs;
+@@ -85,7 +86,13 @@ void init_flist(void)
        struct file_struct f;
  
        /* Figure out how big the file_struct is without trailing padding */
@@ -29,13 +29,13 @@ command before "make":
        checksum_len = protocol_version < 21 ? 2 : MD4_SUM_LENGTH;
  }
  
-@@ -139,16 +146,18 @@ static void list_file_entry(struct file_
+@@ -141,16 +148,18 @@ static void list_file_entry(struct file_
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
 -              rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
 +              rprintf(FINFO, "%s %11.0f %s %s %s -> %s\n",
-                       perms,
+                       permbuf,
                        (double)f->length, timestring(f->modtime),
 +                      preserve_atimes ? timestring(f->atime) : "",
                        f_name(f, NULL), f->u.link);
@@ -44,13 +44,13 @@ command before "make":
        {
 -              rprintf(FINFO, "%s %11.0f %s %s\n",
 +              rprintf(FINFO, "%s %11.0f %s %s %s\n",
-                       perms,
+                       permbuf,
                        (double)f->length, timestring(f->modtime),
 +                      preserve_atimes ? timestring(f->atime) : "",
                        f_name(f, NULL));
        }
  }
-@@ -310,6 +319,7 @@ static void send_file_entry(struct file_
+@@ -312,6 +321,7 @@ static void send_file_entry(struct file_
  {
        unsigned short flags;
        static time_t modtime;
@@ -58,7 +58,7 @@ command before "make":
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -325,7 +335,7 @@ static void send_file_entry(struct file_
+@@ -327,7 +337,7 @@ static void send_file_entry(struct file_
  
        if (!file) {
                write_byte(f, 0);
@@ -67,7 +67,7 @@ command before "make":
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -337,7 +347,7 @@ static void send_file_entry(struct file_
+@@ -339,7 +349,7 @@ static void send_file_entry(struct file_
  
        f_name(file, fname);
  
@@ -76,7 +76,7 @@ command before "make":
  
        if (file->mode == mode)
                flags |= XMIT_SAME_MODE;
-@@ -374,6 +384,12 @@ static void send_file_entry(struct file_
+@@ -375,6 +385,12 @@ static void send_file_entry(struct file_
                flags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -89,7 +89,7 @@ command before "make":
  
  #ifdef SUPPORT_HARD_LINKS
        if (file->link_u.idev) {
-@@ -427,6 +443,8 @@ static void send_file_entry(struct file_
+@@ -428,6 +444,8 @@ static void send_file_entry(struct file_
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -98,7 +98,7 @@ command before "make":
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (!numeric_ids)
                        add_uid(uid);
-@@ -494,6 +512,7 @@ static struct file_struct *receive_file_
+@@ -496,6 +514,7 @@ static struct file_struct *receive_file_
                                              unsigned short flags, int f)
  {
        static time_t modtime;
@@ -106,7 +106,7 @@ command before "make":
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -512,7 +531,7 @@ static struct file_struct *receive_file_
+@@ -514,7 +533,7 @@ static struct file_struct *receive_file_
        struct file_struct *file;
  
        if (!flist) {
@@ -115,7 +115,7 @@ command before "make":
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -568,6 +587,8 @@ static struct file_struct *receive_file_
+@@ -570,6 +589,8 @@ static struct file_struct *receive_file_
                modtime = (time_t)read_int(f);
        if (!(flags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -124,7 +124,7 @@ command before "make":
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -624,6 +645,8 @@ static struct file_struct *receive_file_
+@@ -625,6 +646,8 @@ static struct file_struct *receive_file_
        file->mode = mode;
        file->uid = uid;
        file->gid = gid;
@@ -133,7 +133,7 @@ command before "make":
  
        if (dirname_len) {
                file->dirname = lastdir = bp;
-@@ -649,12 +672,12 @@ static struct file_struct *receive_file_
+@@ -650,12 +673,12 @@ static struct file_struct *receive_file_
                            && lastname[del_hier_name_len-1] == '.'
                            && lastname[del_hier_name_len-2] == '/')
                                del_hier_name_len -= 2;
@@ -148,7 +148,7 @@ command before "make":
                        else
                                in_del_hier = 0;
                }
-@@ -875,12 +898,14 @@ struct file_struct *make_file(char *fnam
+@@ -871,12 +894,14 @@ struct file_struct *make_file(char *fnam
        memset(bp, 0, file_struct_len);
        bp += file_struct_len;
  
@@ -164,7 +164,7 @@ command before "make":
  
  #ifdef SUPPORT_HARD_LINKS
        if (flist && flist->hlink_pool) {
-@@ -992,7 +1017,7 @@ static void send_if_directory(int f, str
+@@ -989,7 +1014,7 @@ static void send_if_directory(int f, str
        char is_dot_dir = fbuf[ol-1] == '.' && (ol == 1 || fbuf[ol-2] == '/');
  
        if (S_ISDIR(file->mode)
@@ -173,19 +173,19 @@ command before "make":
                void *save_filters;
                unsigned int len = strlen(fbuf);
                if (len > 1 && fbuf[len-1] == '/')
-@@ -1570,8 +1595,9 @@ static void clean_flist(struct file_list
+@@ -1595,8 +1620,9 @@ static void clean_flist(struct file_list
                        }
-                       /* Make sure that if we unduplicate '.', that we don't
-                        * lose track of a user-specified top directory. */
+                       /* Make sure we don't lose track of a user-specified
+                        * top directory. */
 -                      flist->files[keep]->flags |= flist->files[drop]->flags
 -                                                 & (FLAG_TOP_DIR|FLAG_DEL_HERE);
 +                      FFLAGS(flist->files[keep])
 +                          |= FFLAGS(flist->files[drop])
 +                           & (FLAG_TOP_DIR|FLAG_DEL_HERE);
  
-                       clear_file(drop, flist);
+                       clear_file(flist->files[drop], flist);
  
-@@ -1633,7 +1659,7 @@ static void output_flist(struct file_lis
+@@ -1720,7 +1746,7 @@ static void output_flist(struct file_lis
                        file->dirname ? file->dirname : "",
                        file->dirname ? "/" : "", NS(file->basename),
                        S_ISDIR(file->mode) ? "/" : "", (int)file->mode,
@@ -194,17 +194,17 @@ command before "make":
        }
  }
  
---- orig/generator.c   2006-01-25 17:15:12
+--- orig/generator.c   2006-01-31 02:30:18
 +++ generator.c        2006-01-26 09:15:22
-@@ -43,6 +43,7 @@ extern int preserve_perms;
+@@ -44,6 +44,7 @@ extern int preserve_perms;
  extern int preserve_uid;
  extern int preserve_gid;
  extern int preserve_times;
 +extern int preserve_atimes;
  extern int omit_dir_times;
+ extern int delete_mode;
  extern int delete_before;
- extern int delete_during;
-@@ -89,6 +90,7 @@ extern dev_t filesystem_dev;
+@@ -91,6 +92,7 @@ extern dev_t filesystem_dev;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -212,7 +212,7 @@ command before "make":
  extern struct file_list *the_file_list;
  extern struct filter_list_struct server_filter_list;
  
-@@ -183,7 +185,7 @@ static int delete_item(char *fname, int 
+@@ -185,7 +187,7 @@ static int delete_item(char *fname, int 
        for (j = dirlist->count; j--; ) {
                struct file_struct *fp = dirlist->files[j];
  
@@ -221,7 +221,7 @@ command before "make":
                        continue;
  
                strlcpy(p, fp->basename, remainder);
-@@ -261,7 +263,7 @@ static void delete_in_dir(struct file_li
+@@ -263,7 +265,7 @@ static void delete_in_dir(struct file_li
        filt_array[cur_depth] = push_local_filters(fbuf, dlen);
  
        if (one_file_system) {
@@ -230,7 +230,7 @@ command before "make":
                        filesystem_dev = stp->st_dev;
                else if (filesystem_dev != stp->st_dev)
                        return;
-@@ -273,7 +275,7 @@ static void delete_in_dir(struct file_li
+@@ -275,7 +277,7 @@ static void delete_in_dir(struct file_li
         * from the filesystem. */
        for (i = dirlist->count; i--; ) {
                struct file_struct *fp = dirlist->files[i];
@@ -238,8 +238,8 @@ command before "make":
 +              if (!fp->basename || FFLAGS(fp) & FLAG_MOUNT_POINT)
                        continue;
                if (flist_find(flist, fp) < 0) {
-                       int mode = fp->mode;
-@@ -300,11 +302,11 @@ static void do_delete_pass(struct file_l
+                       f_name(fp, delbuf);
+@@ -301,11 +303,11 @@ static void do_delete_pass(struct file_l
        for (j = 0; j < flist->count; j++) {
                struct file_struct *file = flist->files[j];
  
@@ -253,7 +253,7 @@ command before "make":
                        rprintf(FINFO, "deleting in %s\n", fbuf);
  
                if (link_stat(fbuf, &st, keep_dirlinks) < 0
-@@ -346,8 +348,11 @@ void itemize(struct file_struct *file, i
+@@ -347,8 +349,11 @@ void itemize(struct file_struct *file, i
                        iflags |= ITEM_REPORT_SIZE;
                if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
                     && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
@@ -266,7 +266,7 @@ command before "make":
                if (preserve_perms
                 && (file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
                        iflags |= ITEM_REPORT_PERMS;
-@@ -396,7 +401,7 @@ int unchanged_file(char *fn, struct file
+@@ -397,7 +402,7 @@ int unchanged_file(char *fn, struct file
        if (ignore_times)
                return 0;
  
@@ -275,7 +275,7 @@ command before "make":
  }
  
  
-@@ -550,13 +555,13 @@ static int find_fuzzy(struct file_struct
+@@ -551,13 +556,13 @@ static int find_fuzzy(struct file_struct
                uint32 dist;
  
                if (!S_ISREG(fp->mode) || !fp->length
@@ -291,7 +291,7 @@ command before "make":
                        if (verbose > 4) {
                                rprintf(FINFO,
                                        "fuzzy size/modtime match for %s\n",
-@@ -632,7 +637,7 @@ static int try_dests_reg(struct file_str
+@@ -633,7 +638,7 @@ static int try_dests_reg(struct file_str
                        if (!unchanged_attrs(file, stp))
                                continue;
                        if ((always_checksum || ignore_times)
@@ -300,16 +300,16 @@ command before "make":
                                continue;
                        best_match = j;
                        match_level = 3;
-@@ -659,6 +664,8 @@ static int try_dests_reg(struct file_str
+@@ -660,6 +665,8 @@ static int try_dests_reg(struct file_str
                                          itemizing && verbose > 1,
                                          code) < 0)
                                goto try_a_copy;
 +                      if (preserve_atimes)
-+                              set_perms(fname, file, stp, 0);
++                              set_file_attrs(fname, file, stp, 0);
                        if (preserve_hard_links && file->link_u.links)
                                hard_link_cluster(file, ndx, itemizing, code);
                } else if (itemizing)
-@@ -894,7 +901,7 @@ static void recv_generator(char *fname, 
+@@ -895,7 +902,7 @@ static void recv_generator(char *fname, 
                    && verbose && code && f_out != -1)
                        rprintf(code, "%s/\n", fname);
                if (delete_during && f_out != -1 && !phase && dry_run < 2
@@ -318,7 +318,7 @@ command before "make":
                        delete_in_dir(the_file_list, fname, file, &st);
                return;
        }
-@@ -1071,7 +1078,7 @@ static void recv_generator(char *fname, 
+@@ -1074,7 +1081,7 @@ static void recv_generator(char *fname, 
        }
  
        if (update_only && statret == 0
@@ -327,7 +327,7 @@ command before "make":
                if (verbose > 1)
                        rprintf(FINFO, "%s is newer\n", fname);
                return;
-@@ -1174,7 +1181,7 @@ static void recv_generator(char *fname, 
+@@ -1177,7 +1184,7 @@ static void recv_generator(char *fname, 
        if (fuzzy_basis) {
                int j = flist_find(fuzzy_dirlist, file);
                if (j >= 0) /* don't use changing file as future fuzzy basis */
@@ -387,7 +387,7 @@ command before "make":
 +      } while (!(FFLAGS(file) & FLAG_HLINK_EOL));
  #endif
  }
---- orig/log.c 2006-01-24 22:24:32
+--- orig/log.c 2006-01-26 10:45:39
 +++ log.c      2006-01-24 22:50:01
 @@ -38,6 +38,7 @@ extern int module_id;
  extern int msg_fd_out;
@@ -397,7 +397,7 @@ command before "make":
  extern int log_format_has_i;
  extern int log_format_has_o_or_i;
  extern int daemon_log_format_has_o_or_i;
-@@ -542,10 +543,12 @@ static void log_formatted(enum logcode c
+@@ -543,10 +544,12 @@ static void log_formatted(enum logcode c
                        n[3] = !(iflags & ITEM_REPORT_SIZE) ? '.' : 's';
                        n[4] = !(iflags & ITEM_REPORT_TIME) ? '.'
                             : !preserve_times || S_ISLNK(file->mode) ? 'T' : 't';
@@ -414,9 +414,9 @@ command before "make":
  
                        if (iflags & (ITEM_IS_NEW|ITEM_MISSING_DATA)) {
                                char ch = iflags & ITEM_IS_NEW ? '+' : '?';
---- orig/options.c     2006-01-23 18:48:23
-+++ options.c  2006-01-24 22:53:18
-@@ -50,6 +50,7 @@ int preserve_uid = 0;
+--- orig/options.c     2006-01-31 03:11:30
++++ options.c  2006-01-31 03:08:39
+@@ -52,6 +52,7 @@ int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
  int omit_dir_times = 0;
@@ -424,19 +424,19 @@ command before "make":
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -291,8 +292,9 @@ void usage(enum logcode F)
-   rprintf(F," -o, --owner                 preserve owner (root only)\n");
-   rprintf(F," -g, --group                 preserve group\n");
-   rprintf(F," -D, --devices               preserve devices (root only)\n");
+@@ -299,8 +300,9 @@ void usage(enum logcode F)
+   rprintf(F,"     --devices               preserve device files (super-user only)\n");
+   rprintf(F,"     --specials              preserve special files\n");
+   rprintf(F," -D                          same as --devices --specials\n");
 -  rprintf(F," -t, --times                 preserve times\n");
 -  rprintf(F," -O, --omit-dir-times        omit directories when preserving times\n");
 +  rprintf(F," -t, --times                 preserve modify times\n");
 +  rprintf(F," -O, --omit-dir-times        omit directories when preserving modify times\n");
 +  rprintf(F," -U, --atimes                preserve access (use) times\n");
-   rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
+   rprintf(F,"     --super                 receiver attempts super-user activities\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-@@ -400,6 +402,9 @@ static struct poptOption long_options[] 
+@@ -412,6 +414,9 @@ static struct poptOption long_options[] 
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
@@ -445,27 +445,27 @@ command before "make":
 +  {"no-k",             0,  POPT_ARG_VAL,    &preserve_atimes, 0, 0, 0 },
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 2, 0, 0 },
    {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
-   {"owner",           'o', POPT_ARG_VAL,    &preserve_uid, 1, 0, 0 },
-@@ -1468,6 +1473,8 @@ void server_options(char **args,int *arg
+   {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },
+@@ -1505,6 +1510,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
 +      if (preserve_atimes)
 +              argstr[x++] = 'U';
-       if (omit_dir_times == 2 && am_sender)
-               argstr[x++] = 'O';
        if (preserve_perms)
---- orig/rsync.c       2006-01-25 17:15:12
-+++ rsync.c    2006-01-26 09:19:43
-@@ -27,6 +27,7 @@ extern int dry_run;
- extern int daemon_log_format_has_i;
+               argstr[x++] = 'p';
+       else if (preserve_executability && am_sender)
+--- orig/rsync.c       2006-01-31 02:30:18
++++ rsync.c    2006-01-31 03:00:22
+@@ -28,6 +28,7 @@ extern int daemon_log_format_has_i;
+ extern int preserve_executability;
  extern int preserve_times;
  extern int omit_dir_times;
 +extern int preserve_atimes;
+ extern int orig_umask;
  extern int am_root;
  extern int am_server;
- extern int am_sender;
-@@ -56,6 +57,7 @@ int set_perms(char *fname,struct file_st
+@@ -78,6 +79,7 @@ int set_file_attrs(char *fname, struct f
        int updated = 0;
        STRUCT_STAT st2;
        int change_uid, change_gid;
@@ -473,17 +473,17 @@ command before "make":
  
        if (!st) {
                if (dry_run)
-@@ -68,18 +70,33 @@ int set_perms(char *fname,struct file_st
+@@ -90,18 +92,33 @@ int set_file_attrs(char *fname, struct f
                st = &st2;
        }
  
 +      /* This code must be the first update in the function due to
 +       * how it uses the "updated" variable. */
        if (!preserve_times || (S_ISDIR(st->st_mode) && omit_dir_times))
-               flags |= PERMS_SKIP_MTIME;
+               flags |= ATTRS_SKIP_MTIME;
 +      if (!preserve_atimes || S_ISDIR(st->st_mode))
-+              flags |= PERMS_SKIP_ATIME;
-       if (!(flags & PERMS_SKIP_MTIME)
++              flags |= ATTRS_SKIP_ATIME;
+       if (!(flags & ATTRS_SKIP_MTIME)
 -          && cmp_modtime(st->st_mtime, file->modtime) != 0) {
 -              int ret = set_modtime(fname, file->modtime, st->st_mode);
 +          && cmp_time(st->st_mtime, file->modtime) != 0) {
@@ -491,7 +491,7 @@ command before "make":
 +              updated = 1;
 +      } else
 +              mtime = st->st_mtime;
-+      if (!(flags & PERMS_SKIP_ATIME)
++      if (!(flags & ATTRS_SKIP_ATIME)
 +          && cmp_time(st->st_atime, file->atime) != 0) {
 +              atime = file->atime;
 +              updated = 1;
@@ -511,7 +511,7 @@ command before "make":
        }
  
        change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- orig/rsync.h       2006-01-25 17:34:58
+--- orig/rsync.h       2006-01-30 20:39:09
 +++ rsync.h    2006-01-24 22:38:08
 @@ -54,6 +54,7 @@
  #define XMIT_HAS_IDEV_DATA (1<<9)
@@ -523,9 +523,9 @@ command before "make":
  
 @@ -119,6 +120,7 @@
  
- #define PERMS_REPORT          (1<<0)
- #define PERMS_SKIP_MTIME      (1<<1)
-+#define PERMS_SKIP_ATIME      (1<<2)
+ #define ATTRS_REPORT          (1<<0)
+ #define ATTRS_SKIP_MTIME      (1<<1)
++#define ATTRS_SKIP_ATIME      (1<<2)
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
@@ -551,21 +551,21 @@ command before "make":
  /*
   * Start the flist array at FLIST_START entries and grow it
   * by doubling until FLIST_LINEAR then grow by FLIST_LINEAR
---- orig/rsync.yo      2006-01-24 22:19:58
-+++ rsync.yo   2006-01-24 22:54:23
-@@ -319,8 +319,9 @@ to the detailed description below for a 
-  -o, --owner                 preserve owner (root only)
-  -g, --group                 preserve group
-  -D, --devices               preserve devices (root only)
+--- orig/rsync.yo      2006-01-31 03:05:44
++++ rsync.yo   2006-01-31 03:06:45
+@@ -323,8 +323,9 @@ to the detailed description below for a 
+      --devices               preserve device files (super-user only)
+      --specials              preserve special files
+  -D                          same as --devices --specials
 - -t, --times                 preserve times
 - -O, --omit-dir-times        omit directories when preserving times
 + -t, --times                 preserve modify times
 + -O, --omit-dir-times        omit directories when preserving mod-times
 + -U, --atimes                preserve access (use) times
-      --chmod=CHMOD           change destination permissions
+      --super                 receiver attempts super-user activities
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
-@@ -711,6 +712,12 @@ it is preserving modification times (see
+@@ -771,6 +772,12 @@ it is preserving modification times (see
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -575,10 +575,21 @@ command before "make":
 +repeated rsync runs with --atimes may be needed if you want to force the
 +access-time values to be 100% identical on the two systems.
 +
- dit(bf(--chmod)) This options tells rsync to apply the listed "chmod" pattern
- to the permission of the files on the destination.  In addition to the normal
- parsing rules specified in the chmod manpage, you can specify an item that
-@@ -1219,9 +1226,13 @@ quote(itemize(
+ 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
+@@ -1278,8 +1285,8 @@ if the receiving rsync is at least versi
+ 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 8 letters long.  The general
+-format is like the string bf(YXcstpog), where bf(Y) is replaced by the
++The "%i" escape has a cryptic output that is 9 letters long.  The general
++format is like the string bf(YXcstupog), where bf(Y) is replaced by the
+ kind 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.
+@@ -1319,9 +1326,13 @@ quote(itemize(
    by the file transfer.
    it() A bf(t) means the modification time is different and is being updated
    to the sender's value (requires bf(--times)).  An alternate value of bf(T)
@@ -643,9 +654,9 @@ command before "make":
 +
 +# The script would have aborted on error, so getting here means we've won.
 +exit 0
---- orig/testsuite/devices.test        2006-01-24 22:24:32
-+++ testsuite/devices.test     2006-01-24 22:32:30
-@@ -55,14 +55,14 @@ touch -r "$fromdir/block" "$fromdir/bloc
+--- orig/testsuite/devices.test        2006-01-30 08:12:44
++++ testsuite/devices.test     2006-01-26 10:53:43
+@@ -42,14 +42,14 @@ touch -r "$fromdir/block" "$fromdir/bloc
  $RSYNC -ai "$fromdir/block" "$todir/block2" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -662,7 +673,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 2 failed"
  
-@@ -71,7 +71,7 @@ sleep 1
+@@ -58,7 +58,7 @@ sleep 1
  $RSYNC -Di "$fromdir/block3" "$todir/block" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -671,7 +682,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
  
-@@ -79,15 +79,15 @@ $RSYNC -aiHvv "$fromdir/" "$todir/" \
+@@ -66,15 +66,15 @@ $RSYNC -aiHvv "$fromdir/" "$todir/" \
      | tee "$outfile"
  filter_outfile
  cat <<EOT >"$chkfile"
@@ -683,7 +694,7 @@ command before "make":
 -cD++++++ char
 -cD++++++ char2
 -cD++++++ char3
--cD++++++ fifo
+-cS++++++ fifo
 +.d..t.... ./
 +cD..t.... block
 +cD....... block2
@@ -692,13 +703,13 @@ command before "make":
 +cD+++++++ char
 +cD+++++++ char2
 +cD+++++++ char3
-+cD+++++++ fifo
++cS+++++++ fifo
  EOT
  if test ! -b "$fromdir/block2.5"; then
      sed -e '/block2\.5/d' \
---- orig/testsuite/itemize.test        2006-01-24 22:24:32
+--- orig/testsuite/itemize.test        2006-01-30 08:12:44
 +++ testsuite/itemize.test     2006-01-24 22:32:03
-@@ -44,14 +44,14 @@ ln "$fromdir/foo/config1" "$fromdir/foo/
+@@ -31,14 +31,14 @@ ln "$fromdir/foo/config1" "$fromdir/foo/
  $RSYNC -iplr "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -721,7 +732,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 1 failed"
  
-@@ -63,10 +63,10 @@ chmod 601 "$fromdir/foo/config2"
+@@ -50,10 +50,10 @@ chmod 601 "$fromdir/foo/config2"
  $RSYNC -iplrH "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -736,7 +747,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 2 failed"
  
-@@ -83,11 +83,11 @@ chmod 777 "$todir/bar/baz/rsync"
+@@ -70,11 +70,11 @@ chmod 777 "$todir/bar/baz/rsync"
  $RSYNC -iplrtc "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -753,7 +764,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
  
-@@ -112,15 +112,15 @@ $RSYNC -ivvplrtH "$fromdir/" "$todir/" \
+@@ -99,15 +99,15 @@ $RSYNC -ivvplrtH "$fromdir/" "$todir/" \
      | tee "$outfile"
  filter_outfile
  cat <<EOT >"$chkfile"
@@ -778,7 +789,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 5 failed"
  
-@@ -139,8 +139,8 @@ touch "$todir/foo/config2"
+@@ -126,8 +126,8 @@ touch "$todir/foo/config2"
  $RSYNC -iplrtH "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -789,7 +800,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 7 failed"
  
-@@ -149,15 +149,15 @@ $RSYNC -ivvplrtH --copy-dest="$lddir" "$
+@@ -136,15 +136,15 @@ $RSYNC -ivvplrtH --copy-dest="$lddir" "$
      | tee "$outfile"
  filter_outfile
  cat <<EOT >"$chkfile"
@@ -814,7 +825,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 8 failed"
  
-@@ -165,11 +165,11 @@ rm -rf "$todir"
+@@ -152,11 +152,11 @@ rm -rf "$todir"
  $RSYNC -iplrtH --copy-dest="$lddir" "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -831,7 +842,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 9 failed"
  
-@@ -196,15 +196,15 @@ $RSYNC -ivvplrtH --link-dest="$lddir" "$
+@@ -183,15 +183,15 @@ $RSYNC -ivvplrtH --link-dest="$lddir" "$
      | tee "$outfile"
  filter_outfile
  cat <<EOT >"$chkfile"
@@ -856,7 +867,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 11 failed"
  
-@@ -212,10 +212,10 @@ rm -rf "$todir"
+@@ -199,10 +199,10 @@ rm -rf "$todir"
  $RSYNC -iplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -871,7 +882,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 12 failed"
  
-@@ -243,14 +243,14 @@ filter_outfile
+@@ -230,14 +230,14 @@ filter_outfile
  # TODO fix really-old problem when combining -H with --compare-dest:
  # missing output for foo/extra hard-link (and it might not be updated)!
  cat <<EOT >"$chkfile"
@@ -894,7 +905,7 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 14 failed"
  
-@@ -258,10 +258,10 @@ rm -rf "$todir"
+@@ -245,10 +245,10 @@ rm -rf "$todir"
  $RSYNC -iplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
@@ -909,9 +920,9 @@ command before "make":
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 15 failed"
  
---- orig/testsuite/rsync.fns   2005-06-10 21:33:28
+--- orig/testsuite/rsync.fns   2006-01-30 08:12:44
 +++ testsuite/rsync.fns        2005-07-28 00:41:20
-@@ -50,7 +50,7 @@ printmsg() {
+@@ -67,7 +67,7 @@ printmsg() {
  
  
  rsync_ls_lR() {
@@ -920,7 +931,7 @@ command before "make":
  }
  
  rsync_getgroups() { 
-@@ -158,6 +158,10 @@ checkit() {
+@@ -175,6 +175,10 @@ checkit() {
      # We can just write everything to stdout/stderr, because the
      # wrapper hides it unless there is a problem.
  
@@ -931,7 +942,7 @@ command before "make":
      echo "Running: \"$1\""  
      eval "$1" 
      status=$?
-@@ -165,10 +169,13 @@ checkit() {
+@@ -182,10 +186,13 @@ checkit() {
        failed="YES";
      fi
  
@@ -1083,7 +1094,7 @@ command before "make":
  
        return 0;
  }
---- orig/util.c        2006-01-20 00:12:48
+--- orig/util.c        2006-01-30 07:18:28
 +++ util.c     2006-01-14 08:20:29
 @@ -130,7 +130,7 @@ void overflow_exit(char *str)
  
@@ -1134,7 +1145,7 @@ command before "make":
                t[1] = modtime;
                return utime(fname,t);
  #else
-@@ -1175,8 +1179,8 @@ int msleep(int t)
+@@ -1183,8 +1187,8 @@ int msleep(int t)
  
  
  /**
@@ -1145,7 +1156,7 @@ command before "make":
   * --modify-window).
   *
   * @retval 0 if the times should be treated as the same
-@@ -1185,7 +1189,7 @@ int msleep(int t)
+@@ -1193,7 +1197,7 @@ int msleep(int t)
   *
   * @retval -1 if the 2nd is later
   **/
index 995ee55..88b714b 100644 (file)
@@ -13,7 +13,7 @@ suffix.
 
 Marc St-Onge
 
---- orig/backup.c      2006-01-20 21:12:21
+--- orig/backup.c      2006-01-30 07:18:27
 +++ backup.c   2005-02-22 02:11:15
 @@ -22,11 +22,17 @@
  
@@ -33,7 +33,7 @@ Marc St-Onge
  
  extern int am_root;
  extern int preserve_devices;
-@@ -35,6 +41,8 @@ extern int preserve_hard_links;
+@@ -36,6 +42,8 @@ extern int preserve_hard_links;
  extern int orig_umask;
  extern int safe_symlinks;
  
@@ -42,7 +42,7 @@ Marc St-Onge
  /* make a complete pathname for backup file */
  char *get_backup_name(char *fname)
  {
-@@ -52,11 +60,28 @@ char *get_backup_name(char *fname)
+@@ -53,11 +61,28 @@ char *get_backup_name(char *fname)
        return NULL;
  }
  
@@ -72,7 +72,7 @@ Marc St-Onge
  
        if (!fnamebak)
                return 0;
-@@ -96,7 +121,8 @@ path
+@@ -97,7 +122,8 @@ path
  static int make_bak_dir(char *fullpath)
  {
        STRUCT_STAT st;
@@ -82,7 +82,7 @@ Marc St-Onge
        char *end = rel + strlen(rel);
        char *p = end;
  
-@@ -183,7 +209,8 @@ static int keep_backup(char *fname)
+@@ -185,7 +211,8 @@ static int keep_backup(char *fname)
        if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
                return 1; /* the file could have disappeared */
  
@@ -92,7 +92,7 @@ Marc St-Onge
                return 0;
  
        /* Check to see if this is a device file, or link */
-@@ -277,3 +304,13 @@ int make_backup(char *fname)
+@@ -280,3 +307,13 @@ int make_backup(char *fname)
                return keep_backup(fname);
        return make_simple_backup(fname);
  }
@@ -106,9 +106,9 @@ Marc St-Onge
 +      deleting = 0;
 +      return ret;
 +}
---- orig/generator.c   2006-01-20 21:12:17
+--- orig/generator.c   2006-01-31 02:30:18
 +++ generator.c        2005-11-15 07:02:12
-@@ -89,6 +89,9 @@ extern dev_t filesystem_dev;
+@@ -91,6 +91,9 @@ extern dev_t filesystem_dev;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -118,7 +118,7 @@ Marc St-Onge
  extern struct file_list *the_file_list;
  extern struct filter_list_struct server_filter_list;
  
-@@ -101,10 +104,14 @@ static int can_link_devices = 1;
+@@ -103,10 +106,14 @@ static int can_link_devices = 1;
  #define DEL_TERSE             (1<<3)
  
  
@@ -134,7 +134,7 @@ Marc St-Onge
  }
  
  
-@@ -125,8 +132,8 @@ static int delete_item(char *fname, int 
+@@ -127,8 +134,8 @@ static int delete_item(char *fname, int 
        if (!S_ISDIR(mode)) {
                if (max_delete && ++deletion_count > max_delete)
                        return 0;
@@ -145,7 +145,7 @@ Marc St-Onge
                else
                        ok = robust_unlink(fname) == 0;
                if (ok) {
-@@ -148,9 +155,9 @@ static int delete_item(char *fname, int 
+@@ -150,9 +157,9 @@ static int delete_item(char *fname, int 
            || (dry_run && zap_dir)) {
                ok = 0;
                errno = ENOTEMPTY;
@@ -157,9 +157,9 @@ Marc St-Onge
        else
                ok = do_rmdir(fname) == 0;
        if (ok) {
---- orig/options.c     2006-01-21 07:55:00
-+++ options.c  2006-01-21 08:05:44
-@@ -132,10 +132,14 @@ int no_detach
+--- orig/options.c     2006-01-31 03:11:30
++++ options.c  2006-01-26 12:40:16
+@@ -137,10 +137,14 @@ int no_detach
  int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
@@ -174,17 +174,17 @@ Marc St-Onge
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -145,7 +149,9 @@ char *log_format = NULL;
+@@ -150,7 +154,9 @@ char *log_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
 +char *backup_dir_dels = NULL;
  char backup_dir_buf[MAXPATHLEN];
 +char backup_dir_dels_buf[MAXPATHLEN];
+ char *sockopts = NULL;
  int rsync_port = 0;
  int compare_dest = 0;
- int copy_dest = 0;
-@@ -276,6 +282,8 @@ void usage(enum logcode F)
+@@ -281,6 +287,8 @@ void usage(enum logcode F)
    rprintf(F," -b, --backup                make backups (see --suffix & --backup-dir)\n");
    rprintf(F,"     --backup-dir=DIR        make backups into hierarchy based in DIR\n");
    rprintf(F,"     --suffix=SUFFIX         set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
@@ -193,7 +193,7 @@ Marc St-Onge
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
-@@ -475,7 +483,9 @@ static struct poptOption long_options[] 
+@@ -494,7 +502,9 @@ static struct poptOption long_options[] 
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_NONE,   &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -203,7 +203,7 @@ Marc St-Onge
    {"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 },
-@@ -1147,6 +1157,8 @@ int parse_arguments(int *argc, const cha
+@@ -1202,6 +1212,8 @@ int parse_arguments(int *argc, const cha
                        partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
@@ -212,7 +212,7 @@ Marc St-Onge
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
-@@ -1181,6 +1193,14 @@ int parse_arguments(int *argc, const cha
+@@ -1236,6 +1248,14 @@ int parse_arguments(int *argc, const cha
                                return 0;
                        }
                }
@@ -227,7 +227,7 @@ Marc St-Onge
        }
  
        if (!backup_suffix)
-@@ -1192,6 +1212,16 @@ int parse_arguments(int *argc, const cha
+@@ -1247,6 +1267,16 @@ int parse_arguments(int *argc, const cha
                        backup_suffix);
                return 0;
        }
@@ -244,7 +244,7 @@ Marc St-Onge
        if (backup_dir) {
                backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
                backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1215,6 +1245,31 @@ int parse_arguments(int *argc, const cha
+@@ -1270,6 +1300,31 @@ int parse_arguments(int *argc, const cha
                        "P *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
@@ -276,7 +276,7 @@ Marc St-Onge
        if (make_backups && !backup_dir)
                omit_dir_times = 1;
  
-@@ -1544,6 +1599,10 @@ void server_options(char **args,int *arg
+@@ -1612,6 +1667,10 @@ void server_options(char **args,int *arg
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -287,7 +287,7 @@ Marc St-Onge
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1552,7 +1611,13 @@ void server_options(char **args,int *arg
+@@ -1620,7 +1679,13 @@ void server_options(char **args,int *arg
                        goto oom;
                args[ac++] = arg;
        }
index 61255e2..f0cb813 100644 (file)
@@ -2,9 +2,9 @@ This patch causes the --cvs-exclude option to prefix the names listed
 in each dir's CVS/Entries file as per-dir includes before the dir's list
 of excludes taken from the .cvsignore file.
 
---- orig/exclude.c     2005-12-24 07:53:38
+--- orig/exclude.c     2006-01-28 00:16:01
 +++ exclude.c  2005-12-17 21:18:38
-@@ -212,6 +212,8 @@ static void add_rule(struct filter_list_
+@@ -221,6 +221,8 @@ static void add_rule(struct filter_list_
                if (!(lp = new_array(struct filter_list_struct, 1)))
                        out_of_memory("add_rule");
                lp->head = lp->tail = NULL;
@@ -13,7 +13,7 @@ of excludes taken from the .cvsignore file.
                if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0)
                        out_of_memory("add_rule");
                ret->u.mergelist = lp;
-@@ -446,6 +448,14 @@ void *push_local_filters(const char *dir
+@@ -454,6 +456,14 @@ void *push_local_filters(const char *dir
                                set_filter_dir(dir, dirlen);
                }
  
@@ -28,7 +28,7 @@ of excludes taken from the .cvsignore file.
                if (strlcpy(dirbuf + dirbuf_len, ex->pattern,
                    MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) {
                        parse_filter_file(lp, dirbuf, ex->match_flags,
-@@ -962,6 +972,7 @@ void parse_filter_file(struct filter_lis
+@@ -970,6 +980,7 @@ void parse_filter_file(struct filter_lis
        char line[BIGPATHBUFLEN];
        char *eob = line + sizeof line - 1;
        int word_split = mflags & MATCHFLG_WORD_SPLIT;
@@ -36,8 +36,8 @@ of excludes taken from the .cvsignore file.
  
        if (!fname || !*fname)
                return;
-@@ -1006,6 +1017,24 @@ void parse_filter_file(struct filter_lis
-                                       continue;
+@@ -1016,6 +1027,24 @@ void parse_filter_file(struct filter_lis
+                               }
                                break;
                        }
 +                      switch (slash_parse) { /* CVS/Entries parsing: */
@@ -61,7 +61,7 @@ of excludes taken from the .cvsignore file.
                        if (word_split && isspace(ch))
                                break;
                        if (eol_nulls? !ch : (ch == '\n' || ch == '\r'))
-@@ -1015,13 +1044,15 @@ void parse_filter_file(struct filter_lis
+@@ -1025,13 +1054,15 @@ void parse_filter_file(struct filter_lis
                        else
                                overflow = 1;
                }
@@ -78,7 +78,7 @@ of excludes taken from the .cvsignore file.
                        parse_rule(listp, line, mflags, xflags);
                if (ch == EOF)
                        break;
---- orig/rsync.h       2005-12-15 23:00:49
+--- orig/rsync.h       2006-01-30 20:39:09
 +++ rsync.h    2005-12-17 19:52:48
 @@ -116,6 +116,7 @@
  #define XFLG_OLD_PREFIXES     (1<<1)
@@ -86,11 +86,11 @@ of excludes taken from the .cvsignore file.
  #define XFLG_ABS_IF_SLASH     (1<<3)
 +#define XFLG_CVS_ENTRIES      (1<<4)
  
- #define PERMS_REPORT          (1<<0)
- #define PERMS_SKIP_MTIME      (1<<1)
---- orig/testsuite/exclude.test        2005-12-24 07:49:27
+ #define ATTRS_REPORT          (1<<0)
+ #define ATTRS_SKIP_MTIME      (1<<1)
+--- orig/testsuite/exclude.test        2006-01-26 22:14:14
 +++ testsuite/exclude.test     2005-12-30 07:32:41
-@@ -22,6 +22,7 @@ set -x
+@@ -21,6 +21,7 @@ set -x
  
  makepath "$fromdir/foo/down/to/you"
  makepath "$fromdir/foo/sub"
@@ -98,7 +98,7 @@ of excludes taken from the .cvsignore file.
  makepath "$fromdir/bar/down/to/foo/too"
  makepath "$fromdir/bar/down/to/bar/baz"
  makepath "$fromdir/mid/for/foo/and/that/is/who"
-@@ -58,6 +59,9 @@ echo cvsout >"$fromdir/bar/down/to/foo/f
+@@ -59,6 +60,9 @@ echo cvsout >"$fromdir/bar/down/to/foo/f
  echo gone >"$fromdir/bar/down/to/foo/file3"
  echo lost >"$fromdir/bar/down/to/foo/file4"
  echo weird >"$fromdir/bar/down/to/foo/+ file3"
@@ -108,7 +108,7 @@ of excludes taken from the .cvsignore file.
  echo cvsout-but-filtin >"$fromdir/bar/down/to/foo/file4.junk"
  echo smashed >"$fromdir/bar/down/to/foo/to"
  cat >"$fromdir/bar/down/to/bar/.filt2" <<EOF
-@@ -101,7 +105,18 @@ cat >"$excl" <<EOF
+@@ -105,7 +109,18 @@ cat >"$excl" <<EOF
  EOF
  
  cat >"$scratchdir/.cvsignore" <<EOF
@@ -128,7 +128,7 @@ of excludes taken from the .cvsignore file.
  EOF
  
  # Create the chk dir with what we expect to be excluded
-@@ -128,6 +143,10 @@ checkit "$RSYNC -avv --exclude-from=\"$e
+@@ -134,6 +149,10 @@ checkit "$RSYNC -avv --exclude-from=\"$e
  # Modify the chk dir by removing cvs-ignored files and then tweaking the dir times.
  
  rm "$chkdir"/foo/*.old
@@ -139,7 +139,7 @@ of excludes taken from the .cvsignore file.
  rm "$chkdir"/bar/down/to/foo/*.bak
  rm "$chkdir"/bar/down/to/foo/*.junk
  rm "$chkdir"/bar/down/to/home-cvs-exclude
-@@ -143,8 +162,12 @@ checkit "$RSYNC -avvC --filter=\"merge $
+@@ -149,8 +168,12 @@ checkit "$RSYNC -avvC --filter=\"merge $
  
  # Modify the chk dir for our merge-exclude test and then tweak the dir times.
  
index 6871d9d..59471f3 100644 (file)
@@ -1,8 +1,8 @@
 This patch from Sami Farin lets you specify --fsync if you want fsync()
 to be called on every file we write.
 
---- orig/options.c     2005-11-12 20:13:05
-+++ options.c  2005-08-27 21:21:34
+--- orig/options.c     2006-01-31 03:11:30
++++ options.c  2006-01-28 00:16:23
 @@ -42,6 +42,7 @@ int whole_file = -1;
  int append_mode = 0;
  int keep_dirlinks = 0;
@@ -11,15 +11,15 @@ to be called on every file we write.
  int preserve_links = 0;
  int preserve_hard_links = 0;
  int preserve_perms = 0;
-@@ -320,6 +321,7 @@ void usage(enum logcode F)
-   rprintf(F,"     --partial               keep partially transferred files\n");
+@@ -327,6 +328,7 @@ void usage(enum logcode F)
    rprintf(F,"     --partial-dir=DIR       put a partially transferred file into DIR\n");
    rprintf(F,"     --delay-updates         put all updated files into place at transfer's end\n");
+   rprintf(F," -m, --prune-empty-dirs      prune empty directory chains from the file-list\n");
 +  rprintf(F,"     --fsync                 fsync every written file\n");
    rprintf(F,"     --numeric-ids           don't map uid/gid values by user/group name\n");
    rprintf(F,"     --timeout=TIME          set I/O timeout in seconds\n");
    rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");
-@@ -485,6 +487,7 @@ static struct poptOption long_options[] 
+@@ -501,6 +503,7 @@ static struct poptOption long_options[] 
    {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_NONE,   &eol_nulls, 0, 0, 0},
@@ -27,7 +27,7 @@ to be called on every file we write.
    {"numeric-ids",      0,  POPT_ARG_NONE,   &numeric_ids, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1602,6 +1605,9 @@ void server_options(char **args,int *arg
+@@ -1694,6 +1697,9 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }
  
@@ -37,7 +37,7 @@ to be called on every file we write.
        if (basis_dir[0] && am_sender) {
                /* the server only needs this option if it is not the sender,
                 *   and it may be an older version that doesn't know this
---- orig/receiver.c    2005-11-10 16:58:36
+--- orig/receiver.c    2006-01-31 02:30:18
 +++ receiver.c 2005-02-20 00:17:37
 @@ -38,6 +38,7 @@ extern int keep_dirlinks;
  extern int preserve_hard_links;
@@ -47,7 +47,7 @@ to be called on every file we write.
  extern int basis_dir_cnt;
  extern int make_backups;
  extern int cleanup_got_literal;
-@@ -319,6 +320,12 @@ static int receive_data(int f_in, char *
+@@ -318,6 +319,12 @@ static int receive_data(int f_in, char *
                exit_cleanup(RERR_FILEIO);
        }
  
@@ -70,7 +70,7 @@ to be called on every file we write.
  char *partial_dir;
  struct filter_list_struct server_filter_list;
  
---- orig/util.c        2005-11-12 20:13:05
+--- orig/util.c        2006-01-30 07:18:28
 +++ util.c     2005-11-12 20:13:44
 @@ -30,6 +30,7 @@
  extern int verbose;
@@ -80,7 +80,7 @@ to be called on every file we write.
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -312,6 +313,12 @@ int copy_file(char *source, char *dest, 
+@@ -312,6 +313,12 @@ int copy_file(const char *source, const 
                return -1;
        }
  
index b21aa0a..bc0fda6 100644 (file)
@@ -8,20 +8,20 @@ This only saves 4 bytes per file (not counting the overhead of the array).
 This probably needs a hashing algorithm to be added if the uid+gid list
 gets to be really large.
 
---- orig/flist.c       2006-01-25 17:15:12
-+++ flist.c    2006-01-25 17:38:28
-@@ -58,6 +58,7 @@ extern int protocol_version;
+--- orig/flist.c       2006-01-31 02:30:18
++++ flist.c    2006-01-26 10:56:31
+@@ -60,6 +60,7 @@ extern int protocol_version;
  extern int sanitize_paths;
- extern int orig_umask;
+ extern const char *io_write_phase;
  extern struct stats stats;
 +extern struct id_pair *id_pairs;
  extern struct file_list *the_file_list;
  
  extern char curr_dir[MAXPATHLEN];
-@@ -362,14 +363,14 @@ static void send_file_entry(struct file_
-                               flags |= XMIT_RDEV_MINOR_IS_SMALL;
+@@ -363,14 +364,14 @@ static void send_file_entry(struct file_
                }
-       }
+       } else if (protocol_version < 28)
+               rdev = makedev(0, 0);
 -      if (file->uid == uid)
 +      if (id_pairs[file->id_ndx].uid == uid)
                flags |= XMIT_SAME_UID;
@@ -37,7 +37,7 @@ gets to be really large.
        if (file->modtime == modtime)
                flags |= XMIT_SAME_TIME;
        else
-@@ -622,8 +623,7 @@ static struct file_struct *receive_file_
+@@ -623,8 +624,7 @@ static struct file_struct *receive_file_
        file->modtime = modtime;
        file->length = file_length;
        file->mode = mode;
@@ -47,7 +47,7 @@ gets to be really large.
  
        if (dirname_len) {
                file->dirname = lastdir = bp;
-@@ -879,8 +879,7 @@ struct file_struct *make_file(char *fnam
+@@ -875,8 +875,7 @@ struct file_struct *make_file(char *fnam
        file->modtime = st.st_mtime;
        file->length = st.st_size;
        file->mode = st.st_mode;
@@ -57,7 +57,7 @@ gets to be really large.
  
  #ifdef SUPPORT_HARD_LINKS
        if (flist && flist->hlink_pool) {
-@@ -947,8 +946,7 @@ struct file_struct *make_file(char *fnam
+@@ -944,8 +943,7 @@ struct file_struct *make_file(char *fnam
                        file->modtime = st2.st_mtime;
                        file->length = st2.st_size;
                        file->mode = st2.st_mode;
@@ -67,7 +67,7 @@ gets to be really large.
                        file->u.link = NULL;
                } else
                        file->mode = save_mode;
-@@ -1392,7 +1390,7 @@ struct file_list *recv_file_list(int f)
+@@ -1389,7 +1387,7 @@ struct file_list *recv_file_list(int f)
        clean_flist(flist, relative_paths, 1);
  
        if (f >= 0) {
@@ -76,7 +76,7 @@ gets to be really large.
  
                /* Recv the io_error flag */
                if (lp_ignore_errors(module_id) || ignore_errors)
-@@ -1618,13 +1616,15 @@ static void output_flist(struct file_lis
+@@ -1705,13 +1703,15 @@ static void output_flist(struct file_lis
  
        for (i = 0; i < flist->count; i++) {
                file = flist->files[i];
@@ -98,9 +98,9 @@ gets to be really large.
                        *gidbuf = '\0';
                if (!am_sender)
                        sprintf(depthbuf, "%d", file->dir.depth);
---- orig/generator.c   2006-01-25 17:15:12
+--- orig/generator.c   2006-01-31 02:30:18
 +++ generator.c        2006-01-25 17:39:42
-@@ -89,6 +89,7 @@ extern dev_t filesystem_dev;
+@@ -91,6 +91,7 @@ extern dev_t filesystem_dev;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -108,7 +108,7 @@ gets to be really large.
  extern struct file_list *the_file_list;
  extern struct filter_list_struct server_filter_list;
  
-@@ -325,10 +326,12 @@ int unchanged_attrs(struct file_struct *
+@@ -326,10 +327,12 @@ int unchanged_attrs(struct file_struct *
         && (st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS))
                return 0;
  
@@ -123,7 +123,7 @@ gets to be really large.
                return 0;
  
        return 1;
-@@ -341,6 +344,8 @@ void itemize(struct file_struct *file, i
+@@ -342,6 +345,8 @@ void itemize(struct file_struct *file, i
                int keep_time = !preserve_times ? 0
                    : S_ISDIR(file->mode) ? !omit_dir_times
                    : !S_ISLNK(file->mode);
@@ -132,7 +132,7 @@ gets to be really large.
  
                if (S_ISREG(file->mode) && file->length != st->st_size)
                        iflags |= ITEM_REPORT_SIZE;
-@@ -351,10 +356,10 @@ void itemize(struct file_struct *file, i
+@@ -352,10 +357,10 @@ void itemize(struct file_struct *file, i
                if (preserve_perms
                 && (file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
                        iflags |= ITEM_REPORT_PERMS;
@@ -146,9 +146,9 @@ gets to be really large.
                        iflags |= ITEM_REPORT_GROUP;
        } else
                iflags |= ITEM_IS_NEW;
---- orig/rsync.c       2006-01-25 17:15:12
+--- orig/rsync.c       2006-01-31 02:30:18
 +++ rsync.c    2006-01-25 17:26:06
-@@ -38,6 +38,7 @@ extern int inplace;
+@@ -40,6 +40,7 @@ extern int inplace;
  extern int keep_dirlinks;
  extern int make_backups;
  extern struct stats stats;
@@ -156,7 +156,7 @@ gets to be really large.
  
  
  /*
-@@ -56,6 +57,8 @@ int set_perms(char *fname,struct file_st
+@@ -78,6 +79,8 @@ int set_file_attrs(char *fname, struct f
        int updated = 0;
        STRUCT_STAT st2;
        int change_uid, change_gid;
@@ -165,7 +165,7 @@ gets to be really large.
  
        if (!st) {
                if (dry_run)
-@@ -82,9 +85,11 @@ int set_perms(char *fname,struct file_st
+@@ -104,9 +107,11 @@ int set_file_attrs(char *fname, struct f
                        updated = 1;
        }
  
@@ -180,7 +180,7 @@ gets to be really large.
  #if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK
        if (S_ISLNK(st->st_mode))
                ;
-@@ -96,18 +101,18 @@ int set_perms(char *fname,struct file_st
+@@ -118,18 +123,18 @@ int set_file_attrs(char *fname, struct f
                                rprintf(FINFO,
                                        "set uid of %s from %ld to %ld\n",
                                        fname,
@@ -203,7 +203,7 @@ gets to be really large.
                        /* shouldn't have attempted to change uid or gid
                         * unless have the privilege */
                        rsyserr(FERROR, errno, "%s %s failed",
---- orig/rsync.h       2006-01-25 17:34:58
+--- orig/rsync.h       2006-01-30 20:39:09
 +++ rsync.h    2006-01-25 17:15:44
 @@ -493,6 +493,11 @@ struct hlink {
        int hlindex;
index 5fab205..612cbf8 100644 (file)
@@ -365,9 +365,9 @@ the file's name.
 +}
 +
 +#endif
---- orig/options.c     2006-01-21 21:02:30
-+++ options.c  2006-01-21 21:12:04
-@@ -141,6 +141,7 @@ char *backup_suffix = NULL;
+--- orig/options.c     2006-01-31 03:11:30
++++ options.c  2006-01-26 10:57:21
+@@ -144,6 +144,7 @@ char *backup_suffix = NULL;
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
@@ -375,7 +375,7 @@ the file's name.
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *log_format = NULL;
-@@ -328,6 +329,7 @@ void usage(enum logcode F)
+@@ -337,6 +338,7 @@ void usage(enum logcode F)
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
    rprintf(F,"     --copy-dest=DIR         ... and include copies of unchanged files\n");
    rprintf(F,"     --link-dest=DIR         hardlink to files in DIR when unchanged\n");
@@ -383,15 +383,16 @@ the file's name.
    rprintf(F," -z, --compress              compress file data during the transfer\n");
    rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");
    rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
-@@ -373,6 +375,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -383,7 +385,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
-+      OPT_LINK_BY_HASH,
+-      OPT_NO_D,
++      OPT_NO_D, OPT_LINK_BY_HASH,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -461,6 +464,7 @@ static struct poptOption long_options[] 
+@@ -478,6 +480,7 @@ static struct poptOption long_options[] 
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -399,7 +400,7 @@ the file's name.
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
    {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },
    {"compress-level",   0,  POPT_ARG_INT,    &def_compress_level, 'z', 0, 0 },
-@@ -1027,6 +1031,21 @@ int parse_arguments(int *argc, const cha
+@@ -1057,6 +1060,21 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -421,7 +422,7 @@ the file's name.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1660,6 +1679,11 @@ void server_options(char **args,int *arg
+@@ -1706,6 +1724,11 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -433,7 +434,7 @@ the file's name.
        if (files_from && (!am_sender || filesfrom_host)) {
                if (filesfrom_host) {
                        args[ac++] = "--files-from";
---- orig/receiver.c    2006-01-14 20:27:09
+--- orig/receiver.c    2006-01-31 02:30:18
 +++ receiver.c 2005-01-15 21:29:13
 @@ -54,6 +54,7 @@ extern int delay_updates;
  extern struct stats stats;
@@ -518,9 +519,9 @@ the file's name.
  
                if (!log_before_transfer)
                        log_item(file, &initial_stats, iflags, NULL);
---- orig/rsync.c       2006-01-14 08:14:31
-+++ rsync.c    2006-01-14 08:26:01
-@@ -38,6 +38,7 @@ extern int inplace;
+--- orig/rsync.c       2006-01-31 02:30:18
++++ rsync.c    2006-01-30 07:19:44
+@@ -40,6 +40,7 @@ extern int inplace;
  extern int keep_dirlinks;
  extern int make_backups;
  extern struct stats stats;
@@ -528,22 +529,26 @@ the file's name.
  
  
  /*
-@@ -188,7 +189,12 @@ void finish_transfer(char *fname, char *
+@@ -213,8 +214,15 @@ void finish_transfer(char *fname, char *
        /* move tmp file over real file */
        if (verbose > 2)
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
--      ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
+-      ret = robust_rename(fnametmp, fname, partialptr,
+-                          file->mode & INITACCESSPERMS);
 +#if HAVE_LINK
 +      if (link_by_hash_dir)
 +              ret = link_by_hash(fnametmp, fname, file);
 +      else
 +#endif
-+              ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
++      {
++              ret = robust_rename(fnametmp, fname, partialptr,
++                                  file->mode & INITACCESSPERMS);
++      }
        if (ret < 0) {
                rsyserr(FERROR, errno, "%s %s -> \"%s\"",
                        ret == -2 ? "copy" : "rename",
---- orig/rsync.h       2006-01-21 21:02:30
-+++ rsync.h    2004-07-03 20:20:15
+--- orig/rsync.h       2006-01-30 20:39:09
++++ rsync.h    2006-01-30 20:42:44
 @@ -640,6 +640,14 @@ struct stats {
        int current_file_index;
  };
@@ -556,12 +561,12 @@ the file's name.
 +      uint32 nlink;
 +};
 +
+ struct chmod_mode_struct;
  
  #include "byteorder.h"
- #include "lib/mdfour.h"
---- orig/rsync.yo      2006-01-21 21:02:31
+--- orig/rsync.yo      2006-01-31 03:05:44
 +++ rsync.yo   2005-02-13 06:58:47
-@@ -356,6 +356,7 @@ to the detailed description below for a 
+@@ -361,6 +361,7 @@ to the detailed description below for a 
       --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
index e37ad56..1088d74 100644 (file)
@@ -48,7 +48,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  
  TLS_OBJ = tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o
  
---- orig/cleanup.c     2006-01-14 08:14:29
+--- orig/cleanup.c     2006-01-30 07:18:27
 +++ cleanup.c  2005-01-10 10:43:22
 @@ -22,6 +22,9 @@
  #include "rsync.h"
@@ -72,7 +72,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        if (verbose > 3) {
                rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",
                        code, file, line);
---- orig/clientserver.c        2006-01-14 08:14:29
+--- orig/clientserver.c        2006-01-30 21:47:45
 +++ clientserver.c     2005-04-09 17:39:57
 @@ -44,6 +44,9 @@ extern int io_timeout;
  extern int orig_umask;
@@ -82,10 +82,10 @@ can't say if I've left any cleanup/compatibility errors in the code.
 +extern int use_ssl;
 +#endif
  extern char *bind_address;
- extern struct filter_list_struct server_filter_list;
+ extern char *sockopts;
  extern char *config_file;
-@@ -99,8 +102,18 @@ int start_socket_client(char *host, char
-               exit_cleanup(RERR_SOCKETIO);
+@@ -103,8 +106,18 @@ int start_socket_client(char *host, char
+       set_socket_options(fd, sockopts);
  
        ret = start_inband_exchange(user, path, fd, fd, argc);
 +      if (ret)
@@ -104,7 +104,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  }
  
  int start_inband_exchange(char *user, char *path, int f_in, int f_out, 
-@@ -161,6 +174,33 @@ int start_inband_exchange(char *user, ch
+@@ -165,6 +178,33 @@ int start_inband_exchange(char *user, ch
        if (verbose > 1)
                print_child_argv(sargs);
  
@@ -138,7 +138,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        p = strchr(path,'/');
        if (p) *p = 0;
        io_printf(f_out, "%s\n", path);
-@@ -189,6 +229,10 @@ int start_inband_exchange(char *user, ch
+@@ -193,6 +233,10 @@ int start_inband_exchange(char *user, ch
                         * server to terminate the listing of modules.
                         * We don't want to go on and transfer
                         * anything; just exit. */
@@ -149,7 +149,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        exit(0);
                }
  
-@@ -196,6 +240,10 @@ int start_inband_exchange(char *user, ch
+@@ -200,6 +244,10 @@ int start_inband_exchange(char *user, ch
                        rprintf(FERROR, "%s\n", line);
                        /* This is always fatal; the server will now
                         * close the socket. */
@@ -160,7 +160,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        return -1;
                }
  
-@@ -700,6 +748,7 @@ static void send_listing(int fd)
+@@ -714,6 +762,7 @@ static void send_listing(int fd)
                io_printf(fd,"@RSYNCD: EXIT\n");
  }
  
@@ -168,7 +168,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  /* this is called when a connection is established to a client
     and we want to start talking. The setup of the system is done from
     here */
-@@ -749,6 +798,9 @@ int start_daemon(int f_in, int f_out)
+@@ -766,6 +815,9 @@ int start_daemon(int f_in, int f_out)
        if (protocol_version > remote_protocol)
                protocol_version = remote_protocol;
  
@@ -178,7 +178,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        line[0] = 0;
        if (!read_line(f_in, line, sizeof line - 1))
                return -1;
-@@ -758,6 +810,20 @@ int start_daemon(int f_in, int f_out)
+@@ -775,6 +827,20 @@ int start_daemon(int f_in, int f_out)
                return -1;
        }
  
@@ -223,9 +223,9 @@ can't say if I've left any cleanup/compatibility errors in the code.
  AC_MSG_CHECKING([whether to call shutdown on all sockets])
  case $host_os in
        *cygwin* ) AC_MSG_RESULT(yes)
---- orig/options.c     2006-01-21 21:02:30
-+++ options.c  2006-01-21 21:13:11
-@@ -163,6 +163,14 @@ int log_format_has_o_or_i = 0;
+--- orig/options.c     2006-01-31 03:11:30
++++ options.c  2006-01-26 10:57:46
+@@ -167,6 +167,14 @@ int log_format_has_o_or_i = 0;
  int always_checksum = 0;
  int list_only = 0;
  
@@ -240,7 +240,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  #define MAX_BATCH_NAME_LEN 256        /* Must be less than MAXPATHLEN-13 */
  char *batch_name = NULL;
  
-@@ -191,6 +199,7 @@ static void print_rsync_version(enum log
+@@ -195,6 +203,7 @@ static void print_rsync_version(enum log
        char const *hardlinks = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
@@ -248,7 +248,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -213,6 +222,10 @@ static void print_rsync_version(enum log
+@@ -217,6 +226,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -258,8 +258,8 @@ can't say if I've left any cleanup/compatibility errors in the code.
 +
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
-       rprintf(f, "Copyright (C) 1996-2006 by Wayne Davison, Andrew Tridgell, and others\n");
-@@ -225,10 +238,10 @@ static void print_rsync_version(enum log
+       rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
+@@ -229,10 +242,10 @@ static void print_rsync_version(enum log
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
         * macros. */
@@ -272,7 +272,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  #ifdef MAINTAINER_MODE
        rprintf(f, "              panic action: \"%s\"\n",
                get_panic_action());
-@@ -361,6 +374,13 @@ void usage(enum logcode F)
+@@ -371,6 +384,13 @@ void usage(enum logcode F)
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
  #endif
@@ -286,15 +286,16 @@ can't say if I've left any cleanup/compatibility errors in the code.
    rprintf(F,"     --version               print version number\n");
    rprintf(F,"     --help                  show this help screen\n");
  
-@@ -373,6 +393,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -383,7 +403,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
-+      OPT_USE_SSL,
+-      OPT_NO_D,
++      OPT_NO_D, OPT_USE_SSL,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -501,6 +522,13 @@ static struct poptOption long_options[] 
+@@ -520,6 +540,13 @@ static struct poptOption long_options[] 
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },
    {"sender",           0,  POPT_ARG_NONE,   0, OPT_SENDER, 0, 0 },
@@ -308,7 +309,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    /* All the following options switch us into daemon-mode option-parsing. */
    {"config",           0,  POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
    {"daemon",           0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },
-@@ -1027,6 +1055,12 @@ int parse_arguments(int *argc, const cha
+@@ -1057,6 +1084,12 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -321,9 +322,9 @@ can't say if I've left any cleanup/compatibility errors in the code.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1305,6 +1339,17 @@ int parse_arguments(int *argc, const cha
+@@ -1335,6 +1368,17 @@ int parse_arguments(int *argc, const cha
        if (delay_updates && !partial_dir)
-               partial_dir = partialdir_for_delayupdate;
+               partial_dir = tmp_partialdir;
  
 +#if HAVE_OPENSSL
 +      if (use_ssl) {
@@ -339,7 +340,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -1700,11 +1745,28 @@ char *check_for_hostspec(char *s, char *
+@@ -1746,11 +1790,28 @@ char *check_for_hostspec(char *s, char *
  {
        char *p;
        int not_host;
@@ -370,7 +371,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                if ((p = strchr(s, '/')) != NULL) {
                        hostlen = p - s;
                        path = p + 1;
---- orig/rsync.h       2006-01-21 21:02:30
+--- orig/rsync.h       2006-01-30 20:39:09
 +++ rsync.h    2004-10-08 21:01:33
 @@ -32,6 +32,7 @@
  
index 57d5e5f..b553729 100644 (file)
@@ -13,6 +13,8 @@ this code works fine using the GNU pth library without any code changes if
 you configured it with --enable-syscall-soft --enable-pthread (you may need
 to twiddle the Makefile options if you didn't install the library, though).
 
+NOTE: we still need to duplicate the partial_fname static in util.c!
+
 If you try this out, please send some email to wayned@samba.org or the rsync
 mailing list with your results, build changes, bug reports, etc.  Thanks!
 
@@ -29,7 +31,7 @@ Be sure to run "make proto" before running "make".
  CC=@CC@
  CFLAGS=@CFLAGS@
  CPPFLAGS=@CPPFLAGS@
---- orig/cleanup.c     2006-01-14 08:14:29
+--- orig/cleanup.c     2006-01-30 07:18:27
 +++ cleanup.c  2005-12-08 23:17:08
 @@ -94,9 +94,6 @@ void _exit_cleanup(int code, const char 
        }
@@ -60,9 +62,9 @@ Be sure to run "make proto" before running "make".
  #define RERR_SIGNAL     20      /* status returned when sent SIGINT, SIGTERM, SIGHUP */
  #define RERR_WAITCHILD  21      /* some error returned by waitpid() */
  #define RERR_MALLOC     22      /* error allocating core memory buffers */
---- orig/generator.c   2006-01-14 20:27:09
+--- orig/generator.c   2006-01-31 02:30:18
 +++ generator.c        2005-12-08 23:17:08
-@@ -65,7 +65,6 @@ extern OFF_T min_size;
+@@ -67,7 +67,6 @@ extern OFF_T min_size;
  extern int io_error;
  extern int allowed_lull;
  extern int sock_f_out;
@@ -70,7 +72,7 @@ Be sure to run "make proto" before running "make".
  extern int protocol_version;
  extern int fuzzy_basis;
  extern int always_checksum;
-@@ -96,6 +95,11 @@ static int deletion_count = 0; /* used t
+@@ -98,6 +97,11 @@ static int deletion_count = 0; /* used t
  static int can_link_symlinks = 1; /* start out optimistic */
  static int can_link_devices = 1;
  
@@ -82,7 +84,7 @@ Be sure to run "make proto" before running "make".
  /* For calling delete_file() */
  #define DEL_FORCE_RECURSE     (1<<1) /* recurse even w/o --force */
  #define DEL_TERSE             (1<<3)
-@@ -445,8 +449,8 @@ static void sum_sizes_sqroot(struct sum_
+@@ -447,8 +451,8 @@ static void sum_sizes_sqroot(struct sum_
        }
  
        if (protocol_version < 27) {
@@ -93,7 +95,7 @@ Be sure to run "make proto" before running "make".
                s2length = SUM_LENGTH;
        } else {
                int32 c;
-@@ -456,7 +460,7 @@ static void sum_sizes_sqroot(struct sum_
+@@ -458,7 +462,7 @@ static void sum_sizes_sqroot(struct sum_
                for (c = blength; c >>= 1 && b; b--) {}
                /* add a bit, subtract rollsum, round up. */
                s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */
@@ -102,7 +104,7 @@ Be sure to run "make proto" before running "make".
                s2length = MIN(s2length, SUM_LENGTH);
        }
  
-@@ -490,7 +494,7 @@ static void generate_and_send_sums(int f
+@@ -492,7 +496,7 @@ static void generate_and_send_sums(int f
        sum_sizes_sqroot(&sum, len);
        write_sum_head(f_out, &sum);
  
@@ -111,7 +113,7 @@ Be sure to run "make proto" before running "make".
                return;
  
        if (len > 0)
-@@ -509,7 +513,7 @@ static void generate_and_send_sums(int f
+@@ -511,7 +515,7 @@ static void generate_and_send_sums(int f
  
                if (f_copy >= 0) {
                        full_write(f_copy, map, n1);
@@ -120,7 +122,7 @@ Be sure to run "make proto" before running "make".
                                continue;
                }
  
-@@ -1135,7 +1139,7 @@ static void recv_generator(char *fname, 
+@@ -1141,7 +1145,7 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -129,7 +131,7 @@ Be sure to run "make proto" before running "make".
                return;
  
        if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1190,7 +1194,7 @@ static void recv_generator(char *fname, 
+@@ -1196,7 +1200,7 @@ static void recv_generator(char *fname, 
                goto notify_others;
        }
  
@@ -138,7 +140,7 @@ Be sure to run "make proto" before running "make".
                if (!(backupptr = get_backup_name(fname))) {
                        close(fd);
                        return;
-@@ -1280,7 +1284,10 @@ void generate_files(int f_out, struct fi
+@@ -1285,7 +1289,10 @@ void generate_files(int f_out, struct fi
        int save_ignore_existing = ignore_existing;
        int save_ignore_non_existing = ignore_non_existing;
        int save_do_progress = do_progress;
@@ -150,7 +152,7 @@ Be sure to run "make proto" before running "make".
  
        if (protocol_version >= 29) {
                itemizing = 1;
-@@ -1309,7 +1316,7 @@ void generate_files(int f_out, struct fi
+@@ -1314,7 +1321,7 @@ void generate_files(int f_out, struct fi
                do_delete_pass(flist);
        do_progress = 0;
  
@@ -159,7 +161,7 @@ Be sure to run "make proto" before running "make".
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1318,12 +1325,6 @@ void generate_files(int f_out, struct fi
+@@ -1323,12 +1330,6 @@ void generate_files(int f_out, struct fi
                        : "enabled");
        }
  
@@ -172,8 +174,8 @@ Be sure to run "make proto" before running "make".
        for (i = 0; i < flist->count; i++) {
                struct file_struct *file = flist->files[i];
  
-@@ -1367,23 +1368,34 @@ void generate_files(int f_out, struct fi
-               delete_in_dir(NULL, NULL, NULL);
+@@ -1372,23 +1373,34 @@ void generate_files(int f_out, struct fi
+               delete_in_dir(NULL, NULL, NULL, NULL);
  
        phase++;
 -      csum_length = SUM_LENGTH;
@@ -213,7 +215,7 @@ Be sure to run "make proto" before running "make".
                if (local_name)
                        strlcpy(fbuf, local_name, sizeof fbuf);
                else
-@@ -1395,27 +1407,43 @@ void generate_files(int f_out, struct fi
+@@ -1400,27 +1412,43 @@ void generate_files(int f_out, struct fi
        phase++;
        ignore_non_existing = save_ignore_non_existing;
        ignore_existing = save_ignore_existing;
@@ -705,7 +707,7 @@ Be sure to run "make proto" before running "make".
 -      write_batch_monitor_out = -1;
 -      write_batch_monitor_in = -1;
 -}
---- orig/log.c 2006-01-17 02:16:40
+--- orig/log.c 2006-01-26 10:45:39
 +++ log.c      2005-12-16 23:49:57
 @@ -35,7 +35,6 @@ extern int am_sender;
  extern int local_server;
@@ -972,9 +974,9 @@ Be sure to run "make proto" before running "make".
                                show_progress(last_match, buf->file_size);
                        sum_update(map_ptr(buf, last_match, len), len);
                        last_match = s->flength;
---- orig/options.c     2006-01-14 08:14:30
+--- orig/options.c     2006-01-31 03:11:30
 +++ options.c  2005-12-08 23:17:09
-@@ -69,7 +69,6 @@ int def_compress_level = Z_DEFAULT_COMPR
+@@ -73,7 +73,6 @@ int def_compress_level = Z_DEFAULT_COMPR
  int am_root = 0;
  int am_server = 0;
  int am_sender = 0;
@@ -982,7 +984,7 @@ Be sure to run "make proto" before running "make".
  int am_starting_up = 1;
  int orig_umask = 0;
  int relative_paths = -1;
-@@ -89,6 +88,7 @@ int am_daemon = 0;
+@@ -94,6 +93,7 @@ int am_daemon = 0;
  int daemon_over_rsh = 0;
  int do_stats = 0;
  int do_progress = 0;
@@ -990,7 +992,7 @@ Be sure to run "make proto" before running "make".
  int keep_partial = 0;
  int safe_symlinks = 0;
  int copy_unsafe_links = 0;
-@@ -1234,6 +1234,7 @@ int parse_arguments(int *argc, const cha
+@@ -1290,6 +1290,7 @@ int parse_arguments(int *argc, const cha
        if ((do_progress || dry_run) && !verbose && !log_before_transfer
            && !am_server)
                verbose = 1;
@@ -998,9 +1000,9 @@ Be sure to run "make proto" before running "make".
  
        if (dry_run)
                do_xfers = 0;
---- orig/pipe.c        2006-01-14 08:14:31
+--- orig/pipe.c        2006-01-21 08:03:40
 +++ pipe.c     2005-12-08 23:17:09
-@@ -55,7 +55,7 @@ pid_t piped_child(char **command, int *f
+@@ -56,7 +56,7 @@ pid_t piped_child(char **command, int *f
                exit_cleanup(RERR_IPC);
        }
  
@@ -1009,7 +1011,7 @@ Be sure to run "make proto" before running "make".
        if (pid == -1) {
                rsyserr(FERROR, errno, "fork");
                exit_cleanup(RERR_IPC);
-@@ -116,7 +116,7 @@ pid_t local_child(int argc, char **argv,
+@@ -120,7 +120,7 @@ pid_t local_child(int argc, char **argv,
                exit_cleanup(RERR_IPC);
        }
  
@@ -1018,7 +1020,7 @@ Be sure to run "make proto" before running "make".
        if (pid == -1) {
                rsyserr(FERROR, errno, "fork");
                exit_cleanup(RERR_IPC);
---- orig/receiver.c    2006-01-14 20:27:09
+--- orig/receiver.c    2006-01-31 02:30:18
 +++ receiver.c 2006-01-14 08:30:29
 @@ -24,7 +24,7 @@ extern int verbose;
  extern int do_xfers;
@@ -1111,7 +1113,7 @@ Be sure to run "make proto" before running "make".
                        rprintf(FINFO, "%s\n", fname);
  
                /* recv file data */
-@@ -702,11 +697,12 @@ int recv_files(int f_in, struct file_lis
+@@ -705,11 +700,12 @@ int recv_files(int f_in, struct file_lis
                cleanup_disable();
  
                if (recv_ok > 0) {
@@ -1126,7 +1128,7 @@ Be sure to run "make proto" before running "make".
                } else if (!recv_ok) {
                        int msgtype = phase || read_batch ? FERROR : FINFO;
                        if (msgtype == FERROR || verbose) {
-@@ -728,10 +724,8 @@ int recv_files(int f_in, struct file_lis
+@@ -731,10 +727,8 @@ int recv_files(int f_in, struct file_lis
                                        "%s: %s failed verification -- update %s%s.\n",
                                        errstr, fname, keptstr, redostr);
                        }
@@ -1139,9 +1141,9 @@ Be sure to run "make proto" before running "make".
                }
        }
        make_backups = save_make_backups;
---- orig/rsync.c       2006-01-14 08:14:31
+--- orig/rsync.c       2006-01-31 02:30:18
 +++ rsync.c    2005-12-08 23:17:10
-@@ -30,7 +30,6 @@ extern int omit_dir_times;
+@@ -32,7 +32,6 @@ extern int orig_umask;
  extern int am_root;
  extern int am_server;
  extern int am_sender;
@@ -1149,14 +1151,14 @@ Be sure to run "make proto" before running "make".
  extern int am_starting_up;
  extern int preserve_uid;
  extern int preserve_gid;
-@@ -208,5 +207,5 @@ const char *who_am_i(void)
+@@ -247,5 +246,5 @@ const char *who_am_i(void)
  {
        if (am_starting_up)
                return am_server ? "server" : "client";
 -      return am_sender ? "sender" : am_generator ? "generator" : "receiver";
 +      return am_sender ? "sender" : am_generator() ? "generator" : "receiver";
  }
---- orig/rsync.h       2006-01-14 20:27:10
+--- orig/rsync.h       2006-01-30 20:39:09
 +++ rsync.h    2006-01-17 02:46:03
 @@ -166,10 +166,8 @@ enum msgcode {
        MSG_DATA=0,     /* raw data on the multiplexed stream */
@@ -1177,9 +1179,9 @@ Be sure to run "make proto" before running "make".
  
  #include "lib/pool_alloc.h"
  
---- orig/util.c        2006-01-14 08:14:31
+--- orig/util.c        2006-01-30 07:18:28
 +++ util.c     2005-12-08 23:17:10
-@@ -405,51 +405,6 @@ int robust_rename(char *from, char *to, 
+@@ -413,51 +413,6 @@ int robust_rename(char *from, char *to, 
        return -1;
  }
  
index c7161c0..b127772 100644 (file)
@@ -41,9 +41,9 @@ Do we need configure support for mktime()?
        if (t - last_io_in >= io_timeout) {
                if (!am_server && !am_daemon) {
                        rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
---- orig/options.c     2006-01-21 21:02:30
-+++ options.c  2006-01-21 21:14:08
-@@ -112,6 +112,7 @@ int checksum_seed = 0;
+--- orig/options.c     2006-01-31 03:11:30
++++ options.c  2006-01-26 10:58:41
+@@ -115,6 +115,7 @@ int checksum_seed = 0;
  int inplace = 0;
  int delay_updates = 0;
  long block_size = 0; /* "long" because popt can't set an int32. */
@@ -51,7 +51,7 @@ Do we need configure support for mktime()?
  
  
  /** Network address family. **/
-@@ -353,6 +354,8 @@ void usage(enum logcode F)
+@@ -363,6 +364,8 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
    rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
@@ -60,15 +60,16 @@ Do we need configure support for mktime()?
    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");
-@@ -373,6 +376,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -383,7 +386,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
-+      OPT_STOP_AT, OPT_TIME_LIMIT,
+-      OPT_NO_D,
++      OPT_NO_D, OPT_STOP_AT, OPT_TIME_LIMIT,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -474,6 +478,8 @@ static struct poptOption long_options[] 
+@@ -492,6 +495,8 @@ static struct poptOption long_options[] 
    {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
    {"itemize-changes", 'i', POPT_ARG_NONE,   0, 'i', 0, 0 },
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
@@ -77,7 +78,7 @@ Do we need configure support for mktime()?
    {"backup",          'b', POPT_ARG_NONE,   &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 },
-@@ -1027,6 +1033,36 @@ int parse_arguments(int *argc, const cha
+@@ -1057,6 +1062,36 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -114,7 +115,7 @@ Do we need configure support for mktime()?
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1564,6 +1600,15 @@ void server_options(char **args,int *arg
+@@ -1608,6 +1643,15 @@ void server_options(char **args,int *arg
                args[ac++] = arg;
        }
  
@@ -130,9 +131,9 @@ Do we need configure support for mktime()?
        if (backup_dir) {
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
---- orig/rsync.yo      2006-01-21 21:02:31
+--- orig/rsync.yo      2006-01-31 03:05:44
 +++ rsync.yo   2005-02-01 10:46:35
-@@ -381,6 +381,8 @@ to the detailed description below for a 
+@@ -387,6 +387,8 @@ to the detailed description below for a 
       --password-file=FILE    read password from FILE
       --list-only             list the files instead of copying them
       --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
@@ -141,7 +142,7 @@ Do we need configure support for mktime()?
       --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
-@@ -1406,6 +1408,19 @@ transfer was too fast, it will wait befo
+@@ -1534,6 +1536,19 @@ transfer was too fast, it will wait befo
  result is an average transfer rate equaling the specified limit. A value
  of zero specifies no limit.
  
@@ -161,7 +162,7 @@ Do we need configure support for mktime()?
  dit(bf(--write-batch=FILE)) Record a file that can later be applied to
  another identical destination with bf(--read-batch). See the "BATCH MODE"
  section for details, and also the bf(--only-write-batch) option.
---- orig/util.c        2006-01-20 00:12:48
+--- orig/util.c        2006-01-30 07:18:28
 +++ util.c     2004-07-03 20:23:22
 @@ -128,6 +128,132 @@ void overflow_exit(char *str)
        exit_cleanup(RERR_MALLOC);
index 9582f79..fc5cf1b 100644 (file)
@@ -28,7 +28,7 @@ After applying this patch, run these commands for a successful build:
  popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
 --- orig/backup.c      2004-10-06 00:13:09
 +++ backup.c   2005-03-03 01:20:46
-@@ -135,6 +135,7 @@ static int make_bak_dir(char *fullpath)
+@@ -136,6 +136,7 @@ static int make_bak_dir(char *fullpath)
                                do_lchown(fullpath, st.st_uid, st.st_gid);
                                do_chmod(fullpath, st.st_mode);
                                (void)DUP_ACL(end, fullpath, st.st_mode);
@@ -36,17 +36,17 @@ After applying this patch, run these commands for a successful build:
                        }
                }
                *p = '/';
-@@ -188,6 +189,7 @@ static int keep_backup(char *fname)
+@@ -190,6 +191,7 @@ static int keep_backup(char *fname)
                return 0;
  
        PUSH_KEEP_BACKUP_ACL(file, fname, buf);
 +      PUSH_KEEP_BACKUP_XATTR(file, fname, buf);
  
        /* Check to see if this is a device file, or link */
-       if (IS_DEVICE(file->mode) && am_root && preserve_devices) {
-@@ -264,6 +266,7 @@ static int keep_backup(char *fname)
+       if ((am_root && preserve_devices && IS_DEVICE(file->mode))
+@@ -267,6 +269,7 @@ static int keep_backup(char *fname)
        }
-       set_perms(buf, file, NULL, 0);
+       set_file_attrs(buf, file, NULL, 0);
        CLEANUP_KEEP_BACKUP_ACL();
 +      CLEANUP_KEEP_BACKUP_XATTR();
        free(file);
@@ -85,9 +85,9 @@ After applying this patch, run these commands for a successful build:
  AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
  AC_OUTPUT
  
---- orig/flist.c       2006-01-21 08:04:42
+--- orig/flist.c       2006-01-31 02:37:33
 +++ flist.c    2005-10-16 23:03:04
-@@ -972,6 +972,8 @@ static struct file_struct *send_file_nam
+@@ -969,6 +969,8 @@ static struct file_struct *send_file_nam
                return NULL;
        if (MAKE_ACL(file, fname) < 0)
                return NULL;
@@ -96,7 +96,7 @@ After applying this patch, run these commands for a successful build:
  
        if (chmod_modes && !S_ISLNK(file->mode))
                file->mode = tweak_mode(file->mode, chmod_modes);
-@@ -984,9 +986,11 @@ static struct file_struct *send_file_nam
+@@ -981,9 +983,11 @@ static struct file_struct *send_file_nam
                flist->files[flist->count++] = file;
                send_file_entry(file, f);
                SEND_ACL(file, f);
@@ -108,7 +108,7 @@ After applying this patch, run these commands for a successful build:
        }
        return file;
  }
-@@ -1378,6 +1382,7 @@ struct file_list *recv_file_list(int f)
+@@ -1373,6 +1377,7 @@ struct file_list *recv_file_list(int f)
                file = receive_file_entry(flist, flags, f);
  
                RECEIVE_ACL(file, f);
@@ -116,17 +116,17 @@ After applying this patch, run these commands for a successful build:
  
                if (S_ISREG(file->mode))
                        stats.total_size += file->length;
-@@ -1402,6 +1407,7 @@ struct file_list *recv_file_list(int f)
+@@ -1397,6 +1402,7 @@ struct file_list *recv_file_list(int f)
        clean_flist(flist, relative_paths, 1);
  
        SORT_FILE_ACL_INDEX_LISTS();
 +      SORT_FILE_XATTR_INDEX_LISTS();
  
        if (f >= 0) {
-               /* Now send the uid/gid list. This was introduced in
---- orig/generator.c   2006-01-14 08:17:25
+               recv_uid_list(f, flist);
+--- orig/generator.c   2006-01-31 02:35:44
 +++ generator.c        2005-05-12 23:21:08
-@@ -897,6 +897,10 @@ static void recv_generator(char *fname, 
+@@ -899,6 +899,10 @@ static void recv_generator(char *fname, 
                if (f_out == -1)
                        SET_ACL(fname, file);
  #endif
@@ -193,17 +193,17 @@ After applying this patch, run these commands for a successful build:
 +#else
 +
 +#endif /* No xattrs */
---- orig/options.c     2005-08-27 21:15:29
-+++ options.c  2005-08-27 21:29:40
+--- orig/options.c     2006-01-31 03:11:18
++++ options.c  2006-01-31 03:16:24
 @@ -45,6 +45,7 @@ int copy_links = 0;
  int preserve_links = 0;
  int preserve_hard_links = 0;
  int preserve_acls = 0;
 +int preserve_xattrs = 0;
  int preserve_perms = 0;
+ int preserve_executability = 0;
  int preserve_devices = 0;
- int preserve_uid = 0;
-@@ -191,6 +192,7 @@ static void print_rsync_version(enum log
+@@ -195,6 +196,7 @@ static void print_rsync_version(enum log
        char const *have_inplace = "no ";
        char const *hardlinks = "no ";
        char const *acls = "no ";
@@ -211,7 +211,7 @@ After applying this patch, run these commands for a successful build:
        char const *links = "no ";
        char const *ipv6 = "no ";
        STRUCT_STAT *dumstat;
-@@ -210,7 +212,9 @@ static void print_rsync_version(enum log
+@@ -214,7 +216,9 @@ static void print_rsync_version(enum log
  #ifdef SUPPORT_ACLS
        acls = "";
  #endif
@@ -222,7 +222,7 @@ After applying this patch, run these commands for a successful build:
  #ifdef SUPPORT_LINKS
        links = "";
  #endif
-@@ -224,9 +228,9 @@ static void print_rsync_version(enum log
+@@ -228,9 +232,9 @@ static void print_rsync_version(enum log
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
        rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@ -234,15 +234,15 @@ After applying this patch, run these commands for a successful build:
  
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
-@@ -295,6 +299,7 @@ void usage(enum logcode F)
-   rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
+@@ -300,6 +304,7 @@ void usage(enum logcode F)
    rprintf(F," -p, --perms                 preserve permissions\n");
+   rprintf(F," -E, --executability         preserve the file's executability\n");
    rprintf(F," -A, --acls                  preserve ACLs (implies --perms)\n");
 +  rprintf(F," -X, --xattrs                preserve extended attributes (implies --perms)\n");
-   rprintf(F," -o, --owner                 preserve owner (root only)\n");
+   rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
+   rprintf(F," -o, --owner                 preserve owner (super-user only)\n");
    rprintf(F," -g, --group                 preserve group\n");
-   rprintf(F," -D, --devices               preserve devices (root only)\n");
-@@ -407,6 +412,9 @@ static struct poptOption long_options[] 
+@@ -419,6 +424,9 @@ static struct poptOption long_options[] 
    {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },
    {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
    {"no-A",             0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
@@ -252,7 +252,7 @@ After applying this patch, run these commands for a successful build:
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1054,6 +1062,17 @@ int parse_arguments(int *argc, const cha
+@@ -1084,6 +1092,17 @@ int parse_arguments(int *argc, const cha
                        return 0;
  #endif /* SUPPORT_ACLS */
  
@@ -270,7 +270,7 @@ After applying this patch, run these commands for a successful build:
  
                default:
                        /* A large opt value means that set_refuse_options()
-@@ -1490,6 +1509,8 @@ void server_options(char **args,int *arg
+@@ -1527,6 +1546,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'H';
        if (preserve_acls)
                argstr[x++] = 'A';
@@ -279,9 +279,9 @@ After applying this patch, run these commands for a successful build:
        if (preserve_uid)
                argstr[x++] = 'o';
        if (preserve_gid)
---- orig/rsync.c       2004-07-03 20:11:58
+--- orig/rsync.c       2006-01-31 02:33:51
 +++ rsync.c    2005-10-16 23:19:27
-@@ -139,12 +139,15 @@ int set_perms(char *fname,struct file_st
+@@ -163,12 +163,15 @@ int set_file_attrs(char *fname, struct f
        }
  #endif
  
@@ -299,10 +299,10 @@ After applying this patch, run these commands for a successful build:
 +                      updated = 1;
        }
  
-       if (verbose > 1 && flags & PERMS_REPORT) {
---- orig/rsync.h       2005-07-29 02:25:55
+       if (verbose > 1 && flags & ATTRS_REPORT) {
+--- orig/rsync.h       2006-01-23 21:24:53
 +++ rsync.h    2005-10-16 23:19:44
-@@ -685,6 +685,38 @@ struct stats {
+@@ -688,6 +688,38 @@ struct chmod_mode_struct;
  #endif /* SUPPORT_ACLS */
  #include "smb_acls.h"
  
@@ -341,28 +341,28 @@ After applying this patch, run these commands for a successful build:
  #include "proto.h"
  
  /* We have replacement versions of these if they're missing. */
---- orig/rsync.yo      2004-07-03 20:11:58
-+++ rsync.yo   2005-03-03 01:33:53
-@@ -317,6 +317,7 @@ to the detailed description below for a 
-  -K, --keep-dirlinks         treat symlinked dir on receiver as dir
+--- orig/rsync.yo      2006-01-31 03:14:05
++++ rsync.yo   2006-01-31 03:16:46
+@@ -318,6 +318,7 @@ to the detailed description below for a 
   -p, --perms                 preserve permissions
-  -A, --acls                  preserve ACLs (implies -p) [local option]
-+ -X, --xattrs                preserve extended attributes (implies -p) [local option]
-  -o, --owner                 preserve owner (root only)
+  -E, --executability         preserve executability
+  -A, --acls                  preserve ACLs (implies -p) [non-standard]
++ -X, --xattrs                preserve extended attrs (implies -p) [n.s.]
+      --chmod=CHMOD           change destination permissions
+  -o, --owner                 preserve owner (super-user only)
   -g, --group                 preserve group
-  -D, --devices               preserve devices (root only)
-@@ -687,6 +688,11 @@ ACLs to be the same as the local ACLs.  
- remote machine's rsync supports this option also. This is a non-standard
- option.
+@@ -727,6 +728,11 @@ dit(bf(-A, --acls)) This option causes r
+ ACLs to be the same as the source ACLs.  This nonstandard option only
+ works if the remote rsync also supports it.  bf(--acls) implies bf(--perms).
  
 +dit(bf(-X, --xattrs)) This option causes rsync to update the remote
 +extended attributes to be the same as the local ones.  This will work
 +only if the remote machine's rsync supports this option also. This is
 +a non-standard option.
 +
- dit(bf(-o, --owner)) This option causes rsync to set the owner of the
- destination file to be the same as the source file.  On most systems,
- only the super-user can set file ownership.  By default, the preservation
+ dit(bf(--chmod)) This option tells rsync to apply one or more
+ comma-separated "chmod" strings to the permission of the files in the
+ transfer.  The resulting value is treated as though it was the permissions
 --- orig/xattr.c       2005-10-16 23:25:12
 +++ xattr.c    2005-10-16 23:25:12
 @@ -0,0 +1,540 @@