Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Mon, 24 Jan 2005 02:08:40 +0000 (02:08 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 24 Jan 2005 02:08:40 +0000 (02:08 +0000)
acls.diff
atimes.diff
chmod-option.diff
filter.diff
owner-group-mod.diff

index 79d7f9a..ec09edb 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1285,9 +1285,9 @@ ACLs to a non-ACL-supporting disk should complain.
  AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
  AC_OUTPUT
  
---- orig/flist.c       2005-01-24 00:18:21
+--- orig/flist.c       2005-01-24 01:43:09
 +++ flist.c    2004-07-03 20:11:58
-@@ -971,6 +971,8 @@ void send_file_name(int f, struct file_l
+@@ -994,6 +994,8 @@ void send_file_name(int f, struct file_l
  
        if (!file)
                return;
@@ -1296,7 +1296,7 @@ ACLs to a non-ACL-supporting disk should complain.
  
        maybe_emit_filelist_progress(flist);
  
-@@ -979,6 +981,10 @@ void send_file_name(int f, struct file_l
+@@ -1002,6 +1004,10 @@ void send_file_name(int f, struct file_l
        if (file->basename[0]) {
                flist->files[flist->count++] = file;
                send_file_entry(file, f, base_flags);
@@ -1307,7 +1307,7 @@ ACLs to a non-ACL-supporting disk should complain.
        }
  
        if (recursive && S_ISDIR(file->mode)
-@@ -1302,6 +1308,8 @@ struct file_list *recv_file_list(int f)
+@@ -1327,6 +1333,8 @@ struct file_list *recv_file_list(int f)
                        flags |= read_byte(f) << 8;
                receive_file_entry(&flist->files[i], flags, flist, f);
  
@@ -1316,7 +1316,7 @@ ACLs to a non-ACL-supporting disk should complain.
                if (S_ISREG(flist->files[i]->mode))
                        stats.total_size += flist->files[i]->length;
  
-@@ -1324,6 +1332,8 @@ struct file_list *recv_file_list(int f)
+@@ -1349,6 +1357,8 @@ struct file_list *recv_file_list(int f)
  
        clean_flist(flist, relative_paths, 1);
  
@@ -1325,9 +1325,9 @@ ACLs to a non-ACL-supporting disk should complain.
        if (f != -1) {
                /* Now send the uid/gid list. This was introduced in
                 * protocol version 15 */
---- orig/generator.c   2005-01-20 23:05:34
-+++ generator.c        2004-07-03 20:11:58
-@@ -311,6 +311,10 @@ static void recv_generator(char *fname, 
+--- orig/generator.c   2005-01-24 01:43:09
++++ generator.c        2005-01-24 01:45:43
+@@ -313,6 +313,10 @@ static void recv_generator(char *fname, 
                if (set_perms(fname, file, statret ? NULL : &st, 0)
                    && verbose && f_out != -1)
                        rprintf(FINFO, "%s/\n", safe_fname(fname));
@@ -1335,9 +1335,9 @@ ACLs to a non-ACL-supporting disk should complain.
 +              if (f_out == -1)
 +                      SET_ACL(fname, file);
 +#endif
-               return;
-       } else if (max_size && file->length > max_size) {
-               if (verbose > 1)
+               if (delete_during && f_out != -1
+                   && (file->flags & FLAG_DEL_START))
+                       delete_in_dir(flist, fname);
 --- orig/lib/sysacls.c 2004-10-20 15:35:58
 +++ lib/sysacls.c      2004-10-20 15:35:58
 @@ -0,0 +1,3217 @@
@@ -4597,7 +4597,7 @@ ACLs to a non-ACL-supporting disk should complain.
    next;
  }
  
---- orig/options.c     2005-01-24 00:18:21
+--- orig/options.c     2005-01-24 01:43:10
 +++ options.c  2004-08-19 17:38:57
 @@ -43,6 +43,7 @@ int keep_dirlinks = 0;
  int copy_links = 0;
@@ -4607,7 +4607,7 @@ ACLs to a non-ACL-supporting disk should complain.
  int preserve_perms = 0;
  int preserve_devices = 0;
  int preserve_uid = 0;
-@@ -161,6 +162,7 @@ static void print_rsync_version(enum log
+@@ -163,6 +164,7 @@ static void print_rsync_version(enum log
        char const *got_socketpair = "no ";
        char const *have_inplace = "no ";
        char const *hardlinks = "no ";
@@ -4615,7 +4615,7 @@ ACLs to a non-ACL-supporting disk should complain.
        char const *links = "no ";
        char const *ipv6 = "no ";
        STRUCT_STAT *dumstat;
-@@ -177,6 +179,10 @@ static void print_rsync_version(enum log
+@@ -179,6 +181,10 @@ static void print_rsync_version(enum log
        hardlinks = "";
  #endif
  
@@ -4626,7 +4626,7 @@ ACLs to a non-ACL-supporting disk should complain.
  #if SUPPORT_LINKS
        links = "";
  #endif
-@@ -191,9 +197,9 @@ static void print_rsync_version(enum log
+@@ -193,9 +199,9 @@ static void print_rsync_version(enum log
                "Copyright (C) 1996-2004 by Andrew Tridgell and others\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
        rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@ -4638,7 +4638,7 @@ ACLs to a non-ACL-supporting disk should complain.
  
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
-@@ -259,6 +265,7 @@ void usage(enum logcode F)
+@@ -261,6 +267,7 @@ void usage(enum logcode F)
    rprintf(F," -H, --hard-links            preserve hard links\n");
    rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
@@ -4646,7 +4646,7 @@ ACLs to a non-ACL-supporting disk should complain.
    rprintf(F," -o, --owner                 preserve owner (root only)\n");
    rprintf(F," -g, --group                 preserve group\n");
    rprintf(F," -D, --devices               preserve devices (root only)\n");
-@@ -366,6 +373,7 @@ static struct poptOption long_options[] 
+@@ -371,6 +378,7 @@ static struct poptOption long_options[] 
    {"no-whole-file",    0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },
    {"copy-unsafe-links", 0, POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
    {"perms",           'p', POPT_ARG_NONE,   &preserve_perms, 0, 0, 0 },
@@ -4654,7 +4654,7 @@ ACLs to a non-ACL-supporting disk should complain.
    {"owner",           'o', POPT_ARG_NONE,   &preserve_uid, 0, 0, 0 },
    {"group",           'g', POPT_ARG_NONE,   &preserve_gid, 0, 0, 0 },
    {"devices",         'D', POPT_ARG_NONE,   &preserve_devices, 0, 0, 0 },
-@@ -747,6 +755,24 @@ int parse_arguments(int *argc, const cha
+@@ -753,6 +761,24 @@ int parse_arguments(int *argc, const cha
                        basis_dir[basis_dir_cnt++] = (char *)arg;
                        break;
  
@@ -4679,7 +4679,7 @@ ACLs to a non-ACL-supporting disk should complain.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off (opt-BASE is its index). */
-@@ -1074,6 +1100,8 @@ void server_options(char **args,int *arg
+@@ -1080,6 +1106,8 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';
@@ -4688,9 +4688,9 @@ ACLs to a non-ACL-supporting disk should complain.
        if (preserve_uid)
                argstr[x++] = 'o';
        if (preserve_gid)
---- orig/rsync.c       2005-01-20 23:52:09
+--- orig/rsync.c       2005-01-24 00:57:24
 +++ rsync.c    2004-07-03 20:11:58
-@@ -234,6 +234,14 @@ int set_perms(char *fname,struct file_st
+@@ -233,6 +233,14 @@ int set_perms(char *fname,struct file_st
        }
  #endif
  
@@ -4748,7 +4748,7 @@ ACLs to a non-ACL-supporting disk should complain.
  #include "proto.h"
  
  /* We have replacement versions of these if they're missing. */
---- orig/rsync.yo      2005-01-24 00:18:21
+--- orig/rsync.yo      2005-01-24 01:43:10
 +++ rsync.yo   2004-07-03 20:11:58
 @@ -327,6 +327,7 @@ verb(
   -H, --hard-links            preserve hard links
@@ -4758,7 +4758,7 @@ ACLs to a non-ACL-supporting disk should complain.
   -o, --owner                 preserve owner (root only)
   -g, --group                 preserve group
   -D, --devices               preserve devices (root only)
-@@ -613,6 +614,11 @@ source file's permissions and the umask 
+@@ -615,6 +616,11 @@ source file's permissions and the umask 
  other files (including updated files) retain their existing permissions
  (which is the same behavior as other file-copy utilities, such as cp).
  
index e098d5d..9e7f7d8 100644 (file)
@@ -15,17 +15,17 @@ command before "make":
                rprintf(FINFO, "flist->length=%.0f\n",
                        (double) fptr[i]->length);
                rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- orig/flist.c       2005-01-21 00:35:26
+--- orig/flist.c       2005-01-24 01:43:09
 +++ flist.c    2004-07-03 20:15:41
-@@ -59,6 +59,7 @@ extern int relative_paths;
- extern int implied_dirs;
+@@ -64,6 +64,7 @@ extern int make_backups;
+ extern int backup_suffix_len;
  extern int copy_links;
  extern int copy_unsafe_links;
 +extern int copy_atimes;
  extern int protocol_version;
  extern int sanitize_paths;
  extern int delete_excluded;
-@@ -143,17 +144,17 @@ static void list_file_entry(struct file_
+@@ -149,17 +150,17 @@ static void list_file_entry(struct file_
  
  #if SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -47,7 +47,7 @@ command before "make":
        }
  }
  
-@@ -334,6 +335,7 @@ void send_file_entry(struct file_struct 
+@@ -340,6 +341,7 @@ void send_file_entry(struct file_struct 
  {
        unsigned short flags;
        static time_t modtime;
@@ -55,7 +55,7 @@ command before "make":
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -349,7 +351,7 @@ void send_file_entry(struct file_struct 
+@@ -355,7 +357,7 @@ void send_file_entry(struct file_struct 
  
        if (!file) {
                write_byte(f, 0);
@@ -64,7 +64,7 @@ command before "make":
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -398,6 +400,12 @@ void send_file_entry(struct file_struct 
+@@ -404,6 +406,12 @@ void send_file_entry(struct file_struct 
                flags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -77,7 +77,7 @@ command before "make":
  
  #if SUPPORT_HARD_LINKS
        if (file->link_u.idev) {
-@@ -453,6 +461,8 @@ void send_file_entry(struct file_struct 
+@@ -459,6 +467,8 @@ void send_file_entry(struct file_struct 
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -86,7 +86,7 @@ command before "make":
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (!numeric_ids)
                        add_uid(uid);
-@@ -526,6 +536,7 @@ void receive_file_entry(struct file_stru
+@@ -532,6 +542,7 @@ void receive_file_entry(struct file_stru
                        struct file_list *flist, int f)
  {
        static time_t modtime;
@@ -94,7 +94,7 @@ command before "make":
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -542,7 +553,7 @@ void receive_file_entry(struct file_stru
+@@ -550,7 +561,7 @@ void receive_file_entry(struct file_stru
        struct file_struct *file;
  
        if (!fptr) {
@@ -103,7 +103,7 @@ command before "make":
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -597,6 +608,8 @@ void receive_file_entry(struct file_stru
+@@ -606,6 +617,8 @@ void receive_file_entry(struct file_stru
                modtime = (time_t)read_int(f);
        if (!(flags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -112,15 +112,15 @@ command before "make":
  
        if (preserve_uid && !(flags & XMIT_SAME_UID))
                uid = (uid_t)read_int(f);
-@@ -647,6 +660,7 @@ void receive_file_entry(struct file_stru
+@@ -656,6 +669,7 @@ void receive_file_entry(struct file_stru
  
-       file->flags = flags & XMIT_DEL_START ? FLAG_DEL_START : 0;
+       file->flags = 0;
        file->modtime = modtime;
 +      file->atime = atime;
        file->length = file_length;
        file->mode = mode;
        file->uid = uid;
-@@ -873,6 +887,7 @@ skip_excludes:
+@@ -896,6 +910,7 @@ skip_excludes:
  
        file->flags = flags;
        file->modtime = st.st_mtime;
@@ -128,9 +128,9 @@ command before "make":
        file->length = st.st_size;
        file->mode = st.st_mode;
        file->uid = st.st_uid;
---- orig/generator.c   2005-01-20 23:05:34
+--- orig/generator.c   2005-01-24 01:43:09
 +++ generator.c        2004-11-03 23:02:12
-@@ -96,7 +96,7 @@ static int unchanged_file(char *fn, stru
+@@ -97,7 +97,7 @@ static int unchanged_file(char *fn, stru
        if (ignore_times)
                return 0;
  
@@ -139,7 +139,7 @@ command before "make":
  }
  
  
-@@ -492,7 +492,7 @@ static void recv_generator(char *fname, 
+@@ -497,7 +497,7 @@ static void recv_generator(char *fname, 
        }
  
        if (update_only && fnamecmp_type == FNAMECMP_FNAME
@@ -148,85 +148,91 @@ command before "make":
                if (verbose > 1)
                        rprintf(FINFO, "%s is newer\n", safe_fname(fname));
                return;
---- orig/options.c     2005-01-20 23:05:34
-+++ options.c  2004-07-03 20:15:41
-@@ -48,6 +48,7 @@ int preserve_devices = 0;
- int preserve_uid = 0;
+--- orig/options.c     2005-01-24 01:43:10
++++ options.c  2005-01-24 01:51:48
+@@ -49,6 +49,7 @@ int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
+ int omit_dir_times = 0;
 +int copy_atimes = 0;
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -261,6 +262,7 @@ void usage(enum logcode F)
+@@ -265,6 +266,7 @@ void usage(enum logcode F)
    rprintf(F," -g, --group                 preserve group\n");
    rprintf(F," -D, --devices               preserve devices (root only)\n");
    rprintf(F," -t, --times                 preserve times\n");
 +  rprintf(F," -A, --copy-atimes           copy access times\n");
+   rprintf(F," -O, --omit-dir-times        omit directories when preserving times\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-   rprintf(F," -W, --whole-file            copy whole files, no incremental checks\n");
-@@ -367,6 +369,7 @@ static struct poptOption long_options[] 
-   {"group",           'g', POPT_ARG_NONE,   &preserve_gid, 0, 0, 0 },
+@@ -376,6 +378,7 @@ static struct poptOption long_options[] 
    {"devices",         'D', POPT_ARG_NONE,   &preserve_devices, 0, 0, 0 },
    {"times",           't', POPT_ARG_NONE,   &preserve_times, 0, 0, 0 },
+   {"omit-dir-times",  'O', POPT_ARG_NONE,   &omit_dir_times, 0, 0, 0 },
 +  {"copy-atimes",     'A', POPT_ARG_NONE,   &copy_atimes, 0, 0, 0 },
    {"checksum",        'c', POPT_ARG_NONE,   &always_checksum, 0, 0, 0 },
    {"verbose",         'v', POPT_ARG_NONE,   0, 'v', 0, 0 },
    {"quiet",           'q', POPT_ARG_NONE,   0, 'q', 0, 0 },
-@@ -1080,6 +1083,8 @@ void server_options(char **args,int *arg
+@@ -1088,6 +1091,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
 +      if (copy_atimes)
 +              argstr[x++] = 'A';
+       if (omit_dir_times && am_sender)
+               argstr[x++] = 'O';
        if (preserve_perms)
-               argstr[x++] = 'p';
-       if (recurse)
---- orig/rsync.c       2005-01-20 23:52:09
-+++ rsync.c    2004-08-13 08:17:28
-@@ -25,6 +25,7 @@
- extern int verbose;
+--- orig/rsync.c       2005-01-24 00:57:24
++++ rsync.c    2005-01-24 01:59:12
+@@ -26,6 +26,7 @@ extern int verbose;
  extern int dry_run;
  extern int preserve_times;
+ extern int omit_dir_times;
 +extern int copy_atimes;
  extern int am_root;
  extern int am_sender;
  extern int am_generator;
-@@ -167,17 +168,32 @@ int set_perms(char *fname,struct file_st
+@@ -153,6 +154,7 @@ int set_perms(char *fname,struct file_st
+       int updated = 0;
+       STRUCT_STAT st2;
+       int change_uid, change_gid;
++      time_t atime, mtime;
+       if (!st) {
+               if (dry_run)
+@@ -165,18 +167,28 @@ int set_perms(char *fname,struct file_st
+               st = &st2;
+       }
++      if (!copy_atimes || S_ISLNK(st->st_mode) || S_ISDIR(st->st_mode))
++              flags |= PERMS_SKIP_ATIME;
        if (!preserve_times || S_ISLNK(st->st_mode)
-           || (make_backups && !backup_dir && S_ISDIR(st->st_mode)))
+        || (S_ISDIR(st->st_mode)
+         && (omit_dir_times || (make_backups && !backup_dir))))
                flags |= PERMS_SKIP_MTIME;
--      if (!(flags & PERMS_SKIP_MTIME)
++      if (!(flags & PERMS_SKIP_ATIME)
++          && cmp_time(st->st_atime, file->atime) != 0) {
++              atime = file->atime;
++              updated = 1;
++      } else
++              atime = st->st_atime;
+       if (!(flags & PERMS_SKIP_MTIME)
 -          && cmp_modtime(st->st_mtime, file->modtime) != 0) {
-+      if (!copy_atimes || S_ISLNK(st->st_mode) || S_ISDIR(st->st_mode))
-+              flags |= PERMS_SKIP_ATIME;
-+      if ((flags & (PERMS_SKIP_MTIME|PERMS_SKIP_ATIME))
-+          != (PERMS_SKIP_MTIME|PERMS_SKIP_ATIME)) {
-+              time_t atime, mtime;
-+
-+              if (!(flags & PERMS_SKIP_ATIME)
-+                  && cmp_time(st->st_atime, file->atime) != 0) {
-+                      atime = file->atime;
-+                      updated = 1;
-+              } else
-+                      atime = st->st_atime;
-+              if (!(flags & PERMS_SKIP_MTIME)
-+                  && cmp_time(st->st_mtime, file->modtime) != 0) {
-+                      mtime = file->modtime;
-+                      updated = 1;
-+              } else
-+                      mtime = st->st_mtime;
-               /* don't complain about not setting times on directories
-                * because some filesystems can't do it */
--              if (set_modtime(fname,file->modtime) != 0 &&
-+              if (updated && set_times(fname, mtime, atime) != 0 &&
-                   !S_ISDIR(st->st_mode)) {
-                       rsyserr(FERROR, errno, "failed to set times on %s",
-                               full_fname(fname));
-                       return 0;
-               }
--              updated = 1;
+-              if (set_modtime(fname,file->modtime) != 0) {
+-                      rsyserr(FERROR, errno, "failed to set times on %s",
+-                              full_fname(fname));
+-                      return 0;
+-              }
++          && cmp_time(st->st_mtime, file->modtime) != 0) {
++              mtime = file->modtime;
+               updated = 1;
++      } else
++              mtime = st->st_mtime;
++      if (updated && set_times(fname, mtime, atime) != 0) {
++              rsyserr(FERROR, errno, "failed to set times on %s",
++                      full_fname(fname));
++              return 0;
        }
  
        change_uid = am_root && preserve_uid && st->st_uid != file->uid;
@@ -256,19 +262,19 @@ command before "make":
        uid_t uid;
        gid_t gid;
        mode_t mode;
---- orig/rsync.yo      2005-01-20 19:47:08
-+++ rsync.yo   2004-07-03 20:15:41
-@@ -330,6 +330,7 @@ verb(
-  -g, --group                 preserve group
+--- orig/rsync.yo      2005-01-24 01:43:10
++++ rsync.yo   2005-01-24 01:57:18
+@@ -332,6 +332,7 @@ verb(
   -D, --devices               preserve devices (root only)
   -t, --times                 preserve times
+  -O, --omit-dir-times        omit directories when preserving times
 + -A, --copy-atimes           copy access times
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
   -W, --whole-file            copy whole files, no incremental checks
-@@ -630,6 +631,11 @@ cause the next transfer to behave as if 
- updated (though the rsync algorithm will make the update fairly efficient
- if the files haven't actually changed, you're much better off using -t).
+@@ -644,6 +645,11 @@ dit(bf(-O, --omit-dir-times)) This tells
+ the preserving of modification times is enabled (see --times).  If NFS
+ is sharing the files on the receiving end, it is a good idea to use -O.
  
 +dit(bf(-A, --copy-atimes)) This tells rsync to transfer access times
 +along with the files and update them on the remote system.  Note that
index fcdec40..8ec525a 100644 (file)
@@ -202,9 +202,9 @@ command before "make":
 +      }
 +      return 0;
 +}
---- orig/flist.c       2004-09-21 09:40:27
+--- orig/flist.c       2005-01-24 01:43:09
 +++ flist.c    2004-09-18 01:51:11
-@@ -65,6 +65,8 @@ extern int delete_excluded;
+@@ -71,6 +71,8 @@ extern int max_delete;
  extern int orig_umask;
  extern int list_only;
  
@@ -213,7 +213,7 @@ command before "make":
  extern struct exclude_list_struct exclude_list;
  extern struct exclude_list_struct server_exclude_list;
  extern struct exclude_list_struct local_exclude_list;
-@@ -869,7 +871,10 @@ skip_excludes:
+@@ -897,7 +899,10 @@ skip_excludes:
        file->flags = flags;
        file->modtime = st.st_mtime;
        file->length = st.st_size;
@@ -225,9 +225,9 @@ command before "make":
        file->uid = st.st_uid;
        file->gid = st.st_gid;
  
---- orig/options.c     2004-11-27 18:27:35
-+++ options.c  2004-07-03 20:13:41
-@@ -128,6 +128,7 @@ char *log_format = NULL;
+--- orig/options.c     2005-01-24 01:43:10
++++ options.c  2005-01-24 01:48:30
+@@ -132,6 +132,7 @@ char *log_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
@@ -235,7 +235,7 @@ command before "make":
  char backup_dir_buf[MAXPATHLEN];
  int rsync_port = 0;
  int compare_dest = 0;
-@@ -141,6 +142,8 @@ int list_only = 0;
+@@ -147,6 +148,8 @@ int list_only = 0;
  #define MAX_BATCH_NAME_LEN 256        /* Must be less than MAXPATHLEN-13 */
  char *batch_name = NULL;
  
@@ -244,23 +244,23 @@ command before "make":
  static int daemon_opt;   /* sets am_daemon after option error-reporting */
  static int modify_window_set;
  static char *dest_option = NULL;
-@@ -260,6 +263,7 @@ void usage(enum logcode F)
-   rprintf(F," -g, --group                 preserve group\n");
+@@ -266,6 +269,7 @@ void usage(enum logcode F)
    rprintf(F," -D, --devices               preserve devices (root only)\n");
    rprintf(F," -t, --times                 preserve times\n");
+   rprintf(F," -O, --omit-dir-times        omit directories when preserving times\n");
 +  rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
    rprintf(F," -W, --whole-file            copy whole files, no incremental checks\n");
-@@ -363,6 +367,7 @@ static struct poptOption long_options[] 
+@@ -373,6 +377,7 @@ static struct poptOption long_options[] 
    {"perms",           'p', POPT_ARG_NONE,   &preserve_perms, 0, 0, 0 },
    {"owner",           'o', POPT_ARG_NONE,   &preserve_uid, 0, 0, 0 },
    {"group",           'g', POPT_ARG_NONE,   &preserve_gid, 0, 0, 0 },
 +  {"chmod",            0,  POPT_ARG_STRING, &chmod_mode, 0, 0, 0 },
    {"devices",         'D', POPT_ARG_NONE,   &preserve_devices, 0, 0, 0 },
    {"times",           't', POPT_ARG_NONE,   &preserve_times, 0, 0, 0 },
-   {"checksum",        'c', POPT_ARG_NONE,   &always_checksum, 0, 0, 0 },
-@@ -932,6 +937,13 @@ int parse_arguments(int *argc, const cha
+   {"omit-dir-times",  'O', POPT_ARG_NONE,   &omit_dir_times, 0, 0, 0 },
+@@ -944,6 +949,13 @@ int parse_arguments(int *argc, const cha
                return 0;
        }
  
@@ -274,7 +274,7 @@ command before "make":
        if (do_progress && !verbose)
                verbose = 1;
  
-@@ -1225,6 +1237,11 @@ void server_options(char **args,int *arg
+@@ -1239,6 +1251,11 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -286,19 +286,19 @@ command before "make":
        if (files_from && (!am_sender || remote_filesfrom_file)) {
                if (remote_filesfrom_file) {
                        args[ac++] = "--files-from";
---- orig/rsync.yo      2004-11-27 17:53:24
-+++ rsync.yo   2004-07-03 20:13:41
-@@ -330,6 +330,7 @@ verb(
-  -g, --group                 preserve group
+--- orig/rsync.yo      2005-01-24 01:43:10
++++ rsync.yo   2005-01-24 01:48:43
+@@ -332,6 +332,7 @@ verb(
   -D, --devices               preserve devices (root only)
   -t, --times                 preserve times
+  -O, --omit-dir-times        omit directories when preserving times
 +     --chmod=CHMOD           change destination permissions
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
   -W, --whole-file            copy whole files, no incremental checks
-@@ -619,6 +620,14 @@ cause the next transfer to behave as if 
- updated (though the rsync algorithm will make the update fairly efficient
- if the files haven't actually changed, you're much better off using -t).
+@@ -644,6 +645,14 @@ dit(bf(-O, --omit-dir-times)) This tells
+ the preserving of modification times is enabled (see --times).  If NFS
+ is sharing the files on the receiving end, it is a good idea to use -O.
  
 +dit(bf(--chmod)) This options tells rsync to apply the listed "chmod" pattern
 +to the permission of the files on the destination.  In addition to the normal
index 846f26f..69f7b85 100644 (file)
@@ -944,9 +944,9 @@ local instead of inherited (see also the 'n' modifier).
 -                  XFLG_WORD_SPLIT | XFLG_WORDS_ONLY);
 +      add_exclude(&exclude_list, getenv("CVSIGNORE"), cvs_flags);
  }
---- orig/flist.c       2005-01-24 00:18:21
-+++ flist.c    2004-08-12 18:59:28
-@@ -40,11 +40,10 @@ extern int module_id;
+--- orig/flist.c       2005-01-24 01:43:09
++++ flist.c    2005-01-24 02:06:07
+@@ -41,11 +41,10 @@ extern int module_id;
  extern int ignore_errors;
  extern int numeric_ids;
  
@@ -956,10 +956,10 @@ local instead of inherited (see also the 'n' modifier).
  extern int xfer_dirs;
  extern char curr_dir[MAXPATHLEN];
 +extern unsigned int curr_dir_len;
+ extern char *backup_dir;
+ extern char *backup_suffix;
  extern int filesfrom_fd;
- extern int one_file_system;
-@@ -67,7 +66,6 @@ extern int list_only;
+@@ -73,7 +72,6 @@ extern int list_only;
  
  extern struct exclude_list_struct exclude_list;
  extern struct exclude_list_struct server_exclude_list;
@@ -967,7 +967,7 @@ local instead of inherited (see also the 'n' modifier).
  
  int io_error;
  
-@@ -223,8 +221,6 @@ int link_stat(const char *path, STRUCT_S
+@@ -229,8 +227,6 @@ int link_stat(const char *path, STRUCT_S
   */
  static int check_exclude_file(char *fname, int is_dir, int exclude_level)
  {
@@ -976,7 +976,7 @@ local instead of inherited (see also the 'n' modifier).
  #if 0 /* This currently never happens, so avoid a useless compare. */
        if (exclude_level == NO_EXCLUDES)
                return 0;
-@@ -246,10 +242,7 @@ static int check_exclude_file(char *fnam
+@@ -252,10 +248,7 @@ static int check_exclude_file(char *fnam
        if (exclude_level != ALL_EXCLUDES)
                return 0;
        if (exclude_list.head
@@ -988,7 +988,7 @@ local instead of inherited (see also the 'n' modifier).
                return 1;
        return 0;
  }
-@@ -983,15 +976,7 @@ void send_file_name(int f, struct file_l
+@@ -1006,15 +999,7 @@ void send_file_name(int f, struct file_l
  
        if (recursive && S_ISDIR(file->mode)
            && !(file->flags & FLAG_MOUNT_POINT)) {
@@ -1004,7 +1004,7 @@ local instead of inherited (see also the 'n' modifier).
        }
  }
  
-@@ -1004,6 +989,7 @@ static void send_directory(int f, struct
+@@ -1027,6 +1012,7 @@ static void send_directory(int f, struct
        struct dirent *di;
        char fname[MAXPATHLEN];
        unsigned int offset;
@@ -1012,7 +1012,7 @@ local instead of inherited (see also the 'n' modifier).
        char *p;
  
        d = opendir(dir);
-@@ -1027,18 +1013,7 @@ static void send_directory(int f, struct
+@@ -1050,18 +1036,7 @@ static void send_directory(int f, struct
                offset++;
        }
  
@@ -1032,7 +1032,7 @@ local instead of inherited (see also the 'n' modifier).
  
        for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) {
                char *dname = d_name(di);
-@@ -1060,6 +1035,8 @@ static void send_directory(int f, struct
+@@ -1083,6 +1058,8 @@ static void send_directory(int f, struct
                rsyserr(FERROR, errno, "readdir(%s)", dir);
        }
  
@@ -1041,7 +1041,7 @@ local instead of inherited (see also the 'n' modifier).
        closedir(d);
  }
  
-@@ -1079,6 +1056,7 @@ struct file_list *send_file_list(int f, 
+@@ -1102,6 +1079,7 @@ struct file_list *send_file_list(int f, 
        char *p, *dir, olddir[sizeof curr_dir];
        char lastpath[MAXPATHLEN] = "";
        struct file_list *flist;
@@ -1049,7 +1049,7 @@ local instead of inherited (see also the 'n' modifier).
        int64 start_write;
        int use_ff_fd = 0;
  
-@@ -1099,6 +1077,10 @@ struct file_list *send_file_list(int f, 
+@@ -1122,6 +1100,10 @@ struct file_list *send_file_list(int f, 
                                exit_cleanup(RERR_FILESELECT);
                        }
                        use_ff_fd = 1;
@@ -1060,7 +1060,7 @@ local instead of inherited (see also the 'n' modifier).
                }
        }
  
-@@ -1135,6 +1117,15 @@ struct file_list *send_file_list(int f, 
+@@ -1160,6 +1142,15 @@ struct file_list *send_file_list(int f, 
                } else if (recurse > 0)
                        recurse = 0;
  
@@ -1110,9 +1110,9 @@ local instead of inherited (see also the 'n' modifier).
  FN_LOCAL_STRING(lp_exclude, exclude)
  FN_LOCAL_STRING(lp_exclude_from, exclude_from)
  FN_LOCAL_STRING(lp_include, include)
---- orig/options.c     2005-01-24 00:18:21
+--- orig/options.c     2005-01-24 01:43:10
 +++ options.c  2005-01-23 07:33:55
-@@ -146,6 +146,7 @@ int list_only = 0;
+@@ -148,6 +148,7 @@ int list_only = 0;
  char *batch_name = NULL;
  
  static int daemon_opt;   /* sets am_daemon after option error-reporting */
@@ -1120,7 +1120,7 @@ local instead of inherited (see also the 'n' modifier).
  static int modify_window_set;
  static char *dest_option = NULL;
  static char *max_size_arg;
-@@ -294,6 +295,9 @@ void usage(enum logcode F)
+@@ -298,6 +299,9 @@ void usage(enum logcode F)
    rprintf(F," -P                          equivalent to --partial --progress\n");
    rprintf(F," -z, --compress              compress file data\n");
    rprintf(F," -C, --cvs-exclude           auto ignore files in the same way CVS does\n");
@@ -1130,7 +1130,7 @@ local instead of inherited (see also the 'n' modifier).
    rprintf(F,"     --exclude=PATTERN       exclude files matching PATTERN\n");
    rprintf(F,"     --exclude-from=FILE     exclude patterns listed in FILE\n");
    rprintf(F,"     --include=PATTERN       don't exclude files matching PATTERN\n");
-@@ -324,7 +328,7 @@ void usage(enum logcode F)
+@@ -328,7 +332,7 @@ void usage(enum logcode F)
  }
  
  enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
@@ -1139,7 +1139,7 @@ local instead of inherited (see also the 'n' modifier).
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
        OPT_REFUSED_BASE = 9000};
-@@ -346,6 +350,7 @@ static struct poptOption long_options[] 
+@@ -351,6 +355,7 @@ static struct poptOption long_options[] 
    {"delete-excluded",  0,  POPT_ARG_NONE,   &delete_excluded, 0, 0, 0 },
    {"force",            0,  POPT_ARG_NONE,   &force_delete, 0, 0, 0 },
    {"numeric-ids",      0,  POPT_ARG_NONE,   &numeric_ids, 0, 0, 0 },
@@ -1147,7 +1147,7 @@ local instead of inherited (see also the 'n' modifier).
    {"exclude",          0,  POPT_ARG_STRING, 0, OPT_EXCLUDE, 0, 0 },
    {"include",          0,  POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },
    {"exclude-from",     0,  POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },
-@@ -398,6 +403,7 @@ static struct poptOption long_options[] 
+@@ -404,6 +409,7 @@ static struct poptOption long_options[] 
    {"ignore-errors",    0,  POPT_ARG_NONE,   &ignore_errors, 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 },
@@ -1155,7 +1155,7 @@ local instead of inherited (see also the 'n' modifier).
    {0,                 'P', POPT_ARG_NONE,   0, 'P', 0, 0 },
    {"port",             0,  POPT_ARG_INT,    &rsync_port, 0, 0, 0 },
    {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
-@@ -619,10 +625,15 @@ int parse_arguments(int *argc, const cha
+@@ -625,10 +631,15 @@ int parse_arguments(int *argc, const cha
                        modify_window_set = 1;
                        break;
  
@@ -1172,7 +1172,7 @@ local instead of inherited (see also the 'n' modifier).
                case OPT_INCLUDE:
                        add_exclude(&exclude_list, poptGetOptArg(pc),
                                    XFLG_DEF_INCLUDE);
-@@ -640,8 +651,8 @@ int parse_arguments(int *argc, const cha
+@@ -646,8 +657,8 @@ int parse_arguments(int *argc, const cha
                                        goto options_rejected;
                        }
                        add_exclude_file(&exclude_list, arg, XFLG_FATAL_ERRORS
@@ -1183,7 +1183,7 @@ local instead of inherited (see also the 'n' modifier).
                        break;
  
                case 'h':
-@@ -665,6 +676,19 @@ int parse_arguments(int *argc, const cha
+@@ -671,6 +682,19 @@ int parse_arguments(int *argc, const cha
                        am_sender = 1;
                        break;
  
@@ -1203,7 +1203,7 @@ local instead of inherited (see also the 'n' modifier).
                case 'P':
                        do_progress = 1;
                        keep_partial = 1;
-@@ -971,7 +995,7 @@ int parse_arguments(int *argc, const cha
+@@ -977,7 +1001,7 @@ int parse_arguments(int *argc, const cha
                                partial_dir = NULL;
                        else if (*partial_dir != '/') {
                                add_exclude(&exclude_list, partial_dir,
@@ -1250,9 +1250,9 @@ local instead of inherited (see also the 'n' modifier).
  };
  
  struct exclude_list_struct {
---- orig/rsync.yo      2005-01-24 00:18:21
+--- orig/rsync.yo      2005-01-24 01:43:10
 +++ rsync.yo   2005-01-21 19:56:38
-@@ -362,6 +362,9 @@ verb(
+@@ -364,6 +364,9 @@ verb(
   -P                          equivalent to --partial --progress
   -z, --compress              compress file data
   -C, --cvs-exclude           auto ignore files in the same way CVS does
@@ -1262,7 +1262,7 @@ local instead of inherited (see also the 'n' modifier).
       --exclude=PATTERN       exclude files matching PATTERN
       --exclude-from=FILE     exclude patterns listed in FILE
       --include=PATTERN       don't exclude files matching PATTERN
-@@ -764,14 +767,41 @@ Finally, any file is ignored if it is in
+@@ -781,14 +784,41 @@ Finally, any file is ignored if it is in
  .cvsignore file and matches one of the patterns listed therein.
  See the bf(cvs(1)) manual for more information.
  
@@ -1309,7 +1309,7 @@ local instead of inherited (see also the 'n' modifier).
  
  dit(bf(--exclude-from=FILE)) This option is similar to the --exclude
  option, but instead it adds all exclude patterns listed in the file
-@@ -779,11 +809,11 @@ FILE to the exclude list.  Blank lines i
+@@ -796,11 +826,11 @@ FILE to the exclude list.  Blank lines i
  ';' or '#' are ignored.
  If em(FILE) is bf(-) the list will be read from standard input.
  
@@ -1325,7 +1325,7 @@ local instead of inherited (see also the 'n' modifier).
  
  dit(bf(--include-from=FILE)) This specifies a list of include patterns
  from a file.
-@@ -828,7 +858,8 @@ was located on the remote "src" host.
+@@ -845,7 +875,8 @@ was located on the remote "src" host.
  
  dit(bf(-0, --from0)) This tells rsync that the filenames it reads from a
  file are terminated by a null ('\0') character, not a NL, CR, or CR+LF.
@@ -1335,7 +1335,7 @@ local instead of inherited (see also the 'n' modifier).
  It does not affect --cvs-exclude (since all names read from a .cvsignore
  file are split on whitespace).
  
-@@ -967,8 +998,8 @@ If the partial-dir value is not an absol
+@@ -984,8 +1015,8 @@ If the partial-dir value is not an absol
  will prevent partial-dir files from being transferred and also prevent the
  untimely deletion of partial-dir items on the receiving side.  An example:
  the above --partial-dir option would add an "--exclude=.rsync-partial/"
@@ -1346,7 +1346,7 @@ local instead of inherited (see also the 'n' modifier).
  rule for this directory exclusion somewhere higher up in the list so that
  it has a high enough priority to be effective (e.g., if your rules specify
  a trailing --exclude=* rule, the auto-added rule will be ineffective).
-@@ -1125,30 +1156,322 @@ page describing the options available fo
+@@ -1142,30 +1173,322 @@ page describing the options available fo
  
  enddit()
  
@@ -1685,7 +1685,7 @@ local instead of inherited (see also the 'n' modifier).
  
  Let's say that we want to match two source files, one with an absolute
  path of "/home/me/foo/bar", and one with a path of "/home/you/bar/baz".
-@@ -1180,115 +1503,59 @@ verb(
+@@ -1197,115 +1520,59 @@ verb(
     Target file: /dest/you/bar/baz
  )
  
@@ -1839,7 +1839,7 @@ local instead of inherited (see also the 'n' modifier).
  )
  
  manpagesection(BATCH MODE)
-@@ -1457,7 +1724,7 @@ it. The most common cause is incorrectly
+@@ -1474,7 +1741,7 @@ it. The most common cause is incorrectly
  scripts (such as .cshrc or .profile) that contain output statements
  for non-interactive logins.
  
index f117a33..fb0eb67 100644 (file)
@@ -31,9 +31,9 @@ groups, even if they weren't returned by getgroups().  E.g.:
 +                      preserve_gid = 2;
 +      }
  }
---- orig/options.c     2005-01-17 23:11:45
+--- orig/options.c     2005-01-24 01:43:10
 +++ options.c  2004-09-09 01:59:08
-@@ -362,8 +362,8 @@ static struct poptOption long_options[] 
+@@ -371,8 +371,8 @@ static struct poptOption long_options[] 
    {"no-whole-file",    0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },
    {"copy-unsafe-links", 0, POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
    {"perms",           'p', POPT_ARG_NONE,   &preserve_perms, 0, 0, 0 },
@@ -43,8 +43,8 @@ groups, even if they weren't returned by getgroups().  E.g.:
 +  {"group",           'g', POPT_ARG_NONE,   0,               'g', 0, 0 },
    {"devices",         'D', POPT_ARG_NONE,   &preserve_devices, 0, 0, 0 },
    {"times",           't', POPT_ARG_NONE,   &preserve_times, 0, 0, 0 },
-   {"checksum",        'c', POPT_ARG_NONE,   &always_checksum, 0, 0, 0 },
-@@ -651,6 +651,14 @@ int parse_arguments(int *argc, const cha
+   {"omit-dir-times",  'O', POPT_ARG_NONE,   &omit_dir_times, 0, 0, 0 },
+@@ -654,6 +654,14 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -59,7 +59,7 @@ groups, even if they weren't returned by getgroups().  E.g.:
                case 'v':
                        verbose++;
                        break;
-@@ -846,8 +854,8 @@ int parse_arguments(int *argc, const cha
+@@ -849,8 +857,8 @@ int parse_arguments(int *argc, const cha
  #endif
                preserve_perms = 1;
                preserve_times = 1;
@@ -70,7 +70,7 @@ groups, even if they weren't returned by getgroups().  E.g.:
                preserve_devices = 1;
        }
  
-@@ -1067,10 +1075,16 @@ void server_options(char **args,int *arg
+@@ -1080,10 +1088,16 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';
@@ -89,17 +89,17 @@ groups, even if they weren't returned by getgroups().  E.g.:
        if (preserve_devices)
                argstr[x++] = 'D';
        if (preserve_times)
---- orig/rsync.c       2005-01-10 09:50:46
-+++ rsync.c    2004-09-09 01:59:08
-@@ -25,7 +25,6 @@
- extern int verbose;
+--- orig/rsync.c       2005-01-24 00:57:24
++++ rsync.c    2005-01-24 02:07:24
+@@ -26,7 +26,6 @@ extern int verbose;
  extern int dry_run;
  extern int preserve_times;
+ extern int omit_dir_times;
 -extern int am_root;
  extern int am_sender;
  extern int am_generator;
  extern int preserve_uid;
-@@ -158,7 +157,7 @@ int set_perms(char *fname,struct file_st
+@@ -179,7 +178,7 @@ int set_perms(char *fname,struct file_st
                updated = 1;
        }