Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Sun, 23 Sep 2007 22:00:58 +0000 (22:00 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 23 Sep 2007 22:00:58 +0000 (22:00 +0000)
atimes.diff
backup-dir-dels.diff
checksum-updating.diff
detect-renamed.diff
time-limit.diff

index 7abb3dc..173e3e9 100644 (file)
@@ -17,7 +17,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int preserve_acls;
  extern int preserve_xattrs;
  extern int need_messages_from_generator;
-@@ -63,7 +64,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -60,7 +61,7 @@ extern iconv_t ic_send, ic_recv;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -26,7 +26,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  #ifdef ICONV_OPTION
  int ic_ndx;
  
-@@ -115,6 +116,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -45,34 +45,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -174,6 +175,7 @@ void show_flist_stats(void)
- static void list_file_entry(struct file_struct *f)
- {
-       char permbuf[PERMSTRING_SIZE];
-+      time_t atime = atimes_ndx ? F_ATIME(f) : 0;
-       double len;
-       if (!F_IS_ACTIVE(f)) {
-@@ -188,14 +190,16 @@ static void list_file_entry(struct file_
- #ifdef SUPPORT_LINKS
-       if (preserve_links && S_ISLNK(f->mode)) {
--              rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
-+              rprintf(FINFO, "%s %11.0f %s %s %s -> %s\n",
-                       permbuf, len, timestring(f->modtime),
-+                      atimes_ndx ? timestring(atime) : "",
-                       f_name(f, NULL), F_SYMLINK(f));
-       } else
- #endif
-       {
--              rprintf(FINFO, "%s %11.0f %s %s\n",
-+              rprintf(FINFO, "%s %11.0f %s %s %s\n",
-                       permbuf, len, timestring(f->modtime),
-+                      atimes_ndx ? timestring(atime) : "",
-                       f_name(f, NULL));
-       }
- }
-@@ -363,6 +367,7 @@ int push_pathname(const char *dir, int l
+@@ -334,6 +335,7 @@ int push_pathname(const char *dir, int l
  static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ndx)
  {
        static time_t modtime;
@@ -80,7 +53,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -461,6 +466,13 @@ static void send_file_entry(int f, struc
+@@ -432,6 +434,13 @@ static void send_file_entry(int f, struc
                xflags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -94,7 +67,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -534,6 +546,8 @@ static void send_file_entry(int f, struc
+@@ -505,6 +514,8 @@ static void send_file_entry(int f, struc
        }
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -103,7 +76,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -620,7 +634,7 @@ static void send_file_entry(int f, struc
+@@ -591,7 +602,7 @@ static void send_file_entry(int f, struc
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
@@ -112,7 +85,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -751,6 +765,16 @@ static struct file_struct *recv_file_ent
+@@ -722,6 +733,16 @@ static struct file_struct *recv_file_ent
        }
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -129,7 +102,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -879,6 +903,8 @@ static struct file_struct *recv_file_ent
+@@ -850,6 +871,8 @@ static struct file_struct *recv_file_ent
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -138,7 +111,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  #ifdef ICONV_OPTION
        if (ic_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1196,6 +1222,8 @@ struct file_struct *make_file(const char
+@@ -1172,6 +1195,8 @@ struct file_struct *make_file(const char
                F_OWNER(file) = st.st_uid;
        if (gid_ndx)
                F_GROUP(file) = st.st_gid;
@@ -176,7 +149,34 @@ TODO:  need to fix this to handle 64-bit time_t values!
                        if (preserve_hard_links && F_IS_HLINKED(file))
                                finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
                        if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1793,7 +1799,7 @@ static void touch_up_dirs(struct file_li
+@@ -1075,6 +1081,7 @@ static int try_dests_non(struct file_str
+ static void list_file_entry(struct file_struct *f)
+ {
+       char permbuf[PERMSTRING_SIZE];
++      time_t atime = atimes_ndx ? F_ATIME(f) : 0;
+       double len;
+       if (!F_IS_ACTIVE(f)) {
+@@ -1089,14 +1096,16 @@ static void list_file_entry(struct file_
+ #ifdef SUPPORT_LINKS
+       if (preserve_links && S_ISLNK(f->mode)) {
+-              rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
++              rprintf(FINFO, "%s %11.0f %s %s %s -> %s\n",
+                       permbuf, len, timestring(f->modtime),
++                      atimes_ndx ? timestring(atime) : "",
+                       f_name(f, NULL), F_SYMLINK(f));
+       } else
+ #endif
+       {
+-              rprintf(FINFO, "%s %11.0f %s %s\n",
++              rprintf(FINFO, "%s %11.0f %s %s %s\n",
+                       permbuf, len, timestring(f->modtime),
++                      atimes_ndx ? timestring(atime) : "",
+                       f_name(f, NULL));
+       }
+ }
+@@ -1846,7 +1855,7 @@ static void touch_up_dirs(struct file_li
                if (!(file->mode & S_IWUSR))
                        do_chmod(fname, file->mode);
                if (need_retouch_dir_times)
@@ -187,7 +187,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
                else if (!(counter & 0xFF))
 --- old/log.c
 +++ new/log.c
-@@ -630,7 +630,8 @@ static void log_formatted(enum logcode c
+@@ -631,7 +631,8 @@ static void log_formatted(enum logcode c
                        c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -199,7 +199,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
                        c[11] = '\0';
 --- old/options.c
 +++ new/options.c
-@@ -56,6 +56,7 @@ int preserve_specials = 0;
+@@ -57,6 +57,7 @@ int preserve_specials = 0;
  int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
@@ -207,7 +207,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -345,6 +346,7 @@ void usage(enum logcode F)
+@@ -346,6 +347,7 @@ void usage(enum logcode F)
    rprintf(F," -D                          same as --devices --specials\n");
    rprintf(F," -t, --times                 preserve modification times\n");
    rprintf(F," -O, --omit-dir-times        omit directories from --times\n");
@@ -225,7 +225,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },
    {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
    {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
-@@ -1715,6 +1720,8 @@ void server_options(char **args, int *ar
+@@ -1717,6 +1722,8 @@ void server_options(char **args, int *ar
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -236,7 +236,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        else if (preserve_executability && am_sender)
 --- old/rsync.c
 +++ new/rsync.c
-@@ -32,6 +32,7 @@ extern int preserve_acls;
+@@ -33,6 +33,7 @@ extern int preserve_acls;
  extern int preserve_xattrs;
  extern int preserve_perms;
  extern int preserve_executability;
@@ -244,7 +244,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int preserve_times;
  extern int am_root;
  extern int am_server;
-@@ -342,6 +343,7 @@ int set_file_attrs(const char *fname, st
+@@ -343,6 +344,7 @@ int set_file_attrs(const char *fname, st
        int updated = 0;
        statx sx2;
        int change_uid, change_gid;
@@ -252,7 +252,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        mode_t new_mode = file->mode;
        int inherit;
  
-@@ -382,18 +384,36 @@ int set_file_attrs(const char *fname, st
+@@ -383,18 +385,36 @@ int set_file_attrs(const char *fname, st
                set_stat_xattr(fname, file);
  #endif
  
@@ -310,7 +310,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -573,6 +575,7 @@ extern int file_extra_cnt;
+@@ -579,6 +581,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -318,7 +318,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -610,6 +613,7 @@ extern int xattrs_ndx;
+@@ -616,6 +619,7 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
@@ -336,7 +336,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -948,6 +949,12 @@ it is preserving modification times (see
+@@ -956,6 +957,12 @@ it is preserving modification times (see
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -349,7 +349,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1610,8 +1617,10 @@ quote(itemization(
+@@ -1633,8 +1640,10 @@ quote(itemization(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
@@ -424,7 +424,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
 --- old/tls.c
 +++ new/tls.c
-@@ -99,6 +99,8 @@ static int stat_xattr(const char *fname,
+@@ -104,6 +104,8 @@ static int stat_xattr(const char *fname,
  
  #endif
  
@@ -433,7 +433,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  static void failed(char const *what, char const *where)
  {
        fprintf(stderr, PROGRAM ": %s %s: %s\n",
-@@ -106,12 +108,29 @@ static void failed(char const *what, cha
+@@ -111,12 +113,29 @@ static void failed(char const *what, cha
        exit(1);
  }
  
@@ -465,7 +465,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        char linkbuf[4096];
  
        if (do_lstat(fname, &buf) < 0)
-@@ -148,19 +167,8 @@ static void list_file(const char *fname)
+@@ -153,19 +172,8 @@ static void list_file(const char *fname)
  
        permstring(permbuf, buf.st_mode);
  
@@ -487,7 +487,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  
        /* TODO: Perhaps escape special characters in fname? */
  
-@@ -171,13 +179,15 @@ static void list_file(const char *fname)
+@@ -176,13 +184,15 @@ static void list_file(const char *fname)
                    (long)minor(buf.st_rdev));
        } else /* NB: use double for size since it might not fit in a long. */
                printf("%12.0f", (double)buf.st_size);
@@ -505,7 +505,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  #ifdef SUPPORT_XATTRS
    {"fake-super",      'f', POPT_ARG_VAL,    &am_root, -1, 0, 0 },
  #endif
-@@ -191,6 +201,7 @@ static void tls_usage(int ret)
+@@ -196,6 +206,7 @@ static void tls_usage(int ret)
    fprintf(F,"usage: " PROGRAM " [OPTIONS] FILE ...\n");
    fprintf(F,"Trivial file listing program for portably checking rsync\n");
    fprintf(F,"\nOptions:\n");
@@ -515,7 +515,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  #endif
 --- old/util.c
 +++ new/util.c
-@@ -121,7 +121,7 @@ NORETURN void overflow_exit(const char *
+@@ -122,7 +122,7 @@ NORETURN void overflow_exit(const char *
        exit_cleanup(RERR_MALLOC);
  }
  
@@ -524,7 +524,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
  {
  #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
        if (S_ISLNK(mode))
-@@ -129,9 +129,13 @@ int set_modtime(const char *fname, time_
+@@ -130,9 +130,13 @@ int set_modtime(const char *fname, time_
  #endif
  
        if (verbose > 2) {
@@ -540,7 +540,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
        }
  
        if (dry_run)
-@@ -140,7 +144,7 @@ int set_modtime(const char *fname, time_
+@@ -141,7 +145,7 @@ int set_modtime(const char *fname, time_
        {
  #ifdef HAVE_UTIMES
                struct timeval t[2];
@@ -549,7 +549,7 @@ TODO:  need to fix this to handle 64-bit time_t values!
                t[0].tv_usec = 0;
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
-@@ -153,12 +157,12 @@ int set_modtime(const char *fname, time_
+@@ -154,12 +158,12 @@ int set_modtime(const char *fname, time_
                return utimes(fname, t);
  #elif defined HAVE_UTIMBUF
                struct utimbuf tbuf;
index c2a7a89..9cb5b7b 100644 (file)
@@ -69,17 +69,16 @@ To use this patch, run these commands for a successful build:
  
        if (!fnamebak)
                return 0;
-@@ -96,7 +120,8 @@ static int make_bak_dir(char *fullpath)
+@@ -96,7 +120,7 @@ int make_bak_dir(const char *fullpath)
  {
-       statx sx;
+       char fbuf[MAXPATHLEN], *rel, *end, *p;
        struct file_struct *file;
--      char *rel = fullpath + backup_dir_len;
-+      int dir_len = deleting ? backup_dir_dels_len : backup_dir_len;
-+      char *rel = fullpath + dir_len;
-       char *end = rel + strlen(rel);
-       char *p = end;
+-      int len = backup_dir_len;
++      int len = deleting ? backup_dir_dels_len : backup_dir_len;
+       statx sx;
  
-@@ -212,7 +237,8 @@ static int keep_backup(const char *fname
+       while (*fullpath == '.' && fullpath[1] == '/') {
+@@ -211,7 +235,8 @@ static int keep_backup(const char *fname
        if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
                return 1; /* the file could have disappeared */
  
@@ -89,7 +88,7 @@ To use this patch, run these commands for a successful build:
                unmake_file(file);
                return 0;
        }
-@@ -327,3 +353,13 @@ int make_backup(const char *fname)
+@@ -326,3 +351,13 @@ int make_backup(const char *fname)
                return keep_backup(fname);
        return make_simple_backup(fname);
  }
@@ -105,7 +104,7 @@ To use this patch, run these commands for a successful build:
 +}
 --- old/generator.c
 +++ new/generator.c
-@@ -94,6 +94,9 @@ extern mode_t orig_umask;
+@@ -93,6 +93,9 @@ extern mode_t orig_umask;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -115,7 +114,7 @@ To use this patch, run these commands for a successful build:
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct filter_list_struct server_filter_list;
  #ifdef ICONV_OPTION
-@@ -131,10 +134,14 @@ enum delret {
+@@ -130,10 +133,14 @@ enum delret {
  static enum delret delete_dir_contents(char *fname, int flags);
  
  
@@ -131,7 +130,7 @@ To use this patch, run these commands for a successful build:
  }
  
  /* Delete a file or directory.  If DEL_RECURSE is set in the flags, this will
-@@ -170,9 +177,9 @@ static enum delret delete_item(char *fbu
+@@ -169,9 +176,9 @@ static enum delret delete_item(char *fbu
        if (S_ISDIR(mode)) {
                what = "rmdir";
                ok = do_rmdir(fbuf) == 0;
@@ -145,7 +144,7 @@ To use this patch, run these commands for a successful build:
                ok = robust_unlink(fbuf) == 0;
 --- old/options.c
 +++ new/options.c
-@@ -145,10 +145,14 @@ int no_detach
+@@ -147,10 +147,14 @@ int no_detach
  int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
@@ -160,7 +159,7 @@ To use this patch, run these commands for a successful build:
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -160,7 +164,9 @@ char *stdout_format = NULL;
+@@ -162,7 +166,9 @@ char *stdout_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
@@ -170,7 +169,7 @@ To use this patch, run these commands for a successful build:
  char *sockopts = NULL;
  int rsync_port = 0;
  int compare_dest = 0;
-@@ -316,6 +322,8 @@ void usage(enum logcode F)
+@@ -318,6 +324,8 @@ void usage(enum logcode F)
    rprintf(F," -b, --backup                make backups (see --suffix & --backup-dir)\n");
    rprintf(F,"     --backup-dir=DIR        make backups into hierarchy based in DIR\n");
    rprintf(F,"     --suffix=SUFFIX         set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
@@ -179,7 +178,7 @@ To use this patch, run these commands for a successful build:
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
-@@ -583,7 +591,9 @@ static struct poptOption long_options[] 
+@@ -588,7 +596,9 @@ static struct poptOption long_options[] 
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -189,7 +188,7 @@ To use this patch, run these commands for a successful build:
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1378,6 +1388,8 @@ int parse_arguments(int *argc, const cha
+@@ -1400,6 +1410,8 @@ int parse_arguments(int *argc_p, const c
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
@@ -198,7 +197,7 @@ To use this patch, run these commands for a successful build:
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
-@@ -1395,6 +1407,14 @@ int parse_arguments(int *argc, const cha
+@@ -1417,6 +1429,14 @@ int parse_arguments(int *argc_p, const c
                        if (check_filter(elp, backup_dir, 1) < 0)
                                goto options_rejected;
                }
@@ -213,7 +212,7 @@ To use this patch, run these commands for a successful build:
        }
  
        if (!backup_suffix)
-@@ -1406,6 +1426,16 @@ int parse_arguments(int *argc, const cha
+@@ -1428,6 +1448,16 @@ int parse_arguments(int *argc_p, const c
                        backup_suffix);
                return 0;
        }
@@ -230,7 +229,7 @@ To use this patch, run these commands for a successful build:
        if (backup_dir) {
                backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
                backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1429,6 +1459,31 @@ int parse_arguments(int *argc, const cha
+@@ -1451,6 +1481,31 @@ int parse_arguments(int *argc_p, const c
                        "P *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
@@ -262,7 +261,7 @@ To use this patch, run these commands for a successful build:
  
        if (make_backups && !backup_dir) {
                omit_dir_times = 0; /* Implied, so avoid -O to sender. */
-@@ -1816,6 +1871,10 @@ void server_options(char **args,int *arg
+@@ -1845,6 +1900,10 @@ void server_options(char **args, int *ar
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -273,7 +272,7 @@ To use this patch, run these commands for a successful build:
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1824,7 +1883,13 @@ void server_options(char **args,int *arg
+@@ -1853,7 +1912,13 @@ void server_options(char **args, int *ar
                        goto oom;
                args[ac++] = arg;
        }
index a5a4a82..64c72eb 100644 (file)
@@ -11,7 +11,7 @@ To use this patch, run these commands for a successful build:
 
 --- old/clientserver.c
 +++ new/clientserver.c
-@@ -38,6 +38,7 @@ extern int sanitize_paths;
+@@ -37,6 +37,7 @@ extern int sanitize_paths;
  extern int filesfrom_fd;
  extern int remote_protocol;
  extern int protocol_version;
@@ -19,7 +19,7 @@ To use this patch, run these commands for a successful build:
  extern int io_timeout;
  extern int no_detach;
  extern int default_af_hint;
-@@ -677,6 +678,8 @@ static int rsync_module(int f_in, int f_
+@@ -676,6 +677,8 @@ static int rsync_module(int f_in, int f_
        else if (am_root < 0) /* Treat --fake-super from client as --super. */
                am_root = 2;
  
@@ -35,10 +35,10 @@ To use this patch, run these commands for a successful build:
  
  extern int verbose;
 +extern int dry_run;
- extern int list_only;
  extern int am_root;
  extern int am_server;
-@@ -59,6 +60,7 @@ extern int implied_dirs;
+ extern int am_daemon;
+@@ -58,6 +59,7 @@ extern int implied_dirs;
  extern int file_extra_cnt;
  extern int ignore_perishable;
  extern int non_perishable_cnt;
@@ -46,7 +46,7 @@ To use this patch, run these commands for a successful build:
  extern int prune_empty_dirs;
  extern int copy_links;
  extern int copy_unsafe_links;
-@@ -83,6 +85,9 @@ extern iconv_t ic_send, ic_recv;
+@@ -82,6 +84,9 @@ extern iconv_t ic_send, ic_recv;
  
  #define PTR_SIZE (sizeof (struct file_struct *))
  
@@ -56,7 +56,7 @@ To use this patch, run these commands for a successful build:
  int io_error;
  int checksum_len;
  dev_t filesystem_dev; /* used to implement -x */
-@@ -118,6 +123,10 @@ static char empty_sum[MAX_DIGEST_LEN];
+@@ -117,6 +122,10 @@ static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int dir_count = 0;
  static int high_hlink_ndx;
@@ -67,7 +67,7 @@ To use this patch, run these commands for a successful build:
  
  static void clean_flist(struct file_list *flist, int strip_root);
  static void output_flist(struct file_list *flist);
-@@ -334,6 +343,301 @@ static void flist_done_allocating(struct
+@@ -304,6 +313,301 @@ static void flist_done_allocating(struct
                flist->pool_boundary = ptr;
  }
  
@@ -369,7 +369,7 @@ To use this patch, run these commands for a successful build:
  int push_pathname(const char *dir, int len)
  {
        if (dir == pathname)
-@@ -1005,7 +1309,7 @@ struct file_struct *make_file(const char
+@@ -975,7 +1279,7 @@ struct file_struct *make_file(const char
                              STRUCT_STAT *stp, int flags, int filter_level)
  {
        static char *lastdir;
@@ -378,7 +378,7 @@ To use this patch, run these commands for a successful build:
        struct file_struct *file;
        char thisname[MAXPATHLEN];
        char linkname[MAXPATHLEN];
-@@ -1095,6 +1399,8 @@ struct file_struct *make_file(const char
+@@ -1065,6 +1369,8 @@ struct file_struct *make_file(const char
        if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
                if (ignore_perishable)
                        non_perishable_cnt++;
@@ -387,7 +387,7 @@ To use this patch, run these commands for a successful build:
                return NULL;
        }
  
-@@ -1135,9 +1441,16 @@ struct file_struct *make_file(const char
+@@ -1105,9 +1411,16 @@ struct file_struct *make_file(const char
                        memcpy(lastdir, thisname, len);
                        lastdir[len] = '\0';
                        lastdir_len = len;
@@ -405,7 +405,7 @@ To use this patch, run these commands for a successful build:
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
-@@ -1213,11 +1526,44 @@ struct file_struct *make_file(const char
+@@ -1183,11 +1496,44 @@ struct file_struct *make_file(const char
        }
  #endif
  
@@ -453,7 +453,7 @@ To use this patch, run these commands for a successful build:
        /* This code is only used by the receiver when it is building
         * a list of files for a delete pass. */
        if (keep_dirlinks && linkname_len && flist) {
-@@ -1509,6 +1855,9 @@ static void send_directory(int f, struct
+@@ -1476,6 +1822,9 @@ static void send_directory(int f, struct
  
        closedir(d);
  
@@ -463,7 +463,7 @@ To use this patch, run these commands for a successful build:
        if (f >= 0 && recurse && !divert_dirs) {
                int i, end = flist->used - 1;
                /* send_if_directory() bumps flist->used, so use "end". */
-@@ -2063,7 +2412,11 @@ struct file_list *send_file_list(int f, 
+@@ -2034,7 +2383,11 @@ struct file_list *send_file_list(int f, 
                         * file-list to check if this is a 1-file xfer. */
                        send_extra_file_list(f, 1);
                }
@@ -476,7 +476,7 @@ To use this patch, run these commands for a successful build:
  
        return flist;
  }
-@@ -2355,7 +2708,7 @@ void flist_free(struct file_list *flist)
+@@ -2320,7 +2673,7 @@ void flist_free(struct file_list *flist)
  
        if (!flist->prev || !flist_cnt)
                pool_destroy(flist->file_pool);
@@ -560,7 +560,7 @@ To use this patch, run these commands for a successful build:
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1956,7 +1959,9 @@ void server_options(char **args, int *ar
+@@ -1958,7 +1961,9 @@ void server_options(char **args, int *ar
                                args[ac++] = basis_dir[i];
                        }
                }
index 954dfad..1518725 100644 (file)
@@ -34,15 +34,15 @@ TODO:
 
 --- old/compat.c
 +++ new/compat.c
-@@ -49,6 +49,7 @@ extern int preserve_xattrs;
- extern int need_messages_from_generator;
- extern int delete_mode, delete_before, delete_during, delete_after;
- extern int delete_excluded;
+@@ -41,6 +41,7 @@ extern int checksum_seed;
+ extern int basis_dir_cnt;
+ extern int prune_empty_dirs;
+ extern int protocol_version;
 +extern int detect_renamed;
- extern int make_backups;
- extern char *shell_cmd; /* contains VER.SUB string if client is a pre-release */
- extern char *backup_dir, *backup_suffix;
-@@ -221,7 +222,7 @@ void setup_protocol(int f_out,int f_in)
+ extern int protect_args;
+ extern int preserve_uid;
+ extern int preserve_gid;
+@@ -218,7 +219,7 @@ void setup_protocol(int f_out,int f_in)
        } else if (protocol_version >= 30) {
                if (recurse && allow_inc_recurse
                 && !delete_before && !delete_after && !delay_updates
@@ -70,7 +70,7 @@ TODO:
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int dir_count = 0;
-@@ -281,6 +284,45 @@ static int is_excluded(char *fname, int 
+@@ -252,6 +255,45 @@ static int is_excluded(char *fname, int 
        return 0;
  }
  
@@ -116,7 +116,7 @@ TODO:
  static void send_directory(int f, struct file_list *flist,
                           char *fbuf, int len, int flags);
  
-@@ -1935,6 +1977,25 @@ struct file_list *send_file_list(int f, 
+@@ -2021,6 +2063,25 @@ struct file_list *send_file_list(int f, 
        if (verbose > 2)
                rprintf(FINFO, "send_file_list done\n");
  
@@ -442,15 +442,15 @@ TODO:
  
        if (do_progress && !am_server)
                rprintf(FINFO, "                    \r");
-@@ -1072,6 +1217,7 @@ static int try_dests_non(struct file_str
-       return j;
+@@ -1101,6 +1246,7 @@ static void list_file_entry(struct file_
+       }
  }
  
 +static struct bitbag *delayed_bits = NULL;
  static int phase = 0;
  static int dflt_perms;
  
-@@ -1308,8 +1454,12 @@ static void recv_generator(char *fname, 
+@@ -1345,8 +1491,12 @@ static void recv_generator(char *fname, 
                        }
                }
                else if (delete_during && f_out != -1 && !phase && dry_run < 2
@@ -465,7 +465,7 @@ TODO:
                goto cleanup;
        }
  
-@@ -1587,8 +1737,14 @@ static void recv_generator(char *fname, 
+@@ -1624,8 +1774,14 @@ static void recv_generator(char *fname, 
                        goto cleanup;
                }
  #endif
@@ -481,7 +481,7 @@ TODO:
                rsyserr(FERROR, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                goto cleanup;
-@@ -1910,6 +2066,12 @@ void generate_files(int f_out, const cha
+@@ -1961,6 +2117,12 @@ void generate_files(int f_out, const cha
        if (verbose > 2)
                rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
  
@@ -494,7 +494,7 @@ TODO:
        if (delete_before && !solo_file && cur_flist->used > 0)
                do_delete_pass();
        if (delete_during == 2) {
-@@ -1920,7 +2082,7 @@ void generate_files(int f_out, const cha
+@@ -1971,7 +2133,7 @@ void generate_files(int f_out, const cha
        }
        do_progress = 0;
  
@@ -503,7 +503,7 @@ TODO:
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1958,7 +2120,7 @@ void generate_files(int f_out, const cha
+@@ -2009,7 +2171,7 @@ void generate_files(int f_out, const cha
                                                dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                        } else
                                                dirdev = MAKEDEV(0, 0);
@@ -512,7 +512,7 @@ TODO:
                                }
                        }
                }
-@@ -2003,7 +2165,21 @@ void generate_files(int f_out, const cha
+@@ -2054,7 +2216,21 @@ void generate_files(int f_out, const cha
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -537,7 +537,7 @@ TODO:
                rprintf(FINFO, "generate_files phase=%d\n", phase);
 --- old/options.c
 +++ new/options.c
-@@ -79,6 +79,7 @@ int am_generator = 0;
+@@ -80,6 +80,7 @@ int am_generator = 0;
  int am_starting_up = 1;
  int relative_paths = -1;
  int implied_dirs = 1;
@@ -545,7 +545,7 @@ TODO:
  int numeric_ids = 0;
  int allow_8bit_chars = 0;
  int force_delete = 0;
-@@ -382,6 +383,7 @@ void usage(enum logcode F)
+@@ -383,6 +384,7 @@ void usage(enum logcode F)
    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");
@@ -561,7 +561,7 @@ TODO:
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
    {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },
    {"no-compress",      0,  POPT_ARG_VAL,    &do_compression, 0, 0, 0 },
-@@ -1531,7 +1534,7 @@ int parse_arguments(int *argc_p, const c
+@@ -1533,7 +1536,7 @@ int parse_arguments(int *argc_p, const c
                inplace = 1;
        }
  
@@ -570,7 +570,7 @@ TODO:
                partial_dir = tmp_partialdir;
  
        if (inplace) {
-@@ -1540,6 +1543,7 @@ int parse_arguments(int *argc_p, const c
+@@ -1542,6 +1545,7 @@ int parse_arguments(int *argc_p, const c
                        snprintf(err_buf, sizeof err_buf,
                                 "--%s cannot be used with --%s\n",
                                 append_mode ? "append" : "inplace",
@@ -578,7 +578,7 @@ TODO:
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -1887,6 +1891,8 @@ void server_options(char **args, int *ar
+@@ -1889,6 +1893,8 @@ void server_options(char **args, int *ar
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -597,7 +597,7 @@ TODO:
       --compare-dest=DIR      also compare received files relative to DIR
       --copy-dest=DIR         ... and include copies of unchanged files
       --link-dest=DIR         hardlink to files in DIR when unchanged
-@@ -1394,6 +1395,15 @@ Note that the use of the bf(--delete) op
+@@ -1417,6 +1418,15 @@ Note that the use of the bf(--delete) op
  fuzzy-match files, so either use bf(--delete-after) or specify some
  filename exclusions if you need to prevent this.
  
@@ -615,7 +615,7 @@ TODO:
  files against doing transfers (if the files are missing in the destination
 --- old/util.c
 +++ new/util.c
-@@ -1029,6 +1029,32 @@ int handle_partial_dir(const char *fname
+@@ -1030,6 +1030,32 @@ int handle_partial_dir(const char *fname
        return 1;
  }
  
index 10acf14..81c1e2d 100644 (file)
@@ -11,15 +11,15 @@ To use this patch, run these commands for a successful build:
 
 --- old/io.c
 +++ new/io.c
-@@ -52,6 +52,7 @@ extern int remove_source_files;
+@@ -53,6 +53,7 @@ extern int protocol_version;
+ extern int remove_source_files;
  extern int preserve_hard_links;
- extern char *filesfrom_host;
  extern struct stats stats;
 +extern time_t stop_at_utime;
- extern struct file_list *cur_flist, *first_flist;
+ extern struct file_list *cur_flist;
  #ifdef ICONV_OPTION
- extern iconv_t ic_send, ic_recv;
-@@ -179,16 +180,24 @@ static void check_timeout(void)
+ extern int filesfrom_convert;
+@@ -215,16 +216,24 @@ static void check_timeout(void)
  {
        time_t t;
  
@@ -49,7 +49,7 @@ To use this patch, run these commands for a successful build:
                        rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
 --- old/options.c
 +++ new/options.c
-@@ -109,6 +109,7 @@ size_t bwlimit_writemax = 0;
+@@ -110,6 +110,7 @@ size_t bwlimit_writemax = 0;
  int ignore_existing = 0;
  int ignore_non_existing = 0;
  int need_messages_from_generator = 0;
@@ -57,7 +57,7 @@ To use this patch, run these commands for a successful build:
  int max_delete = INT_MIN;
  OFF_T max_size = 0;
  OFF_T min_size = 0;
-@@ -413,6 +414,8 @@ void usage(enum logcode F)
+@@ -416,6 +417,8 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read daemon-access password from FILE\n");
    rprintf(F,"     --list-only             list the files instead of copying them\n");
    rprintf(F,"     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n");
@@ -66,7 +66,7 @@ To use this patch, run these commands for a successful build:
    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");
-@@ -435,7 +438,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -438,7 +441,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
@@ -75,7 +75,7 @@ To use this patch, run these commands for a successful build:
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -593,6 +596,8 @@ static struct poptOption long_options[] 
+@@ -603,6 +606,8 @@ static struct poptOption long_options[] 
    {"no-numeric-ids",   0,  POPT_ARG_VAL,    &numeric_ids, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },
    {"no-timeout",       0,  POPT_ARG_VAL,    &io_timeout, 0, 0, 0 },
@@ -84,7 +84,7 @@ To use this patch, run these commands for a successful build:
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
    {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -1205,6 +1210,36 @@ int parse_arguments(int *argc, const cha
+@@ -1221,6 +1226,36 @@ int parse_arguments(int *argc_p, const c
                        return 0;
  #endif
  
@@ -121,7 +121,7 @@ To use this patch, run these commands for a successful build:
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1803,6 +1838,15 @@ void server_options(char **args,int *arg
+@@ -1841,6 +1876,15 @@ void server_options(char **args, int *ar
                args[ac++] = arg;
        }
  
@@ -139,7 +139,7 @@ To use this patch, run these commands for a successful build:
                args[ac++] = backup_dir;
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -421,6 +421,8 @@ to the detailed description below for a 
+@@ -422,6 +422,8 @@ to the detailed description below for a 
       --password-file=FILE    read daemon-access password from FILE
       --list-only             list the files instead of copying them
       --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
@@ -148,7 +148,7 @@ To use this patch, run these commands for a successful build:
       --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
-@@ -1902,6 +1904,19 @@ transfer was too fast, it will wait befo
+@@ -1933,6 +1935,19 @@ transfer was too fast, it will wait befo
  result is an average transfer rate equaling the specified limit. A value
  of zero specifies no limit.
  
@@ -170,7 +170,7 @@ To use this patch, run these commands for a successful build:
  section for details, and also the bf(--only-write-batch) option.
 --- old/util.c
 +++ new/util.c
-@@ -121,6 +121,133 @@ NORETURN void overflow_exit(const char *
+@@ -122,6 +122,133 @@ NORETURN void overflow_exit(const char *
        exit_cleanup(RERR_MALLOC);
  }