Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Sat, 7 Apr 2007 17:37:35 +0000 (17:37 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 7 Apr 2007 17:37:35 +0000 (17:37 +0000)
acls.diff
atimes.diff
flags.diff
fsync.diff
link-by-hash.diff
openssl-support.diff
preallocate.diff
slp.diff

index 1c10a7274482a7786bde9bea179d8c207b1706f3..1cbe85e44340f2c31372789b0ce852aa91141888 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -11,7 +11,7 @@ To use this patch, run these commands for a successful build:
 
 --- old/acls.c
 +++ new/acls.c
-@@ -90,6 +90,18 @@ static const char *str_acl_type(SMB_ACL_
+@@ -89,6 +89,18 @@ static const char *str_acl_type(SMB_ACL_
             : "unknown SMB_ACL_TYPE_T";
  }
  
@@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build:
  static int calc_sacl_entries(const rsync_acl *racl)
  {
        /* A System ACL always gets user/group/other permission entries. */
-@@ -545,6 +557,91 @@ int get_acl(const char *fname, statx *sx
+@@ -544,6 +556,91 @@ int get_acl(const char *fname, statx *sx
        return 0;
  }
  
@@ -122,7 +122,7 @@ To use this patch, run these commands for a successful build:
  /* === Send functions === */
  
  /* The general strategy with the tag_type <-> character mapping is that
-@@ -631,6 +728,11 @@ static void send_rsync_acl(rsync_acl *ra
+@@ -630,6 +727,11 @@ static void send_rsync_acl(rsync_acl *ra
   * This also frees the ACL data. */
  void send_acl(statx *sxp, int f)
  {
@@ -134,7 +134,7 @@ To use this patch, run these commands for a successful build:
        if (!sxp->acc_acl) {
                sxp->acc_acl = create_racl();
                rsync_acl_fake_perms(sxp->acc_acl, sxp->st.st_mode);
-@@ -648,6 +750,146 @@ void send_acl(statx *sxp, int f)
+@@ -647,6 +749,146 @@ void send_acl(statx *sxp, int f)
        }
  }
  
@@ -281,7 +281,7 @@ To use this patch, run these commands for a successful build:
  /* === Receive functions === */
  
  static uchar recv_acl_access(uchar *name_follows_val, int f)
-@@ -767,6 +1009,11 @@ static int recv_rsync_acl(item_list *rac
+@@ -766,6 +1008,11 @@ static int recv_rsync_acl(item_list *rac
  /* Receive the ACL info the sender has included for this file-list entry. */
  void receive_acl(struct file_struct *file, int f)
  {
@@ -295,7 +295,7 @@ To use this patch, run these commands for a successful build:
        if (S_ISDIR(file->mode))
 --- old/compat.c
 +++ new/compat.c
-@@ -111,13 +111,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -115,13 +115,6 @@ void setup_protocol(int f_out,int f_in)
                            protocol_version);
                        exit_cleanup(RERR_PROTOCOL);
                }
@@ -306,9 +306,9 @@ To use this patch, run these commands for a successful build:
 -                          protocol_version);
 -                      exit_cleanup(RERR_PROTOCOL);
 -              }
-       }
-       if (delete_mode && !(delete_before+delete_during+delete_after)) {
+               if (preserve_xattrs) {
+                       rprintf(FERROR,
+                           "--xattrs requires protocol 30 or higher"
 --- old/testsuite/acls.test
 +++ new/testsuite/acls.test
 @@ -9,10 +9,6 @@
@@ -316,7 +316,7 @@ To use this patch, run these commands for a successful build:
  $RSYNC --version | grep ", ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support"
  
 -case "$RSYNC" in
--*protocol=29*) test_skipped "ACLs require protocol 30" ;;
+-*protocol=29*) test_skipped "ACL support requires protocol 30" ;;
 -esac
 -
  case "$setfacl_nodef" in
index 491d4dd4a90f655d0c34265b1ff571adae388d72..cf224823b6cceb5223a8221b1f8150e1d09abbfe 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
 
 --- old/compat.c
 +++ new/compat.c
-@@ -62,6 +62,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -64,6 +64,8 @@ void setup_protocol(int f_out,int f_in)
                preserve_uid = ++file_extra_cnt;
        if (preserve_gid)
                preserve_gid = ++file_extra_cnt;
@@ -16,10 +16,10 @@ To use this patch, run these commands for a successful build:
 +              preserve_atimes = ++file_extra_cnt;
        if (preserve_acls && !am_sender)
                preserve_acls = ++file_extra_cnt;
+       if (preserve_xattrs)
 --- old/flist.c
 +++ new/flist.c
-@@ -49,6 +49,7 @@ extern int preserve_devices;
+@@ -50,6 +50,7 @@ extern int preserve_devices;
  extern int preserve_specials;
  extern int preserve_uid;
  extern int preserve_gid;
@@ -27,7 +27,7 @@ To use this patch, run these commands for a successful build:
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -144,6 +145,7 @@ void show_flist_stats(void)
+@@ -147,6 +148,7 @@ void show_flist_stats(void)
  static void list_file_entry(struct file_struct *f)
  {
        char permbuf[PERMSTRING_SIZE];
@@ -35,7 +35,7 @@ To use this patch, run these commands for a successful build:
        double len;
  
        if (!F_IS_ACTIVE(f)) {
-@@ -158,14 +160,16 @@ static void list_file_entry(struct file_
+@@ -161,14 +163,16 @@ static void list_file_entry(struct file_
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -54,7 +54,7 @@ To use this patch, run these commands for a successful build:
                        f_name(f, NULL));
        }
  }
-@@ -349,6 +353,7 @@ int push_flist_dir(const char *dir, int 
+@@ -352,6 +356,7 @@ int push_flist_dir(const char *dir, int 
  static void send_file_entry(int f, struct file_struct *file, int ndx)
  {
        static time_t modtime;
@@ -62,7 +62,7 @@ To use this patch, run these commands for a successful build:
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -416,6 +421,13 @@ static void send_file_entry(int f, struc
+@@ -419,6 +424,13 @@ static void send_file_entry(int f, struc
                flags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -76,7 +76,7 @@ To use this patch, run these commands for a successful build:
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -483,6 +495,8 @@ static void send_file_entry(int f, struc
+@@ -486,6 +498,8 @@ static void send_file_entry(int f, struc
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -85,7 +85,7 @@ To use this patch, run these commands for a successful build:
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -569,7 +583,7 @@ static void send_file_entry(int f, struc
+@@ -572,7 +586,7 @@ static void send_file_entry(int f, struc
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int flags, int f)
  {
@@ -94,7 +94,7 @@ To use this patch, run these commands for a successful build:
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -667,6 +681,8 @@ static struct file_struct *recv_file_ent
+@@ -670,6 +684,8 @@ static struct file_struct *recv_file_ent
                modtime = (time_t)read_int(f);
        if (!(flags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -103,7 +103,7 @@ To use this patch, run these commands for a successful build:
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -791,6 +807,8 @@ static struct file_struct *recv_file_ent
+@@ -794,6 +810,8 @@ static struct file_struct *recv_file_ent
                F_OWNER(file) = uid;
        if (preserve_gid)
                F_GROUP(file) = gid;
@@ -112,7 +112,7 @@ To use this patch, run these commands for a successful build:
  
        if (basename != thisname) {
                file->dirname = lastdir;
-@@ -1096,6 +1114,8 @@ struct file_struct *make_file(const char
+@@ -1103,6 +1121,8 @@ struct file_struct *make_file(const char
                F_OWNER(file) = st.st_uid;
        if (preserve_gid)
                F_GROUP(file) = st.st_gid;
@@ -123,7 +123,7 @@ To use this patch, run these commands for a successful build:
                file->dirname = lastdir;
 --- old/generator.c
 +++ new/generator.c
-@@ -44,6 +44,7 @@ extern int preserve_perms;
+@@ -45,6 +45,7 @@ extern int preserve_perms;
  extern int preserve_uid;
  extern int preserve_gid;
  extern int preserve_times;
@@ -131,7 +131,7 @@ To use this patch, run these commands for a successful build:
  extern int omit_dir_times;
  extern int delete_mode;
  extern int delete_before;
-@@ -552,6 +553,9 @@ void itemize(const char *fname, struct f
+@@ -561,6 +562,9 @@ void itemize(const char *fnamecmp, struc
                  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                 || (keep_time && cmp_time(file->modtime, sxp->st.st_mtime) != 0))
                        iflags |= ITEM_REPORT_TIME;
@@ -141,7 +141,7 @@ To use this patch, run these commands for a successful build:
                if (!BITS_EQUAL(sxp->st.st_mode, file->mode, CHMOD_BITS))
                        iflags |= ITEM_REPORT_PERMS;
                if (preserve_uid && am_root && F_UID(file) != sxp->st.st_uid)
-@@ -852,6 +856,8 @@ static int try_dests_reg(struct file_str
+@@ -878,6 +882,8 @@ static int try_dests_reg(struct file_str
                if (link_dest) {
                        if (!hard_link_one(file, fname, cmpbuf, 1))
                                goto try_a_copy;
@@ -150,7 +150,7 @@ To use this patch, run these commands for a successful build:
                        if (preserve_hard_links && F_IS_HLINKED(file))
                                finish_hard_link(file, fname, &sxp->st, itemizing, code, j);
                        if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1700,7 +1706,7 @@ static void touch_up_dirs(struct file_li
+@@ -1741,7 +1747,7 @@ static void touch_up_dirs(struct file_li
                if (!(file->mode & S_IWUSR))
                        do_chmod(fname, file->mode);
                if (need_retouch_dir_times)
@@ -181,7 +181,7 @@ To use this patch, run these commands for a successful build:
                        c[11] = '\0';
 --- old/options.c
 +++ new/options.c
-@@ -55,6 +55,7 @@ int preserve_uid = 0;
+@@ -56,6 +56,7 @@ int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
  int omit_dir_times = 0;
@@ -189,7 +189,7 @@ To use this patch, run these commands for a successful build:
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -315,8 +316,9 @@ void usage(enum logcode F)
+@@ -323,8 +324,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");
@@ -201,7 +201,7 @@ To use 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");
-@@ -436,6 +438,9 @@ static struct poptOption long_options[] 
+@@ -451,6 +453,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 },
@@ -211,7 +211,7 @@ To use 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 },
-@@ -1577,6 +1582,8 @@ void server_options(char **args,int *arg
+@@ -1603,6 +1608,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -222,15 +222,15 @@ To use this patch, run these commands for a successful build:
        else if (preserve_executability && am_sender)
 --- old/rsync.c
 +++ new/rsync.c
-@@ -34,6 +34,7 @@ extern int dry_run;
- extern int preserve_acls;
+@@ -35,6 +35,7 @@ extern int preserve_acls;
+ extern int preserve_xattrs;
  extern int preserve_perms;
  extern int preserve_executability;
 +extern int preserve_atimes;
  extern int preserve_times;
  extern int omit_dir_times;
  extern int am_root;
-@@ -234,6 +235,7 @@ int set_file_attrs(char *fname, struct f
+@@ -228,6 +229,7 @@ int set_file_attrs(const char *fname, st
        int updated = 0;
        statx sx2;
        int change_uid, change_gid;
@@ -238,8 +238,8 @@ To use this patch, run these commands for a successful build:
        mode_t new_mode = file->mode;
  
        if (!sxp) {
-@@ -261,18 +263,36 @@ int set_file_attrs(char *fname, struct f
-               get_acl(fname, sxp);
+@@ -263,18 +265,36 @@ int set_file_attrs(const char *fname, st
+               set_xattr(fname, file, fnamecmp, sxp);
  #endif
  
 +      /* This code must be the first update in the function due to
@@ -296,25 +296,25 @@ To use this patch, run these commands for a successful build:
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -571,6 +573,7 @@ extern int file_extra_cnt;
+@@ -568,6 +570,7 @@ struct file_struct {
+ extern int file_extra_cnt;
  extern int preserve_uid;
  extern int preserve_gid;
- extern int preserve_acls;
 +extern int preserve_atimes;
+ extern int preserve_acls;
+ extern int preserve_xattrs;
  
- #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
- #define EXTRA_LEN (sizeof (union file_extras))
-@@ -603,6 +606,7 @@ extern int preserve_acls;
+@@ -602,6 +605,7 @@ extern int preserve_xattrs;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, preserve_uid)->unum
  #define F_GROUP(f) REQ_EXTRA(f, preserve_gid)->unum
 +#define F_ATIME(f) REQ_EXTRA(f, preserve_atimes)->unum
- #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->unum
+ #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->num
+ #define F_XATTR(f) REQ_EXTRA(f, preserve_xattrs)->num
  
- /* These items are per-entry optional and mutally exclusive: */
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -329,8 +329,9 @@ to the detailed description below for a 
+@@ -330,8 +330,9 @@ to the detailed description below for a 
       --devices               preserve device files (super-user only)
       --specials              preserve special files
   -D                          same as --devices --specials
@@ -326,7 +326,7 @@ To use 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
-@@ -896,6 +897,12 @@ it is preserving modification times (see
+@@ -902,6 +903,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).
  
@@ -339,7 +339,7 @@ To use 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
-@@ -1482,7 +1489,7 @@ quote(itemization(
+@@ -1488,7 +1495,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)
@@ -348,7 +348,7 @@ To use 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
-@@ -1491,8 +1498,10 @@ quote(itemization(
+@@ -1497,8 +1504,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).
@@ -363,7 +363,7 @@ To use this patch, run these commands for a successful build:
    (a feature that is not yet released).
 --- old/sender.c
 +++ new/sender.c
-@@ -41,6 +41,7 @@ extern int do_progress;
+@@ -43,6 +43,7 @@ extern int do_progress;
  extern int inplace;
  extern int batch_fd;
  extern int write_batch;
index da91f40af83d247a57630e49798e72077280dada..ffce9707c78519e3134fdd3a557e20e05c785837 100644 (file)
@@ -12,7 +12,7 @@ TODO: fix --delete-delay to work with --flags option.
 
 --- old/compat.c
 +++ new/compat.c
-@@ -63,6 +63,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -64,6 +64,8 @@ void setup_protocol(int f_out,int f_in)
                preserve_uid = ++file_extra_cnt;
        if (preserve_gid)
                preserve_gid = ++file_extra_cnt;
@@ -20,7 +20,7 @@ TODO: fix --delete-delay to work with --flags option.
 +              preserve_fileflags = ++file_extra_cnt;
        if (preserve_acls && !am_sender)
                preserve_acls = ++file_extra_cnt;
+       if (preserve_xattrs)
 --- old/configure.in
 +++ new/configure.in
 @@ -559,7 +559,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
@@ -34,7 +34,7 @@ TODO: fix --delete-delay to work with --flags option.
  AC_CHECK_FUNCS(getpgrp tcgetpgrp)
 --- old/flist.c
 +++ new/flist.c
-@@ -47,6 +47,7 @@ extern int preserve_links;
+@@ -48,6 +48,7 @@ extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
  extern int preserve_specials;
@@ -42,7 +42,7 @@ TODO: fix --delete-delay to work with --flags option.
  extern int preserve_uid;
  extern int preserve_gid;
  extern int relative_paths;
-@@ -352,6 +353,9 @@ static void send_file_entry(int f, struc
+@@ -353,6 +354,9 @@ static void send_file_entry(int f, struc
  {
        static time_t modtime;
        static mode_t mode;
@@ -52,7 +52,7 @@ TODO: fix --delete-delay to work with --flags option.
        static int64 dev;
        static dev_t rdev;
        static uint32 rdev_major;
-@@ -372,6 +376,12 @@ static void send_file_entry(int f, struc
+@@ -373,6 +377,12 @@ static void send_file_entry(int f, struc
                flags |= XMIT_SAME_MODE;
        else
                mode = file->mode;
@@ -65,7 +65,7 @@ TODO: fix --delete-delay to work with --flags option.
        if ((preserve_devices && IS_DEVICE(mode))
         || (preserve_specials && IS_SPECIAL(mode))) {
                if (protocol_version < 28) {
-@@ -485,6 +495,10 @@ static void send_file_entry(int f, struc
+@@ -486,6 +496,10 @@ static void send_file_entry(int f, struc
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -76,7 +76,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -573,6 +587,9 @@ static struct file_struct *recv_file_ent
+@@ -574,6 +588,9 @@ static struct file_struct *recv_file_ent
  {
        static time_t modtime;
        static mode_t mode;
@@ -86,7 +86,7 @@ TODO: fix --delete-delay to work with --flags option.
        static int64 dev;
        static dev_t rdev;
        static uint32 rdev_major;
-@@ -669,9 +686,12 @@ static struct file_struct *recv_file_ent
+@@ -670,9 +687,12 @@ static struct file_struct *recv_file_ent
                modtime = (time_t)read_int(f);
        if (!(flags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -100,7 +100,7 @@ TODO: fix --delete-delay to work with --flags option.
  
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -789,6 +809,10 @@ static struct file_struct *recv_file_ent
+@@ -790,6 +810,10 @@ static struct file_struct *recv_file_ent
                OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
        }
        file->mode = mode;
@@ -111,7 +111,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid)
-@@ -1094,6 +1118,10 @@ struct file_struct *make_file(const char
+@@ -1099,6 +1123,10 @@ struct file_struct *make_file(const char
                OPT_EXTRA(file, 0)->unum = (uint32)(st.st_size >> 32);
        }
        file->mode = st.st_mode;
@@ -124,7 +124,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (preserve_gid)
 --- old/generator.c
 +++ new/generator.c
-@@ -111,6 +111,14 @@ static int dir_tweaking;
+@@ -112,6 +112,14 @@ static int dir_tweaking;
  static int need_retouch_dir_times;
  static const char *solo_file = NULL;
  
@@ -139,7 +139,7 @@ TODO: fix --delete-delay to work with --flags option.
  /* For calling delete_item() and delete_dir_contents(). */
  #define DEL_RECURSE           (1<<1) /* recurse */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -126,7 +134,6 @@ enum delret {
+@@ -127,7 +135,6 @@ enum delret {
  /* Forward declaration for delete_item(). */
  static enum delret delete_dir_contents(char *fname, int flags);
  
@@ -147,7 +147,7 @@ TODO: fix --delete-delay to work with --flags option.
  static int is_backup_file(char *fn)
  {
        int k = strlen(fn) - backup_suffix_len;
-@@ -139,17 +146,20 @@ static int is_backup_file(char *fn)
+@@ -140,17 +147,20 @@ static int is_backup_file(char *fn)
   * Note that fbuf must point to a MAXPATHLEN buffer if the mode indicates it's
   * a directory! (The buffer is used for recursion, but returned unchanged.)
   */
@@ -171,7 +171,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (S_ISDIR(mode) && !(flags & DEL_DIR_IS_EMPTY)) {
                ignore_perishable = 1;
                /* If DEL_RECURSE is not set, this just reports emptiness. */
-@@ -261,7 +271,7 @@ static enum delret delete_dir_contents(c
+@@ -262,7 +272,7 @@ static enum delret delete_dir_contents(c
                if (S_ISDIR(fp->mode)
                 && delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
                        ret = DR_NOT_EMPTY;
@@ -180,7 +180,7 @@ TODO: fix --delete-delay to work with --flags option.
                        ret = DR_NOT_EMPTY;
        }
  
-@@ -317,8 +327,9 @@ static int remember_delete(struct file_s
+@@ -318,8 +328,9 @@ static int remember_delete(struct file_s
        
        while (1) {
                len = snprintf(deldelay_buf + deldelay_cnt,
@@ -192,7 +192,7 @@ TODO: fix --delete-delay to work with --flags option.
                if ((deldelay_cnt += len) <= deldelay_size)
                        break;
                if (deldelay_fd < 0 && !start_delete_delay_temp())
-@@ -331,7 +342,7 @@ static int remember_delete(struct file_s
+@@ -332,7 +343,7 @@ static int remember_delete(struct file_s
        return 1;
  }
  
@@ -201,7 +201,7 @@ TODO: fix --delete-delay to work with --flags option.
  {
        static int read_pos = 0;
        int j, len, mode;
-@@ -373,7 +384,7 @@ static int read_delay_line(char *buf)
+@@ -374,7 +385,7 @@ static int read_delay_line(char *buf)
  
        bp = deldelay_buf + read_pos;
  
@@ -210,7 +210,7 @@ TODO: fix --delete-delay to work with --flags option.
          invalid_data:
                rprintf(FERROR, "ERROR: invalid data in delete-delay file.\n");
                return -1;
-@@ -396,15 +407,15 @@ static int read_delay_line(char *buf)
+@@ -397,15 +408,15 @@ static int read_delay_line(char *buf)
  
  static void do_delayed_deletions(char *delbuf)
  {
@@ -229,7 +229,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (deldelay_fd >= 0)
                close(deldelay_fd);
  }
-@@ -472,7 +483,7 @@ static void delete_in_dir(struct file_li
+@@ -473,7 +484,7 @@ static void delete_in_dir(struct file_li
                                if (!remember_delete(fp, delbuf))
                                        break;
                        } else
@@ -238,7 +238,7 @@ TODO: fix --delete-delay to work with --flags option.
                }
        }
  
-@@ -1178,7 +1189,7 @@ static void recv_generator(char *fname, 
+@@ -1211,7 +1222,7 @@ static void recv_generator(char *fname, 
                 * we need to delete it.  If it doesn't exist, then
                 * (perhaps recursively) create it. */
                if (statret == 0 && !S_ISDIR(sx.st.st_mode)) {
@@ -247,7 +247,7 @@ TODO: fix --delete-delay to work with --flags option.
                                return;
                        statret = -1;
                }
-@@ -1291,7 +1302,7 @@ static void recv_generator(char *fname, 
+@@ -1324,7 +1335,7 @@ static void recv_generator(char *fname, 
                        }
                        /* Not the right symlink (or not a symlink), so
                         * delete it. */
@@ -256,7 +256,7 @@ TODO: fix --delete-delay to work with --flags option.
                                goto cleanup;
                } else if (basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1368,7 +1379,7 @@ static void recv_generator(char *fname, 
+@@ -1401,7 +1412,7 @@ static void recv_generator(char *fname, 
                                        goto return_with_success;
                                goto cleanup;
                        }
@@ -265,7 +265,7 @@ TODO: fix --delete-delay to work with --flags option.
                                goto cleanup;
                } else if (basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1457,7 +1468,7 @@ static void recv_generator(char *fname, 
+@@ -1490,7 +1501,7 @@ static void recv_generator(char *fname, 
        fnamecmp_type = FNAMECMP_FNAME;
  
        if (statret == 0 && !S_ISREG(sx.st.st_mode)) {
@@ -276,23 +276,23 @@ TODO: fix --delete-delay to work with --flags option.
                stat_errno = ENOENT;
 --- old/options.c
 +++ new/options.c
-@@ -48,6 +48,7 @@ int preserve_links = 0;
- int preserve_hard_links = 0;
+@@ -49,6 +49,7 @@ int preserve_hard_links = 0;
  int preserve_acls = 0;
+ int preserve_xattrs = 0;
  int preserve_perms = 0;
 +int preserve_fileflags = 0;
  int preserve_executability = 0;
  int preserve_devices = 0;
  int preserve_specials = 0;
-@@ -203,6 +204,7 @@ static void print_rsync_version(enum log
-       char const *acls = "no ";
+@@ -205,6 +206,7 @@ static void print_rsync_version(enum log
+       char const *xattrs = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
 +      char const *fileflags = "no ";
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -229,6 +231,10 @@ static void print_rsync_version(enum log
+@@ -233,6 +235,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -303,18 +303,18 @@ TODO: fix --delete-delay to work with --flags option.
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2007 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -239,8 +245,8 @@ static void print_rsync_version(enum log
+@@ -243,8 +249,8 @@ static void print_rsync_version(enum log
                (int)(sizeof (int64) * 8));
        rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
                got_socketpair, hardlinks, links, ipv6, have_inplace);
--      rprintf(f, "    %sappend, %sACLs\n",
--              have_inplace, acls);
-+      rprintf(f, "    %sappend, %sACLs, %sfile-flags\n",
-+              have_inplace, acls, fileflags);
+-      rprintf(f, "    %sappend, %sACLs, %sxattrs\n",
+-              have_inplace, acls, xattrs);
++      rprintf(f, "    %sappend, %sACLs, %sxattrs, %sfile-flags\n",
++              have_inplace, acls, xattrs, fileflags);
  
  #ifdef MAINTAINER_MODE
        rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -306,6 +312,7 @@ void usage(enum logcode F)
+@@ -310,6 +316,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");
@@ -322,7 +322,7 @@ TODO: fix --delete-delay to work with --flags option.
    rprintf(F," -E, --executability         preserve the file's executability\n");
    rprintf(F,"     --chmod=CHMOD           affect file and/or directory permissions\n");
  #ifdef SUPPORT_ACLS
-@@ -434,6 +441,8 @@ static struct poptOption long_options[] 
+@@ -441,6 +448,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 },
@@ -331,7 +331,7 @@ TODO: fix --delete-delay to work with --flags option.
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
    {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },
    {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
-@@ -1166,6 +1175,15 @@ int parse_arguments(int *argc, const cha
+@@ -1187,6 +1196,15 @@ int parse_arguments(int *argc, const cha
        }
  #endif
  
@@ -347,7 +347,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (write_batch && read_batch) {
                snprintf(err_buf, sizeof err_buf,
                        "--write-batch and --read-batch can not be used together\n");
-@@ -1629,6 +1647,9 @@ void server_options(char **args,int *arg
+@@ -1654,6 +1672,9 @@ void server_options(char **args,int *arg
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -359,15 +359,15 @@ TODO: fix --delete-delay to work with --flags option.
                        goto oom;
 --- old/rsync.c
 +++ new/rsync.c
-@@ -33,6 +33,7 @@ extern int verbose;
- extern int dry_run;
+@@ -34,6 +34,7 @@ extern int dry_run;
  extern int preserve_acls;
+ extern int preserve_xattrs;
  extern int preserve_perms;
 +extern int preserve_fileflags;
  extern int preserve_executability;
  extern int preserve_times;
  extern int omit_dir_times;
-@@ -53,6 +54,16 @@ extern int make_backups;
+@@ -54,6 +55,16 @@ extern int make_backups;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  
@@ -384,7 +384,7 @@ TODO: fix --delete-delay to work with --flags option.
  #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
  iconv_t ic_chck = (iconv_t)-1;
  
-@@ -228,6 +239,41 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -222,6 +233,41 @@ mode_t dest_mode(mode_t flist_mode, mode
        return new_mode;
  }
  
@@ -423,10 +423,10 @@ TODO: fix --delete-delay to work with --flags option.
 +}
 +#endif
 +
- int set_file_attrs(char *fname, struct file_struct *file, statx *sxp,
-                  int flags)
+ int set_file_attrs(const char *fname, struct file_struct *file, statx *sxp,
+                  const char *fnamecmp, int flags)
  {
-@@ -346,6 +392,15 @@ int set_file_attrs(char *fname, struct f
+@@ -348,6 +394,15 @@ int set_file_attrs(const char *fname, st
        }
  #endif
  
@@ -442,8 +442,8 @@ TODO: fix --delete-delay to work with --flags option.
        if (verbose > 1 && flags & ATTRS_REPORT) {
                if (updated)
                        rprintf(FCLIENT, "%s\n", fname);
-@@ -398,6 +453,9 @@ void finish_transfer(char *fname, char *
-       set_file_attrs(fnametmp, file, NULL,
+@@ -407,6 +462,9 @@ void finish_transfer(const char *fname, 
+       set_file_attrs(fnametmp, file, NULL, fnamecmp,
                       ok_to_set_time ? 0 : ATTRS_SKIP_MTIME);
  
 +#ifdef SUPPORT_FLAGS
@@ -452,7 +452,7 @@ TODO: fix --delete-delay to work with --flags option.
        /* move tmp file over real file */
        if (verbose > 2)
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
-@@ -412,6 +470,9 @@ void finish_transfer(char *fname, char *
+@@ -421,6 +479,9 @@ void finish_transfer(const char *fname, 
        }
        if (ret == 0) {
                /* The file was moved into place (not copied), so it's done. */
@@ -489,16 +489,16 @@ TODO: fix --delete-delay to work with --flags option.
  extern int preserve_gid;
 +extern int preserve_fileflags;
  extern int preserve_acls;
+ extern int preserve_xattrs;
  
- #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
-@@ -601,6 +607,7 @@ extern int preserve_acls;
+@@ -602,6 +608,7 @@ extern int preserve_xattrs;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, preserve_uid)->unum
  #define F_GROUP(f) REQ_EXTRA(f, preserve_gid)->unum
 +#define F_FFLAGS(f) REQ_EXTRA(f, preserve_fileflags)->unum
- #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->unum
+ #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->num
+ #define F_XATTR(f) REQ_EXTRA(f, preserve_xattrs)->num
  
- /* These items are per-entry optional and mutally exclusive: */
 --- old/rsync.yo
 +++ new/rsync.yo
 @@ -321,6 +321,7 @@ to the detailed description below for a 
@@ -509,7 +509,7 @@ TODO: fix --delete-delay to work with --flags option.
   -E, --executability         preserve executability
       --chmod=CHMOD           affect file and/or directory permissions
   -A, --acls                  preserve ACLs (implies -p)
-@@ -511,7 +512,9 @@ specified, in which case bf(-r) is not i
+@@ -512,7 +513,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
@@ -520,9 +520,9 @@ TODO: fix --delete-delay to work with --flags option.
  
  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-":
-@@ -831,6 +834,13 @@ dit(bf(-A, --acls)) This option causes r
- ACLs to be the same as the source ACLs.  This nonstandard option only
works if the remote rsync also supports it.  bf(--acls) implies bf(--perms).
+@@ -837,6 +840,13 @@ extended attributes to be the same as th
+ only if the remote machine's rsync supports this option also. This is
a non-standard option.
  
 +dit(bf(--flags)) This option causes rsync to update the change file flags
 +to be the same as the source file, if your OS supports the bf(chflags)(2)
index 9877bcb407d22c4500a509596e2f4d4a9859d645..f1326f02df4701e99382a28ad323cc5fbec8cc8f 100644 (file)
@@ -17,7 +17,7 @@ To use this patch, run these commands for a successful build:
  int preserve_links = 0;
  int preserve_hard_links = 0;
  int preserve_acls = 0;
-@@ -345,6 +346,7 @@ void usage(enum logcode F)
+@@ -352,6 +353,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");
@@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build:
    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");
-@@ -539,6 +541,7 @@ static struct poptOption long_options[] 
+@@ -549,6 +551,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},
@@ -33,7 +33,7 @@ To use this patch, run these commands for a successful build:
    {"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 },
-@@ -1777,6 +1780,9 @@ void server_options(char **args,int *arg
+@@ -1802,6 +1805,9 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }
  
@@ -45,15 +45,15 @@ To use this patch, run these commands for a successful build:
                 *   and it may be an older version that doesn't know this
 --- old/receiver.c
 +++ new/receiver.c
-@@ -37,6 +37,7 @@ extern int protocol_version;
- extern int relative_paths;
+@@ -39,6 +39,7 @@ extern int relative_paths;
  extern int preserve_hard_links;
  extern int preserve_perms;
+ extern int preserve_xattrs;
 +extern int do_fsync;
  extern int basis_dir_cnt;
  extern int make_backups;
  extern int cleanup_got_literal;
-@@ -257,6 +258,12 @@ static int receive_data(int f_in, char *
+@@ -259,6 +260,12 @@ static int receive_data(int f_in, char *
                exit_cleanup(RERR_FILEIO);
        }
  
index aace9518cf33d6e8c1f94f96e3dab62c22ce3035..5d72765a2543989d5be43fad88f5abb578d90f5c 100644 (file)
@@ -17,7 +17,7 @@ To use this patch, run these commands for a successful build:
 @@ -35,7 +35,7 @@ OBJS1=flist.o rsync.o generator.o receiv
        util.o main.o checksum.o match.o syscall.o log.o backup.o
  OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o \
-       fileio.o batch.o clientname.o chmod.o acls.o
+       fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
 -OBJS3=progress.o pipe.o
 +OBJS3=progress.o pipe.o hashlink.o
  DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
@@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build:
        popt/popthelp.o popt/poptparse.o
 --- old/flist.c
 +++ new/flist.c
-@@ -60,6 +60,7 @@ extern int copy_unsafe_links;
+@@ -61,6 +61,7 @@ extern int copy_unsafe_links;
  extern int protocol_version;
  extern int sanitize_paths;
  extern struct stats stats;
@@ -33,7 +33,7 @@ To use this patch, run these commands for a successful build:
  
  extern char curr_dir[MAXPATHLEN];
  
-@@ -747,7 +748,7 @@ static struct file_struct *recv_file_ent
+@@ -748,7 +749,7 @@ static struct file_struct *recv_file_ent
                extra_len += (S_ISDIR(mode) ? 2 : 1) * EXTRA_LEN;
  #endif
  
@@ -383,7 +383,7 @@ To use this patch, run these commands for a successful build:
 +#endif
 --- old/options.c
 +++ new/options.c
-@@ -145,6 +145,7 @@ char *backup_suffix = NULL;
+@@ -146,6 +146,7 @@ char *backup_suffix = NULL;
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
@@ -391,7 +391,7 @@ To use this patch, run these commands for a successful build:
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *logfile_name = NULL;
-@@ -355,6 +356,7 @@ void usage(enum logcode F)
+@@ -362,6 +363,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");
@@ -399,7 +399,7 @@ To use this patch, run these commands for a successful build:
    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");
-@@ -404,7 +406,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -411,7 +413,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,
@@ -408,7 +408,7 @@ To use this patch, run these commands for a successful build:
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -513,6 +515,7 @@ static struct poptOption long_options[] 
+@@ -523,6 +525,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 },
@@ -416,10 +416,10 @@ To use this patch, run these commands for a successful build:
    {"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 },
-@@ -1127,6 +1130,21 @@ int parse_arguments(int *argc, const cha
+@@ -1148,6 +1151,21 @@ int parse_arguments(int *argc, const cha
+                       return 0;
  #endif
  
 +                case OPT_LINK_BY_HASH:
 +#ifdef HAVE_LINK
 +                      arg = poptGetOptArg(pc);
@@ -438,7 +438,7 @@ To use this patch, run these commands for a successful build:
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1789,6 +1807,11 @@ void server_options(char **args,int *arg
+@@ -1814,6 +1832,11 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -452,7 +452,7 @@ To use this patch, run these commands for a successful build:
                        args[ac++] = "--files-from";
 --- old/receiver.c
 +++ new/receiver.c
-@@ -123,12 +123,14 @@ int get_tmpname(char *fnametmp, char *fn
+@@ -125,12 +125,14 @@ int get_tmpname(char *fnametmp, char *fn
  
  
  static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
@@ -468,7 +468,7 @@ To use this patch, run these commands for a successful build:
        int32 len, sum_len;
        OFF_T offset = 0;
        OFF_T offset2;
-@@ -148,6 +150,9 @@ static int receive_data(int f_in, char *
+@@ -150,6 +152,9 @@ static int receive_data(int f_in, char *
        } else
                mapbuf = NULL;
  
@@ -478,7 +478,7 @@ To use this patch, run these commands for a successful build:
        sum_init(checksum_seed);
  
        if (append_mode > 0) {
-@@ -190,6 +195,8 @@ static int receive_data(int f_in, char *
+@@ -192,6 +197,8 @@ static int receive_data(int f_in, char *
                        cleanup_got_literal = 1;
  
                        sum_update(data, i);
@@ -487,7 +487,7 @@ To use this patch, run these commands for a successful build:
  
                        if (fd != -1 && write_file(fd,data,i) != i)
                                goto report_write_error;
-@@ -216,6 +223,8 @@ static int receive_data(int f_in, char *
+@@ -218,6 +225,8 @@ static int receive_data(int f_in, char *
  
                        see_token(map, len);
                        sum_update(map, len);
@@ -496,7 +496,7 @@ To use this patch, run these commands for a successful build:
                }
  
                if (updating_basis) {
-@@ -258,6 +267,8 @@ static int receive_data(int f_in, char *
+@@ -260,6 +269,8 @@ static int receive_data(int f_in, char *
        }
  
        sum_len = sum_end(file_sum1);
@@ -505,7 +505,7 @@ To use this patch, run these commands for a successful build:
  
        if (mapbuf)
                unmap_file(mapbuf);
-@@ -273,7 +284,7 @@ static int receive_data(int f_in, char *
+@@ -275,7 +286,7 @@ static int receive_data(int f_in, char *
  
  static void discard_receive_data(int f_in, OFF_T length)
  {
@@ -514,7 +514,7 @@ To use this patch, run these commands for a successful build:
  }
  
  static void handle_delayed_updates(char *local_name)
-@@ -635,7 +646,7 @@ int recv_files(int f_in, char *local_nam
+@@ -646,7 +657,7 @@ int recv_files(int f_in, char *local_nam
  
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
@@ -525,7 +525,7 @@ To use this patch, run these commands for a successful build:
  
 --- old/rsync.c
 +++ new/rsync.c
-@@ -50,6 +50,7 @@ extern int inplace;
+@@ -51,6 +51,7 @@ extern int inplace;
  extern int flist_eof;
  extern int keep_dirlinks;
  extern int make_backups;
@@ -533,7 +533,7 @@ To use this patch, run these commands for a successful build:
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  
-@@ -401,8 +402,15 @@ void finish_transfer(char *fname, char *
+@@ -410,8 +411,15 @@ void finish_transfer(const char *fname, 
        /* move tmp file over real file */
        if (verbose > 2)
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
@@ -553,7 +553,7 @@ To use this patch, run these commands for a successful build:
                        ret == -2 ? "copy" : "rename",
 --- old/rsync.h
 +++ new/rsync.h
-@@ -756,6 +756,14 @@ struct stats {
+@@ -758,6 +758,14 @@ struct stats {
        int current_file_index;
  };
  
@@ -570,7 +570,7 @@ To use this patch, run these commands for a successful build:
  #define EMPTY_ITEM_LIST {NULL, 0, 0}
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -368,6 +368,7 @@ to the detailed description below for a 
+@@ -369,6 +369,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 190318692af17a418e21b19258f75555799a937e..830a088fb5dde878ba7ee44a48797e32209f350f 100644 (file)
@@ -218,7 +218,7 @@ To use this patch, run these commands for a successful build:
        *cygwin* ) AC_MSG_RESULT(yes)
 --- old/options.c
 +++ new/options.c
-@@ -172,6 +172,14 @@ int logfile_format_has_o_or_i = 0;
+@@ -174,6 +174,14 @@ int logfile_format_has_o_or_i = 0;
  int always_checksum = 0;
  int list_only = 0;
  
@@ -233,15 +233,15 @@ To use this patch, run these commands for a successful build:
  #define MAX_BATCH_NAME_LEN 256        /* Must be less than MAXPATHLEN-13 */
  char *batch_name = NULL;
  
-@@ -202,6 +210,7 @@ static void print_rsync_version(enum log
-       char const *acls = "no ";
+@@ -205,6 +213,7 @@ static void print_rsync_version(enum log
+       char const *xattrs = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
 +      char const *ssl = "no ";
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -228,6 +237,10 @@ static void print_rsync_version(enum log
+@@ -233,6 +242,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -252,18 +252,18 @@ To use 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-2007 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -238,8 +251,8 @@ static void print_rsync_version(enum log
+@@ -243,8 +256,8 @@ static void print_rsync_version(enum log
                (int)(sizeof (int64) * 8));
        rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
                got_socketpair, hardlinks, links, ipv6, have_inplace);
--      rprintf(f, "    %sappend, %sACLs\n",
--              have_inplace, acls);
-+      rprintf(f, "    %sappend, %sACLs, %sSSL\n",
-+              have_inplace, acls, ssl);
+-      rprintf(f, "    %sappend, %sACLs, %sxattrs\n",
+-              have_inplace, acls, xattrs);
++      rprintf(f, "    %sappend, %sACLs, %sxattrs, %sSSL\n",
++              have_inplace, acls, xattrs, ssl);
  
  #ifdef MAINTAINER_MODE
        rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -390,6 +403,13 @@ void usage(enum logcode F)
+@@ -398,6 +411,13 @@ void usage(enum logcode F)
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
  #endif
@@ -277,7 +277,7 @@ To use this patch, run these commands for a successful build:
    rprintf(F,"     --version               print version number\n");
    rprintf(F,"(-h) --help                  show this help (-h works with no other options)\n");
  
-@@ -403,7 +423,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -411,7 +431,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,
@@ -286,7 +286,7 @@ To use this patch, run these commands for a successful build:
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -554,6 +574,13 @@ static struct poptOption long_options[] 
+@@ -569,6 +589,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 },
@@ -300,7 +300,7 @@ To use this patch, run these commands for a successful build:
    /* 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 },
-@@ -581,6 +608,13 @@ static void daemon_usage(enum logcode F)
+@@ -596,6 +623,13 @@ static void daemon_usage(enum logcode F)
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
  #endif
@@ -314,7 +314,7 @@ To use this patch, run these commands for a successful build:
    rprintf(F,"     --help                  show this help screen\n");
  
    rprintf(F,"\n");
-@@ -607,6 +641,13 @@ static struct poptOption long_daemon_opt
+@@ -622,6 +656,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 },
@@ -328,7 +328,7 @@ To use this patch, run these commands for a successful build:
    {"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 },
-@@ -866,6 +907,12 @@ int parse_arguments(int *argc, const cha
+@@ -881,6 +922,12 @@ int parse_arguments(int *argc, const cha
                                        verbose++;
                                        break;
  
@@ -341,7 +341,7 @@ To use this patch, run these commands for a successful build:
                                default:
                                        rprintf(FERROR,
                                            "rsync: %s: %s (in daemon mode)\n",
-@@ -889,6 +936,17 @@ int parse_arguments(int *argc, const cha
+@@ -904,6 +951,17 @@ int parse_arguments(int *argc, const cha
                                exit_cleanup(RERR_SYNTAX);
                        }
  
@@ -359,10 +359,10 @@ To use this patch, run these commands for a successful build:
                        *argv = poptGetArgs(pc);
                        *argc = count_args(*argv);
                        am_starting_up = 0;
-@@ -1122,6 +1180,12 @@ int parse_arguments(int *argc, const cha
+@@ -1148,6 +1206,12 @@ int parse_arguments(int *argc, const cha
+                       return 0;
  #endif
  
 +#ifdef HAVE_OPENSSL
 +              case OPT_USE_SSL:
 +                      use_ssl = 1;
@@ -372,7 +372,7 @@ To use this patch, run these commands for a successful build:
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1400,6 +1464,17 @@ int parse_arguments(int *argc, const cha
+@@ -1426,6 +1490,17 @@ int parse_arguments(int *argc, const cha
        if (delay_updates && !partial_dir)
                partial_dir = tmp_partialdir;
  
@@ -390,7 +390,7 @@ To use this patch, run these commands for a successful build:
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -1827,10 +1902,27 @@ char *check_for_hostspec(char *s, char *
+@@ -1857,10 +1932,27 @@ char *check_for_hostspec(char *s, char *
        char *p;
        int not_host;
        int hostlen;
index 8d1f423adcddc759576520decd14e978073db9a3..3481313ca13700056ac5dedb1a5447b7e4e64913 100644 (file)
@@ -22,7 +22,7 @@ To use this patch, run these commands for a successful build:
  if test $ac_cv_func_getpgrp = yes; then
 --- old/options.c
 +++ new/options.c
-@@ -69,6 +69,7 @@ int remove_source_files = 0;
+@@ -70,6 +70,7 @@ int remove_source_files = 0;
  int one_file_system = 0;
  int protocol_version = PROTOCOL_VERSION;
  int sparse_files = 0;
@@ -30,15 +30,15 @@ To use this patch, run these commands for a successful build:
  int do_compression = 0;
  int def_compress_level = Z_DEFAULT_COMPRESSION;
  int am_root = 0;
-@@ -202,6 +203,7 @@ static void print_rsync_version(enum log
-       char const *acls = "no ";
+@@ -205,6 +206,7 @@ static void print_rsync_version(enum log
+       char const *xattrs = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
 +      char const *preallocation = "no ";
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -228,6 +230,10 @@ static void print_rsync_version(enum log
+@@ -233,6 +235,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -49,18 +49,18 @@ To use 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-2007 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -238,8 +244,8 @@ static void print_rsync_version(enum log
+@@ -243,8 +249,8 @@ static void print_rsync_version(enum log
                (int)(sizeof (int64) * 8));
        rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
                got_socketpair, hardlinks, links, ipv6, have_inplace);
--      rprintf(f, "    %sappend, %sACLs\n",
--              have_inplace, acls);
-+      rprintf(f, "    %sappend, %sACLs, %spreallocation\n",
-+              have_inplace, acls, preallocation);
+-      rprintf(f, "    %sappend, %sACLs, %sxattrs\n",
+-              have_inplace, acls, xattrs);
++      rprintf(f, "    %sappend, %sACLs, %sxattrs, %spreallocation\n",
++              have_inplace, acls, xattrs, preallocation);
  
  #ifdef MAINTAINER_MODE
        rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -319,6 +325,9 @@ void usage(enum logcode F)
+@@ -327,6 +333,9 @@ void usage(enum logcode F)
    rprintf(F," -O, --omit-dir-times        omit directories when preserving times\n");
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
@@ -70,7 +70,7 @@ To use this patch, run these commands for a successful build:
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
    rprintf(F," -W, --whole-file            copy files whole (without rsync algorithm)\n");
    rprintf(F," -x, --one-file-system       don't cross filesystem boundaries\n");
-@@ -479,6 +488,7 @@ static struct poptOption long_options[] 
+@@ -494,6 +503,7 @@ static struct poptOption long_options[] 
    {"max-size",         0,  POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 },
    {"min-size",         0,  POPT_ARG_STRING, &min_size_arg, OPT_MIN_SIZE, 0, 0 },
    {"sparse",          'S', POPT_ARG_NONE,   &sparse_files, 0, 0, 0 },
@@ -78,7 +78,7 @@ To use this patch, run these commands for a successful build:
    {"inplace",          0,  POPT_ARG_NONE,   &inplace, 0, 0, 0 },
    {"append",           0,  POPT_ARG_VAL,    &append_mode, 1, 0, 0 },
    {"del",              0,  POPT_ARG_NONE,   &delete_during, 0, 0, 0 },
-@@ -1161,6 +1171,15 @@ int parse_arguments(int *argc, const cha
+@@ -1187,6 +1197,15 @@ int parse_arguments(int *argc, const cha
        }
  #endif
  
@@ -94,7 +94,7 @@ To use 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");
-@@ -1808,6 +1827,9 @@ void server_options(char **args,int *arg
+@@ -1838,6 +1857,9 @@ void server_options(char **args,int *arg
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -106,7 +106,7 @@ To use this patch, run these commands for a successful build:
  
 --- old/receiver.c
 +++ new/receiver.c
-@@ -43,6 +43,7 @@ extern int cleanup_got_literal;
+@@ -45,6 +45,7 @@ extern int cleanup_got_literal;
  extern int remove_source_files;
  extern int append_mode;
  extern int sparse_files;
@@ -114,7 +114,7 @@ To use this patch, run these commands for a successful build:
  extern int keep_partial;
  extern int checksum_seed;
  extern int inplace;
-@@ -136,6 +137,19 @@ static int receive_data(int f_in, char *
+@@ -138,6 +139,19 @@ static int receive_data(int f_in, char *
        int32 i;
        char *map = NULL;
  
@@ -134,7 +134,7 @@ To use this patch, run these commands for a successful build:
        read_sum_head(f_in, &sum);
  
        if (fd_r >= 0 && size_r > 0) {
-@@ -243,8 +257,18 @@ static int receive_data(int f_in, char *
+@@ -245,8 +259,18 @@ static int receive_data(int f_in, char *
                goto report_write_error;
  
  #ifdef HAVE_FTRUNCATE
@@ -157,7 +157,7 @@ To use this patch, run these commands for a successful build:
        if (do_progress)
 --- old/rsync.h
 +++ new/rsync.h
-@@ -551,6 +551,10 @@ struct idev_node {
+@@ -549,6 +549,10 @@ struct idev_node {
  #define ACLS_NEED_MASK 1
  #endif
  
@@ -170,7 +170,7 @@ To use this patch, run these commands for a successful build:
  union file_extras {
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -333,6 +333,7 @@ to the detailed description below for a 
+@@ -334,6 +334,7 @@ to the detailed description below for a 
   -O, --omit-dir-times        omit directories when preserving times
       --super                 receiver attempts super-user activities
   -S, --sparse                handle sparse files efficiently
@@ -178,7 +178,7 @@ To use this patch, run these commands for a successful build:
   -n, --dry-run               show what would have been transferred
   -W, --whole-file            copy files whole (without rsync algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -914,6 +915,19 @@ NOTE: Don't use this option when the des
+@@ -920,6 +921,19 @@ NOTE: Don't use this option when the des
  filesystem. It doesn't seem to handle seeks over null regions
  correctly and ends up corrupting the files.
  
index 214c0f83d33c72090a4774df63def4cee717aac8..192a3978a6ff1fbfa3bd5a67818033952ed46909 100644 (file)
--- a/slp.diff
+++ b/slp.diff
@@ -23,7 +23,7 @@ and we can't honor that request.
  INSTALLMAN=@INSTALL@
 @@ -36,7 +38,7 @@ OBJS1=flist.o rsync.o generator.o receiv
  OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o \
-       fileio.o batch.o clientname.o chmod.o acls.o
+       fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
  OBJS3=progress.o pipe.o
 -DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
 +DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o $(SLPOBJ)
@@ -142,15 +142,15 @@ and we can't honor that request.
                        int dummy2;
 --- old/options.c
 +++ new/options.c
-@@ -202,6 +202,7 @@ static void print_rsync_version(enum log
-       char const *acls = "no ";
+@@ -205,6 +205,7 @@ static void print_rsync_version(enum log
+       char const *xattrs = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
 +      char const *slp = "no ";
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -228,6 +229,10 @@ static void print_rsync_version(enum log
+@@ -233,6 +234,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -161,14 +161,14 @@ 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-2007 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -238,8 +243,8 @@ static void print_rsync_version(enum log
+@@ -243,8 +248,8 @@ static void print_rsync_version(enum log
                (int)(sizeof (int64) * 8));
        rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
                got_socketpair, hardlinks, links, ipv6, have_inplace);
--      rprintf(f, "    %sappend, %sACLs\n",
--              have_inplace, acls);
-+      rprintf(f, "    %sappend, %sACLs, %sSLP\n",
-+              have_inplace, acls, slp);
+-      rprintf(f, "    %sappend, %sACLs, %sxattrs\n",
+-              have_inplace, acls, xattrs);
++      rprintf(f, "    %sappend, %sACLs, %sxattrs, %sSLP\n",
++              have_inplace, acls, xattrs, slp);
  
  #ifdef MAINTAINER_MODE
        rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());