From: Wayne Davison Date: Sun, 21 Jun 2020 22:14:06 +0000 (-0700) Subject: Disable atimes on macOS. X-Git-Tag: v3.2.1pre1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b439c1fc8f49605f9a20e889a5c545d994e8aed;p=thirdparty%2Frsync.git Disable atimes on macOS. --- diff --git a/NEWS.md b/NEWS.md index 4ff2a446..9fde0830 100644 --- 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: diff --git a/options.c b/options.c index c68b43b9..b5aaadee 100644 --- 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 diff --git a/testsuite/atimes.test b/testsuite/atimes.test index bd3f2927..6dd58136 100644 --- a/testsuite/atimes.test +++ b/testsuite/atimes.test @@ -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"