[Bug 7249] Add an option to use O_NOATIME

2020-04-23 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=7249

--- Comment #17 from Wayne Davison  ---
I just tweaked the option name to --open-noatime, which I think is clearer.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-04-23 Thread Rsync CVS commit messages
The branch, master has been updated
   via  87257f86 Change --set-notime to --open-noatime.
  from  b9367410 Added --atimes and --set-noatime options.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit 87257f869ca1c49df05f6d587577d195ebb8ce28
Author: Wayne Davison 
Date:   Thu Apr 23 14:27:44 2020 -0700

Change --set-notime to --open-noatime.

---

Summary of changes:
 NEWS|  2 +-
 options.c   | 14 +++---
 rsync.yo|  8 
 syscall.c   |  4 ++--
 t_stub.c|  2 +-
 tls.c   |  2 +-
 trimslash.c |  2 +-
 7 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS b/NEWS
index e3323c61..cd9a1cfb 100644
--- a/NEWS
+++ b/NEWS
@@ -32,7 +32,7 @@ Changes since 3.1.3:
 
 - Improved the --atimes patch and promoted it to be in the release.
 
-- Added --set-noatime option to open files using O_NOATIME.
+- Added --open-noatime option to open files using O_NOATIME.
 
 - Improved the --write-devices patch and promoted it to be in the release.
 
diff --git a/options.c b/options.c
index 95ec6da0..2319b14d 100644
--- a/options.c
+++ b/options.c
@@ -65,7 +65,7 @@ int preserve_gid = 0;
 int preserve_times = 0;
 int preserve_atimes = 0;
 int update_only = 0;
-int set_noatime = 0;
+int open_noatime = 0;
 int cvs_exclude = 0;
 int dry_run = 0;
 int do_xfers = 1;
