Fix patch conflict.
authorWayne Davison <wayne@opencoder.net>
Mon, 21 Sep 2020 22:04:39 +0000 (15:04 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 21 Sep 2020 22:05:52 +0000 (15:05 -0700)
checksum-reading.diff
copy-devices.diff
detect-renamed.diff
fileflags.diff

index 4c06d6a8f1554e367193662b002df4543f3fca92..2d8b36a21b40beca431965b04b9148f7464c8f19 100644 (file)
@@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: e94bad1c156fc3910f24e2b3b71a81b0b0bdeb70
+based-on: 9cd85b849672c93c4b1f534898585f92ec4de30d
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
@@ -679,7 +679,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  --no-motd                suppress daemon-mode MOTD
  --checksum, -c           skip based on checksum, not mod-time & size
 +--sumfiles=MODE          use .rsyncsums to speedup --checksum mode
- --archive, -a            archive mode; equals -rlptgoD (no -H,-A,-X)
+ --archive, -a            archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
  --no-OPTION              turn off an implied OPTION (e.g. --no-D)
  --recursive, -r          recurse into directories
 @@ -698,6 +699,8 @@ your home directory (remove the '=' for that).
@@ -733,7 +733,7 @@ diff --git a/rsync.1.md b/rsync.1.md
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -882,6 +882,10 @@ extern int xattrs_ndx;
+@@ -891,6 +891,10 @@ extern int xattrs_ndx;
  #define F_SUM(f) ((char*)OPT_EXTRA(f, START_BUMP(f) + HLINK_BUMP(f) \
                                    + SUM_EXTRA_CNT - 1))
  
@@ -744,7 +744,7 @@ diff --git a/rsync.h b/rsync.h
  /* Some utility defines: */
  #define F_IS_ACTIVE(f) (f)->basename[0]
  #define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -1094,6 +1098,13 @@ typedef struct {
+@@ -1103,6 +1107,13 @@ typedef struct {
  #define RELNAMECACHE_LEN (offsetof(relnamecache, fname))
  #endif
  
index 313079e018963a8db28c78b94ef7f847c4e884cd..68f7eb524aa891ba2e6ffcd15acdc740d16c06d8 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure                      (optional if already run)
     make
 
-based-on: e94bad1c156fc3910f24e2b3b71a81b0b0bdeb70
+based-on: 9cd85b849672c93c4b1f534898585f92ec4de30d
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -74,7 +74,7 @@ diff --git a/options.c b/options.c
                parse_one_refuse_match(0, "write-devices", list_end);
        }
  
-@@ -2895,6 +2899,9 @@ void server_options(char **args, int *argc_p)
+@@ -2856,6 +2860,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -143,6 +143,6 @@ diff --git a/sender.c b/sender.c
 +              if (IS_DEVICE(st.st_mode) && st.st_size == 0)
 +                      st.st_size = get_device_size(fd, fname);
 +
