Fix patch conflicts.
authorWayne Davison <wayne@opencoder.net>
Sun, 29 Nov 2020 17:58:44 +0000 (09:58 -0800)
committerWayne Davison <wayne@opencoder.net>
Sun, 29 Nov 2020 18:01:48 +0000 (10:01 -0800)
db.diff
fileflags.diff

diff --git a/db.diff b/db.diff
index 84c11f8689f30b6bbf48e8e94e8b4ab40d465bf9..0a7597eaaaf9e325de91ba9a473377510a2c2389 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -21,7 +21,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: d2a97a7ab492e0d0548708251309e077e6aa8c8b
+based-on: 9dd62525f3b98d692e031f22c02be8f775966503
 diff --git a/.gitignore b/.gitignore
 --- a/.gitignore
 +++ b/.gitignore
@@ -219,15 +219,15 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/configure.ac b/configure.ac
 --- a/configure.ac
 +++ b/configure.ac
-@@ -494,6 +494,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
-     unistd.h utime.h grp.h compat.h sys/param.h ctype.h sys/wait.h \
-     sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h \
-     sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
+@@ -10,6 +10,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
+     unistd.h utime.h compat.h sys/param.h ctype.h sys/wait.h sys/stat.h \
+     sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h grp.h \
+     sys/un.h sys/attr.h arpa/inet.h arpa/nameser.h locale.h sys/types.h \
 +    mysql/mysql.h sqlite3.h \
-     netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
+     netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h mcheck.h \
      sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h dl.h \
      popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \
-@@ -1369,6 +1370,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1467,6 +1468,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
      fi
  fi
  
@@ -2328,7 +2328,7 @@ diff --git a/generator.c b/generator.c
  extern int append_mode;
  extern int make_backups;
  extern int csum_length;
-@@ -623,6 +624,8 @@ int quick_check_ok(enum filetype ftype, const char *fn, struct file_struct *file
+@@ -624,6 +625,8 @@ int quick_check_ok(enum filetype ftype, const char *fn, struct file_struct *file
                if (always_checksum > 0) {
                        char sum[MAX_DIGEST_LEN];
                        file_checksum(fn, st, sum);
@@ -2337,7 +2337,7 @@ diff --git a/generator.c b/generator.c
                        return memcmp(sum, F_SUM(file), flist_csum_len) == 0;
                }
  
-@@ -2262,6 +2265,13 @@ void generate_files(int f_out, const char *local_name)
+@@ -2265,6 +2268,13 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
@@ -2351,7 +2351,7 @@ diff --git a/generator.c b/generator.c
        dflt_perms = (ACCESSPERMS & ~orig_umask);
  
        do {
-@@ -2387,6 +2397,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2390,6 +2400,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
index 8df0cbc28fa0870c4f5db870faff961a65954fc3..3116b26e72bd7b18120e48d5ab334002962eeeaf 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: 9cd85b849672c93c4b1f534898585f92ec4de30d
+based-on: 9dd62525f3b98d692e031f22c02be8f775966503
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
@@ -216,7 +216,7 @@ diff --git a/generator.c b/generator.c
  extern int delete_mode;
  extern int delete_before;
  extern int delete_during;
-@@ -487,6 +489,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -484,6 +486,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
                        return 0;
                if (perms_differ(file, sxp))
                        return 0;
@@ -227,7 +227,7 @@ diff --git a/generator.c b/generator.c
                if (ownership_differs(file, sxp))
                        return 0;
  #ifdef SUPPORT_ACLS
-@@ -548,6 +554,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -545,6 +551,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                        iflags |= ITEM_REPORT_OWNER;
                if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
                        iflags |= ITEM_REPORT_GROUP;
@@ -239,7 +239,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
                        if (!ACL_READY(*sxp))
-@@ -1442,6 +1453,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1450,6 +1461,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                if (!preserve_perms) { /* See comment in non-dir code below. */
                        file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, statret == 0);
                }
@@ -250,7 +250,7 @@ diff --git a/generator.c b/generator.c
                if (statret != 0 && basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, itemizing, code);
                        if (j == -2) {
-@@ -1484,10 +1499,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1492,10 +1507,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                 * readable and writable permissions during the time we are
                 * putting files within them.  This is then restored to the
                 * former permissions after the transfer is done. */
@@ -267,8 +267,8 @@ diff --git a/generator.c b/generator.c
                                rsyserr(FERROR_XFER, errno,
                                        "failed to modify permissions on %s",
                                        full_fname(fname));
-@@ -1522,6 +1542,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
-               int exists = statret == 0 && !S_ISDIR(sx.st.st_mode);
+@@ -1530,6 +1550,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+               int exists = statret == 0 && stype != FT_DIR;
                file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, exists);
        }
 +#ifdef SUPPORT_FORCE_CHANGE
@@ -278,7 +278,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)
+@@ -2099,17 +2123,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
                if (fix_dir_perms)
@@ -468,7 +468,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
-@@ -714,6 +718,7 @@ your home directory (remove the '=' for that).
+@@ -718,6 +722,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`).
@@ -476,7 +476,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  
      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).
+@@ -1082,7 +1087,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
@@ -485,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.
  
-@@ -1264,6 +1269,29 @@ your home directory (remove the '=' for that).
+@@ -1268,6 +1273,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`.
  
@@ -515,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
-@@ -1731,7 +1759,7 @@ your home directory (remove the '=' for that).
+@@ -1741,7 +1769,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
@@ -524,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
-@@ -1742,15 +1770,16 @@ your home directory (remove the '=' for that).
+@@ -1752,15 +1780,16 @@ your home directory (remove the '=' for that).
      Tells `--delete` to go ahead and delete files even when there are I/O
      errors.
  
@@ -545,7 +545,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  
  0.  `--max-delete=NUM`
  
-@@ -2702,7 +2731,7 @@ your home directory (remove the '=' for that).
+@@ -2712,7 +2741,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
@@ -692,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)
-@@ -587,6 +589,31 @@ typedef unsigned int size_t;
+@@ -591,6 +593,31 @@ typedef unsigned int size_t;
  #define SUPPORT_CRTIMES 1
  #endif
  
@@ -724,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. */
-@@ -813,6 +840,7 @@ extern int pathname_ndx;
+@@ -817,6 +844,7 @@ extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -732,7 +732,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -867,6 +895,11 @@ extern int xattrs_ndx;
+@@ -871,6 +899,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
@@ -858,12 +858,12 @@ diff --git a/syscall.c b/syscall.c
 -int do_chmod(const char *path, mode_t mode)
 +int do_chmod(const char *path, mode_t mode, UNUSED(uint32 fileflags))
  {
+       static int switch_step = 0;
        int code;
-       if (dry_run) return 0;
-@@ -248,17 +301,72 @@ int do_chmod(const char *path, mode_t mode)
-       } else
-               code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
- #endif /* !HAVE_LCHMOD */
+@@ -256,17 +309,72 @@ int do_chmod(const char *path, mode_t mode)
+                       code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
+               break;
+       }
 +#ifdef SUPPORT_FORCE_CHANGE
 +      if (code < 0 && force_change && errno == EPERM && !S_ISLNK(mode)) {
 +              if (fileflags == NO_FFLAGS) {
@@ -1082,7 +1082,7 @@ diff --git a/util.c b/util.c
 diff --git a/xattrs.c b/xattrs.c
 --- a/xattrs.c
 +++ b/xattrs.c
-@@ -1202,7 +1202,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1203,7 +1203,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
        mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
             | (S_ISDIR(fst.st_mode) ? 0700 : 0600);
        if (fst.st_mode != mode)