The patches for 3.2.4pre4.
[rsync-patches.git] / fileflags.diff
index f2ccc59342366aff4dce330b2c5f0b13fe34680e..bad5060c2f8f52fa204b9993e5631bb09e530c61 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 55b2a06812e39f15f52e92b979600cb82be210cb
+based-on: deb26c7cfcdfd471fd454747a6946d3a3d0d089d
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
@@ -104,7 +104,7 @@ diff --git a/delete.c b/delete.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -52,6 +52,7 @@ extern int preserve_links;
+@@ -53,6 +53,7 @@ extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
  extern int preserve_specials;
@@ -112,7 +112,7 @@ diff --git a/flist.c b/flist.c
  extern int delete_during;
  extern int missing_args;
  extern int eol_nulls;
-@@ -385,6 +386,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -386,6 +387,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
        static time_t crtime;
  #endif
        static mode_t mode;
@@ -122,7 +122,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -428,6 +432,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -429,6 +433,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_MODE;
        else
                mode = file->mode;
@@ -137,7 +137,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_devices && IS_DEVICE(mode)) {
                if (protocol_version < 28) {
-@@ -589,6 +601,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -590,6 +602,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  #endif
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -148,7 +148,7 @@ diff --git a/flist.c b/flist.c
        if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME))
                write_varlong(f, atime, 4);
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
-@@ -683,6 +699,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -684,6 +700,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
        static time_t crtime;
  #endif
        static mode_t mode;
@@ -158,7 +158,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -799,6 +818,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -801,6 +820,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
  #ifdef SUPPORT_CRTIMES
                        if (crtimes_ndx)
                                crtime = F_CRTIME(first);
@@ -169,7 +169,7 @@ diff --git a/flist.c b/flist.c
  #endif
                        if (preserve_uid)
                                uid = F_OWNER(first);
-@@ -871,6 +894,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -874,6 +897,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
  
        if (chmod_modes && !S_ISLNK(mode) && mode)
                mode = tweak_mode(mode, chmod_modes);
@@ -180,7 +180,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -1029,6 +1056,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1042,6 +1069,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
        }
  #endif
        file->mode = mode;
@@ -191,7 +191,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid) {
-@@ -1430,6 +1461,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1455,6 +1486,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        }
  #endif
        file->mode = st.st_mode;
@@ -205,7 +205,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -43,10 +43,12 @@ extern int write_devices;
+@@ -43,10 +43,12 @@ extern int preserve_devices;
  extern int preserve_specials;
  extern int preserve_hard_links;
  extern int preserve_executability;
@@ -280,7 +280,7 @@ diff --git a/generator.c b/generator.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2102,17 +2126,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2104,17 +2128,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
                if (fix_dir_perms)
@@ -367,7 +367,7 @@ diff --git a/main.c b/main.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -53,6 +53,7 @@ int preserve_hard_links = 0;
+@@ -54,6 +54,7 @@ int preserve_hard_links = 0;
  int preserve_acls = 0;
  int preserve_xattrs = 0;
  int preserve_perms = 0;
@@ -375,7 +375,7 @@ diff --git a/options.c b/options.c
  int preserve_executability = 0;
  int preserve_devices = 0;
  int preserve_specials = 0;
