[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Wed Nov 3 16:36:45 UTC 2021


The branch, master has been updated
       via  e4669b81 Add the --info=NONREG setting.
       via  1b9308b7 More NEWS changes.
      from  80c64dc3 Fix the ability to read the user's numeric locale.

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


- Log -----------------------------------------------------------------
commit e4669b81ae0b1e23c4e122022d2507bccc2df5f9
Author: Wayne Davison <wayne at opencoder.net>
Date:   Wed Nov 3 09:35:50 2021 -0700

    Add the --info=NONREG setting.

commit 1b9308b727f3b7b6a254ef6c2359f95f0907ff5e
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sat Oct 30 15:58:01 2021 -0700

    More NEWS changes.

-----------------------------------------------------------------------

Summary of changes:
 NEWS.md     | 39 ++++++++++++++++++++++++++++++++++-----
 backup.c    |  3 ++-
 generator.c |  8 +++++---
 options.c   | 13 +++++++------
 rsync.1.md  | 24 +++++++++++++++++++-----
 rsync.h     |  3 ++-
 6 files changed, 69 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index cfcad9f4..9f9433d2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,6 +4,30 @@
 
 ## Changes in this version:
 
+### OUTPUT CHANGES:
+
+ - A long-standing bug was preventing rsync from figuring out the current
+   locale's decimal point character, which made rsync always output numbers
+   using the "C" locale.  Since this is now fixed in 3.2.4, a script that
+   parses rsync's decimal numbers (e.g. from the verbose footer) should be sure
+   to setup the environment in a way that the output continues to be in the C
+   locale.  For instance, one of the following should work fine:
+
+   ```shell
+       export LC_ALL=C.UTF-8
+   ```
+
+   or maybe:
+
+   ```shell
+       if [ "${LC_ALL:-}" ]; then
+           export LANG="$LC_ALL"
+           export LC_CTYPE="$LC_ALL"
+           unset LC_ALL
+       fi
+       export LC_NUMERIC=C.UTF-8
+   ```
+
 ### BUG FIXES:
 
  - Fixed a bug with `--inplace` + `--sparse` where the destination file could
@@ -49,7 +73,7 @@
  - Added the `--fsync` option (promoted from the patches repo).
 
  - Reduced memory usage for an incremental transfer that has a bunch of small
-   diretories.
+   directories.
 
  - The rsync daemon can now handle a client address with an implied "%scope"
    suffix.
@@ -66,6 +90,11 @@
  - When `--chown`, `--usermap`, or `--groupmap` is used, rsync now implies
    the appropriate `--owner` and/or `--group` option.
 
+ - Added the `--info=NONREG` setting to control if rsync should warn about
+   non-regular files in the transfer.  This is enabled by default (keeping the
+   behavior the same as before), so specifying `--info=nonreg0` can be used to
+   turn the warnings off.
+
  - More ASM optimizations from Shark64.
 
  - Make rrsync handle the latest options.
@@ -84,7 +113,7 @@
 
  - Improved the IPv6 determination in configure.
 
- - Made SIMD & ASM configure default to "no" on non-linux hosts due to various
+ - Made SIMD & ASM configure default to "no" on non-Linux hosts due to various
    reports of problems on NetBSD & macOS hosts.  These tests were also tweaked
    to support a host_cpu of amd64 in addition to x86_64.
 
@@ -186,7 +215,7 @@
    `hosts deny` daemon parameters.  This is a finalized version of the
    netgroup-auth patch from the patches repo.
 
- - Rsync can now hard-link symlinks on FreeBSD due to it making ues of the
+ - Rsync can now hard-link symlinks on FreeBSD due to it making use of the
    linkat() function when it is available.
 
  - Output file+line info on out-of-memory & overflow errors while also avoiding
@@ -866,7 +895,7 @@
  - Fixed a bug in the iconv code when EINVAL or EILSEQ is returned with a full
    output buffer.
 
- - Fixed some rare bugs in `--iconv` processing that might cause a multibyte
+ - Fixed some rare bugs in `--iconv` processing that might cause a multi-byte
    character to get translated incorrectly.
 
  - Fixed a bogus `vanished file` error if some files were specified with `./`
@@ -2377,7 +2406,7 @@
    option, below.
 
  - The way rsync escapes unreadable characters has changed. First, rsync now
-   has support for recognizing valid multibyte character sequences in your
+   has support for recognizing valid multi-byte character sequences in your
    current locale, allowing it to escape fewer characters than before for a
    locale such as UTF-8. Second, it now uses an escape idiom of `\#123`, which
    is the literal string `\#` followed by exactly 3 octal digits. Rsync no
diff --git a/backup.c b/backup.c
index be406bef..5036c23a 100644
--- a/backup.c
+++ b/backup.c
@@ -304,7 +304,8 @@ int make_backup(const char *fname, BOOL prefer_rename)
 #endif
 
 	if (!ret && !S_ISREG(file->mode)) {
-		rprintf(FINFO, "make_bak: skipping non-regular file %s\n", fname);
+		if (INFO_GTE(NONREG, 1))
+			rprintf(FINFO, "make_bak: skipping non-regular file %s\n", fname);
 		unmake_file(file);
 #ifdef SUPPORT_ACLS
 		uncache_tmp_acls();
diff --git a/generator.c b/generator.c
index 4e75ae2e..6e1cbe91 100644
--- a/generator.c
+++ b/generator.c
@@ -1678,9 +1678,11 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
 	}
 
 	if (ftype != FT_REG) {
-		if (solo_file)
-			fname = f_name(file, NULL);
-		rprintf(FINFO, "skipping non-regular file \"%s\"\n", fname);
+		if (INFO_GTE(NONREG, 1)) {
+			if (solo_file)
+				fname = f_name(file, NULL);
+			rprintf(FINFO, "skipping non-regular file \"%s\"\n", fname);
+		}
 		goto cleanup;
 	}
 
diff --git a/options.c b/options.c
index 3f035462..eb5744a1 100644
--- a/options.c
+++ b/options.c
@@ -230,7 +230,7 @@ static const char *debug_verbosity[] = {
 #define MAX_VERBOSITY ((int)(sizeof debug_verbosity / sizeof debug_verbosity[0]) - 1)
 
 static const char *info_verbosity[1+MAX_VERBOSITY] = {
-	/*0*/ NULL,
+	/*0*/ "NONREG",
 	/*1*/ "COPY,DEL,FLIST,MISC,NAME,STATS,SYMSAFE",
 	/*2*/ "BACKUP,MISC2,MOUNT,NAME2,REMOVE,SKIP",
 };
@@ -268,9 +268,10 @@ static struct output_struct info_words[COUNT_INFO+1] = {
 	INFO_WORD(MISC, W_SND|W_REC, "Mention miscellaneous information (levels 1-2)"),
 	INFO_WORD(MOUNT, W_SND|W_REC, "Mention mounts that were found or skipped"),
 	INFO_WORD(NAME, W_SND|W_REC, "Mention 1) updated file/dir names, 2) unchanged names"),
+	INFO_WORD(NONREG, W_REC, "Mention skipped non-regular files (default 1, 0 disables)"),
 	INFO_WORD(PROGRESS, W_CLI, "Mention 1) per-file progress or 2) total transfer progress"),
 	INFO_WORD(REMOVE, W_SND, "Mention files removed on the sending side"),
-	INFO_WORD(SKIP, W_REC, "Mention files that are skipped due to options used (levels 1-2)"),
+	INFO_WORD(SKIP, W_REC, "Mention files skipped due to transfer overrides (levels 1-2)"),
 	INFO_WORD(STATS, W_CLI|W_SRV, "Mention statistics at end of run (levels 1-3)"),
 	INFO_WORD(SYMSAFE, W_SND|W_REC, "Mention symlinks that are unsafe"),
 	{ NULL, "--info", 0, 0, 0, 0 }
@@ -488,9 +489,9 @@ static void output_item_help(struct output_struct *words)
 
 	rprintf(FINFO, fmt, "HELP", "Output this help message");
 	rprintf(FINFO, "\n");
-	rprintf(FINFO, "Options added for each increase in verbose level:\n");
+	rprintf(FINFO, "Options added at each level of verbosity:\n");
 
-	for (j = 1; j <= MAX_VERBOSITY; j++) {
+	for (j = 0; j <= MAX_VERBOSITY; j++) {
 		parse_output_words(words, levels, verbosity[j], HELP_PRIORITY);
 		opt = make_output_option(words, levels, W_CLI|W_SRV|W_SND|W_REC);
 		if (opt) {
@@ -509,7 +510,7 @@ static void set_output_verbosity(int level, uchar priority)
 	if (level > MAX_VERBOSITY)
 		level = MAX_VERBOSITY;
 
-	for (j = 1; j <= level; j++) {
+	for (j = 0; j <= level; j++) {
 		parse_output_words(info_words, info_levels, info_verbosity[j], priority);
 		parse_output_words(debug_words, debug_levels, debug_verbosity[j], priority);
 	}
@@ -528,7 +529,7 @@ void limit_output_verbosity(int level)
 	memset(debug_limits, 0, sizeof debug_limits);
 
 	/* Compute the level limits in the above arrays. */
-	for (j = 1; j <= level; j++) {
+	for (j = 0; j <= level; j++) {
 		parse_output_words(info_words, info_limits, info_verbosity[j], LIMIT_PRIORITY);
 		parse_output_words(debug_words, debug_limits, debug_verbosity[j], LIMIT_PRIORITY);
 	}
diff --git a/rsync.1.md b/rsync.1.md
index d154a98c..3b463901 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -1019,6 +1019,10 @@ your home directory (remove the '=' for that).
 
     When symlinks are encountered, recreate the symlink on the destination.
 
+    By default, rsync generates a "non-regular file" warning for each symlink
+    encountered when this option is not set.  You can silence the warning by
+    specifying ``--info=nonreg0``.
+
 0.  `--copy-links`, `-L`
 
     When symlinks are encountered, the item that they point to (the referent)
@@ -1325,14 +1329,24 @@ your home directory (remove the '=' for that).
 0.  `--devices`
 
     This option causes rsync to transfer character and block device files to
-    the remote system to recreate these devices.  This option has no effect if
-    the receiving rsync is not run as the super-user (see also the `--super`
-    and `--fake-super` options).
+    the remote system to recreate these devices.  If the receiving rsync is not
+    being run as the super-user, rsync silently skips creating the device files
+    (see also the `--super` and `--fake-super` options).
+
+    By default, rsync generates a "non-regular file" warning for each device
+    file encountered when this option is not set.  You can silence the warning
+    by specifying ``--info=nonreg0``.
 
 0.  `--specials`
 
-    This option causes rsync to transfer special files such as named sockets
-    and fifos.
+    This option causes rsync to transfer special files, such as named sockets
+    and fifos.  If the receiving rsync is not being run as the super-user,
+    rsync silently skips creating the special files (see also the `--super` and
+    `--fake-super` options).
+
+    By default, rsync generates a "non-regular file" warning for each special
+    file encountered when this option is not set.  You can silence the warning
+    by specifying ``--info=nonreg0``.
 
 0.  `-D`
 
diff --git a/rsync.h b/rsync.h
index a6c0d1bb..86105afe 100644
--- a/rsync.h
+++ b/rsync.h
@@ -1416,7 +1416,8 @@ extern short info_levels[], debug_levels[];
 #define INFO_MISC (INFO_FLIST+1)
 #define INFO_MOUNT (INFO_MISC+1)
 #define INFO_NAME (INFO_MOUNT+1)
-#define INFO_PROGRESS (INFO_NAME+1)
+#define INFO_NONREG (INFO_NAME+1)
+#define INFO_PROGRESS (INFO_NONREG+1)
 #define INFO_REMOVE (INFO_PROGRESS+1)
 #define INFO_SKIP (INFO_REMOVE+1)
 #define INFO_STATS (INFO_SKIP+1)


-- 
The rsync repository.



More information about the rsync-cvs mailing list