Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Tue, 9 May 2006 18:50:36 +0000 (18:50 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 9 May 2006 18:50:36 +0000 (18:50 +0000)
ODBC-dblog.diff
acls.diff
id-pair.diff
source-filter_dest-filter.diff

index d0daa19..b19b3f6 100644 (file)
@@ -21,23 +21,23 @@ See the file "instructions" (after applying this patch) for more info.
  OBJS3=progress.o pipe.o
 --- old/cleanup.c
 +++ new/cleanup.c
-@@ -23,6 +23,7 @@
+@@ -27,6 +27,7 @@ extern int am_server;
+ extern int am_daemon;
  extern int io_error;
  extern int keep_partial;
 +extern int am_generator;
  extern int log_got_error;
  extern char *partial_dir;
-@@ -149,8 +150,13 @@ void _exit_cleanup(int code, const char 
+ extern char *logfile_name;
+@@ -154,8 +155,13 @@ void _exit_cleanup(int code, const char 
                        code = RERR_PARTIAL;
        }
  
--      if (code)
-+      if (code) {
+-      if (code || am_daemon || (logfile_name && (am_server || !verbose)))
++      if (code || am_daemon || (logfile_name && (am_server || !verbose))) {
                log_exit(code, file, line);
 +#ifdef HAVE_LIBODBC
-+              db_log_exit(code,file,line);
++              db_log_exit(code, file, line);
 +              db_log_close();
 +#endif
 +      }
@@ -68,7 +68,7 @@ See the file "instructions" (after applying this patch) for more info.
                                am_sender ? "on" : "to",
 --- old/configure.in
 +++ new/configure.in
-@@ -540,6 +540,12 @@ if test x"$with_included_popt" != x"yes"
+@@ -577,6 +577,12 @@ if test x"$with_included_popt" != x"yes"
      AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
  fi
  
@@ -1046,7 +1046,7 @@ See the file "instructions" (after applying this patch) for more info.
  FN_LOCAL_BOOL(lp_list, list)
 --- old/log.c
 +++ new/log.c
-@@ -94,7 +94,7 @@ struct {
+@@ -91,7 +91,7 @@ struct {
  /*
   * Map from rsync error code to name, or return NULL.
   */
@@ -1055,21 +1055,9 @@ See the file "instructions" (after applying this patch) for more info.
  {
        int i;
        for (i = 0; rerr_names[i].name; i++) {
---- old/main.c
-+++ new/main.c
-@@ -168,6 +168,9 @@ static void handle_stats(int f)
-       if (am_daemon) {
-               log_exit(0, __FILE__, __LINE__);
-+#ifdef HAVE_LIBODBC
-+              db_log_exit(0,__FILE__,__LINE__);
-+#endif
-               if (f == -1 || !am_sender)
-                       return;
-       }
 --- old/receiver.c
 +++ new/receiver.c
-@@ -113,6 +113,10 @@ static int get_tmpname(char *fnametmp, c
+@@ -109,6 +109,10 @@ static int get_tmpname(char *fnametmp, c
  
        if (maxname < 1) {
                rprintf(FERROR, "temporary filename too long: %s\n", fname);
@@ -1080,7 +1068,7 @@ See the file "instructions" (after applying this patch) for more info.
                fnametmp[0] = '\0';
                return 0;
        }
-@@ -229,6 +233,11 @@ static int receive_data(int f_in, char *
+@@ -225,6 +229,11 @@ static int receive_data(int f_in, char *
                                        rsyserr(FERROR, errno,
                                                "lseek failed on %s",
                                                full_fname(fname));
@@ -1092,7 +1080,7 @@ See the file "instructions" (after applying this patch) for more info.
                                        exit_cleanup(RERR_FILEIO);
                                }
                                continue;
-@@ -254,6 +263,9 @@ static int receive_data(int f_in, char *
+@@ -250,6 +259,9 @@ static int receive_data(int f_in, char *
            report_write_error:
                rsyserr(FERROR, errno, "write failed on %s",
                        full_fname(fname));
@@ -1102,7 +1090,7 @@ See the file "instructions" (after applying this patch) for more info.
                exit_cleanup(RERR_FILEIO);
        }
  
-@@ -297,6 +309,12 @@ static void handle_delayed_updates(struc
+@@ -293,6 +305,12 @@ static void handle_delayed_updates(struc
                                rsyserr(FERROR, errno,
                                        "rename failed for %s (from %s)",
                                        full_fname(fname), partialptr);
@@ -1115,7 +1103,7 @@ See the file "instructions" (after applying this patch) for more info.
                        } else {
                                if (remove_sent_files
                                    || (preserve_hard_links
-@@ -419,6 +437,9 @@ int recv_files(int f_in, struct file_lis
+@@ -414,6 +432,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");
@@ -1125,7 +1113,7 @@ See the file "instructions" (after applying this patch) for more info.
                        exit_cleanup(RERR_PROTOCOL);
                }
  
-@@ -474,6 +495,11 @@ int recv_files(int f_in, struct file_lis
+@@ -469,6 +490,11 @@ int recv_files(int f_in, struct file_lis
                                        rprintf(FERROR,
                                                "invalid basis_dir index: %d.\n",
                                                fnamecmp_type);
@@ -1137,7 +1125,7 @@ See the file "instructions" (after applying this patch) for more info.
                                        exit_cleanup(RERR_PROTOCOL);
                                }
                                pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
-@@ -519,6 +545,9 @@ int recv_files(int f_in, struct file_lis
+@@ -514,6 +540,9 @@ int recv_files(int f_in, struct file_lis
                if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
                        rsyserr(FERROR, errno, "fstat %s failed",
                                full_fname(fnamecmp));
@@ -1147,7 +1135,7 @@ See the file "instructions" (after applying this patch) for more info.
                        discard_receive_data(f_in, file->length);
                        close(fd1);
                        continue;
-@@ -532,6 +561,9 @@ int recv_files(int f_in, struct file_lis
+@@ -527,6 +556,9 @@ int recv_files(int f_in, struct file_lis
                         */
                        rprintf(FERROR,"recv_files: %s is a directory\n",
                                full_fname(fnamecmp));
@@ -1157,7 +1145,7 @@ See the file "instructions" (after applying this patch) for more info.
                        discard_receive_data(f_in, file->length);
                        close(fd1);
                        continue;
-@@ -555,6 +587,9 @@ int recv_files(int f_in, struct file_lis
+@@ -550,6 +582,9 @@ int recv_files(int f_in, struct file_lis
                        if (fd2 == -1) {
                                rsyserr(FERROR, errno, "open %s failed",
                                        full_fname(fname));
@@ -1167,7 +1155,7 @@ See the file "instructions" (after applying this patch) for more info.
                                discard_receive_data(f_in, file->length);
                                if (fd1 != -1)
                                        close(fd1);
-@@ -588,6 +623,10 @@ int recv_files(int f_in, struct file_lis
+@@ -583,6 +618,10 @@ int recv_files(int f_in, struct file_lis
                        if (fd2 == -1) {
                                rsyserr(FERROR, errno, "mkstemp %s failed",
                                        full_fname(fnametmp));
@@ -1178,7 +1166,7 @@ See the file "instructions" (after applying this patch) for more info.
                                discard_receive_data(f_in, file->length);
                                if (fd1 != -1)
                                        close(fd1);
-@@ -610,12 +649,19 @@ int recv_files(int f_in, struct file_lis
+@@ -605,12 +644,19 @@ int recv_files(int f_in, struct file_lis
  
                if (!log_before_transfer)
                        log_item(file, &initial_stats, iflags, NULL);
@@ -1213,7 +1201,7 @@ See the file "instructions" (after applying this patch) for more info.
                                SIVAL(numbuf, 0, i);
 --- old/sender.c
 +++ new/sender.c
-@@ -352,6 +352,9 @@ void send_files(struct file_list *flist,
+@@ -354,6 +354,9 @@ void send_files(struct file_list *flist,
  
                if (!log_before_transfer)
                        log_item(file, &initial_stats, iflags, NULL);
index 64e83e5..ee10bdf 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1311,7 +1311,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
 --- old/flist.c
 +++ new/flist.c
-@@ -41,6 +41,7 @@ extern int curr_dir_depth;
+@@ -40,6 +40,7 @@ extern int filesfrom_fd;
  extern int one_file_system;
  extern int copy_dirlinks;
  extern int keep_dirlinks;
@@ -1319,7 +1319,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
-@@ -134,6 +135,8 @@ static void list_file_entry(struct file_
+@@ -133,6 +134,8 @@ static void list_file_entry(struct file_
  
        permstring(permbuf, f->mode);
  
@@ -1328,7 +1328,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
                rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
-@@ -492,6 +495,9 @@ static struct file_struct *receive_file_
+@@ -491,6 +494,9 @@ static struct file_struct *receive_file_
        char thisname[MAXPATHLEN];
        unsigned int l1 = 0, l2 = 0;
        int alloc_len, basename_len, dirname_len, linkname_len, sum_len;
@@ -1338,7 +1338,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        OFF_T file_length;
        char *basename, *dirname, *bp;
        struct file_struct *file;
-@@ -595,13 +601,27 @@ static struct file_struct *receive_file_
+@@ -594,13 +600,27 @@ static struct file_struct *receive_file_
  
        sum_len = always_checksum && S_ISREG(mode) ? MD4_SUM_LENGTH : 0;
  
@@ -1366,7 +1366,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
        file->modtime = modtime;
        file->length = file_length;
-@@ -694,6 +714,11 @@ static struct file_struct *receive_file_
+@@ -693,6 +713,11 @@ static struct file_struct *receive_file_
                read_buf(f, sum, checksum_len);
        }
  
@@ -1378,7 +1378,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        return file;
  }
  
-@@ -943,6 +968,9 @@ static struct file_struct *send_file_nam
+@@ -942,6 +967,9 @@ static struct file_struct *send_file_nam
                                          unsigned short flags)
  {
        struct file_struct *file;
@@ -1388,7 +1388,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
        file = make_file(fname, flist, stp, flags,
                         f == -2 ? SERVER_FILTERS : ALL_FILTERS);
-@@ -952,6 +980,15 @@ static struct file_struct *send_file_nam
+@@ -951,6 +979,15 @@ static struct file_struct *send_file_nam
        if (chmod_modes && !S_ISLNK(file->mode))
                file->mode = tweak_mode(file->mode, chmod_modes);
  
@@ -1404,7 +1404,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        maybe_emit_filelist_progress(flist->count + flist_count_offset);
  
        flist_expand(flist);
-@@ -959,6 +996,15 @@ static struct file_struct *send_file_nam
+@@ -958,6 +995,15 @@ static struct file_struct *send_file_nam
        if (file->basename[0]) {
                flist->files[flist->count++] = file;
                send_file_entry(file, f);
@@ -1573,7 +1573,7 @@ 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 = daemon_log_format_has_i || dry_run
+                       code = logfile_format_has_i || dry_run
                             ? FCLIENT : FINFO;
 @@ -688,8 +708,13 @@ static int try_dests_reg(struct file_str
                        }
@@ -1642,7 +1642,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
 +#endif
                }
                if (verbose > 1 && maybe_ATTRS_REPORT) {
-                       code = daemon_log_format_has_i || dry_run
+                       code = logfile_format_has_i || dry_run
 @@ -781,6 +819,7 @@ static int try_dests_non(struct file_str
  }
  
@@ -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
-@@ -600,8 +600,10 @@ static void log_formatted(enum logcode c
+@@ -592,8 +592,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';
@@ -5539,7 +5539,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  int preserve_perms = 0;
  int preserve_executability = 0;
  int preserve_devices = 0;
-@@ -194,6 +195,7 @@ static void print_rsync_version(enum log
+@@ -198,6 +199,7 @@ static void print_rsync_version(enum log
        char const *got_socketpair = "no ";
        char const *have_inplace = "no ";
        char const *hardlinks = "no ";
@@ -5547,7 +5547,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        char const *links = "no ";
        char const *ipv6 = "no ";
        STRUCT_STAT *dumstat;
-@@ -210,6 +212,10 @@ static void print_rsync_version(enum log
+@@ -214,6 +216,10 @@ static void print_rsync_version(enum log
        hardlinks = "";
  #endif
  
@@ -5558,7 +5558,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  #ifdef SUPPORT_LINKS
        links = "";
  #endif
-@@ -223,9 +229,9 @@ static void print_rsync_version(enum log
+@@ -227,9 +233,9 @@ static void print_rsync_version(enum log
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
        rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@ -5570,7 +5570,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
-@@ -295,6 +301,9 @@ void usage(enum logcode F)
+@@ -299,6 +305,9 @@ void usage(enum logcode F)
    rprintf(F," -H, --hard-links            preserve hard links\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
    rprintf(F," -E, --executability         preserve the file's executability\n");
@@ -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");
-@@ -410,6 +419,9 @@ static struct poptOption long_options[] 
+@@ -415,6 +424,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 },
-@@ -1072,6 +1084,24 @@ int parse_arguments(int *argc, const cha
+@@ -1080,6 +1092,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. */
-@@ -1503,6 +1533,10 @@ void server_options(char **args,int *arg
+@@ -1526,6 +1556,10 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';
@@ -5628,7 +5628,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        if (preserve_gid)
 --- old/receiver.c
 +++ new/receiver.c
-@@ -48,6 +48,7 @@ extern int keep_partial;
+@@ -47,6 +47,7 @@ extern int keep_partial;
  extern int checksum_seed;
  extern int inplace;
  extern int delay_updates;
@@ -5636,9 +5636,9 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern struct stats stats;
  extern char *log_format;
  extern char *tmpdir;
-@@ -346,6 +347,10 @@ int recv_files(int f_in, struct file_lis
-       int itemizing = am_daemon ? daemon_log_format_has_i
-                     : !am_server && log_format_has_i;
+@@ -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;
        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)
-@@ -543,7 +548,16 @@ int recv_files(int f_in, struct file_lis
+@@ -541,7 +546,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;
@@ -5670,7 +5670,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
 @@ -33,6 +33,7 @@
  extern int verbose;
  extern int dry_run;
- extern int daemon_log_format_has_i;
+ extern int logfile_format_has_i;
 +extern int preserve_acls;
  extern int preserve_perms;
  extern int preserve_executability;
@@ -5844,7 +5844,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
 --- old/rsync.h
 +++ new/rsync.h
-@@ -485,6 +485,15 @@ struct idev {
+@@ -486,6 +486,15 @@ struct idev {
  #define IN_LOOPBACKNET 127
  #endif
  
@@ -5860,7 +5860,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  #define GID_NONE ((gid_t)-1)
  
  #define HL_CHECK_MASTER       0
-@@ -645,6 +654,17 @@ struct stats {
+@@ -646,6 +655,17 @@ struct stats {
  
  struct chmod_mode_struct;
  
@@ -5878,7 +5878,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  #include "byteorder.h"
  #include "lib/mdfour.h"
  #include "lib/wildmatch.h"
-@@ -660,6 +680,16 @@ struct chmod_mode_struct;
+@@ -661,6 +681,16 @@ struct chmod_mode_struct;
  
  #define UNUSED(x) x __attribute__((__unused__))
  
@@ -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
-@@ -742,7 +743,9 @@ quote(itemize(
+@@ -744,7 +745,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.
  ))
-@@ -773,9 +776,11 @@ The preservation of the destination's se
+@@ -775,9 +778,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
-@@ -793,6 +798,15 @@ quote(itemize(
+@@ -795,6 +800,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
-@@ -1374,8 +1388,8 @@ if the receiving rsync is at least versi
+@@ -1376,8 +1390,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.
-@@ -1424,7 +1438,11 @@ quote(itemize(
+@@ -1426,7 +1440,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 8fa4fac..30bd52c 100644 (file)
@@ -18,7 +18,7 @@ gets to be really large.
  extern struct file_list *the_file_list;
  
  extern char curr_dir[MAXPATHLEN];
-@@ -355,14 +356,14 @@ static void send_file_entry(struct file_
+@@ -347,14 +348,14 @@ static void send_file_entry(struct file_
                }
        } else if (protocol_version < 28)
                rdev = makedev(0, 0);
@@ -37,7 +37,7 @@ gets to be really large.
        if (file->modtime == modtime)
                flags |= XMIT_SAME_TIME;
        else
-@@ -613,8 +614,7 @@ static struct file_struct *receive_file_
+@@ -605,8 +606,7 @@ static struct file_struct *receive_file_
        file->modtime = modtime;
        file->length = file_length;
        file->mode = mode;
@@ -47,7 +47,7 @@ gets to be really large.
  
        if (dirname_len) {
                file->dirname = lastdir = bp;
-@@ -865,8 +865,7 @@ struct file_struct *make_file(char *fnam
+@@ -855,8 +855,7 @@ struct file_struct *make_file(char *fnam
        file->modtime = st.st_mtime;
        file->length = st.st_size;
        file->mode = st.st_mode;
@@ -57,7 +57,7 @@ gets to be really large.
  
  #ifdef SUPPORT_HARD_LINKS
        if (flist && flist->hlink_pool) {
-@@ -934,8 +933,7 @@ struct file_struct *make_file(char *fnam
+@@ -924,8 +923,7 @@ struct file_struct *make_file(char *fnam
                        file->modtime = st2.st_mtime;
                        file->length = st2.st_size;
                        file->mode = st2.st_mode;
@@ -67,7 +67,7 @@ gets to be really large.
                        file->u.link = NULL;
                } else
                        file->mode = save_mode;
-@@ -1379,7 +1377,7 @@ struct file_list *recv_file_list(int f)
+@@ -1375,7 +1373,7 @@ struct file_list *recv_file_list(int f)
        clean_flist(flist, relative_paths, 1);
  
        if (f >= 0) {
@@ -76,7 +76,7 @@ gets to be really large.
  
                /* Recv the io_error flag */
                if (lp_ignore_errors(module_id) || ignore_errors)
-@@ -1695,13 +1693,15 @@ static void output_flist(struct file_lis
+@@ -1691,13 +1689,15 @@ static void output_flist(struct file_lis
  
        for (i = 0; i < flist->count; i++) {
                file = flist->files[i];
@@ -148,15 +148,15 @@ gets to be really large.
                iflags |= ITEM_IS_NEW;
 --- old/log.c
 +++ new/log.c
-@@ -43,6 +43,7 @@ extern int daemon_log_format_has_o_or_i;
- extern mode_t orig_umask;
- extern char *auth_user;
+@@ -45,6 +45,7 @@ extern char *auth_user;
  extern char *log_format;
+ extern char *logfile_format;
+ extern char *logfile_name;
 +extern struct id_pair *id_pairs;
  #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
  extern iconv_t ic_chck;
  #endif
-@@ -475,16 +476,16 @@ static void log_formatted(enum logcode c
+@@ -464,16 +465,16 @@ static void log_formatted(enum logcode c
                case 'U':
                        strlcat(fmt, "ld", sizeof fmt);
                        snprintf(buf2, sizeof buf2, fmt,
@@ -235,7 +235,7 @@ gets to be really large.
                        rsyserr(FERROR, errno, "%s %s failed",
 --- old/rsync.h
 +++ new/rsync.h
-@@ -495,6 +495,11 @@ struct hlink {
+@@ -496,6 +496,11 @@ struct hlink {
        int hlindex;
  };
  
@@ -247,7 +247,7 @@ gets to be really large.
  #define F_DEV link_u.idev->dev
  #define F_INODE       link_u.idev->inode
  
-@@ -519,8 +524,7 @@ struct file_struct {
+@@ -520,8 +525,7 @@ struct file_struct {
                struct hlink *links;
        } link_u;
        time_t modtime;
index 394905e..3ec3dea 100644 (file)
@@ -39,7 +39,7 @@ After applying this patch, run these commands for a successful build:
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -379,7 +380,7 @@ void itemize(struct file_struct *file, i
+@@ -376,7 +377,7 @@ void itemize(struct file_struct *file, i
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
  int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
  {
@@ -50,7 +50,7 @@ After applying this patch, run these commands for a successful build:
        /* if always checksum is set then we use the checksum instead
 --- old/main.c
 +++ new/main.c
-@@ -110,7 +110,7 @@ pid_t wait_process(pid_t pid, int *statu
+@@ -119,7 +119,7 @@ pid_t wait_process(pid_t pid, int *statu
  }
  
  /* Wait for a process to exit, calling io_flush while waiting. */
@@ -69,16 +69,16 @@ After applying this patch, run these commands for a successful build:
  int daemon_bwlimit = 0;
  int bwlimit = 0;
  int fuzzy_basis = 0;
-@@ -148,6 +149,8 @@ char *basis_dir[MAX_BASIS_DIRS+1];
- char *config_file = NULL;
- char *shell_cmd = NULL;
- char *log_format = NULL;
+@@ -151,6 +152,8 @@ char *log_format = NULL;
+ char *logfile_name = NULL;
+ char *logfile_format = NULL;
+ char *password_file = NULL;
 +char *source_filter = NULL;
 +char *dest_filter = NULL;
- char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
-@@ -332,6 +335,7 @@ void usage(enum logcode F)
+ char backup_dir_buf[MAXPATHLEN];
+@@ -337,6 +340,7 @@ void usage(enum logcode F)
    rprintf(F,"     --timeout=TIME          set I/O timeout in seconds\n");
    rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");
    rprintf(F,"     --size-only             skip files that match in size\n");
@@ -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");
-@@ -367,6 +371,8 @@ void usage(enum logcode F)
+@@ -373,6 +377,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");
-@@ -443,6 +449,7 @@ static struct poptOption long_options[] 
+@@ -453,6 +459,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 },
-@@ -517,6 +524,8 @@ static struct poptOption long_options[] 
+@@ -528,6 +535,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 },
-@@ -1385,6 +1394,16 @@ int parse_arguments(int *argc, const cha
+@@ -1406,6 +1415,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;
-@@ -1647,6 +1666,25 @@ void server_options(char **args,int *arg
+@@ -1671,6 +1690,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
-@@ -157,3 +157,77 @@ pid_t local_child(int argc, char **argv,
+@@ -159,3 +159,77 @@ pid_t local_child(int argc, char **argv,
  
        return pid;
  }
@@ -237,7 +237,7 @@ After applying this patch, run these commands for a successful build:
 +}
 --- old/receiver.c
 +++ new/receiver.c
-@@ -53,6 +53,7 @@ extern int inplace;
+@@ -49,6 +49,7 @@ extern int inplace;
  extern int delay_updates;
  extern struct stats stats;
  extern char *log_format;
@@ -245,8 +245,8 @@ After applying this patch, run these commands for a successful build:
  extern char *tmpdir;
  extern char *partial_dir;
  extern char *basis_dir[];
-@@ -350,6 +351,8 @@ int recv_files(int f_in, struct file_lis
-                     : !am_server && log_format_has_i;
+@@ -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;
        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);
-@@ -362,6 +365,23 @@ int recv_files(int f_in, struct file_lis
+@@ -357,6 +360,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();
  
-@@ -604,6 +624,9 @@ int recv_files(int f_in, struct file_lis
+@@ -599,6 +619,9 @@ int recv_files(int f_in, struct file_lis
                else if (!am_server && verbose && do_progress)
                        rprintf(FINFO, "%s\n", fname);
  
@@ -288,7 +288,7 @@ After applying this patch, run these commands for a successful build:
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
                                       fname, fd2, file->length);
-@@ -619,6 +642,16 @@ int recv_files(int f_in, struct file_lis
+@@ -614,6 +637,16 @@ int recv_files(int f_in, struct file_lis
                        exit_cleanup(RERR_FILEIO);
                }
  
@@ -303,8 +303,8 @@ After applying this patch, run these commands for a successful build:
 +              }
 +
                if ((recv_ok && (!delay_updates || !partialptr)) || inplace) {
-                       if (partialptr == fname || *partial_dir == '/')
-                               partialptr = NULL;
+                       char *temp_copy_name;
+                       if (partialptr == fname)
 --- old/rsync.h
 +++ new/rsync.h
 @@ -103,6 +103,7 @@
@@ -317,7 +317,7 @@ After applying this patch, run these commands for a successful build:
  
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -355,6 +355,7 @@ to the detailed description below for a 
+@@ -359,6 +359,7 @@ to the detailed description below for a 
       --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
@@ -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
-@@ -390,6 +391,8 @@ to the detailed description below for a 
+@@ -395,6 +396,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
-@@ -1609,6 +1612,33 @@ file previously generated by bf(--write-
+@@ -1732,6 +1735,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,7 +370,7 @@ 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
-@@ -41,6 +41,7 @@ extern int write_batch;
+@@ -44,6 +44,7 @@ extern int write_batch;
  extern struct stats stats;
  extern struct file_list *the_file_list;
  extern char *log_format;
@@ -378,8 +378,8 @@ After applying this patch, run these commands for a successful build:
  
  
  /**
-@@ -219,6 +220,26 @@ void send_files(struct file_list *flist,
-                     : !am_server && log_format_has_i;
+@@ -221,6 +222,26 @@ void send_files(struct file_list *flist,
+       int itemizing = am_server ? logfile_format_has_i : log_format_has_i;
        int f_xfer = write_batch < 0 ? batch_fd : f_out;
        int i, j;
 +      char *filter_argv[MAX_FILTER_ARGS + 1];
@@ -405,7 +405,7 @@ After applying this patch, run these commands for a successful build:
  
        if (verbose > 2)
                rprintf(FINFO, "send_files starting\n");
-@@ -293,6 +314,7 @@ void send_files(struct file_list *flist,
+@@ -295,6 +316,7 @@ void send_files(struct file_list *flist,
                        return;
                }
  
@@ -413,7 +413,7 @@ After applying this patch, run these commands for a successful build:
                fd = do_open(fname, O_RDONLY, 0);
                if (fd == -1) {
                        if (errno == ENOENT) {
-@@ -321,6 +343,33 @@ void send_files(struct file_list *flist,
+@@ -323,6 +345,33 @@ void send_files(struct file_list *flist,
                        return;
                }
  
@@ -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);
-@@ -363,6 +412,8 @@ void send_files(struct file_list *flist,
+@@ -365,6 +414,8 @@ void send_files(struct file_list *flist,
                        }
                }
                close(fd);