-@@ -94,6 +95,7 @@ int msgs2stderr = 2; /* Default: send errors to stderr for local & remote-shell
+@@ -95,6 +96,7 @@ int msgs2stderr = 2; /* Default: send errors to stderr for local & remote-shell
  int saw_stderr_opt = 0;
  int allow_8bit_chars = 0;
  int force_delete = 0;
@@ -383,7 +383,7 @@ diff --git a/options.c b/options.c
  int io_timeout = 0;
  int prune_empty_dirs = 0;
  int use_qsort = 0;
-@@ -618,6 +620,8 @@ static struct poptOption long_options[] = {
+@@ -619,6 +621,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 },
@@ -392,7 +392,7 @@ diff --git a/options.c b/options.c
    {"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 },
-@@ -715,6 +719,12 @@ static struct poptOption long_options[] = {
+@@ -717,6 +721,12 @@ static struct poptOption long_options[] = {
    {"remove-source-files",0,POPT_ARG_VAL,    &remove_source_files, 1, 0, 0 },
    {"force",            0,  POPT_ARG_VAL,    &force_delete, 1, 0, 0 },
    {"no-force",         0,  POPT_ARG_VAL,    &force_delete, 0, 0, 0 },
@@ -405,7 +405,7 @@ diff --git a/options.c b/options.c
    {"ignore-errors",    0,  POPT_ARG_VAL,    &ignore_errors, 1, 0, 0 },
    {"no-ignore-errors", 0,  POPT_ARG_VAL,    &ignore_errors, 0, 0, 0 },
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
-@@ -1005,6 +1015,14 @@ static void set_refuse_options(void)
+@@ -1009,6 +1019,14 @@ static void set_refuse_options(void)
  #ifndef SUPPORT_CRTIMES
        parse_one_refuse_match(0, "crtimes", list_end);
  #endif
@@ -420,7 +420,7 @@ diff --git a/options.c b/options.c
  
        /* Now we use the descrip values to actually mark the options for refusal. */
        for (op = long_options; op != list_end; op++) {
-@@ -2685,6 +2703,9 @@ void server_options(char **args, int *argc_p)
+@@ -2689,6 +2707,9 @@ void server_options(char **args, int *argc_p)
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -430,7 +430,7 @@ diff --git a/options.c b/options.c
        if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
                if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
                        goto oom;
-@@ -2780,6 +2801,16 @@ void server_options(char **args, int *argc_p)
+@@ -2784,6 +2805,16 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--delete-excluded";
                if (force_delete)
                        args[ac++] = "--force";
@@ -450,7 +450,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.1.md b/rsync.1.md
 --- a/rsync.1.md
 +++ b/rsync.1.md
-@@ -366,6 +366,7 @@ has its own detailed description later in this man page.
+@@ -366,6 +366,7 @@ has its own detailed description later in this manpage.
  --keep-dirlinks, -K      treat symlinked dir on receiver as dir
  --hard-links, -H         preserve hard links
  --perms, -p              preserve permissions
@@ -458,7 +458,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  --executability, -E      preserve executability
  --chmod=CHMOD            affect file and/or directory permissions
  --acls, -A               preserve ACLs (implies --perms)
-@@ -406,7 +407,10 @@ has its own detailed description later in this man page.
+@@ -407,7 +408,10 @@ has its own detailed description later in this manpage.
  --ignore-missing-args    ignore missing source args without error
  --delete-missing-args    delete missing source args from destination
  --ignore-errors          delete even if there are I/O errors
@@ -470,7 +470,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  --max-delete=NUM         don't delete more than NUM files
  --max-size=SIZE          don't transfer any file larger than SIZE
  --min-size=SIZE          don't transfer any file smaller than SIZE
-@@ -738,6 +742,7 @@ your home directory (remove the '=' for that).
+@@ -739,6 +743,7 @@ your home directory (remove the '=' for that).
      recursion and want to preserve almost everything.  Be aware that it does
      **not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
      crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
@@ -478,7 +478,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  
      The only exception to the above equivalence is when [`--files-from`](#opt)
      is specified, in which case [`-r`](#opt) is not implied.
-@@ -1198,7 +1203,7 @@ your home directory (remove the '=' for that).
+@@ -1199,7 +1204,7 @@ your home directory (remove the '=' for that).
      Without this option, if the sending side has replaced a directory with a
      symlink to a directory, the receiving side will delete anything that is in
      the way of the new symlink, including a directory hierarchy (as long as
@@ -487,7 +487,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  
      See also [`--keep-dirlinks`](#opt) for an analogous option for the
      receiving side.
-@@ -1393,6 +1398,37 @@ your home directory (remove the '=' for that).
+@@ -1394,6 +1399,37 @@ your home directory (remove the '=' for that).
      those used by [`--fake-super`](#opt)) unless you repeat the option (e.g. `-XX`).
      This "copy all xattrs" mode cannot be used with [`--fake-super`](#opt).
  
@@ -525,7 +525,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  0.  `--chmod=CHMOD`
  
      This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1888,8 +1924,8 @@ your home directory (remove the '=' for that).
+@@ -1897,8 +1933,8 @@ your home directory (remove the '=' for that).
      [`--ignore-missing-args`](#opt) option a step farther: each missing arg
      will become a deletion request of the corresponding destination file on the
      receiving side (should it exist).  If the destination file is a non-empty
@@ -536,7 +536,7 @@ diff --git a/rsync.1.md b/rsync.1.md
      independent of any other type of delete processing.
  
      The missing source files are represented by special file-list entries which
-@@ -1900,14 +1936,14 @@ your home directory (remove the '=' for that).
+@@ -1909,14 +1945,14 @@ your home directory (remove the '=' for that).
      Tells [`--delete`](#opt) to go ahead and delete files even when there are
      I/O errors.
  
@@ -554,7 +554,7 @@ diff --git a/rsync.1.md b/rsync.1.md
      [`--recursive`](#opt) option was also enabled.
  
  0.  `--max-delete=NUM`
-@@ -2904,7 +2940,7 @@ your home directory (remove the '=' for that).
+@@ -2913,7 +2949,7 @@ your home directory (remove the '=' for that).
      also turns on the output of other verbose messages).
  
      The "%i" escape has a cryptic output that is 11 letters long.  The general