Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Mon, 29 May 2006 23:08:04 +0000 (23:08 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 29 May 2006 23:08:04 +0000 (23:08 +0000)
ODBC-dblog.diff
acls.diff
atimes.diff
source-filter_dest-filter.diff
threaded-receiver.diff

index 15f231c..7d87050 100644 (file)
@@ -1114,7 +1114,7 @@ See the file "instructions" (after applying this patch) for more info.
                        } else {
                                if (remove_sent_files
                                    || (preserve_hard_links
-@@ -416,6 +438,9 @@ int recv_files(int f_in, struct file_lis
+@@ -417,6 +439,9 @@ int recv_files(int f_in, struct file_lis
                if (server_filter_list.head
                    && check_filter(&server_filter_list, fname, 0) < 0) {
                        rprintf(FERROR, "attempt to hack rsync failed.\n");
@@ -1177,10 +1177,10 @@ See the file "instructions" (after applying this patch) for more info.
                                discard_receive_data(f_in, file->length);
                                if (fd1 != -1)
                                        close(fd1);
-@@ -607,12 +650,19 @@ int recv_files(int f_in, struct file_lis
+@@ -605,12 +648,19 @@ int recv_files(int f_in, struct file_lis
+                                      fname, fd2, file->length);
  
-               if (!log_before_transfer)
-                       log_item(file, &initial_stats, iflags, NULL);
+               log_item(log_code, file, &initial_stats, iflags, NULL);
 +#ifdef HAVE_LIBODBC
 +              db_log_transfer(file, &initial_stats, "receive");
 +#endif
@@ -1197,7 +1197,7 @@ See the file "instructions" (after applying this patch) for more info.
                        exit_cleanup(RERR_FILEIO);
                }
  
-@@ -671,6 +721,12 @@ int recv_files(int f_in, struct file_lis
+@@ -669,6 +719,12 @@ int recv_files(int f_in, struct file_lis
                                rprintf(msgtype,
                                        "%s: %s failed verification -- update %s%s.\n",
                                        errstr, fname, keptstr, redostr);
@@ -1212,10 +1212,10 @@ See the file "instructions" (after applying this patch) for more info.
                                SIVAL(numbuf, 0, i);
 --- old/sender.c
 +++ new/sender.c
-@@ -354,6 +354,9 @@ void send_files(struct file_list *flist,
+@@ -353,6 +353,9 @@ void send_files(struct file_list *flist,
+                       end_progress(st.st_size);
  
-               if (!log_before_transfer)
-                       log_item(file, &initial_stats, iflags, NULL);
+               log_item(log_code, file, &initial_stats, iflags, NULL);
 +#ifdef HAVE_LIBODBC
 +              db_log_transfer(file, &initial_stats,"send");
 +#endif
index d8b5419..23d76dc 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1573,9 +1573,9 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
 +                      itemize(file, ndx, 0, sxp, 0, 0, NULL);
 +              }
                if (verbose > 1 && maybe_ATTRS_REPORT) {
-                       code = logfile_format_has_i || dry_run
-                            ? FCLIENT : FINFO;
-@@ -686,8 +706,13 @@ static int try_dests_reg(struct file_str
+                       code = logfile_format_has_i || dry_run ? FNAME : FINFO;
+                       rprintf(code, "%s is uptodate\n", fname);
+@@ -685,8 +705,13 @@ static int try_dests_reg(struct file_str
                        }
                        return -1;
                }
@@ -1591,7 +1591,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                set_file_attrs(fname, file, NULL, 0);
                if (maybe_ATTRS_REPORT
                 && ((!itemizing && verbose && match_level == 2)
-@@ -712,13 +737,18 @@ static int try_dests_non(struct file_str
+@@ -710,13 +735,18 @@ static int try_dests_non(struct file_str
                         enum logcode code)
  {
        char fnamebuf[MAXPATHLEN];
@@ -1613,7 +1613,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                        continue;
                if (S_ISLNK(file->mode)) {
  #ifdef SUPPORT_LINKS
-@@ -731,10 +761,10 @@ static int try_dests_non(struct file_str
+@@ -729,10 +759,10 @@ static int try_dests_non(struct file_str
  #endif
                                continue;
                } else if (IS_SPECIAL(file->mode)) {
@@ -1626,7 +1626,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                continue;
                } else {
                        rprintf(FERROR,
-@@ -765,7 +795,15 @@ static int try_dests_non(struct file_str
+@@ -763,7 +793,15 @@ static int try_dests_non(struct file_str
                        int changes = compare_dest ? 0 : ITEM_LOCAL_CHANGE
                                    + (link_dest ? ITEM_XNAME_FOLLOWS : 0);
                        char *lp = link_dest ? "" : NULL;
@@ -1642,8 +1642,8 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
 +#endif
                }
                if (verbose > 1 && maybe_ATTRS_REPORT) {
-                       code = logfile_format_has_i || dry_run
-@@ -779,6 +817,7 @@ static int try_dests_non(struct file_str
+                       code = logfile_format_has_i || dry_run ? FNAME : FINFO;
+@@ -776,6 +814,7 @@ static int try_dests_non(struct file_str
  }
  
  static int phase = 0;
@@ -1651,7 +1651,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
  /* Acts on the_file_list->file's ndx'th item, whose name is fname.  If a dir,
   * make sure it exists, and has the right permissions/timestamp info.  For
-@@ -800,7 +839,8 @@ static void recv_generator(char *fname, 
+@@ -797,7 +836,8 @@ static void recv_generator(char *fname, 
        static int need_fuzzy_dirlist = 0;
        struct file_struct *fuzzy_file = NULL;
        int fd = -1, f_copy = -1;
@@ -1661,7 +1661,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        struct file_struct *back_file = NULL;
        int statret, real_ret, stat_errno;
        char *fnamecmp, *partialptr, *backupptr = NULL;
-@@ -851,6 +891,9 @@ static void recv_generator(char *fname, 
+@@ -848,6 +888,9 @@ static void recv_generator(char *fname, 
                dry_run--;
                missing_below = -1;
        }
@@ -1671,7 +1671,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        if (dry_run > 1) {
                statret = -1;
                stat_errno = ENOENT;
-@@ -858,7 +901,7 @@ static void recv_generator(char *fname, 
+@@ -855,7 +898,7 @@ static void recv_generator(char *fname, 
                char *dn = file->dirname ? file->dirname : ".";
                if (parent_dirname != dn && strcmp(parent_dirname, dn) != 0) {
                        if (relative_paths && !implied_dirs
@@ -1680,7 +1680,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                         && create_directory_path(fname) < 0) {
                                rsyserr(FERROR, errno,
                                        "recv_generator: mkdir %s failed",
-@@ -870,6 +913,10 @@ static void recv_generator(char *fname, 
+@@ -867,6 +910,10 @@ static void recv_generator(char *fname, 
                        }
                        if (fuzzy_basis)
                                need_fuzzy_dirlist = 1;
@@ -1691,7 +1691,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                }
                parent_dirname = dn;
  
-@@ -878,7 +925,7 @@ static void recv_generator(char *fname, 
+@@ -875,7 +922,7 @@ static void recv_generator(char *fname, 
                        need_fuzzy_dirlist = 0;
                }
  
@@ -1700,7 +1700,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                    keep_dirlinks && S_ISDIR(file->mode));
                stat_errno = errno;
        }
-@@ -896,8 +943,9 @@ static void recv_generator(char *fname, 
+@@ -893,8 +940,9 @@ static void recv_generator(char *fname, 
         * mode based on the local permissions and some heuristics. */
        if (!preserve_perms) {
                int exists = statret == 0
@@ -1712,7 +1712,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        }
  
        if (S_ISDIR(file->mode)) {
-@@ -906,8 +954,8 @@ static void recv_generator(char *fname, 
+@@ -903,8 +951,8 @@ static void recv_generator(char *fname, 
                 * file of that name and it is *not* a directory, then
                 * we need to delete it.  If it doesn't exist, then
                 * (perhaps recursively) create it. */
@@ -1723,7 +1723,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                return;
                        statret = -1;
                }
-@@ -916,7 +964,11 @@ static void recv_generator(char *fname, 
+@@ -913,7 +961,11 @@ static void recv_generator(char *fname, 
                        dry_run++;
                }
                if (itemizing && f_out != -1) {
@@ -1736,7 +1736,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                statret ? ITEM_LOCAL_CHANGE : 0, 0, NULL);
                }
                if (statret != 0 && do_mkdir(fname,file->mode) < 0 && errno != EEXIST) {
-@@ -928,19 +980,19 @@ static void recv_generator(char *fname, 
+@@ -925,19 +977,19 @@ static void recv_generator(char *fname, 
                                        full_fname(fname));
                        }
                }
@@ -1761,7 +1761,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
        if (preserve_links && S_ISLNK(file->mode)) {
  #ifdef SUPPORT_LINKS
-@@ -958,7 +1010,7 @@ static void recv_generator(char *fname, 
+@@ -955,7 +1007,7 @@ static void recv_generator(char *fname, 
                        char lnk[MAXPATHLEN];
                        int len;
  
@@ -1770,7 +1770,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                            && (len = readlink(fname, lnk, MAXPATHLEN-1)) > 0) {
                                lnk[len] = 0;
                                /* A link already pointing to the
-@@ -966,10 +1018,10 @@ static void recv_generator(char *fname, 
+@@ -963,10 +1015,10 @@ static void recv_generator(char *fname, 
                                 * required. */
                                if (strcmp(lnk, file->u.link) == 0) {
                                        if (itemizing) {
@@ -1783,7 +1783,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                                       maybe_ATTRS_REPORT);
                                        if (preserve_hard_links
                                            && file->link_u.links) {
-@@ -982,9 +1034,9 @@ static void recv_generator(char *fname, 
+@@ -979,9 +1031,9 @@ static void recv_generator(char *fname, 
                        }
                        /* Not the right symlink (or not a symlink), so
                         * delete it. */
@@ -1795,7 +1795,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                statret = -1;
                } else if (basis_dir[0] != NULL) {
                        if (try_dests_non(file, fname, ndx, itemizing,
-@@ -1000,7 +1052,7 @@ static void recv_generator(char *fname, 
+@@ -997,7 +1049,7 @@ static void recv_generator(char *fname, 
                        }
                }
                if (preserve_hard_links && file->link_u.links
@@ -1804,7 +1804,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                       itemizing, code, HL_SKIP))
                        return;
                if (do_symlink(file->u.link,fname) != 0) {
-@@ -1009,7 +1061,7 @@ static void recv_generator(char *fname, 
+@@ -1006,7 +1058,7 @@ static void recv_generator(char *fname, 
                } else {
                        set_file_attrs(fname, file, NULL, 0);
                        if (itemizing) {
@@ -1813,7 +1813,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                        ITEM_LOCAL_CHANGE, 0, NULL);
                        }
                        if (code && verbose) {
-@@ -1043,18 +1095,22 @@ static void recv_generator(char *fname, 
+@@ -1040,18 +1092,22 @@ static void recv_generator(char *fname, 
                                itemizing = code = 0;
                        }
                }
@@ -1844,7 +1844,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                statret = -1;
                        if (verbose > 2) {
                                rprintf(FINFO,"mknod(%s,0%o,0x%x)\n",
-@@ -1067,7 +1123,7 @@ static void recv_generator(char *fname, 
+@@ -1064,7 +1120,7 @@ static void recv_generator(char *fname, 
                        } else {
                                set_file_attrs(fname, file, NULL, 0);
                                if (itemizing) {
@@ -1853,7 +1853,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                                ITEM_LOCAL_CHANGE, 0, NULL);
                                }
                                if (code && verbose)
-@@ -1079,12 +1135,12 @@ static void recv_generator(char *fname, 
+@@ -1076,12 +1132,12 @@ static void recv_generator(char *fname, 
                        }
                } else {
                        if (itemizing)
@@ -1869,7 +1869,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        }
  
        if (!S_ISREG(file->mode)) {
-@@ -1118,7 +1174,7 @@ static void recv_generator(char *fname, 
+@@ -1115,7 +1171,7 @@ static void recv_generator(char *fname, 
        }
  
        if (update_only && statret == 0
@@ -1878,7 +1878,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                if (verbose > 1)
                        rprintf(FINFO, "%s is newer\n", fname);
                return;
-@@ -1127,18 +1183,18 @@ static void recv_generator(char *fname, 
+@@ -1124,18 +1180,18 @@ static void recv_generator(char *fname, 
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
@@ -1901,7 +1901,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                if (j != -1) {
                        fnamecmp = fnamecmpbuf;
                        fnamecmp_type = j;
-@@ -1147,7 +1203,7 @@ static void recv_generator(char *fname, 
+@@ -1144,7 +1200,7 @@ static void recv_generator(char *fname, 
        }
  
        real_ret = statret;
@@ -1910,7 +1910,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
        if (partial_dir && (partialptr = partial_dir_fname(fname)) != NULL
            && link_stat(partialptr, &partial_st, 0) == 0
-@@ -1166,7 +1222,7 @@ static void recv_generator(char *fname, 
+@@ -1163,7 +1219,7 @@ static void recv_generator(char *fname, 
                                rprintf(FINFO, "fuzzy basis selected for %s: %s\n",
                                        fname, fnamecmpbuf);
                        }
@@ -1919,7 +1919,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                        statret = 0;
                        fnamecmp = fnamecmpbuf;
                        fnamecmp_type = FNAMECMP_FUZZY;
-@@ -1175,7 +1231,7 @@ static void recv_generator(char *fname, 
+@@ -1172,7 +1228,7 @@ static void recv_generator(char *fname, 
  
        if (statret != 0) {
                if (preserve_hard_links && file->link_u.links
@@ -1928,7 +1928,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                       itemizing, code, HL_SKIP))
                        return;
                if (stat_errno == ENOENT)
-@@ -1185,31 +1241,44 @@ static void recv_generator(char *fname, 
+@@ -1182,31 +1238,44 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -1979,7 +1979,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                fnamecmp = partialptr;
                fnamecmp_type = FNAMECMP_PARTIAL_DIR;
                statret = 0;
-@@ -1233,17 +1302,21 @@ static void recv_generator(char *fname, 
+@@ -1230,17 +1299,21 @@ static void recv_generator(char *fname, 
          pretend_missing:
                /* pretend the file didn't exist */
                if (preserve_hard_links && file->link_u.links
@@ -2004,7 +2004,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                }
                if (!(back_file = make_file(fname, NULL, NULL, 0, NO_FILTERS))) {
                        close(fd);
-@@ -1254,7 +1327,7 @@ static void recv_generator(char *fname, 
+@@ -1251,7 +1324,7 @@ static void recv_generator(char *fname, 
                                full_fname(backupptr));
                        free(back_file);
                        close(fd);
@@ -2013,7 +2013,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                }
                if ((f_copy = do_open(backupptr,
                    O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0600)) < 0) {
-@@ -1262,14 +1335,14 @@ static void recv_generator(char *fname, 
+@@ -1259,14 +1332,14 @@ static void recv_generator(char *fname, 
                                full_fname(backupptr));
                        free(back_file);
                        close(fd);
@@ -2030,7 +2030,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        }
  
        if (verbose > 2)
-@@ -1287,24 +1360,32 @@ static void recv_generator(char *fname, 
+@@ -1284,24 +1357,32 @@ static void recv_generator(char *fname, 
                        iflags |= ITEM_BASIS_TYPE_FOLLOWS;
                if (fnamecmp_type == FNAMECMP_FUZZY)
                        iflags |= ITEM_XNAME_FOLLOWS;
@@ -2068,7 +2068,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
        if (f_copy >= 0) {
                close(f_copy);
-@@ -1317,6 +1398,13 @@ static void recv_generator(char *fname, 
+@@ -1314,6 +1395,13 @@ static void recv_generator(char *fname, 
        }
  
        close(fd);
@@ -2082,7 +2082,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  }
  
  void generate_files(int f_out, struct file_list *flist, char *local_name)
-@@ -1376,6 +1464,8 @@ void generate_files(int f_out, struct fi
+@@ -1373,6 +1461,8 @@ void generate_files(int f_out, struct fi
         * notice that and let us know via the redo pipe (or its closing). */
        ignore_timeout = 1;
  
@@ -2099,7 +2099,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern int link_dest;
 +extern int preserve_acls;
  extern int make_backups;
- extern int log_format_has_i;
+ extern int stdout_format_has_i;
  extern char *basis_dir[];
 @@ -143,15 +144,19 @@ void init_hard_links(void)
  
@@ -2147,7 +2147,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                                statret = 1;
 -                                              st = &st3;
 +                                              sxp->st = st3;
-                                               if (verbose < 2 || !log_format_has_i)
+                                               if (verbose < 2 || !stdout_format_has_i)
                                                        itemizing = code = 0;
                                                break;
 @@ -215,12 +220,16 @@ int hard_link_check(struct file_struct *
@@ -5505,7 +5505,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
 +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
 --- old/log.c
 +++ new/log.c
-@@ -592,8 +592,10 @@ static void log_formatted(enum logcode c
+@@ -594,8 +594,10 @@ static void log_formatted(enum logcode c
                        n[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        n[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        n[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -5580,7 +5580,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
    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");
-@@ -415,6 +424,9 @@ static struct poptOption long_options[] 
+@@ -416,6 +425,9 @@ static struct poptOption long_options[] 
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
@@ -5590,7 +5590,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
    {"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 },
-@@ -1080,6 +1092,24 @@ int parse_arguments(int *argc, const cha
+@@ -1083,6 +1095,24 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -5615,7 +5615,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1526,6 +1556,10 @@ void server_options(char **args,int *arg
+@@ -1529,6 +1559,10 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';
@@ -5634,11 +5634,11 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern int delay_updates;
 +extern mode_t orig_umask;
  extern struct stats stats;
- extern char *log_format;
+ extern char *stdout_format;
  extern char *tmpdir;
-@@ -344,6 +345,10 @@ int recv_files(int f_in, struct file_lis
-       int save_make_backups = make_backups;
-       int itemizing = am_server ? logfile_format_has_i : log_format_has_i;
+@@ -347,6 +348,10 @@ int recv_files(int f_in, struct file_lis
+       int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
+       enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int max_phase = protocol_version >= 29 ? 2 : 1;
 +      int dflt_perms = (ACCESSPERMS & ~orig_umask);
 +#ifdef SUPPORT_ACLS
@@ -5647,7 +5647,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        int i, recv_ok;
  
        if (verbose > 2)
-@@ -541,7 +546,16 @@ int recv_files(int f_in, struct file_lis
+@@ -543,7 +548,16 @@ int recv_files(int f_in, struct file_lis
                 * mode based on the local permissions and some heuristics. */
                if (!preserve_perms) {
                        int exists = fd1 != -1;
@@ -5830,7 +5830,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                }
                if (ret == 0) /* ret == 1 if symlink could not be set */
                        updated = 1;
-@@ -225,6 +247,11 @@ int set_file_attrs(char *fname, struct f
+@@ -224,6 +246,11 @@ int set_file_attrs(char *fname, struct f
                else
                        rprintf(code, "%s is uptodate\n", fname);
        }
@@ -5905,7 +5905,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
       --chmod=CHMOD           change destination permissions
   -o, --owner                 preserve owner (super-user only)
   -g, --group                 preserve group
-@@ -744,7 +745,9 @@ quote(itemize(
+@@ -745,7 +746,9 @@ quote(itemize(
    permissions, though the bf(--executability) option might change just
    the execute permission for the file.
    it() New files get their "normal" permission bits set to the source
@@ -5916,7 +5916,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
    their special permission bits disabled except in the case where a new
    directory inherits a setgid bit from its parent directory.
  ))
-@@ -775,9 +778,11 @@ The preservation of the destination's se
+@@ -776,9 +779,11 @@ The preservation of the destination's se
  directories when bf(--perms) is off was added in rsync 2.6.7.  Older rsync
  versions erroneously preserved the three special permission bits for
  newly-created files when bf(--perms) was off, while overriding the
@@ -5931,7 +5931,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
  dit(bf(-E, --executability)) This option causes rsync to preserve the
  executability (or non-executability) of regular files when bf(--perms) is
-@@ -795,6 +800,15 @@ quote(itemize(
+@@ -796,6 +801,15 @@ quote(itemize(
  
  If bf(--perms) is enabled, this option is ignored.
  
@@ -5947,7 +5947,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  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
-@@ -1376,8 +1390,8 @@ if the receiving rsync is at least versi
+@@ -1377,8 +1391,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).
  
@@ -5958,7 +5958,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1426,7 +1440,11 @@ quote(itemize(
+@@ -1427,7 +1441,11 @@ quote(itemize(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
index 51eae2b..19ba7e0 100644 (file)
@@ -51,7 +51,7 @@ After applying this patch, run these commands for a successful build:
                        f_name(f, NULL));
        }
  }
-@@ -306,6 +315,7 @@ static void send_file_entry(struct file_
+@@ -298,6 +307,7 @@ static void send_file_entry(struct file_
  {
        unsigned short flags;
        static time_t modtime;
@@ -59,7 +59,7 @@ After applying this patch, run these commands for a successful build:
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -321,7 +331,7 @@ static void send_file_entry(struct file_
+@@ -313,7 +323,7 @@ static void send_file_entry(struct file_
  
        if (!file) {
                write_byte(f, 0);
@@ -68,7 +68,7 @@ After applying this patch, run these commands for a successful build:
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -331,7 +341,7 @@ static void send_file_entry(struct file_
+@@ -323,7 +333,7 @@ static void send_file_entry(struct file_
  
        f_name(file, fname);
  
@@ -77,7 +77,7 @@ After applying this patch, run these commands for a successful build:
  
        if (file->mode == mode)
                flags |= XMIT_SAME_MODE;
-@@ -367,6 +377,12 @@ static void send_file_entry(struct file_
+@@ -359,6 +369,12 @@ static void send_file_entry(struct file_
                flags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -90,7 +90,7 @@ After applying this patch, run these commands for a successful build:
  
  #ifdef SUPPORT_HARD_LINKS
        if (file->link_u.idev) {
-@@ -420,6 +436,8 @@ static void send_file_entry(struct file_
+@@ -412,6 +428,8 @@ static void send_file_entry(struct file_
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -99,7 +99,7 @@ After applying this patch, run these commands for a successful build:
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (!numeric_ids)
                        add_uid(uid);
-@@ -486,6 +504,7 @@ static struct file_struct *receive_file_
+@@ -478,6 +496,7 @@ static struct file_struct *receive_file_
                                              unsigned short flags, int f)
  {
        static time_t modtime;
@@ -107,7 +107,7 @@ After applying this patch, run these commands for a successful build:
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -504,7 +523,7 @@ static struct file_struct *receive_file_
+@@ -496,7 +515,7 @@ static struct file_struct *receive_file_
        struct file_struct *file;
  
        if (!flist) {
@@ -116,7 +116,7 @@ After applying this patch, run these commands for a successful build:
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -560,6 +579,8 @@ static struct file_struct *receive_file_
+@@ -552,6 +571,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));
@@ -125,7 +125,7 @@ After applying this patch, run these commands for a successful build:
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -615,6 +636,8 @@ static struct file_struct *receive_file_
+@@ -607,6 +628,8 @@ static struct file_struct *receive_file_
        file->mode = mode;
        file->uid = uid;
        file->gid = gid;
@@ -134,7 +134,7 @@ After applying this patch, run these commands for a successful build:
  
        if (dirname_len) {
                file->dirname = lastdir = bp;
-@@ -640,12 +663,12 @@ static struct file_struct *receive_file_
+@@ -632,12 +655,12 @@ static struct file_struct *receive_file_
                            && lastname[del_hier_name_len-1] == '.'
                            && lastname[del_hier_name_len-2] == '/')
                                del_hier_name_len -= 2;
@@ -149,7 +149,7 @@ After applying this patch, run these commands for a successful build:
                        else
                                in_del_hier = 0;
                }
-@@ -861,12 +884,14 @@ struct file_struct *make_file(char *fnam
+@@ -851,12 +874,14 @@ struct file_struct *make_file(char *fnam
        memset(bp, 0, file_struct_len);
        bp += file_struct_len;
  
@@ -165,7 +165,7 @@ After applying this patch, run these commands for a successful build:
  
  #ifdef SUPPORT_HARD_LINKS
        if (flist && flist->hlink_pool) {
-@@ -979,7 +1004,7 @@ static void send_if_directory(int f, str
+@@ -969,7 +994,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)
@@ -174,7 +174,7 @@ After applying this patch, run these commands for a successful build:
                void *save_filters;
                unsigned int len = strlen(fbuf);
                if (len > 1 && fbuf[len-1] == '/')
-@@ -1585,8 +1610,9 @@ static void clean_flist(struct file_list
+@@ -1581,8 +1606,9 @@ static void clean_flist(struct file_list
                        }
                        /* Make sure we don't lose track of a user-specified
                         * top directory. */
@@ -186,7 +186,7 @@ After applying this patch, run these commands for a successful build:
  
                        clear_file(flist->files[drop], flist);
  
-@@ -1710,7 +1736,7 @@ static void output_flist(struct file_lis
+@@ -1706,7 +1732,7 @@ static void output_flist(struct file_lis
                        file->dirname ? file->dirname : "",
                        file->dirname ? "/" : "", NS(file->basename),
                        S_ISDIR(file->mode) ? "/" : "", (int)file->mode,
@@ -273,7 +273,7 @@ After applying this patch, run these commands for a successful build:
                        continue;
  
                name = fp->basename;
-@@ -656,6 +661,8 @@ static int try_dests_reg(struct file_str
+@@ -663,6 +668,8 @@ static int try_dests_reg(struct file_str
                                          itemizing && verbose > 1,
                                          code) < 0)
                                goto try_a_copy;
@@ -281,8 +281,8 @@ After applying this patch, run these commands for a successful build:
 +                              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)
-@@ -922,7 +929,7 @@ static void recv_generator(char *fname, 
+               } else
+@@ -929,7 +936,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
@@ -291,7 +291,7 @@ After applying this patch, run these commands for a successful build:
                        delete_in_dir(the_file_list, fname, file, &st);
                return;
        }
-@@ -1211,7 +1218,7 @@ static void recv_generator(char *fname, 
+@@ -1218,7 +1225,7 @@ static void recv_generator(char *fname, 
        if (fuzzy_dirlist) {
                int j = flist_find(fuzzy_dirlist, file);
                if (j >= 0) /* don't use changing file as future fuzzy basis */
@@ -304,7 +304,7 @@ After applying this patch, run these commands for a successful build:
 +++ new/hlink.c
 @@ -28,6 +28,7 @@ extern int link_dest;
  extern int make_backups;
- extern int log_format_has_i;
+ extern int stdout_format_has_i;
  extern char *basis_dir[];
 +extern unsigned int file_struct_len;
  extern struct file_list *the_file_list;
@@ -358,10 +358,10 @@ After applying this patch, run these commands for a successful build:
  extern int protocol_version;
  extern int preserve_times;
 +extern int preserve_atimes;
- extern int log_format_has_i;
- extern int log_format_has_o_or_i;
- extern int daemon_log_format_has_o_or_i;
-@@ -603,7 +604,8 @@ static void log_formatted(enum logcode c
+ extern int stdout_format_has_i;
+ extern int stdout_format_has_o_or_i;
+ extern int logfile_format_has_o_or_i;
+@@ -594,7 +595,8 @@ static void log_formatted(enum logcode c
                        n[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        n[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        n[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -381,7 +381,7 @@ After applying this patch, run these commands for a successful build:
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -301,8 +302,9 @@ void usage(enum logcode F)
+@@ -305,8 +306,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");
@@ -393,7 +393,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-@@ -413,6 +415,9 @@ static struct poptOption long_options[] 
+@@ -419,6 +421,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 },
@@ -403,7 +403,7 @@ After applying this patch, run these commands for a successful build:
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 2, 0, 0 },
    {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
    {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },
-@@ -1518,6 +1523,8 @@ void server_options(char **args,int *arg
+@@ -1537,6 +1542,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -415,7 +415,7 @@ After applying this patch, run these commands for a successful build:
 --- old/rsync.c
 +++ new/rsync.c
 @@ -35,6 +35,7 @@ extern int dry_run;
- extern int daemon_log_format_has_i;
+ extern int logfile_format_has_i;
  extern int preserve_perms;
  extern int preserve_executability;
 +extern int preserve_atimes;
@@ -485,7 +485,7 @@ After applying this patch, run these commands for a successful build:
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -522,9 +524,12 @@ struct file_struct {
+@@ -523,9 +525,12 @@ struct file_struct {
        uid_t uid;
        gid_t gid;
        mode_t mode;
@@ -513,7 +513,7 @@ After applying this patch, run these commands for a successful build:
       --super                 receiver attempts super-user activities
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
-@@ -858,6 +859,12 @@ it is preserving modification times (see
+@@ -861,6 +862,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).
  
@@ -526,7 +526,7 @@ After applying this patch, run these commands for a successful build:
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1373,7 +1380,7 @@ with older versions of rsync, but that a
+@@ -1378,7 +1385,7 @@ with older versions of rsync, but that a
  verbose messages).
  
  The "%i" escape has a cryptic output that is 9 letters long.  The general
@@ -535,7 +535,7 @@ After applying this patch, run these commands for a successful build:
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1413,7 +1420,7 @@ quote(itemize(
+@@ -1418,7 +1425,7 @@ 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)
@@ -544,7 +544,7 @@ After applying this patch, run these commands for a successful build:
    anytime a symlink is transferred, or when a file or device is transferred
    without bf(--times).
    it() A bf(p) means the permissions are different and are being updated to
-@@ -1422,7 +1429,10 @@ quote(itemize(
+@@ -1427,7 +1434,10 @@ quote(itemize(
    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).
@@ -565,7 +565,7 @@ After applying this patch, run these commands for a successful build:
 +extern unsigned int file_struct_len;
  extern struct stats stats;
  extern struct file_list *the_file_list;
- extern char *log_format;
+ extern char *stdout_format;
 @@ -129,7 +130,7 @@ void successful_send(int ndx)
  
        file = the_file_list->files[ndx];
@@ -575,7 +575,7 @@ After applying this patch, run these commands for a successful build:
                return;
        if (file->dir.root) {
                offset = stringjoin(fname, sizeof fname,
-@@ -373,7 +374,7 @@ void send_files(struct file_list *flist,
+@@ -371,7 +372,7 @@ void send_files(struct file_list *flist,
                        rprintf(FINFO, "sender finished %s\n", fname);
  
                /* Flag that we actually sent this entry. */
@@ -783,7 +783,7 @@ After applying this patch, run these commands for a successful build:
  }
 --- old/util.c
 +++ new/util.c
-@@ -116,7 +116,7 @@ void overflow_exit(char *str)
+@@ -121,7 +121,7 @@ void overflow_exit(char *str)
        exit_cleanup(RERR_MALLOC);
  }
  
@@ -792,7 +792,7 @@ After applying this patch, run these commands for a successful build:
  {
  #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
        if (S_ISLNK(mode))
-@@ -124,9 +124,13 @@ int set_modtime(char *fname, time_t modt
+@@ -129,9 +129,13 @@ int set_modtime(char *fname, time_t modt
  #endif
  
        if (verbose > 2) {
@@ -808,7 +808,7 @@ After applying this patch, run these commands for a successful build:
        }
  
        if (dry_run)
-@@ -135,7 +139,7 @@ int set_modtime(char *fname, time_t modt
+@@ -140,7 +144,7 @@ int set_modtime(char *fname, time_t modt
        {
  #ifdef HAVE_UTIMES
                struct timeval t[2];
@@ -817,7 +817,7 @@ After applying this patch, run these commands for a successful build:
                t[0].tv_usec = 0;
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
-@@ -146,12 +150,12 @@ int set_modtime(char *fname, time_t modt
+@@ -151,12 +155,12 @@ int set_modtime(char *fname, time_t modt
                return utimes(fname, t);
  #elif defined HAVE_UTIMBUF
                struct utimbuf tbuf;
index 3ec3dea..9464ccd 100644 (file)
@@ -69,9 +69,9 @@ After applying this patch, run these commands for a successful build:
  int daemon_bwlimit = 0;
  int bwlimit = 0;
  int fuzzy_basis = 0;
-@@ -151,6 +152,8 @@ char *log_format = NULL;
- char *logfile_name = NULL;
+@@ -151,6 +152,8 @@ char *logfile_name = NULL;
  char *logfile_format = NULL;
+ char *stdout_format = NULL;
  char *password_file = NULL;
 +char *source_filter = NULL;
 +char *dest_filter = NULL;
@@ -86,7 +86,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --modify-window=NUM     compare mod-times with reduced accuracy\n");
    rprintf(F," -T, --temp-dir=DIR          create temporary files in directory DIR\n");
    rprintf(F," -y, --fuzzy                 find similar file for basis if no dest file\n");
-@@ -373,6 +377,8 @@ void usage(enum logcode F)
+@@ -374,6 +378,8 @@ void usage(enum logcode F)
    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");
@@ -95,7 +95,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --protocol=NUM          force an older protocol version to be used\n");
  #ifdef INET6
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
-@@ -453,6 +459,7 @@ static struct poptOption long_options[] 
+@@ -454,6 +460,7 @@ static struct poptOption long_options[] 
    {"chmod",            0,  POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
    {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
@@ -103,7 +103,7 @@ After applying this patch, run these commands for a successful build:
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
    {"existing",         0,  POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
-@@ -528,6 +535,8 @@ static struct poptOption long_options[] 
+@@ -531,6 +538,8 @@ static struct poptOption long_options[] 
    {"password-file",    0,  POPT_ARG_STRING, &password_file, 0, 0, 0 },
    {"blocking-io",      0,  POPT_ARG_VAL,    &blocking_io, 1, 0, 0 },
    {"no-blocking-io",   0,  POPT_ARG_VAL,    &blocking_io, 0, 0, 0 },
@@ -112,7 +112,7 @@ After applying this patch, run these commands for a successful build:
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },
-@@ -1406,6 +1415,16 @@ int parse_arguments(int *argc, const cha
+@@ -1409,6 +1418,16 @@ int parse_arguments(int *argc, const cha
                }
        }
  
@@ -129,7 +129,7 @@ After applying this patch, run these commands for a successful build:
        if (files_from) {
                char *h, *p;
                int q;
-@@ -1671,6 +1690,25 @@ void server_options(char **args,int *arg
+@@ -1675,6 +1694,25 @@ void server_options(char **args,int *arg
                        args[ac++] = "--size-only";
        }
  
@@ -157,7 +157,7 @@ After applying this patch, run these commands for a successful build:
                        goto oom;
 --- old/pipe.c
 +++ new/pipe.c
-@@ -159,3 +159,77 @@ pid_t local_child(int argc, char **argv,
+@@ -166,3 +166,77 @@ pid_t local_child(int argc, char **argv,
  
        return pid;
  }
@@ -237,16 +237,16 @@ After applying this patch, run these commands for a successful build:
 +}
 --- old/receiver.c
 +++ new/receiver.c
-@@ -49,6 +49,7 @@ extern int inplace;
+@@ -48,6 +48,7 @@ extern int checksum_seed;
+ extern int inplace;
  extern int delay_updates;
  extern struct stats stats;
- extern char *log_format;
 +extern char *dest_filter;
+ extern char *stdout_format;
  extern char *tmpdir;
  extern char *partial_dir;
- extern char *basis_dir[];
-@@ -345,6 +346,8 @@ int recv_files(int f_in, struct file_lis
-       int itemizing = am_server ? logfile_format_has_i : log_format_has_i;
+@@ -348,6 +349,8 @@ int recv_files(int f_in, struct file_lis
+       enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int max_phase = protocol_version >= 29 ? 2 : 1;
        int i, recv_ok;
 +      pid_t pid = 0;
@@ -254,7 +254,7 @@ After applying this patch, run these commands for a successful build:
  
        if (verbose > 2)
                rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
-@@ -357,6 +360,23 @@ int recv_files(int f_in, struct file_lis
+@@ -360,6 +363,23 @@ int recv_files(int f_in, struct file_lis
        if (delay_updates)
                delayed_bits = bitbag_create(flist->count);
  
@@ -278,7 +278,7 @@ After applying this patch, run these commands for a successful build:
        while (1) {
                cleanup_disable();
  
-@@ -599,6 +619,9 @@ int recv_files(int f_in, struct file_lis
+@@ -600,6 +620,9 @@ int recv_files(int f_in, struct file_lis
                else if (!am_server && verbose && do_progress)
                        rprintf(FINFO, "%s\n", fname);
  
@@ -325,7 +325,7 @@ After applying this patch, run these commands for a successful build:
       --modify-window=NUM     compare mod-times with reduced accuracy
   -T, --temp-dir=DIR          create temporary files in directory DIR
   -y, --fuzzy                 find similar file for basis if no dest file
-@@ -395,6 +396,8 @@ to the detailed description below for a 
+@@ -396,6 +397,8 @@ to the detailed description below for a 
       --write-batch=FILE      write a batched update to FILE
       --only-write-batch=FILE like --write-batch but w/o updating dest
       --read-batch=FILE       read a batched update from FILE
@@ -334,7 +334,7 @@ After applying this patch, run these commands for a successful build:
       --protocol=NUM          force an older protocol version to be used
       --checksum-seed=NUM     set block/file checksum seed (advanced)
   -4, --ipv4                  prefer IPv4
-@@ -1732,6 +1735,33 @@ file previously generated by bf(--write-
+@@ -1733,6 +1736,33 @@ file previously generated by bf(--write-
  If em(FILE) is bf(-), the batch data will be read from standard input.
  See the "BATCH MODE" section for details.
  
@@ -370,16 +370,16 @@ After applying this patch, run these commands for a successful build:
  version of rsync.  For instance, if rsync 2.6.4 is being used with the
 --- old/sender.c
 +++ new/sender.c
-@@ -44,6 +44,7 @@ extern int write_batch;
+@@ -43,6 +43,7 @@ extern int batch_fd;
+ extern int write_batch;
  extern struct stats stats;
  extern struct file_list *the_file_list;
- extern char *log_format;
 +extern char *source_filter;
+ extern char *stdout_format;
  
  
- /**
-@@ -221,6 +222,26 @@ void send_files(struct file_list *flist,
-       int itemizing = am_server ? logfile_format_has_i : log_format_has_i;
+@@ -222,6 +223,26 @@ void send_files(struct file_list *flist,
+       enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int f_xfer = write_batch < 0 ? batch_fd : f_out;
        int i, j;
 +      char *filter_argv[MAX_FILTER_ARGS + 1];
@@ -447,7 +447,7 @@ After applying this patch, run these commands for a successful build:
                if (st.st_size) {
                        int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE);
                        mbuf = map_file(fd, st.st_size, read_size, s->blength);
-@@ -365,6 +414,8 @@ void send_files(struct file_list *flist,
+@@ -364,6 +413,8 @@ void send_files(struct file_list *flist,
                        }
                }
                close(fd);
index dc6a1c7..d12948d 100644 (file)
@@ -137,7 +137,7 @@ After applying this patch, run these commands for a successful build:
                                continue;
                }
  
-@@ -1185,7 +1189,7 @@ static void recv_generator(char *fname, 
+@@ -1182,7 +1186,7 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -146,7 +146,7 @@ After applying this patch, run these commands for a successful build:
                return;
  
        if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1240,7 +1244,7 @@ static void recv_generator(char *fname, 
+@@ -1237,7 +1241,7 @@ static void recv_generator(char *fname, 
                goto notify_others;
        }
  
@@ -155,7 +155,7 @@ After applying this patch, run these commands for a successful build:
                if (!(backupptr = get_backup_name(fname))) {
                        close(fd);
                        return;
-@@ -1331,9 +1335,12 @@ void generate_files(int f_out, struct fi
+@@ -1328,9 +1332,12 @@ 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;
@@ -168,8 +168,8 @@ After applying this patch, run these commands for a successful build:
 +
        if (protocol_version >= 29) {
                itemizing = 1;
-               maybe_ATTRS_REPORT = log_format_has_i ? 0 : ATTRS_REPORT;
-@@ -1361,7 +1368,7 @@ void generate_files(int f_out, struct fi
+               maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT;
+@@ -1358,7 +1365,7 @@ void generate_files(int f_out, struct fi
                do_delete_pass(flist);
        do_progress = 0;
  
@@ -178,7 +178,7 @@ After applying this patch, run these commands for a successful build:
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1370,12 +1377,6 @@ void generate_files(int f_out, struct fi
+@@ -1367,12 +1374,6 @@ void generate_files(int f_out, struct fi
                        : "enabled");
        }
  
@@ -191,7 +191,7 @@ After applying this patch, run these commands for a successful build:
        for (i = 0; i < flist->count; i++) {
                struct file_struct *file = flist->files[i];
  
-@@ -1419,23 +1420,34 @@ void generate_files(int f_out, struct fi
+@@ -1416,23 +1417,34 @@ void generate_files(int f_out, struct fi
                delete_in_dir(NULL, NULL, NULL, NULL);
  
        phase++;
@@ -232,7 +232,7 @@ After applying this patch, run these commands for a successful build:
                if (local_name)
                        strlcpy(fbuf, local_name, sizeof fbuf);
                else
-@@ -1447,27 +1459,43 @@ void generate_files(int f_out, struct fi
+@@ -1444,27 +1456,43 @@ void generate_files(int f_out, struct fi
        phase++;
        ignore_non_existing = save_ignore_non_existing;
        ignore_existing = save_ignore_existing;
@@ -1035,7 +1035,7 @@ After applying this patch, run these commands for a successful build:
  int keep_partial = 0;
  int safe_symlinks = 0;
  int copy_unsafe_links = 0;
-@@ -1301,6 +1301,7 @@ int parse_arguments(int *argc, const cha
+@@ -1304,6 +1304,7 @@ int parse_arguments(int *argc, const cha
  
        if (do_progress && !verbose && !log_before_transfer && !am_server)
                verbose = 1;
@@ -1045,7 +1045,7 @@ After applying this patch, run these commands for a successful build:
                do_xfers = 0;
 --- old/pipe.c
 +++ new/pipe.c
-@@ -58,7 +58,7 @@ pid_t piped_child(char **command, int *f
+@@ -59,7 +59,7 @@ pid_t piped_child(char **command, int *f
                exit_cleanup(RERR_IPC);
        }
  
@@ -1054,7 +1054,7 @@ After applying this patch, run these commands for a successful build:
        if (pid == -1) {
                rsyserr(FERROR, errno, "fork");
                exit_cleanup(RERR_IPC);
-@@ -122,7 +122,7 @@ pid_t local_child(int argc, char **argv,
+@@ -123,7 +123,7 @@ pid_t local_child(int argc, char **argv,
                exit_cleanup(RERR_IPC);
        }
  
@@ -1072,7 +1072,7 @@ After applying this patch, run these commands for a successful build:
 -extern int do_progress;
 +extern int recv_progress;
  extern int log_before_transfer;
- extern int log_format_has_i;
+ extern int stdout_format_has_i;
  extern int logfile_format_has_i;
 @@ -154,7 +154,7 @@ static int receive_data(int f_in, char *
                if (sum.remainder)
@@ -1101,7 +1101,7 @@ After applying this patch, run these commands for a successful build:
                        show_progress(offset, total_size);
  
                if (i > 0) {
-@@ -243,7 +243,7 @@ static int receive_data(int f_in, char *
+@@ -245,7 +245,7 @@ static int receive_data(int f_in, char *
                ftruncate(fd, offset);
  #endif
  
@@ -1110,7 +1110,7 @@ After applying this patch, run these commands for a successful build:
                end_progress(total_size);
  
        if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
-@@ -294,12 +294,12 @@ static void handle_delayed_updates(struc
+@@ -296,12 +296,12 @@ static void handle_delayed_updates(struc
                                        "rename failed for %s (from %s)",
                                        full_fname(fname), partialptr);
                        } else {
@@ -1126,7 +1126,7 @@ After applying this patch, run these commands for a successful build:
                                handle_partial_dir(partialptr, PDIR_DELETE);
                        }
                }
-@@ -349,11 +349,6 @@ int recv_files(int f_in, struct file_lis
+@@ -352,11 +352,6 @@ int recv_files(int f_in, struct file_lis
        if (verbose > 2)
                rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
  
@@ -1138,7 +1138,7 @@ After applying this patch, run these commands for a successful build:
        if (delay_updates)
                delayed_bits = bitbag_create(flist->count);
  
-@@ -374,7 +369,7 @@ int recv_files(int f_in, struct file_lis
+@@ -377,7 +372,7 @@ int recv_files(int f_in, struct file_lis
                                rprintf(FINFO, "recv_files phase=%d\n", phase);
                        if (phase == 2 && delay_updates)
                                handle_delayed_updates(flist, local_name);
@@ -1147,10 +1147,10 @@ After applying this patch, run these commands for a successful build:
                        if (keep_partial && !partial_dir)
                                make_backups = 0; /* prevents double backup */
                        if (append_mode) {
-@@ -596,7 +591,7 @@ int recv_files(int f_in, struct file_lis
+@@ -597,7 +592,7 @@ int recv_files(int f_in, struct file_lis
                /* log the transfer */
                if (log_before_transfer)
-                       log_item(file, &initial_stats, iflags, NULL);
+                       log_item(FNAME, file, &initial_stats, iflags, NULL);
 -              else if (!am_server && verbose && do_progress)
 +              else if (!am_server && verbose && recv_progress)
                        rprintf(FINFO, "%s\n", fname);
@@ -1193,7 +1193,7 @@ After applying this patch, run these commands for a successful build:
  extern int am_starting_up;
  extern int allow_8bit_chars;
  extern int preserve_uid;
-@@ -303,5 +302,5 @@ const char *who_am_i(void)
+@@ -302,5 +301,5 @@ const char *who_am_i(void)
  {
        if (am_starting_up)
                return am_server ? "server" : "client";