Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Tue, 6 Nov 2007 15:39:11 +0000 (15:39 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 6 Nov 2007 15:39:11 +0000 (15:39 +0000)
atimes.diff
detect-renamed.diff
flags.diff
link-by-hash.diff
slow-down.diff
usermap.diff

index 29a54be..9e811d9 100644 (file)
@@ -21,12 +21,12 @@ TODO:  need to fix this to handle 64-bit time_t values!
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
--int uid_ndx, gid_ndx, acls_ndx, xattrs_ndx;
-+int uid_ndx, gid_ndx, atimes_ndx, acls_ndx, xattrs_ndx;
- #ifdef ICONV_OPTION
- int ic_ndx;
+-int uid_ndx, gid_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
++int uid_ndx, gid_ndx, atimes_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
  
-@@ -125,6 +126,8 @@ void setup_protocol(int f_out,int f_in)
+ #ifdef ICONV_OPTION
+ int filesfrom_convert = 0;
+@@ -124,6 +125,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -45,7 +45,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -334,6 +335,7 @@ int push_pathname(const char *dir, int l
+@@ -338,6 +339,7 @@ int push_pathname(const char *dir, int l
  static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ndx)
  {
        static time_t modtime;
@@ -53,7 +53,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        static mode_t mode;
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
-@@ -440,6 +442,13 @@ static void send_file_entry(int f, struc
+@@ -444,6 +446,13 @@ static void send_file_entry(int f, struc
                xflags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -67,7 +67,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -513,6 +522,8 @@ static void send_file_entry(int f, struc
+@@ -517,6 +526,8 @@ static void send_file_entry(int f, struc
        }
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -76,7 +76,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -599,7 +610,7 @@ static void send_file_entry(int f, struc
+@@ -603,7 +614,7 @@ static void send_file_entry(int f, struc
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
@@ -85,7 +85,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        static mode_t mode;
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
-@@ -732,6 +743,16 @@ static struct file_struct *recv_file_ent
+@@ -736,6 +747,16 @@ static struct file_struct *recv_file_ent
        }
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -102,21 +102,21 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -860,6 +881,8 @@ static struct file_struct *recv_file_ent
+@@ -864,6 +885,8 @@ static struct file_struct *recv_file_ent
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
 +      if (atimes_ndx)
-+              F_ATIME(file) = (time_t)atime;
- #ifdef ICONV_OPTION
-       if (ic_ndx)
++              F_ATIME(file) = (uint32)atime;
+       if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
 @@ -1186,6 +1209,8 @@ struct file_struct *make_file(const char
                F_OWNER(file) = st.st_uid;
        if (gid_ndx)
                F_GROUP(file) = st.st_gid;
 +      if (atimes_ndx)
-+              F_ATIME(file) = st.st_atime;
++              F_ATIME(file) = (uint32)st.st_atime;
  
        if (basename != thisname)
                file->dirname = lastdir;
@@ -130,7 +130,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int uid_ndx;
  extern int gid_ndx;
  extern int delete_mode;
-@@ -562,6 +563,9 @@ void itemize(const char *fnamecmp, struc
+@@ -568,6 +569,9 @@ void itemize(const char *fnamecmp, struc
                  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                 || (keep_time && cmp_time(file->modtime, sxp->st.st_mtime) != 0))
                        iflags |= ITEM_REPORT_TIME;
@@ -140,7 +140,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -884,6 +888,8 @@ static int try_dests_reg(struct file_str
+@@ -923,6 +927,8 @@ static int try_dests_reg(struct file_str
                if (link_dest) {
                        if (!hard_link_one(file, fname, cmpbuf, 1))
                                goto try_a_copy;
@@ -149,7 +149,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
                        if (preserve_hard_links && F_IS_HLINKED(file))
                                finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
                        if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1080,6 +1086,7 @@ static int try_dests_non(struct file_str
+@@ -1113,6 +1119,7 @@ static int try_dests_non(struct file_str
  static void list_file_entry(struct file_struct *f)
  {
        char permbuf[PERMSTRING_SIZE];
@@ -157,7 +157,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        double len;
  
        if (!F_IS_ACTIVE(f)) {
-@@ -1094,14 +1101,16 @@ static void list_file_entry(struct file_
+@@ -1127,14 +1134,16 @@ static void list_file_entry(struct file_
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -176,7 +176,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
                        f_name(f, NULL));
        }
  }
-@@ -1851,7 +1860,7 @@ static void touch_up_dirs(struct file_li
+@@ -1884,7 +1893,7 @@ static void touch_up_dirs(struct file_li
                if (!(file->mode & S_IWUSR))
                        do_chmod(fname, file->mode);
                if (need_retouch_dir_times)
@@ -244,7 +244,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int preserve_times;
  extern int am_root;
  extern int am_server;
-@@ -340,6 +341,7 @@ int set_file_attrs(const char *fname, st
+@@ -343,6 +344,7 @@ int set_file_attrs(const char *fname, st
        int updated = 0;
        stat_x sx2;
        int change_uid, change_gid;
@@ -252,7 +252,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        mode_t new_mode = file->mode;
        int inherit;
  
-@@ -380,18 +382,36 @@ int set_file_attrs(const char *fname, st
+@@ -383,18 +385,36 @@ int set_file_attrs(const char *fname, st
                set_stat_xattr(fname, file);
  #endif
  
@@ -310,7 +310,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -602,6 +604,7 @@ extern int file_extra_cnt;
+@@ -608,6 +610,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -318,14 +318,14 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -639,6 +642,7 @@ extern int xattrs_ndx;
+@@ -645,6 +648,7 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
 +#define F_ATIME(f) REQ_EXTRA(f, atimes_ndx)->unum
  #define F_ACL(f) REQ_EXTRA(f, acls_ndx)->num
  #define F_XATTR(f) REQ_EXTRA(f, xattrs_ndx)->num
- #define F_NDX(f) REQ_EXTRA(f, ic_ndx)->num
+ #define F_NDX(f) REQ_EXTRA(f, unsort_ndx)->num
 --- old/rsync.yo
 +++ new/rsync.yo
 @@ -349,6 +349,7 @@ to the detailed description below for a 
@@ -336,7 +336,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -965,6 +966,12 @@ it is preserving modification times (see
+@@ -973,6 +974,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).
  
@@ -349,7 +349,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  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
-@@ -1646,8 +1653,10 @@ quote(itemization(
+@@ -1654,8 +1661,10 @@ quote(itemization(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
@@ -551,7 +551,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
                t[1].tv_usec = 0;
 @@ -154,12 +158,12 @@ int set_modtime(const char *fname, time_
                return utimes(fname, t);
- #elif defined HAVE_UTIMBUF
+ #elif defined HAVE_STRUCT_UTIMBUF
                struct utimbuf tbuf;
 -              tbuf.actime = time(NULL);
 +              tbuf.actime = atime;
index 4f927d9..706ccd9 100644 (file)
@@ -42,7 +42,7 @@ TODO:
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
-@@ -108,6 +109,7 @@ void set_allow_inc_recurse(void)
+@@ -107,6 +108,7 @@ void set_allow_inc_recurse(void)
                allow_inc_recurse = 0;
        else if (!am_sender
         && (delete_before || delete_after
@@ -59,8 +59,8 @@ TODO:
 +extern int detect_renamed;
  extern int protocol_version;
  extern int sanitize_paths;
- extern struct stats stats;
-@@ -113,6 +114,8 @@ static int64 tmp_dev, tmp_ino;
+ extern int need_unsorted_flist;
+@@ -117,6 +118,8 @@ static int64 tmp_dev, tmp_ino;
  #endif
  static char tmp_sum[MAX_DIGEST_LEN];
  
@@ -69,7 +69,7 @@ TODO:
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int dir_count = 0;
-@@ -252,6 +255,45 @@ static int is_excluded(char *fname, int 
+@@ -256,6 +259,45 @@ static int is_excluded(char *fname, int 
        return 0;
  }
  
@@ -115,7 +115,7 @@ TODO:
  static void send_directory(int f, struct file_list *flist,
                           char *fbuf, int len, int flags);
  
-@@ -2154,6 +2196,25 @@ struct file_list *recv_file_list(int f)
+@@ -2169,6 +2211,25 @@ struct file_list *recv_file_list(int f)
  
        clean_flist(flist, relative_paths);
  
@@ -151,15 +151,15 @@ TODO:
  extern int whole_file;
  extern int list_only;
  extern int read_batch;
-@@ -95,6 +96,7 @@ extern char *backup_suffix;
+@@ -96,6 +97,7 @@ extern char *backup_suffix;
  extern int backup_suffix_len;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct filter_list_struct server_filter_list;
 +extern struct file_list the_fattr_list;
- #ifdef ICONV_OPTION
extern int ic_ndx;
- #endif
-@@ -105,6 +107,7 @@ int maybe_ATTRS_REPORT = 0;
int ignore_perishable = 0;
+ int non_perishable_cnt = 0;
+@@ -103,6 +105,7 @@ int maybe_ATTRS_REPORT = 0;
  
  static dev_t dev_zero;
  static int deletion_count = 0; /* used to implement --max-delete */
@@ -167,7 +167,7 @@ TODO:
  static int deldelay_size = 0, deldelay_cnt = 0;
  static char *deldelay_buf = NULL;
  static int deldelay_fd = -1;
-@@ -114,7 +117,8 @@ static int need_retouch_dir_times;
+@@ -112,7 +115,8 @@ static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
@@ -177,7 +177,7 @@ TODO:
  #define DEL_RECURSE           (1<<1) /* recurse */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
  
-@@ -136,11 +140,121 @@ static int is_backup_file(char *fn)
+@@ -134,11 +138,121 @@ static int is_backup_file(char *fn)
        return k > 0 && strcmp(fn+k, backup_suffix) == 0;
  }
  
@@ -299,7 +299,7 @@ TODO:
   */
  static enum delret delete_item(char *fbuf, int mode, char *replace, int flags)
  {
-@@ -162,6 +276,8 @@ static enum delret delete_item(char *fbu
+@@ -160,6 +274,8 @@ static enum delret delete_item(char *fbu
                        goto check_ret;
                /* OK: try to delete the directory. */
        }
@@ -308,7 +308,7 @@ TODO:
  
        if (!replace && max_delete >= 0 && ++deletion_count > max_delete)
                return DR_AT_LIMIT;
-@@ -208,6 +324,8 @@ static enum delret delete_item(char *fbu
+@@ -206,6 +322,8 @@ static enum delret delete_item(char *fbu
   * its contents, otherwise just checks for content.  Returns DR_SUCCESS or
   * DR_NOT_EMPTY.  Note that fname must point to a MAXPATHLEN buffer!  (The
   * buffer is used for recursion, but returned unchanged.)
@@ -317,7 +317,7 @@ TODO:
   */
  static enum delret delete_dir_contents(char *fname, int flags)
  {
-@@ -227,7 +345,9 @@ static enum delret delete_dir_contents(c
+@@ -225,7 +343,9 @@ static enum delret delete_dir_contents(c
        save_filters = push_local_filters(fname, dlen);
  
        non_perishable_cnt = 0;
@@ -327,7 +327,7 @@ TODO:
        ret = non_perishable_cnt ? DR_NOT_EMPTY : DR_SUCCESS;
  
        if (!dirlist->used)
-@@ -264,6 +384,8 @@ static enum delret delete_dir_contents(c
+@@ -262,6 +382,8 @@ static enum delret delete_dir_contents(c
                if (S_ISDIR(fp->mode)
                 && delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
                        ret = DR_NOT_EMPTY;
@@ -336,7 +336,7 @@ TODO:
                if (delete_item(fname, fp->mode, NULL, flags) != DR_SUCCESS)
                        ret = DR_NOT_EMPTY;
        }
-@@ -416,13 +538,18 @@ static void do_delayed_deletions(char *d
+@@ -414,13 +536,18 @@ static void do_delayed_deletions(char *d
   * all the --delete-WHEN options.  Note that the fbuf pointer must point to a
   * MAXPATHLEN buffer with the name of the directory in it (the functions we
   * call will append names onto the end, but the old dir value will be restored
@@ -359,7 +359,7 @@ TODO:
  
        if (!fbuf) {
                change_local_filter_dir(NULL, 0, 0);
-@@ -432,21 +559,28 @@ static void delete_in_dir(char *fbuf, st
+@@ -430,21 +557,28 @@ static void delete_in_dir(char *fbuf, st
        if (verbose > 2)
                rprintf(FINFO, "delete_in_dir(%s)\n", fbuf);
  
@@ -393,7 +393,7 @@ TODO:
        if (one_file_system) {
                if (file->flags & FLAG_TOP_DIR)
                        filesystem_dev = *fs_dev;
-@@ -456,6 +590,14 @@ static void delete_in_dir(char *fbuf, st
+@@ -454,6 +588,14 @@ static void delete_in_dir(char *fbuf, st
  
        dirlist = get_dirlist(fbuf, dlen, 0);
  
@@ -408,7 +408,7 @@ TODO:
        /* If an item in dirlist is not found in flist, delete it
         * from the filesystem. */
        for (i = dirlist->used; i--; ) {
-@@ -468,16 +610,25 @@ static void delete_in_dir(char *fbuf, st
+@@ -466,16 +608,25 @@ static void delete_in_dir(char *fbuf, st
                                        f_name(fp, NULL));
                        continue;
                }
@@ -437,7 +437,7 @@ TODO:
        flist_free(dirlist);
  }
  
-@@ -507,9 +658,9 @@ static void do_delete_pass(void)
+@@ -505,9 +656,9 @@ static void do_delete_pass(void)
                 || !S_ISDIR(st.st_mode))
                        continue;
  
@@ -449,7 +449,7 @@ TODO:
  
        if (do_progress && !am_server)
                rprintf(FINFO, "                    \r");
-@@ -1106,6 +1257,7 @@ static void list_file_entry(struct file_
+@@ -1139,6 +1290,7 @@ static void list_file_entry(struct file_
        }
  }
  
@@ -457,7 +457,7 @@ TODO:
  static int phase = 0;
  static int dflt_perms;
  
-@@ -1350,8 +1502,12 @@ static void recv_generator(char *fname, 
+@@ -1383,8 +1535,12 @@ static void recv_generator(char *fname, 
                        }
                }
                else if (delete_during && f_out != -1 && !phase && dry_run < 2
@@ -472,7 +472,7 @@ TODO:
                goto cleanup;
        }
  
-@@ -1629,8 +1785,14 @@ static void recv_generator(char *fname, 
+@@ -1662,8 +1818,14 @@ static void recv_generator(char *fname, 
                        goto cleanup;
                }
  #endif
@@ -488,7 +488,7 @@ TODO:
                rsyserr(FERROR, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                goto cleanup;
-@@ -1966,6 +2128,12 @@ void generate_files(int f_out, const cha
+@@ -2000,6 +2162,12 @@ void generate_files(int f_out, const cha
        if (verbose > 2)
                rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
  
@@ -501,7 +501,7 @@ TODO:
        if (delete_before && !solo_file && cur_flist->used > 0)
                do_delete_pass();
        if (delete_during == 2) {
-@@ -1976,7 +2144,7 @@ void generate_files(int f_out, const cha
+@@ -2010,7 +2178,7 @@ void generate_files(int f_out, const cha
        }
        do_progress = 0;
  
@@ -510,7 +510,7 @@ TODO:
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -2014,7 +2182,7 @@ void generate_files(int f_out, const cha
+@@ -2048,7 +2216,7 @@ void generate_files(int f_out, const cha
                                                dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                        } else
                                                dirdev = MAKEDEV(0, 0);
@@ -519,7 +519,7 @@ TODO:
                                }
                        }
                }
-@@ -2059,7 +2227,21 @@ void generate_files(int f_out, const cha
+@@ -2091,7 +2259,21 @@ void generate_files(int f_out, const cha
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -604,7 +604,7 @@ TODO:
       --compare-dest=DIR      also compare received files relative to DIR
       --copy-dest=DIR         ... and include copies of unchanged files
       --link-dest=DIR         hardlink to files in DIR when unchanged
-@@ -1430,6 +1431,21 @@ Note that the use of the bf(--delete) op
+@@ -1438,6 +1439,21 @@ Note that the use of the bf(--delete) op
  fuzzy-match files, so either use bf(--delete-after) or specify some
  filename exclusions if you need to prevent this.
  
@@ -628,7 +628,7 @@ TODO:
  files against doing transfers (if the files are missing in the destination
 --- old/util.c
 +++ new/util.c
-@@ -1030,6 +1030,32 @@ int handle_partial_dir(const char *fname
+@@ -1042,6 +1042,32 @@ int handle_partial_dir(const char *fname
        return 1;
  }
  
index e60248c..6bfabb1 100644 (file)
@@ -22,12 +22,12 @@ To use this patch, run these commands for a successful build:
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
--int uid_ndx, gid_ndx, acls_ndx, xattrs_ndx;
-+int uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx;
- #ifdef ICONV_OPTION
- int ic_ndx;
+-int uid_ndx, gid_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
++int uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
  
-@@ -125,6 +126,8 @@ void setup_protocol(int f_out,int f_in)
+ #ifdef ICONV_OPTION
+ int filesfrom_convert = 0;
+@@ -124,6 +125,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -38,7 +38,7 @@ To use this patch, run these commands for a successful build:
        if (preserve_xattrs)
 --- old/configure.in
 +++ new/configure.in
-@@ -557,7 +557,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
+@@ -544,7 +544,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
      memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
      strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
      setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
@@ -57,7 +57,7 @@ To use this patch, run these commands for a successful build:
  extern int uid_ndx;
  extern int gid_ndx;
  extern int eol_nulls;
-@@ -335,6 +336,9 @@ static void send_file_entry(int f, struc
+@@ -339,6 +340,9 @@ static void send_file_entry(int f, struc
  {
        static time_t modtime;
        static mode_t mode;
@@ -67,7 +67,7 @@ To use this patch, run these commands for a successful build:
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -393,6 +397,12 @@ static void send_file_entry(int f, struc
+@@ -397,6 +401,12 @@ static void send_file_entry(int f, struc
                xflags |= XMIT_SAME_MODE;
        else
                mode = file->mode;
@@ -80,7 +80,7 @@ To use this patch, run these commands for a successful build:
  
        if ((preserve_devices && IS_DEVICE(mode))
         || (preserve_specials && IS_SPECIAL(mode))) {
-@@ -513,6 +523,10 @@ static void send_file_entry(int f, struc
+@@ -517,6 +527,10 @@ static void send_file_entry(int f, struc
        }
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -91,7 +91,7 @@ To use this patch, run these commands for a successful build:
        if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -601,6 +615,9 @@ static struct file_struct *recv_file_ent
+@@ -605,6 +619,9 @@ static struct file_struct *recv_file_ent
  {
        static int64 modtime;
        static mode_t mode;
@@ -101,7 +101,7 @@ To use this patch, run these commands for a successful build:
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -732,9 +749,12 @@ static struct file_struct *recv_file_ent
+@@ -736,9 +753,12 @@ static struct file_struct *recv_file_ent
        }
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -115,7 +115,7 @@ To use this patch, run these commands for a successful build:
  
        if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -854,6 +874,10 @@ static struct file_struct *recv_file_ent
+@@ -858,6 +878,10 @@ static struct file_struct *recv_file_ent
                OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
        }
        file->mode = mode;
@@ -139,7 +139,7 @@ To use this patch, run these commands for a successful build:
        if (gid_ndx)
 --- old/generator.c
 +++ new/generator.c
-@@ -114,6 +114,14 @@ static int need_retouch_dir_times;
+@@ -112,6 +112,14 @@ static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
@@ -154,7 +154,7 @@ To use this patch, run these commands for a successful build:
  /* For calling delete_item() and delete_dir_contents(). */
  #define DEL_RECURSE           (1<<1) /* recurse */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -129,7 +137,6 @@ enum delret {
+@@ -127,7 +135,6 @@ enum delret {
  /* Forward declaration for delete_item(). */
  static enum delret delete_dir_contents(char *fname, int flags);
  
@@ -162,7 +162,7 @@ To use this patch, run these commands for a successful build:
  static int is_backup_file(char *fn)
  {
        int k = strlen(fn) - backup_suffix_len;
-@@ -142,17 +149,20 @@ static int is_backup_file(char *fn)
+@@ -140,17 +147,20 @@ static int is_backup_file(char *fn)
   * Note that fbuf must point to a MAXPATHLEN buffer if the mode indicates it's
   * a directory! (The buffer is used for recursion, but returned unchanged.)
   */
@@ -186,7 +186,7 @@ To use this patch, run these commands for a successful build:
        if (S_ISDIR(mode) && !(flags & DEL_DIR_IS_EMPTY)) {
                ignore_perishable = 1;
                /* If DEL_RECURSE is not set, this just reports emptiness. */
-@@ -264,7 +274,7 @@ static enum delret delete_dir_contents(c
+@@ -262,7 +272,7 @@ static enum delret delete_dir_contents(c
                if (S_ISDIR(fp->mode)
                 && delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
                        ret = DR_NOT_EMPTY;
@@ -195,8 +195,8 @@ To use this patch, run these commands for a successful build:
                        ret = DR_NOT_EMPTY;
        }
  
-@@ -320,8 +330,9 @@ static int remember_delete(struct file_s
-       
+@@ -318,8 +328,9 @@ static int remember_delete(struct file_s
        while (1) {
                len = snprintf(deldelay_buf + deldelay_cnt,
 -                             deldelay_size - deldelay_cnt,
@@ -207,7 +207,7 @@ To use this patch, run these commands for a successful build:
                if ((deldelay_cnt += len) <= deldelay_size)
                        break;
                if (deldelay_fd < 0 && !start_delete_delay_temp())
-@@ -334,7 +345,7 @@ static int remember_delete(struct file_s
+@@ -332,7 +343,7 @@ static int remember_delete(struct file_s
        return 1;
  }
  
@@ -216,7 +216,7 @@ To use this patch, run these commands for a successful build:
  {
        static int read_pos = 0;
        int j, len, mode;
-@@ -376,12 +387,12 @@ static int read_delay_line(char *buf)
+@@ -374,12 +385,12 @@ static int read_delay_line(char *buf)
  
        bp = deldelay_buf + read_pos;
  
@@ -231,7 +231,7 @@ To use this patch, run these commands for a successful build:
        len = j - read_pos - (past_space - bp) + 1; /* count the '\0' */
        read_pos = j + 1;
  
-@@ -399,15 +410,15 @@ static int read_delay_line(char *buf)
+@@ -397,15 +408,15 @@ static int read_delay_line(char *buf)
  
  static void do_delayed_deletions(char *delbuf)
  {
@@ -250,7 +250,7 @@ To use this patch, run these commands for a successful build:
        if (deldelay_fd >= 0)
                close(deldelay_fd);
  }
-@@ -474,7 +485,7 @@ static void delete_in_dir(char *fbuf, st
+@@ -472,7 +483,7 @@ static void delete_in_dir(char *fbuf, st
                                if (!remember_delete(fp, delbuf))
                                        break;
                        } else
@@ -259,7 +259,7 @@ To use this patch, run these commands for a successful build:
                }
        }
  
-@@ -1263,7 +1274,7 @@ static void recv_generator(char *fname, 
+@@ -1296,7 +1307,7 @@ static void recv_generator(char *fname, 
                         * full later (right before we handle its contents). */
                        if (statret == 0
                         && (S_ISDIR(sx.st.st_mode)
@@ -268,7 +268,7 @@ To use this patch, run these commands for a successful build:
                                goto cleanup; /* Any errors get reported later. */
                        if (do_mkdir(fname, file->mode & 0700) == 0)
                                file->flags |= FLAG_DIR_CREATED;
-@@ -1275,7 +1286,7 @@ static void recv_generator(char *fname, 
+@@ -1308,7 +1319,7 @@ static void recv_generator(char *fname, 
                 * we need to delete it.  If it doesn't exist, then
                 * (perhaps recursively) create it. */
                if (statret == 0 && !S_ISDIR(sx.st.st_mode)) {
@@ -277,7 +277,7 @@ To use this patch, run these commands for a successful build:
                                goto skipping_dir_contents;
                        statret = -1;
                }
-@@ -1404,7 +1415,7 @@ static void recv_generator(char *fname, 
+@@ -1437,7 +1448,7 @@ static void recv_generator(char *fname, 
                        }
                        /* Not the right symlink (or not a symlink), so
                         * delete it. */
@@ -286,7 +286,7 @@ To use this patch, run these commands for a successful build:
                                goto cleanup;
                } else if (basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1483,7 +1494,7 @@ static void recv_generator(char *fname, 
+@@ -1516,7 +1527,7 @@ static void recv_generator(char *fname, 
                                        goto return_with_success;
                                goto cleanup;
                        }
@@ -295,7 +295,7 @@ To use this patch, run these commands for a successful build:
                                goto cleanup;
                } else if (basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1574,7 +1585,7 @@ static void recv_generator(char *fname, 
+@@ -1607,7 +1618,7 @@ static void recv_generator(char *fname, 
        fnamecmp_type = FNAMECMP_FNAME;
  
        if (statret == 0 && !S_ISREG(sx.st.st_mode)) {
@@ -501,7 +501,7 @@ To use this patch, run these commands for a successful build:
  
  /* These flags are used in the live flist data. */
  
-@@ -435,6 +436,10 @@ typedef unsigned int size_t;
+@@ -441,6 +442,10 @@ typedef unsigned int size_t;
  #endif
  #endif
  
@@ -512,7 +512,7 @@ To use this patch, run these commands for a successful build:
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -602,6 +607,7 @@ extern int file_extra_cnt;
+@@ -608,6 +613,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -520,14 +520,14 @@ To use this patch, run these commands for a successful build:
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -639,6 +645,7 @@ extern int xattrs_ndx;
+@@ -645,6 +651,7 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
 +#define F_FFLAGS(f) REQ_EXTRA(f, fileflags_ndx)->unum
  #define F_ACL(f) REQ_EXTRA(f, acls_ndx)->num
  #define F_XATTR(f) REQ_EXTRA(f, xattrs_ndx)->num
- #define F_NDX(f) REQ_EXTRA(f, ic_ndx)->num
+ #define F_NDX(f) REQ_EXTRA(f, unsort_ndx)->num
 --- old/rsync.yo
 +++ new/rsync.yo
 @@ -338,6 +338,7 @@ to the detailed description below for a 
@@ -549,7 +549,7 @@ To use this patch, run these commands for a successful build:
  
  dit(--no-OPTION) You may turn off one or more implied options by prefixing
  the option name with "no-".  Not all options may be prefixed with a "no-":
-@@ -900,6 +903,13 @@ super-user copies all namespaces except 
+@@ -908,6 +911,13 @@ super-user copies all namespaces except 
  the user.* namespace.  To be able to backup and restore non-user namespaces as
  a normal user, see the bf(--fake-super) option.
  
index ed365c4..9e5ffac 100644 (file)
@@ -25,15 +25,15 @@ To use this patch, run these commands for a successful build:
        popt/popthelp.o popt/poptparse.o
 --- old/flist.c
 +++ new/flist.c
-@@ -65,6 +65,7 @@ extern int protocol_version;
- extern int sanitize_paths;
+@@ -67,6 +67,7 @@ extern int need_unsorted_flist;
+ extern int unsort_ndx;
  extern struct stats stats;
  extern char *filesfrom_host;
 +extern char *link_by_hash_dir;
- #ifdef ICONV_OPTION
- extern char *iconv_opt;
- #endif
-@@ -818,7 +819,7 @@ static struct file_struct *recv_file_ent
+ extern char curr_dir[MAXPATHLEN];
+@@ -815,7 +816,7 @@ static struct file_struct *recv_file_ent
                extra_len += (S_ISDIR(mode) ? 2 : 1) * EXTRA_LEN;
  #endif
  
@@ -495,7 +495,7 @@ To use this patch, run these commands for a successful build:
 +                              mdfour_update(&mdfour_data, (uchar*)map, len);
                }
  
-               if (updating_basis) {
+               if (updating_basis_or_equiv) {
 @@ -299,6 +308,8 @@ static int receive_data(int f_in, char *
        }
  
@@ -514,7 +514,7 @@ To use this patch, run these commands for a successful build:
  }
  
  static void handle_delayed_updates(char *local_name)
-@@ -667,7 +678,7 @@ int recv_files(int f_in, char *local_nam
+@@ -673,7 +684,7 @@ int recv_files(int f_in, char *local_nam
  
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
index 9e4de29..a5083cb 100644 (file)
@@ -16,15 +16,15 @@ To use this patch, run these commands for a successful build:
 
 --- old/flist.c
 +++ new/flist.c
-@@ -63,6 +63,7 @@ extern int copy_links;
- extern int copy_unsafe_links;
- extern int protocol_version;
+@@ -65,6 +65,7 @@ extern int protocol_version;
  extern int sanitize_paths;
+ extern int need_unsorted_flist;
+ extern int unsort_ndx;
 +extern unsigned long sleep_asec;
  extern struct stats stats;
  extern char *filesfrom_host;
  
-@@ -1465,6 +1466,9 @@ static void send_directory(int f, struct
+@@ -1480,6 +1481,9 @@ static void send_directory(int f, struct
                }
  
                send_file_name(f, flist, fbuf, NULL, flags, filter_level);
index 03c233b..515ff48 100644 (file)
@@ -9,16 +9,15 @@ To use this patch, run these commands for a successful build:
 
 --- old/flist.c
 +++ new/flist.c
-@@ -63,6 +63,8 @@ extern int copy_links;
- extern int copy_unsafe_links;
- extern int protocol_version;
- extern int sanitize_paths;
-+extern char *usermap;
-+extern char *groupmap;
+@@ -67,6 +67,7 @@ extern int need_unsorted_flist;
+ extern int unsort_ndx;
  extern struct stats stats;
  extern char *filesfrom_host;
++extern char *usermap, *groupmap;
+ extern char curr_dir[MAXPATHLEN];
  
-@@ -733,7 +735,7 @@ static struct file_struct *recv_file_ent
+@@ -747,7 +748,7 @@ static struct file_struct *recv_file_ent
                        uid = (uid_t)read_varint(f);
                        if (xflags & XMIT_USER_NAME_FOLLOWS)
                                uid = recv_user_name(f, uid);
@@ -27,7 +26,7 @@ To use this patch, run these commands for a successful build:
                                uid = match_uid(uid);
                }
        }
-@@ -745,7 +747,7 @@ static struct file_struct *recv_file_ent
+@@ -759,7 +760,7 @@ static struct file_struct *recv_file_ent
                        gid_flags = 0;
                        if (xflags & XMIT_GROUP_NAME_FOLLOWS)
                                gid = recv_group_name(f, gid, &gid_flags);
@@ -36,7 +35,7 @@ To use this patch, run these commands for a successful build:
                                gid = match_gid(gid, &gid_flags);
                }
        }
-@@ -2045,8 +2047,13 @@ struct file_list *recv_file_list(int f)
+@@ -2076,8 +2077,13 @@ struct file_list *recv_file_list(int f)
        int dstart, flags;
        int64 start_read;
  
@@ -80,8 +79,8 @@ To use this patch, run these commands for a successful build:
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },
    {"no-timeout",       0,  POPT_ARG_VAL,    &io_timeout, 0, 0, 0 },
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1935,6 +1941,18 @@ void server_options(char **args, int *ar
-               args[ac++] = "--no-i-r";
+@@ -1931,6 +1937,18 @@ void server_options(char **args, int *ar
+               args[ac++] = "--use-qsort";
  
        if (am_sender) {
 +              if (usermap) {
@@ -101,7 +100,7 @@ To use this patch, run these commands for a successful build:
  
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -379,6 +379,8 @@ to the detailed description below for a 
+@@ -378,6 +378,8 @@ to the detailed description below for a 
       --delay-updates         put all updated files into place at end
   -m, --prune-empty-dirs      prune empty directory chains from file-list
       --numeric-ids           don't map uid/gid values by user/group name
@@ -110,7 +109,7 @@ To use this patch, run these commands for a successful build:
       --timeout=TIME          set I/O timeout in seconds
   -I, --ignore-times          don't skip files that match size and time
       --size-only             skip files that match in size
-@@ -1553,6 +1555,46 @@ from the source system is used instead. 
+@@ -1566,6 +1568,46 @@ from the source system is used instead. 
  the chroot setting affects rsync's ability to look up the names of the
  users and groups and what you can do about it.