-               if (st.st_size) {
-                       int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE);
-                       mbuf = map_file(fd, st.st_size, read_size, s->blength);
+               if (append_mode > 0 && st.st_size < F_LENGTH(file)) {
+                       rprintf(FWARNING, "skipped diminished file: %s\n",
+                               full_fname(fname));
index 87134f5904316c09d6e76ffbb859d55d2a4f9912..a961336bb263ddbc5fbaca97d211de3a89f7cf82 100644 (file)
@@ -38,7 +38,7 @@ TODO:
   a file that can't use it, while missing out on giving it to a file
   that could use it.
 
-based-on: e94bad1c156fc3910f24e2b3b71a81b0b0bdeb70
+based-on: 9cd85b849672c93c4b1f534898585f92ec4de30d
 diff --git a/backup.c b/backup.c
 --- a/backup.c
 +++ b/backup.c
@@ -54,7 +54,7 @@ diff --git a/backup.c b/backup.c
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -39,6 +39,7 @@ extern int checksum_seed;
+@@ -40,6 +40,7 @@ extern int checksum_seed;
  extern int basis_dir_cnt;
  extern int prune_empty_dirs;
  extern int protocol_version;
@@ -62,14 +62,14 @@ diff --git a/compat.c b/compat.c
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
-@@ -159,6 +160,7 @@ void set_allow_inc_recurse(void)
+@@ -166,6 +167,7 @@ void set_allow_inc_recurse(void)
                allow_inc_recurse = 0;
        else if (!am_sender
         && (delete_before || delete_after
 +        || detect_renamed
          || delay_updates || prune_empty_dirs))
                allow_inc_recurse = 0;
-       else if (am_server && !local_server
+       else if (am_server && strchr(client_info, 'i') == NULL)
 diff --git a/delete.c b/delete.c
 --- a/delete.c
 +++ b/delete.c
@@ -589,15 +589,15 @@ diff --git a/generator.c b/generator.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -721,7 +721,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
-       trailing_slash = cp && !cp[1];
+@@ -722,7 +722,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
  
        if (mkpath_dest_arg && statret < 0 && (cp || file_total > 1)) {
+               int save_errno = errno;
 -              int ret = make_path(dest_path, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
 +              int ret = make_path(dest_path, ACCESSPERMS, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
                if (ret < 0)
                        goto mkdir_error;
-               if (INFO_GTE(NAME, 1)) {
+               if (ret && INFO_GTE(NAME, 1)) {
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -634,7 +634,7 @@ diff --git a/options.c b/options.c
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -2760,6 +2763,8 @@ void server_options(char **args, int *argc_p)
+@@ -2721,6 +2724,8 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -666,7 +666,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  --compare-dest=DIR       also compare destination files relative to DIR
  --copy-dest=DIR          ... and include copies of unchanged files
  --link-dest=DIR          hardlink to files in DIR when unchanged
-@@ -2247,6 +2248,22 @@ your home directory (remove the '=' for that).
+@@ -2249,6 +2250,22 @@ your home directory (remove the '=' for that).
      fuzzy-match files, so either use `--delete-after` or specify some filename
      exclusions if you need to prevent this.
  
@@ -692,7 +692,7 @@ diff --git a/rsync.1.md b/rsync.1.md
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -272,7 +272,7 @@ enum msgcode {
+@@ -282,7 +282,7 @@ enum msgcode {
  #define NDX_DEL_STATS -3
  #define NDX_FLIST_OFFSET -101
  
@@ -701,7 +701,7 @@ diff --git a/rsync.h b/rsync.h
  #define DEL_NO_UID_WRITE      (1<<0) /* file/dir has our uid w/o write perm */
  #define DEL_RECURSE           (1<<1) /* if dir, delete all contents */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -282,6 +282,7 @@ enum msgcode {
+@@ -292,6 +292,7 @@ enum msgcode {
  #define DEL_FOR_DEVICE                (1<<6) /* making room for a replacement device */
  #define DEL_FOR_SPECIAL       (1<<7) /* making room for a replacement special */
  #define DEL_FOR_BACKUP                (1<<8) /* the delete is for a backup operation */
index 1910857cd620a0c73968a70d7f5f70e3fa10b6dd..8df0cbc28fa0870c4f5db870faff961a65954fc3 100644 (file)
@@ -7,11 +7,11 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: e94bad1c156fc3910f24e2b3b71a81b0b0bdeb70
+based-on: 9cd85b849672c93c4b1f534898585f92ec4de30d
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -39,6 +39,7 @@ extern int checksum_seed;
+@@ -40,6 +40,7 @@ extern int checksum_seed;
  extern int basis_dir_cnt;
  extern int prune_empty_dirs;
  extern int protocol_version;
@@ -19,7 +19,7 @@ diff --git a/compat.c b/compat.c
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
-@@ -46,6 +47,7 @@ extern int preserve_atimes;
+@@ -47,6 +48,7 @@ extern int preserve_atimes;
  extern int preserve_crtimes;
  extern int preserve_acls;
  extern int preserve_xattrs;
@@ -27,7 +27,7 @@ diff --git a/compat.c b/compat.c
  extern int xfer_flags_as_varint;
  extern int need_messages_from_generator;
  extern int delete_mode, delete_before, delete_during, delete_after;
-@@ -77,7 +79,7 @@ int do_negotiated_strings = 0;
+@@ -78,7 +80,7 @@ int do_negotiated_strings = 0;
  int xmit_id0_names = 0;
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -36,7 +36,7 @@ diff --git a/compat.c b/compat.c
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
  int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -566,6 +568,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -572,6 +574,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -45,7 +45,7 @@ diff --git a/compat.c b/compat.c
        if (preserve_acls && !am_sender)
                acls_ndx = ++file_extra_cnt;
        if (preserve_xattrs)
-@@ -726,6 +730,10 @@ void setup_protocol(int f_out,int f_in)
+@@ -732,6 +736,10 @@ void setup_protocol(int f_out,int f_in)
                        fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n");
                        exit_cleanup(RERR_PROTOCOL);
                }
@@ -339,7 +339,7 @@ diff --git a/main.c b/main.c
  extern int msgs2stderr;
  extern int module_id;
  extern int read_only;
-@@ -970,6 +974,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -973,6 +977,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
         * points to an identical file won't be replaced by the referent. */
        copy_links = copy_dirlinks = copy_unsafe_links = 0;
  
@@ -418,7 +418,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++) {
-@@ -2646,6 +2664,9 @@ void server_options(char **args, int *argc_p)
+@@ -2607,6 +2625,9 @@ void server_options(char **args, int *argc_p)
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -428,7 +428,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;
-@@ -2754,6 +2775,16 @@ void server_options(char **args, int *argc_p)
+@@ -2715,6 +2736,16 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--delete-excluded";
                if (force_delete)
                        args[ac++] = "--force";
@@ -468,16 +468,15 @@ 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
-@@ -717,6 +721,8 @@ your home directory (remove the '=' for that).
+@@ -714,6 +718,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`).
++    It also does **not** imply `--fileflags`.
  
-     Note that `-a` **does not preserve hardlinks**, because finding
-     multiply-linked files is expensive.  You must separately specify `-H`.
-+    Note also that for backward compatibility, `-a` currently does **not**
-+    imply the `--fileflags` option.
- 0.  `--no-OPTION`
-@@ -1076,7 +1082,7 @@ your home directory (remove the '=' for that).
+     The only exception to the above equivalence is when
+     `--files-from` is specified, in which case `-r` is not implied.
+@@ -1078,7 +1083,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
@@ -486,7 +485,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  
      See also `--keep-dirlinks` for an analogous option for the receiving side.
  
-@@ -1262,6 +1268,29 @@ your home directory (remove the '=' for that).
+@@ -1264,6 +1269,29 @@ your home directory (remove the '=' for that).
      those used by `--fake-super`) unless you repeat the option (e.g. `-XX`).
      This "copy all xattrs" mode cannot be used with `--fake-super`.
  
@@ -516,7 +515,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
-@@ -1729,7 +1758,7 @@ your home directory (remove the '=' for that).
+@@ -1731,7 +1759,7 @@ your home directory (remove the '=' for that).
      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 directory, it will only be
@@ -525,7 +524,7 @@ diff --git a/rsync.1.md b/rsync.1.md
      that, this option is independent of any other type of delete processing.
  
      The missing source files are represented by special file-list entries which
-@@ -1740,15 +1769,16 @@ your home directory (remove the '=' for that).
+@@ -1742,15 +1770,16 @@ your home directory (remove the '=' for that).
      Tells `--delete` to go ahead and delete files even when there are I/O
      errors.
  
@@ -546,7 +545,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  
  0.  `--max-delete=NUM`
  
-@@ -2700,7 +2730,7 @@ your home directory (remove the '=' for that).
+@@ -2702,7 +2731,7 @@ your home directory (remove the '=' for that).
      output of other verbose messages).
  
      The "%i" escape has a cryptic output that is 11 letters long.  The general
@@ -677,7 +676,7 @@ diff --git a/rsync.h b/rsync.h
  #define XMIT_CRTIME_EQ_MTIME (1<<17)  /* any protocol - restricted by command-line option */
  
  /* These flags are used in the live flist data. */
-@@ -182,6 +182,7 @@
+@@ -192,6 +192,7 @@
  #define ATTRS_SKIP_MTIME      (1<<1)
  #define ATTRS_ACCURATE_TIME   (1<<2)
  #define ATTRS_SKIP_ATIME      (1<<3)
@@ -685,7 +684,7 @@ diff --git a/rsync.h b/rsync.h
  #define ATTRS_SKIP_CRTIME     (1<<5)
  
  #define MSG_FLUSH     2
-@@ -210,6 +211,7 @@
+@@ -220,6 +221,7 @@
  #define ITEM_REPORT_GROUP (1<<6)
  #define ITEM_REPORT_ACL (1<<7)
  #define ITEM_REPORT_XATTR (1<<8)
@@ -693,7 +692,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_REPORT_CRTIME (1<<10)
  #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
  #define ITEM_XNAME_FOLLOWS (1<<12)
-@@ -578,6 +580,31 @@ typedef unsigned int size_t;
+@@ -587,6 +589,31 @@ typedef unsigned int size_t;
  #define SUPPORT_CRTIMES 1
  #endif
  
@@ -725,7 +724,7 @@ diff --git a/rsync.h b/rsync.h
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -804,6 +831,7 @@ extern int pathname_ndx;
+@@ -813,6 +840,7 @@ extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -733,7 +732,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -858,6 +886,11 @@ extern int xattrs_ndx;
+@@ -867,6 +895,11 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
@@ -974,8 +973,8 @@ diff --git a/t_stub.c b/t_stub.c
 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
 --- a/testsuite/rsync.fns
 +++ b/testsuite/rsync.fns
-@@ -23,9 +23,9 @@ todir="$tmpdir/to"
chkdir="$tmpdir/chk"
+@@ -26,9 +26,9 @@ chkfile="$scratchdir/rsync.chk"
outfile="$scratchdir/rsync.out"
  
  # For itemized output:
 -all_plus='+++++++++'
@@ -990,7 +989,7 @@ diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
 diff --git a/usage.c b/usage.c
 --- a/usage.c
 +++ b/usage.c
-@@ -131,6 +131,11 @@ static void print_info_flags(enum logcode f)
+@@ -137,6 +137,11 @@ static void print_info_flags(enum logcode f)
  #endif
                        "crtimes",