Got rid of patch fuzz.
authorWayne Davison <wayned@samba.org>
Tue, 15 Feb 2005 19:36:33 +0000 (19:36 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 15 Feb 2005 19:36:33 +0000 (19:36 +0000)
acls.diff
backup-dir-dels.diff
owner-group-mod.diff
time-limit.diff

index d8a8e6d..084a728 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1325,11 +1325,11 @@ ACLs to a non-ACL-supporting disk should complain.
        if (f >= 0) {
                /* Now send the uid/gid list. This was introduced in
                 * protocol version 15 */
---- orig/generator.c   2005-02-14 02:45:10
+--- orig/generator.c   2005-02-15 19:27:04
 +++ generator.c        2005-01-30 10:09:44
-@@ -406,6 +406,10 @@ static void recv_generator(char *fname, 
+@@ -461,6 +461,10 @@ static void recv_generator(char *fname, 
                if (set_perms(fname, file, statret ? NULL : &st, 0)
-                   && verbose && f_out != -1)
+                   && verbose && f_out != -1 && !itemize_changes)
                        rprintf(FINFO, "%s/\n", safe_fname(fname));
 +#if SUPPORT_ACLS
 +              if (f_out == -1)
@@ -4597,7 +4597,7 @@ ACLs to a non-ACL-supporting disk should complain.
    next;
  }
  
---- orig/options.c     2005-02-14 02:45:10
+--- orig/options.c     2005-02-15 19:27:05
 +++ options.c  2005-02-14 02:46:05
 @@ -44,6 +44,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;
-@@ -167,6 +168,7 @@ static void print_rsync_version(enum log
+@@ -168,6 +169,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;
-@@ -183,6 +185,10 @@ static void print_rsync_version(enum log
+@@ -184,6 +186,10 @@ static void print_rsync_version(enum log
        hardlinks = "";
  #endif
  
@@ -4626,7 +4626,7 @@ ACLs to a non-ACL-supporting disk should complain.
  #ifdef SUPPORT_LINKS
        links = "";
  #endif
-@@ -197,9 +203,9 @@ static void print_rsync_version(enum log
+@@ -198,9 +204,9 @@ static void print_rsync_version(enum log
                "Copyright (C) 1996-2005 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
-@@ -269,6 +275,7 @@ void usage(enum logcode F)
+@@ -270,6 +276,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,15 +4646,15 @@ 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");
-@@ -389,6 +396,7 @@ static struct poptOption long_options[] 
+@@ -391,6 +398,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 },
+   {"copy-unsafe-links",0,  POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
    {"perms",           'p', POPT_ARG_NONE,   &preserve_perms, 0, 0, 0 },
 +  {"acls",            'A', POPT_ARG_NONE,   0,              'A', 0, 0 },
    {"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 },
-@@ -834,6 +842,24 @@ int parse_arguments(int *argc, const cha
+@@ -837,6 +845,24 @@ int parse_arguments(int *argc, const cha
                        basis_dir[basis_dir_cnt++] = (char *)arg;
                        break;
  
@@ -4679,8 +4679,8 @@ ACLs to a non-ACL-supporting disk should complain.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1206,6 +1232,8 @@ void server_options(char **args,int *arg
+@@ -1211,6 +1237,8 @@ void server_options(char **args,int *arg
+               argstr[x++] = 'i';
        if (preserve_hard_links)
                argstr[x++] = 'H';
 +      if (preserve_acls)
@@ -4705,7 +4705,7 @@ ACLs to a non-ACL-supporting disk should complain.
        if (verbose > 1 && flags & PERMS_REPORT) {
                if (updated)
                        rprintf(FINFO, "%s\n", safe_fname(fname));
---- orig/rsync.h       2005-02-14 02:45:10
+--- orig/rsync.h       2005-02-15 19:27:05
 +++ rsync.h    2004-07-03 20:11:58
 @@ -612,6 +612,40 @@ struct stats {
  #include "lib/permstring.h"
@@ -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-02-14 02:45:11
+--- orig/rsync.yo      2005-02-15 19:27:05
 +++ rsync.yo   2004-07-03 20:11:58
 @@ -317,6 +317,7 @@ to the detailed description below for a 
   -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)
-@@ -614,6 +615,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 432309a..c0a59bf 100644 (file)
@@ -13,7 +13,7 @@ suffix.
 
 Marc St-Onge
 
---- orig/backup.c      2005-02-07 20:41:56
+--- orig/backup.c      2005-02-14 02:45:09
 +++ backup.c   2004-09-22 02:36:06
 @@ -22,11 +22,17 @@
  
@@ -105,7 +105,7 @@ Marc St-Onge
 +      deleting = 0;
 +      return ret;
 +}
---- orig/flist.c       2005-02-13 21:17:16
+--- orig/flist.c       2005-02-14 02:45:10
 +++ flist.c    2005-01-30 10:11:42
 @@ -46,6 +46,8 @@ extern char curr_dir[MAXPATHLEN];
  extern unsigned int curr_dir_len;
@@ -124,7 +124,7 @@ Marc St-Onge
  extern int copy_links;
  extern int copy_unsafe_links;
  extern int protocol_version;
-@@ -1709,10 +1712,14 @@ char *f_name(struct file_struct *f)
+@@ -1750,10 +1753,14 @@ char *f_name(struct file_struct *f)
  }
  
  
@@ -139,8 +139,8 @@ Marc St-Onge
 +      return k > 0 && strcmp(fn+k, backup_suffix_rm) == 0;
  }
  
-@@ -1799,11 +1806,12 @@ void delete_missing(struct file_list *fu
+ struct file_list *get_dirlist(const char *dirname, int ignore_filter_rules)
+@@ -1859,11 +1866,12 @@ void delete_missing(struct file_list *fu
                mode = dir_list->files[i]->mode;
                if (flist_find(full_list, dir_list->files[i]) < 0) {
                        char *f = f_name(dir_list->files[i]);
@@ -156,9 +156,9 @@ Marc St-Onge
                                                safe_fname(f));
                                }
                        } else if (S_ISDIR(mode))
---- orig/options.c     2005-02-13 05:50:28
+--- orig/options.c     2005-02-15 19:27:05
 +++ options.c  2005-01-28 19:17:35
-@@ -118,10 +118,14 @@ int no_detach = 0;
+@@ -119,10 +119,14 @@ int no_detach = 0;
  int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
@@ -173,7 +173,7 @@ Marc St-Onge
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -131,7 +135,9 @@ char *log_format = NULL;
+@@ -132,7 +136,9 @@ char *log_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
@@ -183,7 +183,7 @@ Marc St-Onge
  int rsync_port = 0;
  int compare_dest = 0;
  int copy_dest = 0;
-@@ -258,6 +264,8 @@ void usage(enum logcode F)
+@@ -260,6 +266,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);
@@ -192,7 +192,7 @@ Marc St-Onge
    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," -d, --dirs                  transfer directories without recursing\n");
-@@ -350,6 +358,7 @@ static struct poptOption long_options[] 
+@@ -354,6 +362,7 @@ static struct poptOption long_options[] 
    /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
    {"version",          0,  POPT_ARG_NONE,   0, OPT_VERSION, 0, 0},
    {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
@@ -200,15 +200,15 @@ Marc St-Onge
    {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
    {"password-file",    0,  POPT_ARG_STRING, &password_file, 0, 0, 0 },
    {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
-@@ -427,6 +436,7 @@ static struct poptOption long_options[] 
-   {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
+@@ -433,6 +442,7 @@ static struct poptOption long_options[] 
+   {"itemize-changes", 'i', POPT_ARG_NONE,   &itemize_changes, 0, 0, 0 },
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
 +  {"backup-dir-rm",    0,  POPT_ARG_STRING, &backup_dir_rm, 0, 0, 0 },
    {"hard-links",      'H', POPT_ARG_NONE,   &preserve_hard_links, 0, 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 },
-@@ -968,6 +978,8 @@ int parse_arguments(int *argc, const cha
+@@ -974,6 +984,8 @@ int parse_arguments(int *argc, const cha
                        partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
@@ -217,7 +217,7 @@ Marc St-Onge
                if (files_from)
                        files_from = sanitize_path(NULL, files_from, NULL, 0);
        }
-@@ -1000,6 +1012,12 @@ int parse_arguments(int *argc, const cha
+@@ -1006,6 +1018,12 @@ int parse_arguments(int *argc, const cha
                        if (check_filter(elp, backup_dir, 1) < 0)
                                goto options_rejected;
                }
@@ -230,7 +230,7 @@ Marc St-Onge
        }
        if (server_filter_list.head && files_from) {
                if (!*files_from)
-@@ -1022,6 +1040,16 @@ int parse_arguments(int *argc, const cha
+@@ -1028,6 +1046,16 @@ int parse_arguments(int *argc, const cha
                        backup_suffix);
                return 0;
        }
@@ -247,7 +247,7 @@ Marc St-Onge
        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;
-@@ -1043,6 +1071,31 @@ int parse_arguments(int *argc, const cha
+@@ -1049,6 +1077,31 @@ int parse_arguments(int *argc, const cha
                        "--suffix cannot be a null string without --backup-dir\n");
                return 0;
        }
@@ -277,9 +277,9 @@ Marc St-Onge
 +              return 0;
 +      }
  
-       if (do_progress && !verbose) {
+       if (do_progress && !verbose && !itemize_changes) {
                if (refused_verbose) {
-@@ -1279,6 +1332,10 @@ void server_options(char **args,int *arg
+@@ -1287,6 +1340,10 @@ void server_options(char **args,int *arg
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -290,7 +290,7 @@ Marc St-Onge
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1287,7 +1344,13 @@ void server_options(char **args,int *arg
+@@ -1295,7 +1352,13 @@ void server_options(char **args,int *arg
                        goto oom;
                args[ac++] = arg;
        }
index c95251d..44f9606 100644 (file)
@@ -34,11 +34,11 @@ groups, even if they weren't returned by getgroups().  E.g.:
 +                      preserve_gid = 2;
 +      }
  }
---- orig/options.c     2005-02-14 02:45:10
+--- orig/options.c     2005-02-15 19:27:05
 +++ options.c  2004-09-09 01:59:08
-@@ -389,8 +389,8 @@ static struct poptOption long_options[] 
+@@ -391,8 +391,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 },
+   {"copy-unsafe-links",0,  POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
    {"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 },
@@ -47,7 +47,7 @@ groups, even if they weren't returned by getgroups().  E.g.:
    {"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 },
-@@ -719,6 +719,14 @@ int parse_arguments(int *argc, const cha
+@@ -722,6 +722,14 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -62,7 +62,7 @@ groups, even if they weren't returned by getgroups().  E.g.:
                case 'v':
                        verbose++;
                        break;
-@@ -929,8 +937,8 @@ int parse_arguments(int *argc, const cha
+@@ -932,8 +940,8 @@ int parse_arguments(int *argc, const cha
  #endif
                preserve_perms = 1;
                preserve_times = 1;
@@ -73,8 +73,8 @@ groups, even if they weren't returned by getgroups().  E.g.:
                preserve_devices = 1;
        }
  
-@@ -1206,10 +1214,16 @@ void server_options(char **args,int *arg
+@@ -1211,10 +1219,16 @@ void server_options(char **args,int *arg
+               argstr[x++] = 'i';
        if (preserve_hard_links)
                argstr[x++] = 'H';
 -      if (preserve_uid)
index 6f45390..837c0d9 100644 (file)
@@ -41,9 +41,9 @@ Do we need configure support for mktime()?
                if (!am_server && !am_daemon) {
                        rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
                                (int)(t-last_io));
---- orig/options.c     2005-02-11 18:21:45
+--- orig/options.c     2005-02-15 19:27:05
 +++ options.c  2005-01-28 19:35:23
-@@ -101,6 +101,7 @@ int checksum_seed = 0;
+@@ -102,6 +102,7 @@ int checksum_seed = 0;
  int inplace = 0;
  int delay_updates = 0;
  long block_size = 0; /* "long" because popt can't set an int32. */
@@ -51,7 +51,7 @@ Do we need configure support for mktime()?
  
  
  /** Network address family. **/
-@@ -327,6 +328,8 @@ void usage(enum logcode F)
+@@ -331,6 +332,8 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read 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");
@@ -59,8 +59,8 @@ Do we need configure support for mktime()?
 +  rprintf(F,"     --time-limit=MINS       Stop rsync after MINS minutes have elapsed\n");
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    rprintf(F,"     --read-batch=FILE       read a batched update from FILE\n");
- #if INET6
-@@ -344,6 +347,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+ #ifdef INET6
+@@ -348,6 +351,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
@@ -68,16 +68,16 @@ Do we need configure support for mktime()?
        OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -426,6 +430,8 @@ static struct poptOption long_options[] 
-   {"port",             0,  POPT_ARG_INT,    &rsync_port, 0, 0, 0 },
+@@ -432,6 +436,8 @@ static struct poptOption long_options[] 
    {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
+   {"itemize-changes", 'i', POPT_ARG_NONE,   &itemize_changes, 0, 0, 0 },
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
 +  {"stop-at",          0,  POPT_ARG_STRING, 0, OPT_STOP_AT, 0, 0 },
 +  {"time-limit",       0,  POPT_ARG_STRING, 0, OPT_TIME_LIMIT, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"hard-links",      'H', POPT_ARG_NONE,   &preserve_hard_links, 0, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
-@@ -831,6 +837,36 @@ int parse_arguments(int *argc, const cha
+@@ -837,6 +843,36 @@ int parse_arguments(int *argc, const cha
                        basis_dir[basis_dir_cnt++] = (char *)arg;
                        break;
  
@@ -114,7 +114,7 @@ Do we need configure support for mktime()?
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1275,6 +1311,15 @@ void server_options(char **args,int *arg
+@@ -1283,6 +1319,15 @@ void server_options(char **args,int *arg
                args[ac++] = arg;
        }
  
@@ -130,9 +130,9 @@ Do we need configure support for mktime()?
        if (backup_dir) {
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
---- orig/rsync.yo      2005-02-11 23:14:49
+--- orig/rsync.yo      2005-02-15 19:27:05
 +++ rsync.yo   2005-02-01 10:46:35
-@@ -376,6 +376,8 @@ to the detailed description below for a 
+@@ -378,6 +378,8 @@ to the detailed description below for a 
       --password-file=FILE    read password from FILE
       --list-only             list the files instead of copying them
       --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
@@ -141,7 +141,7 @@ Do we need configure support for mktime()?
       --write-batch=FILE      write a batched update to FILE
       --read-batch=FILE       read a batched update from FILE
       --checksum-seed=NUM     set block/file checksum seed (advanced)
-@@ -1133,6 +1135,19 @@ transfer was too fast, it will wait befo
+@@ -1182,6 +1184,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.
  
@@ -161,7 +161,7 @@ Do we need configure support for mktime()?
  dit(bf(--write-batch=FILE)) Record a file that can later be applied to
  another identical destination with bf(--read-batch). See the "BATCH MODE"
  section for details.
---- orig/util.c        2005-02-11 10:53:15
+--- orig/util.c        2005-02-14 02:45:11
 +++ util.c     2004-07-03 20:23:22
 @@ -126,6 +126,132 @@ void overflow(char *str)
        exit_cleanup(RERR_MALLOC);