Updated the opening comments to mention how to apply the patch
authorWayne Davison <wayned@samba.org>
Wed, 1 Nov 2006 21:33:37 +0000 (21:33 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 1 Nov 2006 21:33:37 +0000 (21:33 +0000)
prior to the build.  Also updated to apply cleanly.

31 files changed:
ODBC-dblog.diff
acls.diff
adaptec_acl_mods.diff
atimes.diff
backup-dir-dels.diff
catch_crash_signals.diff
cvs-entries.diff
date-only.diff
detect-renamed.diff
downdate.diff
dynamic_hash.diff
early-checksum.diff
fake-super.diff
flags.diff
fsync.diff
id-pair.diff
ignore-case.diff
link-by-hash.diff
links-depth.diff
md5.diff
netgroup-auth.diff
omit-dir-changes.diff
openssl-support.diff
slow-down.diff
slp.diff
soften-links.diff
source-filter_dest-filter.diff
threaded-receiver.diff
time-limit.diff
tru64.diff
xattrs.diff

index 4182aff..7180103 100644 (file)
@@ -1,12 +1,13 @@
 Add support for logging daemon messages to an SQL database.
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/ODBC-dblog.diff
     ./prepare-source
     ./configure --enable-ODBC
     make
 
-See the file "instructions" (after applying this patch) for more info.
+See the newly-created file "instructions" for more info.
 
 --- old/Makefile.in
 +++ new/Makefile.in
@@ -29,7 +30,7 @@ See the file "instructions" (after applying this patch) for more info.
  extern int log_got_error;
  extern char *partial_dir;
  extern char *logfile_name;
-@@ -179,8 +180,13 @@ NORETURN void _exit_cleanup(int code, co
+@@ -174,8 +175,13 @@ NORETURN void _exit_cleanup(int code, co
                                code = exit_code = RERR_PARTIAL;
                }
  
@@ -43,10 +44,10 @@ See the file "instructions" (after applying this patch) for more info.
 +              }
  
                /* FALLTHROUGH */
-       case 5:
+ #include "case_N.h"
 --- old/clientserver.c
 +++ new/clientserver.c
-@@ -390,6 +390,9 @@ static int rsync_module(int f_in, int f_
+@@ -394,6 +394,9 @@ static int rsync_module(int f_in, int f_
                   XFLG_ABS_IF_SLASH | XFLG_OLD_PREFIXES);
  
        log_init(1);
@@ -56,7 +57,7 @@ See the file "instructions" (after applying this patch) for more info.
  
  #ifdef HAVE_PUTENV
        if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) {
-@@ -629,6 +632,9 @@ static int rsync_module(int f_in, int f_
+@@ -633,6 +636,9 @@ static int rsync_module(int f_in, int f_
                        rprintf(FLOG, "rsync %s %s from %s@%s (%s)\n",
                                am_sender ? "on" : "to",
                                request, auth_user, host, addr);
index 4d385fd..e2fe5cf 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1,5 +1,6 @@
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/acls.diff
     ./prepare-source
     ./configure --enable-acl-support
     make
index e36ed9d..21ccc9f 100644 (file)
@@ -1,8 +1,7 @@
-Depends-On-Patch: acls.diff
-
-After applying the above patch and this one, run these commands for a
-successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/acls.diff
+    patch -p1 <patches/adaptec_acl_mods.diff
     ./prepare-source
     ./configure --enable-acl-support
     make
@@ -31,7 +30,7 @@ entry.
 
 --- old/acls.c
 +++ new/acls.c
-@@ -325,6 +325,9 @@ static BOOL unpack_smb_acl(rsync_acl *ra
+@@ -282,6 +282,9 @@ static BOOL unpack_smb_acl(rsync_acl *ra
                }
                access = (sys_acl_get_perm(permset, SMB_ACL_READ) ? 4 : 0)
                       | (sys_acl_get_perm(permset, SMB_ACL_WRITE) ? 2 : 0)
@@ -41,7 +40,7 @@ entry.
                       | (sys_acl_get_perm(permset, SMB_ACL_EXECUTE) ? 1 : 0);
                /* continue == done with entry; break == store in temporary ida list */
                switch (tag_type) {
-@@ -419,6 +422,12 @@ static int store_access_in_entry(uchar a
+@@ -376,6 +379,12 @@ static int store_access_in_entry(uchar a
  
        COE( sys_acl_get_permset,(entry, &permset) );
        COE( sys_acl_clear_perms,(permset) );
@@ -54,7 +53,7 @@ entry.
        if (access & 4)
                COE( sys_acl_add_perm,(permset, SMB_ACL_READ) );
        if (access & 2)
-@@ -452,7 +461,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -409,7 +418,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
  
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_USER_OBJ) );
@@ -63,7 +62,7 @@ entry.
  
        for (ida = racl->users.idas, count = racl->users.count; count--; ida++) {
                COE( sys_acl_create_entry,(smb_acl, &entry) );
-@@ -463,7 +472,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -420,7 +429,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
  
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_GROUP_OBJ) );
@@ -72,7 +71,7 @@ entry.
  
        for (ida = racl->groups.idas, count = racl->groups.count; count--; ida++) {
                COE( sys_acl_create_entry,(smb_acl, &entry) );
-@@ -473,7 +482,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -430,7 +439,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
        }
  
  #ifdef ACLS_NEED_MASK
@@ -81,7 +80,7 @@ entry.
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_MASK) );
        COE2( store_access_in_entry,(mask_bits, entry) );
-@@ -487,7 +496,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -444,7 +453,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
  
        COE( sys_acl_create_entry,(smb_acl, &entry) );
        COE( sys_acl_set_tag_type,(entry, SMB_ACL_OTHER) );
@@ -90,7 +89,7 @@ entry.
  
  #ifdef DEBUG
        if (sys_acl_valid(*smb_acl) < 0)
-@@ -721,7 +730,7 @@ static void receive_rsync_acl(rsync_acl 
+@@ -649,7 +658,7 @@ static void receive_rsync_acl(rsync_acl 
        while (count--) {
                char tag = read_byte(f);
                uchar access = read_byte(f);
@@ -99,7 +98,7 @@ entry.
                        rprintf(FERROR, "receive_rsync_acl: bogus permset %o\n",
                                access);
                        exit_cleanup(RERR_STREAMIO);
-@@ -797,7 +806,7 @@ static void receive_rsync_acl(rsync_acl 
+@@ -725,7 +734,7 @@ static void receive_rsync_acl(rsync_acl 
                        racl->mask = NO_ENTRY;
                }
        } else if (racl->mask == NO_ENTRY) /* Must be non-empty with lists. */
index c0fb23b..0ec615a 100644 (file)
@@ -1,5 +1,6 @@
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/atimes.diff
     ./prepare-source
     ./configure                      (optional if already run)
     make
@@ -300,7 +301,7 @@ After applying this patch, run these commands for a successful build:
                        delete_in_dir(the_file_list, fname, file, &st);
                return;
        }
-@@ -1249,7 +1256,7 @@ static void recv_generator(char *fname, 
+@@ -1252,7 +1259,7 @@ static void recv_generator(char *fname, 
        if (fuzzy_dirlist) {
                int j = flist_find(fuzzy_dirlist, file);
                if (j >= 0) /* don't use changing file as future fuzzy basis */
@@ -309,7 +310,7 @@ After applying this patch, run these commands for a successful build:
        }
  
        /* open the file */
-@@ -1514,7 +1521,7 @@ void generate_files(int f_out, struct fi
+@@ -1517,7 +1524,7 @@ void generate_files(int f_out, struct fi
                                continue;
                        if (!need_retouch_dir_times && file->mode & S_IWUSR)
                                continue;
@@ -399,7 +400,7 @@ After applying this patch, run these commands for a successful build:
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -309,8 +310,9 @@ void usage(enum logcode F)
+@@ -311,8 +312,9 @@ void usage(enum logcode F)
    rprintf(F,"     --devices               preserve device files (super-user only)\n");
    rprintf(F,"     --specials              preserve special files\n");
    rprintf(F," -D                          same as --devices --specials\n");
@@ -411,7 +412,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-@@ -424,6 +426,9 @@ static struct poptOption long_options[] 
+@@ -428,6 +430,9 @@ static struct poptOption long_options[] 
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
@@ -421,7 +422,7 @@ After applying this patch, run these commands for a successful build:
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 2, 0, 0 },
    {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
    {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },
-@@ -1534,6 +1539,8 @@ void server_options(char **args,int *arg
+@@ -1538,6 +1543,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -519,7 +520,7 @@ After applying this patch, run these commands for a successful build:
   * by doubling until FLIST_LINEAR then grow by FLIST_LINEAR
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -327,8 +327,9 @@ to the detailed description below for a 
+@@ -328,8 +328,9 @@ to the detailed description below for a 
       --devices               preserve device files (super-user only)
       --specials              preserve special files
   -D                          same as --devices --specials
@@ -531,7 +532,7 @@ After applying this patch, run these commands for a successful build:
       --super                 receiver attempts super-user activities
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
-@@ -861,6 +862,12 @@ it is preserving modification times (see
+@@ -869,6 +870,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).
  
@@ -544,7 +545,7 @@ After applying this patch, run these commands for a successful build:
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1382,7 +1389,7 @@ with older versions of rsync, but that a
+@@ -1390,7 +1397,7 @@ with older versions of rsync, but that a
  verbose messages).
  
  The "%i" escape has a cryptic output that is 9 letters long.  The general
@@ -553,7 +554,7 @@ After applying this patch, run these commands for a successful build:
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1422,7 +1429,7 @@ quote(itemization(
+@@ -1430,7 +1437,7 @@ quote(itemization(
    by the file transfer.
    it() A bf(t) means the modification time is different and is being updated
    to the sender's value (requires bf(--times)).  An alternate value of bf(T)
@@ -562,7 +563,7 @@ After applying this patch, run these commands for a successful build:
    anytime a symlink is transferred, or when a file or device is transferred
    without bf(--times).
    it() A bf(p) means the permissions are different and are being updated to
-@@ -1431,7 +1438,10 @@ quote(itemization(
+@@ -1439,7 +1446,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).
@@ -758,10 +759,13 @@ After applying this patch, run these commands for a successful build:
 -              fprintf(stderr, "usage: " PROGRAM " DIR ...\n"
 -                      "Trivial file listing program for portably checking rsync\n");
 -              return 1;
+-      }
 +      poptContext pc;
 +      const char **extra_args;
 +      int opt;
-+
+-      for (argv++; *argv; argv++) {
+-              list_file(*argv);
 +      pc = poptGetContext(PROGRAM, argc, (const char **)argv,
 +                          long_options, 0);
 +      while ((opt = poptGetNextOpt(pc)) != -1) {
@@ -777,9 +781,6 @@ After applying this patch, run these commands for a successful build:
 +              }
        }
  
--      for (argv++; *argv; argv++) {
--              list_file(*argv);
--      }
 +      extra_args = poptGetArgs(pc);
 +      if (*extra_args == NULL)
 +              tls_usage(1);
@@ -787,7 +788,7 @@ After applying this patch, run these commands for a successful build:
 +      for (; *extra_args; extra_args++)
 +              list_file(*extra_args);
 +      poptFreeContext(pc);
++
        return 0;
  }
 --- old/util.c
index a614e66..51b71cf 100644 (file)
@@ -13,6 +13,12 @@ suffix.
 
 Marc St-Onge
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/backup-dir-dels.diff
+    ./configure                                 (optional if already run)
+    make
+
 --- old/backup.c
 +++ new/backup.c
 @@ -23,10 +23,15 @@
@@ -182,7 +188,7 @@ Marc St-Onge
  char *sockopts = NULL;
  int rsync_port = 0;
  int compare_dest = 0;
-@@ -290,6 +296,8 @@ void usage(enum logcode F)
+@@ -292,6 +298,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);
@@ -191,7 +197,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,"     --append                append data onto shorter files\n");
-@@ -514,7 +522,9 @@ static struct poptOption long_options[] 
+@@ -518,7 +526,9 @@ static struct poptOption long_options[] 
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_NONE,   &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -201,7 +207,7 @@ Marc St-Onge
    {"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 },
-@@ -1225,6 +1235,8 @@ int parse_arguments(int *argc, const cha
+@@ -1232,6 +1242,8 @@ int parse_arguments(int *argc, const cha
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
@@ -210,7 +216,7 @@ Marc St-Onge
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
-@@ -1246,6 +1258,14 @@ int parse_arguments(int *argc, const cha
+@@ -1253,6 +1265,14 @@ int parse_arguments(int *argc, const cha
                                return 0;
                        }
                }
@@ -225,7 +231,7 @@ Marc St-Onge
        }
  
        if (!backup_suffix)
-@@ -1257,6 +1277,16 @@ int parse_arguments(int *argc, const cha
+@@ -1264,6 +1284,16 @@ int parse_arguments(int *argc, const cha
                        backup_suffix);
                return 0;
        }
@@ -242,7 +248,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;
-@@ -1280,6 +1310,31 @@ int parse_arguments(int *argc, const cha
+@@ -1287,6 +1317,31 @@ int parse_arguments(int *argc, const cha
                        "P *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
@@ -274,7 +280,7 @@ Marc St-Onge
        if (make_backups && !backup_dir)
                omit_dir_times = 1;
  
-@@ -1639,6 +1694,10 @@ void server_options(char **args,int *arg
+@@ -1646,6 +1701,10 @@ void server_options(char **args,int *arg
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -285,7 +291,7 @@ Marc St-Onge
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1647,7 +1706,13 @@ void server_options(char **args,int *arg
+@@ -1654,7 +1713,13 @@ void server_options(char **args,int *arg
                        goto oom;
                args[ac++] = arg;
        }
index 70c6ed4..472b71e 100644 (file)
@@ -19,6 +19,12 @@ Igor Yu. Zhbanov wrote:
 I'm not sure I like this, but if you run into the cygwin problem, this might
 prove helpful.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/catch_crash_signals.diff
+    ./configure                                  (optional if already run)
+    make
+
 --- old/errcode.h
 +++ new/errcode.h
 @@ -47,6 +47,8 @@
@@ -42,7 +48,7 @@ prove helpful.
        { RERR_PARTIAL    , "some files could not be transferred" },
 --- old/main.c
 +++ new/main.c
-@@ -137,8 +137,11 @@ static void wait_process_with_flush(pid_
+@@ -149,8 +149,11 @@ static void wait_process_with_flush(pid_
                        *exit_code_ptr = RERR_TERMINATED;
                else
                        *exit_code_ptr = RERR_WAITCHILD;
@@ -55,7 +61,7 @@ prove helpful.
  }
  
  /* This function gets called from all 3 processes.  We want the client side
-@@ -1112,6 +1115,14 @@ static RETSIGTYPE sigchld_handler(UNUSED
+@@ -1211,6 +1214,14 @@ RETSIGTYPE remember_children(UNUSED(int 
                                break;
                        }
                }
@@ -70,7 +76,7 @@ prove helpful.
        }
  #endif
  #ifndef HAVE_SIGACTION
-@@ -1170,6 +1181,12 @@ static RETSIGTYPE rsync_panic_handler(UN
+@@ -1269,6 +1280,12 @@ static RETSIGTYPE rsync_panic_handler(UN
  }
  #endif
  
@@ -83,7 +89,7 @@ prove helpful.
  
  int main(int argc,char *argv[])
  {
-@@ -1192,6 +1209,11 @@ int main(int argc,char *argv[])
+@@ -1291,6 +1308,11 @@ int main(int argc,char *argv[])
        SIGACTMASK(SIGFPE, rsync_panic_handler);
        SIGACTMASK(SIGABRT, rsync_panic_handler);
        SIGACTMASK(SIGBUS, rsync_panic_handler);
@@ -97,7 +103,7 @@ prove helpful.
        starttime = time(NULL);
 --- old/socket.c
 +++ new/socket.c
-@@ -435,7 +435,17 @@ int is_a_socket(int fd)
+@@ -454,7 +454,17 @@ int is_a_socket(int fd)
  static RETSIGTYPE sigchld_handler(UNUSED(int val))
  {
  #ifdef WNOHANG
index 33def78..3052025 100644 (file)
@@ -2,9 +2,15 @@ This patch causes the --cvs-exclude option to prefix the names listed
 in each dir's CVS/Entries file as per-dir includes before the dir's list
 of excludes taken from the .cvsignore file.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/cvs-entries.diff
+    ./configure                                 (optional if already run)
+    make
+
 --- old/exclude.c
 +++ new/exclude.c
-@@ -221,6 +221,8 @@ static void add_rule(struct filter_list_
+@@ -216,6 +216,8 @@ static void add_rule(struct filter_list_
                if (!(lp = new_array(struct filter_list_struct, 1)))
                        out_of_memory("add_rule");
                lp->head = lp->tail = NULL;
@@ -13,7 +19,7 @@ of excludes taken from the .cvsignore file.
                if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0)
                        out_of_memory("add_rule");
                ret->u.mergelist = lp;
-@@ -454,6 +456,14 @@ void *push_local_filters(const char *dir
+@@ -448,6 +450,14 @@ void *push_local_filters(const char *dir
                                set_filter_dir(dir, dirlen);
                }
  
@@ -28,7 +34,7 @@ of excludes taken from the .cvsignore file.
                if (strlcpy(dirbuf + dirbuf_len, ex->pattern,
                    MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) {
                        parse_filter_file(lp, dirbuf, ex->match_flags,
-@@ -970,6 +980,7 @@ void parse_filter_file(struct filter_lis
+@@ -973,6 +983,7 @@ void parse_filter_file(struct filter_lis
        char line[BIGPATHBUFLEN];
        char *eob = line + sizeof line - 1;
        int word_split = mflags & MATCHFLG_WORD_SPLIT;
@@ -36,7 +42,7 @@ of excludes taken from the .cvsignore file.
  
        if (!fname || !*fname)
                return;
-@@ -1016,6 +1027,24 @@ void parse_filter_file(struct filter_lis
+@@ -1019,6 +1030,24 @@ void parse_filter_file(struct filter_lis
                                }
                                break;
                        }
@@ -61,7 +67,7 @@ of excludes taken from the .cvsignore file.
                        if (word_split && isspace(ch))
                                break;
                        if (eol_nulls? !ch : (ch == '\n' || ch == '\r'))
-@@ -1025,13 +1054,15 @@ void parse_filter_file(struct filter_lis
+@@ -1028,13 +1057,15 @@ void parse_filter_file(struct filter_lis
                        else
                                overflow = 1;
                }
@@ -80,7 +86,7 @@ of excludes taken from the .cvsignore file.
                        break;
 --- old/rsync.h
 +++ new/rsync.h
-@@ -116,6 +116,7 @@
+@@ -117,6 +117,7 @@
  #define XFLG_OLD_PREFIXES     (1<<1)
  #define XFLG_ANCHORED2ABS     (1<<2)
  #define XFLG_ABS_IF_SLASH     (1<<3)
index 42315fd..d63b154 100644 (file)
@@ -1,4 +1,4 @@
-Greetings, and thanks for all of your work on the wonderful rsync!
+Jeremy Bornstein wrote:
 
 I recently had the need to transfer files only with different mod
 dates (and to *not* transfer them based on file size differences).
@@ -8,16 +8,15 @@ rsync didn't already have a --date-only flag, so I added one and am
 enclosing the diffs in case you (as I hope) decide to include this
 option in future releases.
 
-Again, thanks!
+To use this patch, run these commands for a successful build:
 
-Best Regards,
-Jeremy Bornstein
-
-[Patched update to have context and apply to latest CVS source.]
+    patch -p1 <patches/date-only.diff
+    ./configure                                 (optional if already run)
+    make
 
 --- old/generator.c
 +++ new/generator.c
-@@ -61,6 +61,7 @@ extern int append_mode;
+@@ -60,6 +60,7 @@ extern int append_mode;
  extern int make_backups;
  extern int csum_length;
  extern int ignore_times;
@@ -25,7 +24,7 @@ Jeremy Bornstein
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -379,6 +380,8 @@ void itemize(struct file_struct *file, i
+@@ -378,6 +379,8 @@ void itemize(struct file_struct *file, i
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
  int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
  {
@@ -44,7 +43,7 @@ Jeremy Bornstein
  int daemon_bwlimit = 0;
  int bwlimit = 0;
  int fuzzy_basis = 0;
-@@ -332,6 +333,7 @@ void usage(enum logcode F)
+@@ -343,6 +344,7 @@ void usage(enum logcode F)
    rprintf(F,"     --timeout=TIME          set I/O timeout in seconds\n");
    rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");
    rprintf(F,"     --size-only             skip files that match in size\n");
@@ -52,7 +51,7 @@ Jeremy Bornstein
    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");
-@@ -443,6 +445,7 @@ static struct poptOption long_options[] 
+@@ -463,6 +465,7 @@ static struct poptOption long_options[] 
    {"chmod",            0,  POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
    {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
@@ -60,7 +59,7 @@ Jeremy Bornstein
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
    {"existing",         0,  POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
-@@ -1647,6 +1650,9 @@ void server_options(char **args,int *arg
+@@ -1676,6 +1679,9 @@ void server_options(char **args,int *arg
                        args[ac++] = "--size-only";
        }
  
@@ -72,7 +71,7 @@ Jeremy Bornstein
                        goto oom;
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -355,6 +355,7 @@ to the detailed description below for a 
+@@ -360,6 +360,7 @@ to the detailed description below for a 
       --timeout=TIME          set I/O timeout in seconds
   -I, --ignore-times          don't skip files that match size and time
       --size-only             skip files that match in size
@@ -80,7 +79,7 @@ Jeremy Bornstein
       --modify-window=NUM     compare mod-times with reduced accuracy
   -T, --temp-dir=DIR          create temporary files in directory DIR
   -y, --fuzzy                 find similar file for basis if no dest file
-@@ -460,6 +461,12 @@ regardless of timestamp. This is useful 
+@@ -477,6 +478,12 @@ regardless of timestamp. This is useful 
  after using another mirroring system which may not preserve timestamps
  exactly.
  
index 6faf82a..fd66988 100644 (file)
@@ -19,10 +19,10 @@ memory than trying to keep track of the matches internally, and also allows
 any deletions or file-updates to occur normally without interfering with
 these alternate-basis discoveries.
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
-    ./prepare-source
-    ./configure                      (optional if already run)
+    patch -p1 <patches/detect-renamed.diff
+    ./configure                                 (optional if already run)
     make
 
 TODO:
@@ -34,15 +34,15 @@ TODO:
 
 --- old/flist.c
 +++ new/flist.c
-@@ -55,6 +55,7 @@ extern int implied_dirs;
+@@ -51,6 +51,7 @@ extern int implied_dirs;
  extern int prune_empty_dirs;
  extern int copy_links;
  extern int copy_unsafe_links;
 +extern int detect_renamed;
  extern int protocol_version;
  extern int sanitize_paths;
- extern const char *io_write_phase;
-@@ -73,6 +74,8 @@ int checksum_len;
+ extern struct stats stats;
+@@ -68,6 +69,8 @@ int checksum_len;
  dev_t filesystem_dev; /* used to implement -x */
  unsigned int file_struct_len;
  
@@ -51,8 +51,8 @@ TODO:
  static char empty_sum[MD4_SUM_LENGTH];
  static int flist_count_offset;
  
-@@ -259,6 +262,44 @@ static mode_t from_wire_mode(int mode)
-       return (mode_t)mode;
+@@ -250,6 +253,44 @@ static mode_t from_wire_mode(int mode)
+       return mode;
  }
  
 +static int fattr_compare(struct file_struct **file1, struct file_struct **file2)
@@ -96,7 +96,7 @@ TODO:
  static void send_directory(int f, struct file_list *flist,
                           char *fbuf, int len);
  
-@@ -1387,6 +1428,25 @@ struct file_list *recv_file_list(int f)
+@@ -1379,6 +1420,25 @@ struct file_list *recv_file_list(int f)
  
        clean_flist(flist, relative_paths, 1);
  
@@ -124,14 +124,14 @@ TODO:
  
 --- old/generator.c
 +++ new/generator.c
-@@ -77,6 +77,7 @@ extern char *basis_dir[];
+@@ -76,6 +76,7 @@ extern char *basis_dir[];
  extern int compare_dest;
  extern int copy_dest;
  extern int link_dest;
 +extern int detect_renamed;
  extern int whole_file;
  extern int list_only;
- extern int read_batch;
+ extern int new_root_dir;
 @@ -91,12 +92,15 @@ extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -413,7 +413,7 @@ TODO:
  
        if (do_progress && !am_server)
                rprintf(FINFO, "                    \r");
-@@ -756,6 +897,7 @@ static int try_dests_non(struct file_str
+@@ -771,6 +912,7 @@ static int try_dests_non(struct file_str
        return -1;
  }
  
@@ -421,8 +421,8 @@ TODO:
  static int phase = 0;
  
  /* Acts on the_file_list->file's ndx'th item, whose name is fname.  If a dir,
-@@ -910,8 +1052,12 @@ static void recv_generator(char *fname, 
-                   && verbose && code && f_out != -1)
+@@ -944,8 +1086,12 @@ static void recv_generator(char *fname, 
+                   && verbose && code != FNONE && f_out != -1)
                        rprintf(code, "%s/\n", fname);
                if (delete_during && f_out != -1 && !phase && dry_run < 2
 -                  && (file->flags & FLAG_DEL_HERE))
@@ -436,7 +436,7 @@ TODO:
                return;
        }
  
-@@ -1150,8 +1296,14 @@ static void recv_generator(char *fname, 
+@@ -1201,8 +1347,14 @@ static void recv_generator(char *fname, 
                    && hard_link_check(file, ndx, fname, statret, &st,
                                       itemizing, code, HL_SKIP))
                        return;
@@ -452,7 +452,7 @@ TODO:
                rsyserr(FERROR, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                return;
-@@ -1329,11 +1481,17 @@ void generate_files(int f_out, struct fi
+@@ -1388,11 +1540,17 @@ void generate_files(int f_out, struct fi
                        (long)getpid(), flist->count);
        }
  
@@ -471,7 +471,7 @@ TODO:
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1388,7 +1546,23 @@ void generate_files(int f_out, struct fi
+@@ -1447,7 +1605,23 @@ void generate_files(int f_out, struct fi
        }
        recv_generator(NULL, NULL, 0, 0, 0, code, -1);
        if (delete_during)
@@ -498,7 +498,7 @@ TODO:
        csum_length = SUM_LENGTH;
 --- old/options.c
 +++ new/options.c
-@@ -76,6 +76,7 @@ int am_generator = 0;
+@@ -78,6 +78,7 @@ int am_generator = 0;
  int am_starting_up = 1;
  int relative_paths = -1;
  int implied_dirs = 1;
@@ -506,7 +506,7 @@ TODO:
  int numeric_ids = 0;
  int allow_8bit_chars = 0;
  int force_delete = 0;
-@@ -334,6 +335,7 @@ void usage(enum logcode F)
+@@ -346,6 +347,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");
@@ -514,7 +514,7 @@ TODO:
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
    rprintf(F,"     --copy-dest=DIR         ... and include copies of unchanged files\n");
    rprintf(F,"     --link-dest=DIR         hardlink to files in DIR when unchanged\n");
-@@ -481,6 +483,7 @@ static struct poptOption long_options[] 
+@@ -499,6 +501,7 @@ static struct poptOption long_options[] 
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -522,7 +522,7 @@ TODO:
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
    {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },
    {"compress-level",   0,  POPT_ARG_INT,    &def_compress_level, 'z', 0, 0 },
-@@ -1340,7 +1343,7 @@ int parse_arguments(int *argc, const cha
+@@ -1362,7 +1365,7 @@ int parse_arguments(int *argc, const cha
                inplace = 1;
        }
  
@@ -531,7 +531,7 @@ TODO:
                partial_dir = tmp_partialdir;
  
        if (inplace) {
-@@ -1349,6 +1352,7 @@ int parse_arguments(int *argc, const cha
+@@ -1371,6 +1374,7 @@ int parse_arguments(int *argc, const cha
                        snprintf(err_buf, sizeof err_buf,
                                 "--%s cannot be used with --%s\n",
                                 append_mode ? "append" : "inplace",
@@ -539,7 +539,7 @@ TODO:
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -1651,6 +1655,8 @@ void server_options(char **args,int *arg
+@@ -1674,6 +1678,8 @@ void server_options(char **args,int *arg
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -550,7 +550,7 @@ TODO:
        if (modify_window_set) {
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -362,6 +362,7 @@ to the detailed description below for a 
+@@ -363,6 +363,7 @@ to the detailed description below for a 
       --modify-window=NUM     compare mod-times with reduced accuracy
   -T, --temp-dir=DIR          create temporary files in directory DIR
   -y, --fuzzy                 find similar file for basis if no dest file
@@ -558,7 +558,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
-@@ -1240,6 +1241,15 @@ Note that the use of the bf(--delete) op
+@@ -1259,6 +1260,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.
  
@@ -576,7 +576,7 @@ TODO:
  files against doing transfers (if the files are missing in the destination
 --- old/util.c
 +++ new/util.c
-@@ -1013,6 +1013,32 @@ int handle_partial_dir(const char *fname
+@@ -1025,6 +1025,32 @@ int handle_partial_dir(const char *fname
        return 1;
  }
  
index 6a9698e..bbc89a2 100644 (file)
@@ -1,17 +1,23 @@
 A patch from Stefan Müller to add the --downdate option, which works
 in the opposite manner as --update.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/downdate.diff
+    ./configure                                 (optional if already run)
+    make
+
 --- old/generator.c
 +++ new/generator.c
 @@ -53,6 +53,7 @@ extern int ignore_errors;
- extern int remove_sent_files;
+ extern int remove_source_files;
  extern int delay_updates;
  extern int update_only;
 +extern int downdate_only;
  extern int ignore_existing;
  extern int ignore_non_existing;
  extern int inplace;
-@@ -1133,6 +1134,13 @@ static void recv_generator(char *fname, 
+@@ -1144,6 +1145,13 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -25,7 +31,7 @@ in the opposite manner as --update.
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
-@@ -1430,7 +1438,7 @@ void generate_files(int f_out, struct fi
+@@ -1452,7 +1460,7 @@ void generate_files(int f_out, struct fi
        phase++;
        csum_length = SUM_LENGTH;
        max_size = min_size = ignore_existing = ignore_non_existing = 0;
@@ -44,7 +50,7 @@ in the opposite manner as --update.
  int cvs_exclude = 0;
  int dry_run = 0;
  int do_xfers = 1;
-@@ -291,6 +292,7 @@ void usage(enum logcode F)
+@@ -293,6 +294,7 @@ void usage(enum logcode F)
    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);
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
@@ -52,7 +58,7 @@ in the opposite manner as --update.
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
    rprintf(F," -d, --dirs                  transfer directories without recursing\n");
-@@ -461,6 +463,7 @@ static struct poptOption long_options[] 
+@@ -465,6 +467,7 @@ static struct poptOption long_options[] 
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
index 12756ca..f9a41d5 100644 (file)
@@ -8,9 +8,15 @@ III when copying a 65 MB file without very much matching data).
 This was updated for the latest codebase from a patch written by Shachar
 Shemesh.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/dynamic_hash.diff
+    ./configure                                 (optional if already run)
+    make
+
 --- old/match.c
 +++ new/match.c
-@@ -37,24 +37,31 @@ static int total_matches;
+@@ -40,24 +40,31 @@ static int total_matches;
  
  extern struct stats stats;
  
@@ -49,7 +55,7 @@ Shemesh.
  
        for (i = 0; i < s->count; i++) {
                uint32 t = SUM2HASH(s->sums[i].sum1);
-@@ -162,11 +169,11 @@ static void hash_search(int f,struct sum
+@@ -165,11 +172,11 @@ static void hash_search(int f,struct sum
                                (double)offset, s2 & 0xFFFF, s1 & 0xFFFF);
                }
  
index 25aa0de..948b1ed 100644 (file)
@@ -8,6 +8,12 @@ to its checksum pass during its normal find-the-different-files pass.
 I have benchmarked this a little, and it appears to slow things down
 for a local copy, so the old algorithm is used for local copies.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/early-checksum.diff
+    ./configure                                 (optional if already run)
+    make
+
 --- old/flist.c
 +++ new/flist.c
 @@ -31,6 +31,7 @@ extern int am_daemon;
@@ -73,7 +79,7 @@ for a local copy, so the old algorithm is used for local copies.
                                continue;
                        best_match = j;
                        match_level = 2;
-@@ -1212,7 +1216,7 @@ static void recv_generator(char *fname, 
+@@ -1215,7 +1219,7 @@ static void recv_generator(char *fname, 
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -84,7 +90,7 @@ for a local copy, so the old algorithm is used for local copies.
                        handle_partial_dir(partialptr, PDIR_DELETE);
 --- old/hlink.c
 +++ new/hlink.c
-@@ -222,7 +222,7 @@ int hard_link_check(struct file_struct *
+@@ -224,7 +224,7 @@ int hard_link_check(struct file_struct *
                                                }
                                                break;
                                        }
index e4f47c5..0f45051 100644 (file)
@@ -1,22 +1,21 @@
-Depends-On-Patch: acls.diff
-Depends-On-Patch: xattrs.diff
-
 This patch adds a new option:  --fake-super, which tells rsync to copy in a
 fake super-user mode that stores various file attributes in an extended-
 attribute value instead of as real file-system attributes.  See the changes
 to the manpages for details.
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/acls.diff
+    patch -p1 <patches/xattrs.diff
+    patch -p1 <patches/fake-super.diff
     ./prepare-source
     ./configure --enable-xattr-support
     make
 
-or, if you want ACL support too:
+If you want ACL support too, use this configure command instead of the one
+above:
 
-    ./prepare-source
     ./configure --enable-acl-support --enable-xattr-support
-    make
 
 --- old/backup.c
 +++ new/backup.c
index 74864d8..dbbeea4 100644 (file)
@@ -1,8 +1,9 @@
 This patch provides --flags, which preserves the st_flags field.
 Modified from a patch that was written by Rolf Grossmann.
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/flags.diff
     ./prepare-source
     ./configure
     make
@@ -196,7 +197,7 @@ After applying this patch, run these commands for a successful build:
                                return;
                        if (!S_ISLNK(st.st_mode))
                                statret = -1;
-@@ -1060,7 +1076,7 @@ static void recv_generator(char *fname, 
+@@ -1063,7 +1079,7 @@ static void recv_generator(char *fname, 
                 || (st.st_mode & ~CHMOD_BITS) != (file->mode & ~CHMOD_BITS)
                 || st.st_rdev != file->u.rdev) {
                        if (statret == 0
@@ -205,7 +206,7 @@ After applying this patch, run these commands for a successful build:
                                return;
                        if (preserve_hard_links && file->link_u.links
                            && hard_link_check(file, ndx, fname, -1, &st,
-@@ -1145,7 +1161,7 @@ static void recv_generator(char *fname, 
+@@ -1148,7 +1164,7 @@ static void recv_generator(char *fname, 
        fnamecmp_type = FNAMECMP_FNAME;
  
        if (statret == 0 && !S_ISREG(st.st_mode)) {
@@ -224,7 +225,7 @@ After applying this patch, run these commands for a successful build:
  int preserve_executability = 0;
  int preserve_devices = 0;
  int preserve_specials = 0;
-@@ -200,6 +201,7 @@ static void print_rsync_version(enum log
+@@ -201,6 +202,7 @@ static void print_rsync_version(enum log
        char const *hardlinks = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
@@ -232,7 +233,7 @@ After applying this patch, run these commands for a successful build:
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -222,6 +224,10 @@ static void print_rsync_version(enum log
+@@ -223,6 +225,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -243,7 +244,7 @@ After applying this patch, run these commands for a successful build:
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -234,9 +240,9 @@ static void print_rsync_version(enum log
+@@ -235,9 +241,9 @@ static void print_rsync_version(enum log
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
         * macros. */
@@ -255,7 +256,7 @@ After applying this patch, run these commands for a successful build:
                (int) (sizeof dumstat->st_ino * 8),
                (int) (sizeof (int64) * 8));
  #ifdef MAINTAINER_MODE
-@@ -302,6 +308,7 @@ void usage(enum logcode F)
+@@ -304,6 +310,7 @@ void usage(enum logcode F)
    rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -H, --hard-links            preserve hard links\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
@@ -263,7 +264,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F," -E, --executability         preserve the file's executability\n");
    rprintf(F,"     --chmod=CHMOD           affect file and/or directory permissions\n");
    rprintf(F," -o, --owner                 preserve owner (super-user only)\n");
-@@ -420,6 +427,8 @@ static struct poptOption long_options[] 
+@@ -424,6 +431,8 @@ static struct poptOption long_options[] 
    {"perms",           'p', POPT_ARG_VAL,    &preserve_perms, 1, 0, 0 },
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
@@ -272,7 +273,7 @@ After applying this patch, run these commands for a successful build:
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1124,6 +1133,15 @@ int parse_arguments(int *argc, const cha
+@@ -1128,6 +1137,15 @@ int parse_arguments(int *argc, const cha
        }
  #endif
  
@@ -288,7 +289,7 @@ After applying this patch, run these commands for a successful build:
        if (write_batch && read_batch) {
                snprintf(err_buf, sizeof err_buf,
                        "--write-batch and --read-batch can not be used together\n");
-@@ -1577,6 +1595,9 @@ void server_options(char **args,int *arg
+@@ -1581,6 +1599,9 @@ void server_options(char **args,int *arg
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -424,7 +425,7 @@ After applying this patch, run these commands for a successful build:
        mode_t mode;
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -320,6 +320,7 @@ to the detailed description below for a 
+@@ -321,6 +321,7 @@ to the detailed description below for a 
   -K, --keep-dirlinks         treat symlinked dir on receiver as dir
   -H, --hard-links            preserve hard links
   -p, --perms                 preserve permissions
@@ -432,7 +433,7 @@ After applying this patch, run these commands for a successful build:
   -E, --executability         preserve executability
       --chmod=CHMOD           affect file and/or directory permissions
   -o, --owner                 preserve owner (super-user only)
-@@ -501,7 +502,9 @@ specified, in which case bf(-r) is not i
+@@ -509,7 +510,9 @@ specified, in which case bf(-r) is not i
  
  Note that bf(-a) bf(does not preserve hardlinks), because
  finding multiply-linked files is expensive.  You must separately
@@ -443,7 +444,7 @@ After applying this patch, run these commands for a successful build:
  
  dit(--no-OPTION) You may turn off one or more implied options by prefixing
  the option name with "no-".  Not all options may be prefixed with a "no-":
-@@ -796,6 +799,13 @@ quote(itemization(
+@@ -804,6 +807,13 @@ quote(itemization(
  
  If bf(--perms) is enabled, this option is ignored.
  
index a7a45c7..42f85a4 100644 (file)
@@ -1,6 +1,12 @@
 This patch from Sami Farin lets you specify --fsync if you want fsync()
 to be called on every file we write.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/fsync.diff
+    ./configure                         (optional if already run)
+    make
+
 --- old/options.c
 +++ new/options.c
 @@ -45,6 +45,7 @@ int append_mode = 0;
@@ -11,7 +17,7 @@ to be called on every file we write.
  int preserve_links = 0;
  int preserve_hard_links = 0;
  int preserve_perms = 0;
-@@ -329,6 +330,7 @@ void usage(enum logcode F)
+@@ -339,6 +340,7 @@ void usage(enum logcode F)
    rprintf(F,"     --partial-dir=DIR       put a partially transferred file into DIR\n");
    rprintf(F,"     --delay-updates         put all updated files into place at transfer's end\n");
    rprintf(F," -m, --prune-empty-dirs      prune empty directory chains from the file-list\n");
@@ -19,7 +25,7 @@ to be called on every file we write.
    rprintf(F,"     --numeric-ids           don't map uid/gid values by user/group name\n");
    rprintf(F,"     --timeout=TIME          set I/O timeout in seconds\n");
    rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");
-@@ -506,6 +508,7 @@ static struct poptOption long_options[] 
+@@ -525,6 +527,7 @@ static struct poptOption long_options[] 
    {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_NONE,   &eol_nulls, 0, 0, 0},
@@ -27,7 +33,7 @@ to be called on every file we write.
    {"numeric-ids",      0,  POPT_ARG_NONE,   &numeric_ids, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1706,6 +1709,9 @@ void server_options(char **args,int *arg
+@@ -1727,6 +1730,9 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }
  
@@ -39,7 +45,7 @@ to be called on every file we write.
                 *   and it may be an older version that doesn't know this
 --- old/receiver.c
 +++ new/receiver.c
-@@ -38,6 +38,7 @@ extern int protocol_version;
+@@ -37,6 +37,7 @@ extern int protocol_version;
  extern int relative_paths;
  extern int preserve_hard_links;
  extern int preserve_perms;
@@ -47,7 +53,7 @@ to be called on every file we write.
  extern int basis_dir_cnt;
  extern int make_backups;
  extern int cleanup_got_literal;
-@@ -254,6 +255,12 @@ static int receive_data(int f_in, char *
+@@ -258,6 +259,12 @@ static int receive_data(int f_in, char *
                exit_cleanup(RERR_FILEIO);
        }
  
@@ -80,7 +86,7 @@ to be called on every file we write.
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -309,6 +310,12 @@ int copy_file(const char *source, const 
+@@ -314,6 +315,12 @@ int copy_file(const char *source, const 
                return -1;
        }
  
index 23922a2..08d4cd5 100644 (file)
@@ -8,6 +8,12 @@ This only saves 4 bytes per file (not counting the overhead of the array).
 This probably needs a hashing algorithm to be added if the uid+gid list
 gets to be really large.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/id-pair.diff
+    ./configure                         (optional if already run)
+    make
+
 --- old/flist.c
 +++ new/flist.c
 @@ -54,6 +54,7 @@ extern int copy_unsafe_links;
@@ -67,7 +73,7 @@ gets to be really large.
                        file->u.link = NULL;
                } else
                        file->mode = save_mode;
-@@ -1383,7 +1381,7 @@ struct file_list *recv_file_list(int f)
+@@ -1380,7 +1378,7 @@ struct file_list *recv_file_list(int f)
        clean_flist(flist, relative_paths, 1);
  
        if (f >= 0) {
@@ -76,7 +82,7 @@ gets to be really large.
  
                /* Recv the io_error flag */
                if (lp_ignore_errors(module_id) || ignore_errors)
-@@ -1699,13 +1697,15 @@ static void output_flist(struct file_lis
+@@ -1696,13 +1694,15 @@ static void output_flist(struct file_lis
  
        for (i = 0; i < flist->count; i++) {
                file = flist->files[i];
@@ -148,7 +154,7 @@ gets to be really large.
                iflags |= ITEM_IS_NEW;
 --- old/log.c
 +++ new/log.c
-@@ -47,6 +47,7 @@ extern char *auth_user;
+@@ -46,6 +46,7 @@ extern char *auth_user;
  extern char *stdout_format;
  extern char *logfile_format;
  extern char *logfile_name;
@@ -156,7 +162,7 @@ gets to be really large.
  #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
  extern iconv_t ic_chck;
  #endif
-@@ -479,16 +480,16 @@ static void log_formatted(enum logcode c
+@@ -470,16 +471,16 @@ static void log_formatted(enum logcode c
                case 'U':
                        strlcat(fmt, "ld", sizeof fmt);
                        snprintf(buf2, sizeof buf2, fmt,
index 0ac2402..9b0b881 100644 (file)
@@ -1,6 +1,12 @@
 This adds the --ignore-case option, which makes rsync compare filenames
 in a case-insensitive manner.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/ignore-case.diff
+    ./configure                            (optional if already run)
+    make
+
 --- old/flist.c
 +++ new/flist.c
 @@ -32,6 +32,7 @@ extern int am_sender;
@@ -11,7 +17,7 @@ in a case-insensitive manner.
  extern int ignore_errors;
  extern int numeric_ids;
  extern int recurse;
-@@ -1786,7 +1787,7 @@ int f_name_cmp(struct file_struct *f1, s
+@@ -1783,7 +1784,7 @@ int f_name_cmp(struct file_struct *f1, s
        if (type1 != type2)
                return type1 == t_PATH ? 1 : -1;
  
@@ -20,7 +26,7 @@ in a case-insensitive manner.
                if (!*c1) {
                        switch (state1) {
                        case s_DIR:
-@@ -1849,7 +1850,16 @@ int f_name_cmp(struct file_struct *f1, s
+@@ -1846,7 +1847,16 @@ int f_name_cmp(struct file_struct *f1, s
                        if (type1 != type2)
                                return type1 == t_PATH ? 1 : -1;
                }
@@ -84,7 +90,7 @@ in a case-insensitive manner.
  int blocking_io = -1;
  int checksum_seed = 0;
  int inplace = 0;
-@@ -359,6 +360,7 @@ void usage(enum logcode F)
+@@ -361,6 +362,7 @@ void usage(enum logcode F)
    rprintf(F,"     --include-from=FILE     read include patterns from FILE\n");
    rprintf(F,"     --files-from=FILE       read list of source-file names from FILE\n");
    rprintf(F," -0, --from0                 all *-from/filter files are delimited by 0s\n");
@@ -92,7 +98,7 @@ in a case-insensitive manner.
    rprintf(F,"     --address=ADDRESS       bind address for outgoing socket to daemon\n");
    rprintf(F,"     --port=PORT             specify double-colon alternate port number\n");
    rprintf(F,"     --sockopts=OPTIONS      specify custom TCP options\n");
-@@ -521,6 +523,7 @@ static struct poptOption long_options[] 
+@@ -525,6 +527,7 @@ static struct poptOption long_options[] 
    {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_NONE,   &eol_nulls, 0, 0, 0},
@@ -100,7 +106,7 @@ in a case-insensitive manner.
    {"numeric-ids",      0,  POPT_ARG_NONE,   &numeric_ids, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1684,6 +1687,9 @@ void server_options(char **args,int *arg
+@@ -1688,6 +1691,9 @@ void server_options(char **args,int *arg
                args[ac++] = arg;
        }
  
index 8cd07a4..ed8bf5b 100644 (file)
@@ -1,16 +1,16 @@
-After applying this patch, run these commands for a successful build:
-
-    ./prepare-source
-    ./configure                      (optional if already run)
-    make
-
-Jason M. Felice writes:
+Jason M. Felice wrote:
 
 This patch adds the --link-by-hash=DIR option, which hard links received
 files in a link farm arranged by MD4 file hash.  The result is that the system
 will only store one copy of the unique contents of each file, regardless of
 the file's name.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/link-by-hash.diff
+    ./prepare-source
+    ./configure
+    make
 
 --- old/Makefile.in
 +++ new/Makefile.in
@@ -375,7 +375,7 @@ the file's name.
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *logfile_name = NULL;
-@@ -347,6 +348,7 @@ void usage(enum logcode F)
+@@ -349,6 +350,7 @@ void usage(enum logcode F)
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
    rprintf(F,"     --copy-dest=DIR         ... and include copies of unchanged files\n");
    rprintf(F,"     --link-dest=DIR         hardlink to files in DIR when unchanged\n");
@@ -383,7 +383,7 @@ the file's name.
    rprintf(F," -z, --compress              compress file data during the transfer\n");
    rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");
    rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
-@@ -396,7 +398,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -398,7 +400,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,
@@ -392,7 +392,7 @@ the file's name.
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -495,6 +497,7 @@ static struct poptOption long_options[] 
+@@ -499,6 +501,7 @@ static struct poptOption long_options[] 
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -400,7 +400,7 @@ the file's name.
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
    {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },
    {"compress-level",   0,  POPT_ARG_INT,    &def_compress_level, 'z', 0, 0 },
-@@ -1085,6 +1088,21 @@ int parse_arguments(int *argc, const cha
+@@ -1089,6 +1092,21 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -422,7 +422,7 @@ the file's name.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1735,6 +1753,11 @@ void server_options(char **args,int *arg
+@@ -1739,6 +1757,11 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -566,7 +566,7 @@ the file's name.
  #include "byteorder.h"
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -365,6 +365,7 @@ to the detailed description below for a 
+@@ -366,6 +366,7 @@ to the detailed description below for a 
       --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
index 30cac5a..3e5df59 100644 (file)
@@ -6,9 +6,15 @@ with the latest codebase, but even in its original form it didn't
 handle relative symlinks properly, and that has not yet been fixed
 in this modified version.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/links-depth.diff
+    ./configure                          (optional if already run)
+    make
+
 --- old/flist.c
 +++ new/flist.c
-@@ -45,6 +45,7 @@ extern int one_file_system;
+@@ -41,6 +41,7 @@ extern int one_file_system;
  extern int copy_dirlinks;
  extern int keep_dirlinks;
  extern int preserve_links;
@@ -16,7 +22,7 @@ in this modified version.
  extern int preserve_hard_links;
  extern int preserve_devices;
  extern int preserve_specials;
-@@ -715,6 +716,30 @@ static struct file_struct *receive_file_
+@@ -702,6 +703,30 @@ static struct file_struct *receive_file_
        return file;
  }
  
@@ -47,7 +53,7 @@ in this modified version.
  /**
   * Create a file_struct for a named file by reading its stat()
   * information and performing extensive checks against global
-@@ -849,7 +874,13 @@ struct file_struct *make_file(char *fnam
+@@ -837,7 +862,13 @@ struct file_struct *make_file(char *fnam
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
@@ -64,7 +70,7 @@ in this modified version.
  #endif
 --- old/options.c
 +++ new/options.c
-@@ -44,6 +44,7 @@ int keep_dirlinks = 0;
+@@ -46,6 +46,7 @@ int keep_dirlinks = 0;
  int copy_dirlinks = 0;
  int copy_links = 0;
  int preserve_links = 0;
@@ -72,7 +78,7 @@ in this modified version.
  int preserve_hard_links = 0;
  int preserve_perms = 0;
  int preserve_executability = 0;
-@@ -287,6 +288,7 @@ void usage(enum logcode F)
+@@ -297,6 +298,7 @@ void usage(enum logcode F)
    rprintf(F,"     --append                append data onto shorter files\n");
    rprintf(F," -d, --dirs                  transfer directories without recursing\n");
    rprintf(F," -l, --links                 copy symlinks as symlinks\n");
@@ -80,7 +86,7 @@ in this modified version.
    rprintf(F," -L, --copy-links            transform symlink into referent file/dir\n");
    rprintf(F,"     --copy-unsafe-links     only \"unsafe\" symlinks are transformed\n");
    rprintf(F,"     --safe-links            ignore symlinks that point outside the source tree\n");
-@@ -432,6 +434,7 @@ static struct poptOption long_options[] 
+@@ -447,6 +449,7 @@ static struct poptOption long_options[] 
    {"links",           'l', POPT_ARG_VAL,    &preserve_links, 1, 0, 0 },
    {"no-links",         0,  POPT_ARG_VAL,    &preserve_links, 0, 0, 0 },
    {"no-l",             0,  POPT_ARG_VAL,    &preserve_links, 0, 0, 0 },
@@ -90,7 +96,7 @@ in this modified version.
    {"safe-links",       0,  POPT_ARG_NONE,   &safe_symlinks, 0, 0, 0 },
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -313,6 +313,7 @@ to the detailed description below for a 
+@@ -314,6 +314,7 @@ to the detailed description below for a 
       --append                append data onto shorter files
   -d, --dirs                  transfer directories without recursing
   -l, --links                 copy symlinks as symlinks
index 2e6bcb0..c8d339c 100644 (file)
--- a/md5.diff
+++ b/md5.diff
@@ -1,6 +1,15 @@
+This patch adds the --md5 option, which makes rsync use md5 checksums
+instead of md4.
+
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/md5.diff
+    ./configure
+    make
+
 --- old/Makefile.in
 +++ new/Makefile.in
-@@ -26,7 +26,7 @@ VERSION=@VERSION@
+@@ -27,7 +27,7 @@ VERSION=@VERSION@
  .SUFFIXES: .c .o
  
  HEADERS=byteorder.h config.h errcode.h proto.h rsync.h lib/pool_alloc.h
        zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o
 --- old/checksum.c
 +++ new/checksum.c
-@@ -18,6 +18,7 @@
- */
+@@ -21,6 +21,7 @@
 */
  
  #include "rsync.h"
 +#include "lib/md5.h"
  
  int csum_length=2; /* initial value */
  
-@@ -25,6 +26,7 @@ int csum_length=2; /* initial value */
+@@ -28,6 +29,7 @@ int csum_length=2; /* initial value */
  
  extern int checksum_seed;
  extern int protocol_version;
@@ -27,7 +36,7 @@
  
  /*
    a simple 32 bit checksum that can be upadted from either end
-@@ -55,6 +57,7 @@ void get_checksum2(char *buf, int32 len,
+@@ -58,6 +60,7 @@ void get_checksum2(char *buf, int32 len,
        static char *buf1;
        static int32 len1;
        struct mdfour m;
@@ -35,7 +44,7 @@
  
        if (len > len1) {
                if (buf1)
-@@ -65,7 +68,10 @@ void get_checksum2(char *buf, int32 len,
+@@ -68,7 +71,10 @@ void get_checksum2(char *buf, int32 len,
                        out_of_memory("get_checksum2");
        }
  
@@ -47,7 +56,7 @@
  
        memcpy(buf1,buf,len);
        if (checksum_seed) {
-@@ -74,7 +80,10 @@ void get_checksum2(char *buf, int32 len,
+@@ -77,7 +83,10 @@ void get_checksum2(char *buf, int32 len,
        }
  
        for(i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) {
@@ -59,7 +68,7 @@
        }
        /*
         * Prior to version 27 an incorrect MD4 checksum was computed
-@@ -83,10 +92,16 @@ void get_checksum2(char *buf, int32 len,
+@@ -86,10 +95,16 @@ void get_checksum2(char *buf, int32 len,
         * even when there are no more bytes.
         */
        if (len - i > 0 || protocol_version >= 27) {
@@ -78,7 +87,7 @@
  }
  
  
-@@ -97,6 +112,7 @@ void file_checksum(char *fname,char *sum
+@@ -100,6 +115,7 @@ void file_checksum(char *fname,char *sum
        int fd;
        OFF_T len = size;
        struct mdfour m;
@@ -86,7 +95,7 @@
  
        memset(sum,0,MD4_SUM_LENGTH);
  
-@@ -106,21 +122,36 @@ void file_checksum(char *fname,char *sum
+@@ -109,21 +125,36 @@ void file_checksum(char *fname,char *sum
  
        buf = map_file(fd, size, MAX_MAP_SIZE, CSUM_CHUNK);
  
  
        close(fd);
        unmap_file(buf);
-@@ -130,11 +161,15 @@ void file_checksum(char *fname,char *sum
+@@ -133,11 +164,15 @@ void file_checksum(char *fname,char *sum
  static int32 sumresidue;
  static char sumrbuf[CSUM_CHUNK];
  static struct mdfour md;
        sumresidue = 0;
        SIVAL(s, 0, seed);
        sum_update(s, 4);
-@@ -159,13 +194,19 @@ void sum_update(char *p, int32 len)
+@@ -162,13 +197,19 @@ void sum_update(char *p, int32 len)
        if (sumresidue) {
                int32 i = CSUM_CHUNK - sumresidue;
                memcpy(sumrbuf + sumresidue, p, i);
                len -= CSUM_CHUNK;
                p += CSUM_CHUNK;
        }
-@@ -177,8 +218,15 @@ void sum_update(char *p, int32 len)
+@@ -180,8 +221,15 @@ void sum_update(char *p, int32 len)
  
  void sum_end(char *sum)
  {
  
  /** Network address family. **/
  #ifdef INET6
-@@ -369,6 +370,7 @@ void usage(enum logcode F)
+@@ -381,6 +382,7 @@ void usage(enum logcode F)
    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");
    rprintf(F,"     --protocol=NUM          force an older protocol version to be used\n");
  #ifdef INET6
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
-@@ -475,6 +477,7 @@ static struct poptOption long_options[] 
+@@ -494,6 +496,7 @@ static struct poptOption long_options[] 
    {"whole-file",      'W', POPT_ARG_VAL,    &whole_file, 1, 0, 0 },
    {"no-whole-file",    0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },
    {"no-W",             0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },
    {"checksum",        'c', POPT_ARG_NONE,   &always_checksum, 0, 0, 0 },
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
-@@ -1610,6 +1613,9 @@ void server_options(char **args,int *arg
+@@ -1642,6 +1645,9 @@ void server_options(char **args,int *arg
                args[ac++] = arg;
        }
  
index e31ad3c..5062a82 100644 (file)
@@ -3,6 +3,12 @@ and hosts deny.
 
 This patch still needs autoconf support for portability.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/netgroup-auth.diff
+    ./configure                           (optional if already run)
+    make
+
 --- old/access.c
 +++ new/access.c
 @@ -20,11 +20,14 @@
index 83fe03b..e012c3c 100644 (file)
@@ -1,6 +1,12 @@
 This patch from Antti Tapaninen added the --omit-dir-changes option, which
 tells rsync to not affect any attributes on the directories in the transfer.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/omit-dir-changes.diff
+    ./configure                              (optional if already run)
+    make
+
 --- old/generator.c
 +++ new/generator.c
 @@ -44,6 +44,7 @@ extern int preserve_uid;
@@ -11,7 +17,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
  extern int delete_mode;
  extern int delete_before;
  extern int delete_during;
-@@ -347,10 +348,11 @@ void itemize(struct file_struct *file, i
+@@ -348,10 +349,11 @@ void itemize(struct file_struct *file, i
                        iflags |= ITEM_REPORT_TIME;
                if ((file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
                        iflags |= ITEM_REPORT_PERMS;
@@ -26,7 +32,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
                        iflags |= ITEM_REPORT_GROUP;
        } else
                iflags |= ITEM_IS_NEW;
-@@ -895,7 +897,7 @@ static void recv_generator(char *fname, 
+@@ -892,7 +894,7 @@ static void recv_generator(char *fname, 
  
        /* If we're not preserving permissions, change the file-list's
         * mode based on the local permissions and some heuristics. */
@@ -45,7 +51,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -311,6 +312,7 @@ void usage(enum logcode F)
+@@ -313,6 +314,7 @@ void usage(enum logcode F)
    rprintf(F," -D                          same as --devices --specials\n");
    rprintf(F," -t, --times                 preserve times\n");
    rprintf(F," -O, --omit-dir-times        omit directories when preserving times\n");
@@ -53,7 +59,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-@@ -425,6 +427,7 @@ static struct poptOption long_options[] 
+@@ -429,6 +431,7 @@ static struct poptOption long_options[] 
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 2, 0, 0 },
@@ -61,7 +67,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
    {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
    {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },
    {"no-super",         0,  POPT_ARG_VAL,    &am_root, 0, 0, 0 },
-@@ -1285,6 +1288,9 @@ int parse_arguments(int *argc, const cha
+@@ -1287,6 +1290,9 @@ int parse_arguments(int *argc, const cha
                        "P *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
@@ -71,7 +77,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
        if (make_backups && !backup_dir)
                omit_dir_times = 1;
  
-@@ -1513,6 +1519,8 @@ void server_options(char **args,int *arg
+@@ -1515,6 +1521,8 @@ void server_options(char **args,int *arg
                        argstr[x++] = 'm';
                if (omit_dir_times == 2)
                        argstr[x++] = 'O';
@@ -90,7 +96,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
  extern int basis_dir_cnt;
  extern int make_backups;
  extern int cleanup_got_literal;
-@@ -541,7 +542,7 @@ int recv_files(int f_in, struct file_lis
+@@ -551,7 +552,7 @@ int recv_files(int f_in, struct file_lis
  
                /* If we're not preserving permissions, change the file-list's
                 * mode based on the local permissions and some heuristics. */
@@ -109,7 +115,7 @@ tells rsync to not affect any attributes on the directories in the transfer.
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -159,9 +160,11 @@ int set_file_attrs(char *fname, struct f
+@@ -162,9 +163,11 @@ int set_file_attrs(char *fname, struct f
                        updated = 1;
        }
  
index db58b1c..c6c7e40 100644 (file)
@@ -1,10 +1,4 @@
-After applying this patch, run these commands for a successful build:
-
-    ./prepare-source
-    ./configure
-    make
-
-Casey Marshall writes:
+Casey Marshall wrote:
 
 I've been hacking together a way to use rsync with OpenSSL, and have
 attached my current patch against a recent CVS tree. The details of
@@ -34,6 +28,12 @@ this implementation are:
 All warnings apply; I don't do C programming all that often, so I
 can't say if I've left any cleanup/compatibility errors in the code.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/openssl-support.diff
+    ./prepare-source
+    ./configure
+    make
 
 --- old/Makefile.in
 +++ new/Makefile.in
@@ -75,7 +75,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  
 --- old/clientserver.c
 +++ new/clientserver.c
-@@ -29,6 +29,9 @@ extern int am_sender;
+@@ -30,6 +30,9 @@ extern int am_sender;
  extern int am_server;
  extern int am_daemon;
  extern int am_root;
@@ -85,13 +85,14 @@ can't say if I've left any cleanup/compatibility errors in the code.
  extern int rsync_port;
  extern int kluge_around_eof;
  extern int daemon_over_rsh;
-@@ -105,8 +108,18 @@ int start_socket_client(char *host, char
+@@ -106,8 +109,18 @@ int start_socket_client(char *host, char
        set_socket_options(fd, sockopts);
  
        ret = start_inband_exchange(user, path, fd, fd, argc);
 +      if (ret)
 +              return ret;
-+
+-      return ret ? ret : client_run(fd, fd, -1, argc, argv);
 +#ifdef HAVE_OPENSSL
 +      if (use_ssl) {
 +              int f_in = get_tls_rfd();
@@ -99,13 +100,12 @@ can't say if I've left any cleanup/compatibility errors in the code.
 +              return client_run(f_in, f_out, -1, argc, argv);
 +      }
 +#endif
--      return ret ? ret : client_run(fd, fd, -1, argc, argv);
++
 +      return client_run(fd, fd, -1, argc, argv);
  }
  
  int start_inband_exchange(char *user, char *path, int f_in, int f_out,
-@@ -167,6 +180,33 @@ int start_inband_exchange(char *user, ch
+@@ -168,6 +181,33 @@ int start_inband_exchange(char *user, ch
        if (verbose > 1)
                print_child_argv(sargs);
  
@@ -139,7 +139,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        p = strchr(path,'/');
        if (p) *p = 0;
        io_printf(f_out, "%s\n", path);
-@@ -195,6 +235,10 @@ int start_inband_exchange(char *user, ch
+@@ -196,6 +236,10 @@ int start_inband_exchange(char *user, ch
                         * server to terminate the listing of modules.
                         * We don't want to go on and transfer
                         * anything; just exit. */
@@ -150,7 +150,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        exit(0);
                }
  
-@@ -202,6 +246,10 @@ int start_inband_exchange(char *user, ch
+@@ -203,6 +247,10 @@ int start_inband_exchange(char *user, ch
                        rprintf(FERROR, "%s\n", line);
                        /* This is always fatal; the server will now
                         * close the socket. */
@@ -161,15 +161,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        return -1;
                }
  
-@@ -718,6 +766,7 @@ static void send_listing(int fd)
-               io_printf(fd,"@RSYNCD: EXIT\n");
- }
-+
- /* this is called when a connection is established to a client
-    and we want to start talking. The setup of the system is done from
-    here */
-@@ -776,6 +825,9 @@ int start_daemon(int f_in, int f_out)
+@@ -780,6 +828,9 @@ int start_daemon(int f_in, int f_out)
        if (protocol_version > remote_protocol)
                protocol_version = remote_protocol;
  
@@ -179,7 +171,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        line[0] = 0;
        if (!read_line(f_in, line, sizeof line - 1))
                return -1;
-@@ -787,6 +839,20 @@ int start_daemon(int f_in, int f_out)
+@@ -791,6 +842,20 @@ int start_daemon(int f_in, int f_out)
                return -1;
        }
  
@@ -226,7 +218,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        *cygwin* ) AC_MSG_RESULT(yes)
 --- old/options.c
 +++ new/options.c
-@@ -172,6 +172,14 @@ int logfile_format_has_o_or_i = 0;
+@@ -173,6 +173,14 @@ int logfile_format_has_o_or_i = 0;
  int always_checksum = 0;
  int list_only = 0;
  
@@ -241,7 +233,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  #define MAX_BATCH_NAME_LEN 256        /* Must be less than MAXPATHLEN-13 */
  char *batch_name = NULL;
  
-@@ -200,6 +208,7 @@ static void print_rsync_version(enum log
+@@ -201,6 +209,7 @@ static void print_rsync_version(enum log
        char const *hardlinks = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
@@ -249,7 +241,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -222,6 +231,10 @@ static void print_rsync_version(enum log
+@@ -223,6 +232,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -260,7 +252,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -234,9 +247,9 @@ static void print_rsync_version(enum log
+@@ -235,9 +248,9 @@ static void print_rsync_version(enum log
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
         * macros. */
@@ -272,7 +264,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                (int) (sizeof dumstat->st_ino * 8),
                (int) (sizeof (int64) * 8));
  #ifdef MAINTAINER_MODE
-@@ -383,6 +396,13 @@ void usage(enum logcode F)
+@@ -385,6 +398,13 @@ void usage(enum logcode F)
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
  #endif
@@ -286,7 +278,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    rprintf(F,"     --version               print version number\n");
    rprintf(F,"(-h) --help                  show this help (-h works with no other options)\n");
  
-@@ -396,7 +416,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -398,7 +418,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,
@@ -295,7 +287,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -541,6 +561,13 @@ static struct poptOption long_options[] 
+@@ -545,6 +565,13 @@ static struct poptOption long_options[] 
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },
    {"sender",           0,  POPT_ARG_NONE,   0, OPT_SENDER, 0, 0 },
@@ -309,7 +301,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    /* All the following options switch us into daemon-mode option-parsing. */
    {"config",           0,  POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
    {"daemon",           0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },
-@@ -568,6 +595,13 @@ static void daemon_usage(enum logcode F)
+@@ -572,6 +599,13 @@ static void daemon_usage(enum logcode F)
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
  #endif
@@ -323,7 +315,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    rprintf(F,"     --help                  show this help screen\n");
  
    rprintf(F,"\n");
-@@ -594,6 +628,13 @@ static struct poptOption long_daemon_opt
+@@ -598,6 +632,13 @@ static struct poptOption long_daemon_opt
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   &am_server, 0, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
@@ -337,7 +329,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    {"verbose",         'v', POPT_ARG_NONE,   0, 'v', 0, 0 },
    {"no-verbose",       0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },
    {"no-v",             0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },
-@@ -851,6 +892,12 @@ int parse_arguments(int *argc, const cha
+@@ -855,6 +896,12 @@ int parse_arguments(int *argc, const cha
                                        verbose++;
                                        break;
  
@@ -350,7 +342,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                                default:
                                        rprintf(FERROR,
                                            "rsync: %s: %s (in daemon mode)\n",
-@@ -874,6 +921,17 @@ int parse_arguments(int *argc, const cha
+@@ -878,6 +925,17 @@ int parse_arguments(int *argc, const cha
                                exit_cleanup(RERR_SYNTAX);
                        }
  
@@ -368,7 +360,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        *argv = poptGetArgs(pc);
                        *argc = count_args(*argv);
                        am_starting_up = 0;
-@@ -1085,6 +1143,12 @@ int parse_arguments(int *argc, const cha
+@@ -1089,6 +1147,12 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -381,7 +373,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1361,6 +1425,17 @@ int parse_arguments(int *argc, const cha
+@@ -1365,6 +1429,17 @@ int parse_arguments(int *argc, const cha
        if (delay_updates && !partial_dir)
                partial_dir = tmp_partialdir;
  
@@ -399,7 +391,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -1778,10 +1853,27 @@ char *check_for_hostspec(char *s, char *
+@@ -1782,10 +1857,27 @@ char *check_for_hostspec(char *s, char *
        char *p;
        int not_host;
        int hostlen;
index b14dcf9..e3109fa 100644 (file)
@@ -8,9 +8,15 @@ should really be a way to affect more of rsync's processing, perhaps by
 specifying a maximum disk I/O rate (and have that affect a maximum stat()
 rate or something like that).
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/slow-down.diff
+    ./configure                           (optional if already run)
+    make
+
 --- old/flist.c
 +++ new/flist.c
-@@ -57,6 +57,7 @@ extern int copy_links;
+@@ -53,6 +53,7 @@ extern int copy_links;
  extern int copy_unsafe_links;
  extern int protocol_version;
  extern int sanitize_paths;
@@ -18,7 +24,7 @@ rate or something like that).
  extern struct stats stats;
  extern struct file_list *the_file_list;
  
-@@ -1043,6 +1044,9 @@ static void send_directory(int f, struct
+@@ -1036,6 +1037,9 @@ static void send_directory(int f, struct
                }
  
                send_file_name(f, flist, fbuf, NULL, 0);
@@ -30,7 +36,7 @@ rate or something like that).
        fbuf[len] = '\0';
 --- old/options.c
 +++ new/options.c
-@@ -100,6 +100,7 @@ int size_only = 0;
+@@ -102,6 +102,7 @@ int size_only = 0;
  int daemon_bwlimit = 0;
  int bwlimit = 0;
  int fuzzy_basis = 0;
@@ -38,7 +44,7 @@ rate or something like that).
  size_t bwlimit_writemax = 0;
  int ignore_existing = 0;
  int ignore_non_existing = 0;
-@@ -363,6 +364,7 @@ void usage(enum logcode F)
+@@ -377,6 +378,7 @@ 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");
@@ -46,8 +52,8 @@ rate or something like that).
    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");
-@@ -495,6 +497,7 @@ static struct poptOption long_options[] 
-   {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
+@@ -516,6 +518,7 @@ static struct poptOption long_options[] 
+   {"log-format",       0,  POPT_ARG_STRING, &stdout_format, 0, 0, 0 }, /* DEPRECATED */
    {"itemize-changes", 'i', POPT_ARG_NONE,   0, 'i', 0, 0 },
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
 +  {"slow-down",        0,  POPT_ARG_LONG,   &sleep_asec, 0, 0, 0 },
index e5e5914..4283bcc 100644 (file)
--- a/slp.diff
+++ b/slp.diff
@@ -1,7 +1,8 @@
 This adds Service Location Protocol support.
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/slp.diff
     ./prepare-source
     ./configure --enable-slp
     make
@@ -11,7 +12,7 @@ and we can't honor that request.
 
 --- old/Makefile.in
 +++ new/Makefile.in
-@@ -12,6 +12,8 @@ CFLAGS=@CFLAGS@
+@@ -13,6 +13,8 @@ CFLAGS=@CFLAGS@
  CPPFLAGS=@CPPFLAGS@
  EXEEXT=@EXEEXT@
  LDFLAGS=@LDFLAGS@
@@ -20,7 +21,7 @@ and we can't honor that request.
  
  INSTALLCMD=@INSTALL@
  INSTALLMAN=@INSTALL@
-@@ -35,7 +37,7 @@ OBJS1=rsync.o generator.o receiver.o cle
+@@ -36,7 +38,7 @@ OBJS1=rsync.o generator.o receiver.o cle
  OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
        fileio.o batch.o clientname.o chmod.o
  OBJS3=progress.o pipe.o
@@ -29,7 +30,7 @@ and we can't honor that request.
  popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
        popt/popthelp.o popt/poptparse.o
  OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
-@@ -69,7 +71,7 @@ install-strip:
+@@ -70,7 +72,7 @@ install-strip:
        $(MAKE) INSTALL_STRIP='-s' install
  
  rsync$(EXEEXT): $(OBJS)
@@ -40,7 +41,7 @@ and we can't honor that request.
  
 --- old/clientserver.c
 +++ new/clientserver.c
-@@ -844,6 +844,13 @@ int daemon_main(void)
+@@ -849,6 +849,13 @@ int daemon_main(void)
         * address too.  In fact, why not just do inet_ntop on the
         * local address??? */
  
@@ -56,7 +57,7 @@ and we can't honor that request.
                int fd;
 --- old/configure.in
 +++ new/configure.in
-@@ -559,6 +559,29 @@ if test $rsync_cv_can_hardlink_special =
+@@ -592,6 +592,29 @@ if test $rsync_cv_can_hardlink_special =
      AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
  fi
  
@@ -120,7 +121,7 @@ and we can't honor that request.
  FN_LOCAL_STRING(lp_comment, comment)
 --- old/main.c
 +++ new/main.c
-@@ -1032,6 +1032,18 @@ static int start_client(int argc, char *
+@@ -1058,6 +1058,18 @@ static int start_client(int argc, char *
  
        if (!read_batch) { /* for read_batch, NO source is specified */
                shell_path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
@@ -141,7 +142,7 @@ and we can't honor that request.
                        int dummy2;
 --- old/options.c
 +++ new/options.c
-@@ -200,6 +200,7 @@ static void print_rsync_version(enum log
+@@ -201,6 +201,7 @@ static void print_rsync_version(enum log
        char const *hardlinks = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
@@ -149,7 +150,7 @@ and we can't honor that request.
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -222,6 +223,10 @@ static void print_rsync_version(enum log
+@@ -223,6 +224,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -160,7 +161,7 @@ and we can't honor that request.
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -234,9 +239,9 @@ static void print_rsync_version(enum log
+@@ -235,9 +240,9 @@ static void print_rsync_version(enum log
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
         * macros. */
@@ -224,7 +225,7 @@ and we can't honor that request.
  enddit()
  
  
-@@ -550,6 +559,7 @@ use chroot = no
+@@ -556,6 +565,7 @@ use chroot = no
  max connections = 4
  syslog facility = local5
  pid file = /var/run/rsyncd.pid
@@ -234,7 +235,7 @@ and we can't honor that request.
          path = /var/ftp/pub
 --- old/socket.c
 +++ new/socket.c
-@@ -465,6 +465,16 @@ void start_accept_loop(int port, int (*f
+@@ -466,6 +466,16 @@ void start_accept_loop(int port, int (*f
  {
        fd_set deffds;
        int *sp, maxfd, i;
@@ -251,7 +252,7 @@ and we can't honor that request.
  
  #ifdef HAVE_SIGACTION
        sigact.sa_flags = SA_NOCLDSTOP;
-@@ -493,14 +503,25 @@ void start_accept_loop(int port, int (*f
+@@ -494,14 +504,25 @@ void start_accept_loop(int port, int (*f
                        maxfd = sp[i];
        }
  
@@ -277,7 +278,7 @@ and we can't honor that request.
  
                /* close log file before the potentially very long select so
                 * file can be trimmed by another process instead of growing
-@@ -512,8 +533,18 @@ void start_accept_loop(int port, int (*f
+@@ -513,8 +534,18 @@ void start_accept_loop(int port, int (*f
  #else
                fds = deffds;
  #endif
index aff79a5..d8f9d1d 100644 (file)
@@ -1,17 +1,18 @@
-Date: Fri, 12 Apr 2002 13:44:22 +0200
-From: Marco d'Itri <md@Linux.IT>
-To: mbp@samba.org
-Subject: rsync and debian mirrors
+Marco d'Itri wrote:
 
 I run one of the debian mirrors, and I had to write this patch because
 my archive is split between more than one disk. Would you accept a more
 polished version of this patch for inclusion in rsync?
 
-[Updated to latest CVS source by Wayne Davison.]
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/soften-links.diff
+    ./configure                           (optional if already run)
+    make
 
 --- old/syscall.c
 +++ new/syscall.c
-@@ -62,9 +62,14 @@ int do_symlink(const char *fname1, const
+@@ -59,9 +59,14 @@ int do_symlink(const char *fname1, const
  #ifdef HAVE_LINK
  int do_link(const char *fname1, const char *fname2)
  {
index ead601a..833d749 100644 (file)
@@ -23,10 +23,11 @@ Implementation details for the --source-filter and -dest-filter options:
  - If the COMMAND contains single quotes, option-passing breaks.  (Needs
    to be fixed.)
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/source-filter_dest-filter.diff
     ./prepare-source
-    ./configure                      (optional if already run)
+    ./configure                                (optional if already run)
     make
 
 --- old/generator.c
@@ -78,7 +79,7 @@ After applying this patch, run these commands for a successful build:
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
  char backup_dir_buf[MAXPATHLEN];
-@@ -341,6 +344,7 @@ void usage(enum logcode F)
+@@ -343,6 +346,7 @@ void usage(enum logcode F)
    rprintf(F,"     --timeout=TIME          set I/O timeout in seconds\n");
    rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");
    rprintf(F,"     --size-only             skip files that match in size\n");
@@ -86,7 +87,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --modify-window=NUM     compare mod-times with reduced accuracy\n");
    rprintf(F," -T, --temp-dir=DIR          create temporary files in directory DIR\n");
    rprintf(F," -y, --fuzzy                 find similar file for basis if no dest file\n");
-@@ -378,6 +382,8 @@ void usage(enum logcode F)
+@@ -380,6 +384,8 @@ void usage(enum logcode F)
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    rprintf(F,"     --only-write-batch=FILE like --write-batch but w/o updating destination\n");
    rprintf(F,"     --read-batch=FILE       read a batched update from FILE\n");
@@ -95,7 +96,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --protocol=NUM          force an older protocol version to be used\n");
  #ifdef INET6
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
-@@ -459,6 +465,7 @@ static struct poptOption long_options[] 
+@@ -463,6 +469,7 @@ static struct poptOption long_options[] 
    {"chmod",            0,  POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
    {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
@@ -103,7 +104,7 @@ After applying this patch, run these commands for a successful build:
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
    {"existing",         0,  POPT_ARG_NONE,   &ignore_non_existing, 0, 0, 0 },
-@@ -537,6 +544,8 @@ static struct poptOption long_options[] 
+@@ -541,6 +548,8 @@ static struct poptOption long_options[] 
    {"password-file",    0,  POPT_ARG_STRING, &password_file, 0, 0, 0 },
    {"blocking-io",      0,  POPT_ARG_VAL,    &blocking_io, 1, 0, 0 },
    {"no-blocking-io",   0,  POPT_ARG_VAL,    &blocking_io, 0, 0, 0 },
@@ -112,7 +113,7 @@ After applying this patch, run these commands for a successful build:
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },
-@@ -1403,6 +1412,16 @@ int parse_arguments(int *argc, const cha
+@@ -1410,6 +1419,16 @@ int parse_arguments(int *argc, const cha
                }
        }
  
@@ -129,7 +130,7 @@ After applying this patch, run these commands for a successful build:
        if (files_from) {
                char *h, *p;
                int q;
-@@ -1669,6 +1688,25 @@ void server_options(char **args,int *arg
+@@ -1676,6 +1695,25 @@ void server_options(char **args,int *arg
                        args[ac++] = "--size-only";
        }
  
@@ -245,7 +246,7 @@ After applying this patch, run these commands for a successful build:
  extern char *stdout_format;
  extern char *tmpdir;
  extern char *partial_dir;
-@@ -350,6 +351,8 @@ int recv_files(int f_in, struct file_lis
+@@ -351,6 +352,8 @@ int recv_files(int f_in, struct file_lis
        enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int max_phase = protocol_version >= 29 ? 2 : 1;
        int i, recv_ok;
@@ -254,7 +255,7 @@ After applying this patch, run these commands for a successful build:
  
        if (verbose > 2)
                rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
-@@ -364,6 +367,23 @@ int recv_files(int f_in, struct file_lis
+@@ -365,6 +368,23 @@ int recv_files(int f_in, struct file_lis
  
        updating_basis = inplace;
  
@@ -278,7 +279,7 @@ After applying this patch, run these commands for a successful build:
        while (1) {
                cleanup_disable();
  
-@@ -606,6 +626,9 @@ int recv_files(int f_in, struct file_lis
+@@ -610,6 +630,9 @@ int recv_files(int f_in, struct file_lis
                else if (!am_server && verbose && do_progress)
                        rprintf(FINFO, "%s\n", fname);
  
@@ -288,7 +289,7 @@ After applying this patch, run these commands for a successful build:
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
                                       fname, fd2, file->length);
-@@ -620,6 +643,16 @@ int recv_files(int f_in, struct file_lis
+@@ -624,6 +647,16 @@ int recv_files(int f_in, struct file_lis
                        exit_cleanup(RERR_FILEIO);
                }
  
@@ -317,7 +318,7 @@ After applying this patch, run these commands for a successful build:
  
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -359,6 +359,7 @@ to the detailed description below for a 
+@@ -360,6 +360,7 @@ to the detailed description below for a 
       --timeout=TIME          set I/O timeout in seconds
   -I, --ignore-times          don't skip files that match size and time
       --size-only             skip files that match in size
@@ -325,7 +326,7 @@ After applying this patch, run these commands for a successful build:
       --modify-window=NUM     compare mod-times with reduced accuracy
   -T, --temp-dir=DIR          create temporary files in directory DIR
   -y, --fuzzy                 find similar file for basis if no dest file
-@@ -396,6 +397,8 @@ to the detailed description below for a 
+@@ -397,6 +398,8 @@ to the detailed description below for a 
       --write-batch=FILE      write a batched update to FILE
       --only-write-batch=FILE like --write-batch but w/o updating dest
       --read-batch=FILE       read a batched update from FILE
@@ -334,7 +335,7 @@ After applying this patch, run these commands for a successful build:
       --protocol=NUM          force an older protocol version to be used
       --checksum-seed=NUM     set block/file checksum seed (advanced)
   -4, --ipv4                  prefer IPv4
-@@ -1753,6 +1756,33 @@ file previously generated by bf(--write-
+@@ -1759,6 +1762,33 @@ file previously generated by bf(--write-
  If em(FILE) is bf(-), the batch data will be read from standard input.
  See the "BATCH MODE" section for details.
  
index d908d9a..7480b0b 100644 (file)
@@ -18,6 +18,12 @@ NOTE: we still need to duplicate the partial_fname static in util.c!
 If you try this out, please send some email to wayned@samba.org or the rsync
 mailing list with your results, build changes, bug reports, etc.  Thanks!
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/threaded-receiver.diff
+    ./configure
+    make
+
 --- old/Makefile.in
 +++ new/Makefile.in
 @@ -7,7 +7,7 @@ exec_prefix=@exec_prefix@
@@ -131,7 +137,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
                                continue;
                }
  
-@@ -1205,7 +1209,7 @@ static void recv_generator(char *fname, 
+@@ -1208,7 +1212,7 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -140,7 +146,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
                return;
  
        if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1268,7 +1272,7 @@ static void recv_generator(char *fname, 
+@@ -1271,7 +1275,7 @@ static void recv_generator(char *fname, 
                goto notify_others;
        }
  
@@ -149,7 +155,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
                if (!(backupptr = get_backup_name(fname))) {
                        close(fd);
                        return;
-@@ -1359,9 +1363,12 @@ void generate_files(int f_out, struct fi
+@@ -1362,9 +1366,12 @@ void generate_files(int f_out, struct fi
        int save_ignore_existing = ignore_existing;
        int save_ignore_non_existing = ignore_non_existing;
        int save_do_progress = do_progress;
@@ -163,7 +169,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
        if (protocol_version >= 29) {
                itemizing = 1;
                maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT;
-@@ -1389,7 +1396,7 @@ void generate_files(int f_out, struct fi
+@@ -1392,7 +1399,7 @@ void generate_files(int f_out, struct fi
                do_delete_pass(flist);
        do_progress = 0;
  
@@ -172,7 +178,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1398,12 +1405,6 @@ void generate_files(int f_out, struct fi
+@@ -1401,12 +1408,6 @@ void generate_files(int f_out, struct fi
                        : "enabled");
        }
  
@@ -185,7 +191,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
        for (i = 0; i < flist->count; i++) {
                struct file_struct *file = flist->files[i];
  
-@@ -1447,23 +1448,34 @@ void generate_files(int f_out, struct fi
+@@ -1450,23 +1451,34 @@ void generate_files(int f_out, struct fi
                delete_in_dir(NULL, NULL, NULL, NULL);
  
        phase++;
@@ -226,7 +232,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
                if (local_name)
                        strlcpy(fbuf, local_name, sizeof fbuf);
                else
-@@ -1475,27 +1487,43 @@ void generate_files(int f_out, struct fi
+@@ -1478,27 +1490,43 @@ void generate_files(int f_out, struct fi
        phase++;
        ignore_non_existing = save_ignore_non_existing;
        ignore_existing = save_ignore_existing;
@@ -854,6 +860,13 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
  
 -      if (fd_pair(error_pipe) < 0) {
 -              rsyserr(FERROR, errno, "pipe failed in do_recv");
+-              exit_cleanup(RERR_IPC);
+-      }
+-
+-      io_flush(NORMAL_FLUSH);
+-
+-      if ((pid = do_fork()) == -1) {
+-              rsyserr(FERROR, errno, "fork failed in do_recv");
 +      args.f_in = f_in;
 +      args.flist = flist;
 +      args.local_name = local_name;
@@ -862,13 +875,6 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
                exit_cleanup(RERR_IPC);
        }
  
--      io_flush(NORMAL_FLUSH);
--
--      if ((pid = do_fork()) == -1) {
--              rsyserr(FERROR, errno, "fork failed in do_recv");
--              exit_cleanup(RERR_IPC);
--      }
--
 -      if (pid == 0) {
 -              close(error_pipe[0]);
 -              if (f_in != f_out)
@@ -1030,7 +1036,7 @@ mailing list with your results, build changes, bug reports, etc.  Thanks!
  int keep_partial = 0;
  int safe_symlinks = 0;
  int copy_unsafe_links = 0;
-@@ -1302,6 +1302,7 @@ int parse_arguments(int *argc, const cha
+@@ -1306,6 +1306,7 @@ int parse_arguments(int *argc, const cha
  
        if (do_progress && !verbose && !log_before_transfer && !am_server)
                verbose = 1;
index 7478534..4658e87 100644 (file)
@@ -3,9 +3,15 @@ to be simpler and more efficient by Wayne Davison.
 
 Do we need configure support for mktime()?
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/time-limit.diff
+    ./configure                              (optional if already run)
+    make
+
 --- old/io.c
 +++ new/io.c
-@@ -57,6 +57,7 @@ extern int remove_sent_files;
+@@ -50,6 +50,7 @@ extern int remove_source_files;
  extern int preserve_hard_links;
  extern char *filesfrom_host;
  extern struct stats stats;
@@ -13,7 +19,7 @@ Do we need configure support for mktime()?
  extern struct file_list *the_file_list;
  
  const char phase_unknown[] = "unknown";
-@@ -168,16 +169,24 @@ static void check_timeout(void)
+@@ -147,16 +148,24 @@ static void check_timeout(void)
  {
        time_t t;
  
@@ -51,7 +57,7 @@ Do we need configure support for mktime()?
  
  
  /** Network address family. **/
-@@ -365,6 +366,8 @@ void usage(enum logcode F)
+@@ -377,6 +378,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");
@@ -60,7 +66,7 @@ Do we need configure support for mktime()?
    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");
-@@ -385,7 +388,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -398,7 +401,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,
@@ -69,8 +75,8 @@ Do we need configure support for mktime()?
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -494,6 +497,8 @@ static struct poptOption long_options[] 
-   {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
+@@ -516,6 +519,8 @@ static struct poptOption long_options[] 
+   {"log-format",       0,  POPT_ARG_STRING, &stdout_format, 0, 0, 0 }, /* DEPRECATED */
    {"itemize-changes", 'i', POPT_ARG_NONE,   0, 'i', 0, 0 },
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
 +  {"stop-at",          0,  POPT_ARG_STRING, 0, OPT_STOP_AT, 0, 0 },
@@ -78,7 +84,7 @@ Do we need configure support for mktime()?
    {"backup",          'b', POPT_ARG_NONE,   &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -1060,6 +1065,36 @@ int parse_arguments(int *argc, const cha
+@@ -1089,6 +1094,36 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -115,7 +121,7 @@ Do we need configure support for mktime()?
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1610,6 +1645,15 @@ void server_options(char **args,int *arg
+@@ -1642,6 +1677,15 @@ void server_options(char **args,int *arg
                args[ac++] = arg;
        }
  
@@ -133,7 +139,7 @@ Do we need configure support for mktime()?
                args[ac++] = backup_dir;
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -388,6 +388,8 @@ to the detailed description below for a 
+@@ -394,6 +394,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
@@ -142,7 +148,7 @@ Do we need configure support for mktime()?
       --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
-@@ -1584,6 +1586,19 @@ transfer was too fast, it will wait befo
+@@ -1733,6 +1735,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.
  
@@ -164,7 +170,7 @@ Do we need configure support for mktime()?
  section for details, and also the bf(--only-write-batch) option.
 --- old/util.c
 +++ new/util.c
-@@ -125,6 +125,133 @@ void overflow_exit(char *str)
+@@ -121,6 +121,133 @@ NORETURN void overflow_exit(char *str)
        exit_cleanup(RERR_MALLOC);
  }
  
index 4457acb..818a8b7 100644 (file)
@@ -1,5 +1,11 @@
 This is an adapted version of the original by Zoong Pham.
 
+To use this patch, run these commands for a successful build:
+
+    patch -p1 <patches/tru64.diff
+    ./configure                          (optional if already run)
+    make
+
 --- old/lib/getaddrinfo.c
 +++ new/lib/getaddrinfo.c
 @@ -41,6 +41,20 @@
@@ -25,7 +31,7 @@ This is an adapted version of the original by Zoong Pham.
  #endif
 --- old/syscall.c
 +++ new/syscall.c
-@@ -27,6 +27,7 @@
+@@ -24,6 +24,7 @@
  #include "rsync.h"
  
  #if !defined MKNOD_CREATES_SOCKETS && defined HAVE_SYS_UN_H
index 25edadf..37b9753 100644 (file)
@@ -1,13 +1,18 @@
-Depends-On-Patch: acls.diff
+This patch adds basic support for extended attributes.  It works, but there
+are some things that still needs to be improved (see TODO list below).
 
-This patch adds preliminary support for extended attributes.
-
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/acls.diff
+    patch -p1 <patches/xattrs.diff
     ./prepare-source
     ./configure --enable-acl-support --enable-xattr-support
     make
 
+Alternately, if you don't want ACL support, configure it this way:
+
+    ./configure --enable-xattr-support
+
 TODO:
 
  - This patch needs to more efficiently handle large xattrs, especially when
@@ -41,7 +46,7 @@ TODO:
  popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
 --- old/acls.c
 +++ new/acls.c
-@@ -31,6 +31,7 @@ extern int read_only;
+@@ -30,6 +30,7 @@ extern int read_only;
  extern int list_only;
  extern int orig_umask;
  extern int preserve_acls;
@@ -49,7 +54,7 @@ TODO:
  extern unsigned int file_struct_len;
  
  /* === ACL structures === */
-@@ -742,6 +743,10 @@ void receive_acl(struct file_struct *fil
+@@ -741,6 +742,10 @@ void receive_acl(struct file_struct *fil
        type = SMB_ACL_TYPE_ACCESS;
        racl_list = &access_acl_list;
        ndx_ptr = (char*)file + file_struct_len;
@@ -60,7 +65,7 @@ TODO:
        do {
                char tag = read_byte(f);
                int ndx;
-@@ -801,6 +806,10 @@ void cache_acl(struct file_struct *file,
+@@ -800,6 +805,10 @@ void cache_acl(struct file_struct *file,
        racl = sxp->acc_acl;
        racl_list = &access_acl_list;
        ndx_ptr = (char*)file + file_struct_len;
@@ -71,7 +76,7 @@ TODO:
        do {
                if (!racl)
                        ndx = -1;
-@@ -921,6 +930,10 @@ int set_acl(const char *fname, const str
+@@ -920,6 +929,10 @@ int set_acl(const char *fname, const str
  
        type = SMB_ACL_TYPE_ACCESS;
        ndx_ptr = (char*)file + file_struct_len;
@@ -501,7 +506,7 @@ TODO:
  extern int preserve_perms;
  extern int preserve_executability;
  extern int preserve_times;
-@@ -219,6 +220,10 @@ int set_file_attrs(char *fname, struct f
+@@ -218,6 +219,10 @@ int set_file_attrs(char *fname, struct f
        if (daemon_chmod_modes && !S_ISLNK(new_mode))
                new_mode = tweak_mode(new_mode, daemon_chmod_modes);