Disable atimes on macOS.
authorWayne Davison <wayne@opencoder.net>
Sun, 21 Jun 2020 22:14:06 +0000 (15:14 -0700)
committerWayne Davison <wayne@opencoder.net>
Sun, 21 Jun 2020 22:16:56 +0000 (15:16 -0700)
NEWS.md
options.c
testsuite/atimes.test

diff --git a/NEWS.md b/NEWS.md
index 4ff2a446f2c2c4749b4c48ed639556be43b9e166..9fde08301dad3f16f1f52690a7fd707e77f5e667 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -19,7 +19,7 @@ Protocol: 31 (unchanged)
 
  - Fix an issue with the md2man code when building in an external dir.
 
- - Make sure "early exec" gets no stdin.
+ - Disable --atimes on macOS (it apparently doesn't work).
 
 ### ENHANCEMENTS:
 
index c68b43b99657460494a624d2497c486e428fef65..b5aaadeed170e5d24161570366124cafc2f3eeb7 100644 (file)
--- a/options.c
+++ b/options.c
@@ -188,6 +188,10 @@ const char **remote_options = NULL;
 const char *checksum_choice = NULL;
 const char *compress_choice = NULL;
 
+#ifndef __APPLE__ /* Do we need a configure check for this? */
+#define SUPPORT_ATIMES 1
+#endif
+
 int quiet = 0;
 int output_motd = 1;
 int log_before_transfer = 0;
@@ -604,7 +608,10 @@ static void print_capabilities(enum logcode f)
 #endif
                        "IPv6",
 
-               "atimes",
+#ifndef SUPPORT_ATIMES
+               "no "
+#endif
+                       "atimes",
 
                "batchfiles",
 
@@ -1179,6 +1186,9 @@ static void set_refuse_options(void)
                parse_one_refuse_match(0, "log-file*", list_end);
        }
 
+#ifndef SUPPORT_ATIMES
+       parse_one_refuse_match(0, "atimes", list_end);
+#endif
 #ifndef SUPPORT_HARD_LINKS
        parse_one_refuse_match(0, "link-dest", list_end);
 #endif
index bd3f292764969b31b355b8017cf38c0e7da67ee7..6dd581366e49621cd343efe24492a9024c26af1a 100644 (file)
@@ -4,6 +4,8 @@
 
 . "$suitedir/rsync.fns"
 
+$RSYNC --version | grep "[, ] atimes" >/dev/null || test_skipped "Rsync is configured without atimes support"
+
 mkdir "$fromdir"
 
 touch "$fromdir/foo"