@@ -714,7 +714,7 @@ void usage(enum logcode F)
   rprintf(F," -D  same as --devices --specials\n");
   rprintf(F," -t, --times preserve modification times\n");
   rprintf(F," -U, --atimespreserve access (last-used) 
times\n");
-  rprintf(F," --set-noatime   avoid changing the atime on accessed 
files\n");
+  rprintf(F," --open-noatime  avoid changing the atime on opened 
files\n");
   rprintf(F," -O, --omit-dir-timesomit directories from --times\n");
   rprintf(F," -J, --omit-link-times   omit symlinks from --times\n");
   rprintf(F," --super receiver attempts super-user 
activities\n");
@@ -879,8 +879,8 @@ static struct poptOption long_options[] = {
   {"atimes",  'U', POPT_ARG_NONE,   0, 'U', 0, 0 },
   {"no-atimes",0,  POPT_ARG_VAL,_atimes, 0, 0, 0 },
   {"no-U", 0,  POPT_ARG_VAL,_atimes, 0, 0, 0 },
-  {"set-noatime",  0,  POPT_ARG_VAL,_noatime, 1, 0, 0 },
-  {"no-set-noatime",   0,  POPT_ARG_VAL,_noatime, 0, 0, 0 },
+  {"open-noatime", 0,  POPT_ARG_VAL,_noatime, 1, 0, 0 },
+  {"no-open-noatime",  0,  POPT_ARG_VAL,_noatime, 0, 0, 0 },
   {"omit-dir-times",  'O', POPT_ARG_VAL,_dir_times, 1, 0, 0 },
   {"no-omit-dir-times",0,  POPT_ARG_VAL,_dir_times, 0, 0, 0 },
   {"no-O", 0,  POPT_ARG_VAL,_dir_times, 0, 0, 0 },
@@ -1554,7 +1554,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
 
case 'U':
if (++preserve_atimes > 1)
-   set_noatime = 1;
+   open_noatime = 1;
break;
 
case 'v':
@@ -2850,8 +2850,8 @@ void server_options(char **args, int *argc_p)
if (preallocate_files && am_sender)
args[ac++] = "--preallocate";
 
-   if (set_noatime && preserve_atimes <= 1)
-   args[ac++] = "--set-noatime";
+   if (open_noatime && preserve_atimes <= 1)
+   args[ac++] = "--open-noatime";
 
if (ac > MAX_SERVER_ARGS) { /* Not possible... */
rprintf(FERROR, "argc overflow in server_options().\n");
diff --git a/rsync.yo b/rsync.yo
index 443c37da..1fd78b63 100644
--- a/rsync.yo
+++ b/rsync.yo
@@ -379,7 +379,7 @@ to the detailed description below for a complete 
description.  verb(
  -D  same as --devices --specials
  -t, --times preserve modification times
  -U, --atimespreserve access (use) times
- --set-noatime   avoid changing the atime on accessed files
+ --open-noatime  avoid changing the atime on opened files
  -O, --omit-dir-timesomit directories from --times
  -J, --omit-link-times   omit symlinks from --times
  --super receiver attempts super-user activities
@@ -1245,16 +1245,16 @@ if the files haven't actually changed, you're much 
better off using bf(-t)).
 dit(bf(-U, --atimes)) This tells rsync to set the access (use) times of the
 destination files to the same value as the source files.
 
-If repeated, it also sets the bf(--set-noatime) option, which can help you
+If repeated, it also sets the bf(--open-noatime) option, which can help you
 to make the sending and receiving systems have the same access times on the
 transferred files without needing to run rsync an extra time after a file is
 transferred.
 
 

[Bug 7249] Add an option to use O_NOATIME

2020-04-23 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=7249

Wayne Davison  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #16 from Wayne Davison  ---
The --set-noatime option was just added to the main git (along with the
--atimes option for copying access times).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-04-23 Thread Rsync CVS commit messages
The branch, master has been updated
   via  b9367410 Added --atimes and --set-noatime options.
   via  2b2a3c87 Mention more changes in the NEWS.
  from  6e962ac5 Eliminate .in for rsync-ssl.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit b936741032fbfcd41b74ae4ca76ea718df25c64b
Author: Wayne Davison 
Date:   Thu Apr 23 13:17:41 2020 -0700

Added --atimes and --set-noatime options.

commit 2b2a3c87b6390ffef87311eb6551117a312d4f61
Author: Wayne Davison 
Date:   Thu Apr 23 13:13:35 2020 -0700

Mention more changes in the NEWS.

---

Summary of changes:
 NEWS  | 59 +--
 compat.c  | 16 ---
 flist.c   | 27 --
 generator.c   | 53 ++-
 log.c |  3 +-
 options.c | 22 +++
 rsync.c   | 53 ---
 rsync.h   | 43 +++--
 rsync.yo  | 26 +-
 syscall.c | 66 
 t_stub.c  |  1 +
 testsuite/atimes.test | 17 
 testsuite/daemon.test | 11 +++-
 testsuite/rsync.fns   | 17 +++-
 tls.c | 76 +++
 trimslash.c   |  1 +
 util.c| 35 +++-
 17 files changed, 416 insertions(+), 110 deletions(-)
 create mode 100644 testsuite/atimes.test


Changeset truncated at 500 lines:

diff --git a/NEWS b/NEWS
index de493a05..e3323c61 100644
--- a/NEWS
+++ b/NEWS
@@ -7,12 +7,67 @@ Changes since 3.1.3:
 - Avoid a potential out-of-bounds read in daemon mode if argc can be made
   to become 0.
 
+- Fix the default list of skip-compress files for non-daemon transfers.
+
 - Fix xattr filter rules losing an 'x' attribute in a non-local transfer.
 
-- Fix a compiler error/warning about shifting a negative value (in the zlib
-  code).
+- Avoid an error when a check for a potential fuzzy file happens to
+  reference a directory.
+
+- Make the atomic-rsync helper script have a more consistent error-exit.
+
+- Make sure that a signal handler calls _exit() instead of exit().
+
+- Various zlib fixes, including security fixes for CVE-2016-9843,
+  CVE-2016-9842, CVE-2016-9841, and CVE-2016-9840.
+
+- Fixed an issue with --remove-source-files not removing a source symlink
+  when combined with --copy-links.
+
+- Fixed the block-size validation logic when dealing with older protocols.
+
+- Some rrsync fixes and enhancements to handle the latest options.
 
   ENHANCEMENTS:
 
+- Improved the --atimes patch and promoted it to be in the release.
+
+- Added --set-noatime option to open files using O_NOATIME.
+
+- Improved the --write-devices patch and promoted it to be in the release.
+
+- Added openssl support to the rsync-ssl script via its renamed helper
+  script, rsync-ssl-rsh.  Install both bash scripts by default now
+  (removing the install-ssl-client make target).  Rsync was also enhanced
+  to set the RSYNC_PORT environment variable when running a daemon-over-rsh
+  script. Its value is the user-specified port number (set via --port or an
+  rsync:// URL) or 0 if the user didn't override the port.
+
+- Added a status output based on a signal (via both SIGINFO & SIGVTALRM).
+
+- Added a --copy-as=USER option to give some extra security to root-run
+  rsync commands into/from untrusted directories (such as backups and
+  restores).
+
 - Added support for RSYNC_SHELL & RSYNC_NO_XFER_EXEC environment variables
   that affect the pre-xfer exec and post-xfer exec rsync daemon options.
+
+- Fixed a crash in the --iconv code.
+
+- Fixed a problem with the --link-dest|--copy-dest code when --xattrs was
+  specified along with multiple alternate-destination directories (it could
+  possibly choose a bad file match while trying to find a better xattr
+  match).
+
+- Various manpage improvements.
+
+  DEVELOPER RELATED:
+
+- Silenced some annoying warnings about major()|minor() due to the autoconf
+  include-file check not being smart enough.
+
+- Improved some configure checks to work better with strict C99 compilers.
+
+- Some perl scripts were recoded into awk and python3.
+
+- Some code typos were fixed (as pointed out by a Fossies run).
diff --git a/compat.c b/compat.c
index 17113ae4..6298b904 100644
--- a/compat.c
+++ b/compat.c
@@ -48,6 +48,7 @@ extern int protocol_version;
 extern int protect_args;
 extern int preserve_uid;
 extern int preserve_gid;
+extern int preserve_atimes;
 extern int preserve_acls;
 extern int preserve_xattrs;
 extern int