[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sun Oct 16 17:31:49 UTC 2022


The branch, master has been updated
       via  02559675 Silence autoconf warnings.
       via  449d9bf9 Make the new manpage section better.
      from  35ecec97 A few more manpage clarifications.

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


- Log -----------------------------------------------------------------
commit 025596757ccd21226b3306b11cc7c8d94b6f7a6f
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sun Oct 16 10:28:58 2022 -0700

    Silence autoconf warnings.

commit 449d9bf950d0c408d93263a545b1d0e9e48bf14b
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sun Oct 16 10:23:51 2022 -0700

    Make the new manpage section better.

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

Summary of changes:
 configure.ac    | 16 +++++++---------
 m4/have_type.m4 |  1 -
 rsync.1.md      | 43 +++++++++++++++++++++++--------------------
 rsync.h         |  8 +-------
 4 files changed, 31 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/configure.ac b/configure.ac
index 8ad6137e..a2c99558 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,6 @@ AC_INIT([rsync],[ ],[https://rsync.samba.org/bug-tracking.html])
 
 AC_C_BIGENDIAN
 AC_HEADER_DIRENT
-AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 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 \
@@ -20,7 +19,7 @@ AC_HEADER_MAJOR_FIXED
 
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([byteorder.h])
-AC_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
 AC_PREREQ([2.69])
 
 PACKAGE_VERSION=`sed -n 's/.*RSYNC_VERSION.*"\(.*\)".*/\1/p' <$srcdir/version.h`
@@ -61,7 +60,6 @@ AC_PROG_AWK
 AC_PROG_EGREP
 AC_PROG_INSTALL
 AC_PROG_MKDIR_P
-AC_PROG_CC_STDC
 AC_SUBST(SHELL)
 AC_PATH_PROG([PERL], [perl])
 AC_PATH_PROG([PYTHON3], [python3])
@@ -390,7 +388,7 @@ AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]),
 	;;
   esac ],
 
-  AC_TRY_RUN([ /* AF_INET6 availability check */
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 availability check */
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -401,11 +399,11 @@ main()
    else
      exit(0);
 }
-],
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(INET6, 1, [true if you have IPv6]),
-  AC_MSG_RESULT(no),
-  AC_MSG_RESULT(no)
+]])],
+  [AC_MSG_RESULT(yes)
+  AC_DEFINE(INET6, 1, true if you have IPv6)],
+  [AC_MSG_RESULT(no)],
+  [AC_MSG_RESULT(no)]
 ))
 
 dnl Do you want to disable use of locale functions
diff --git a/m4/have_type.m4 b/m4/have_type.m4
index 704ca33b..12fc719e 100644
--- a/m4/have_type.m4
+++ b/m4/have_type.m4
@@ -1,6 +1,5 @@
 dnl AC_HAVE_TYPE(TYPE,INCLUDES)
 AC_DEFUN([AC_HAVE_TYPE], [
-AC_REQUIRE([AC_HEADER_STDC])
 cv=`echo "$1" | sed 'y%./+- %__p__%'`
 AC_MSG_CHECKING(for $1)
 AC_CACHE_VAL([ac_cv_type_$cv],
diff --git a/rsync.1.md b/rsync.1.md
index a2302830..21d2e2ff 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -152,10 +152,16 @@ rsync daemon by leaving off the module name:
 
 >     rsync somehost.mydomain.com::
 
-## COPYING A SINGLE FILE
+## COPYING TO A DIFFERENT NAME
 
-Rsync has the ability to customize the destination file's name when copying a
-single item.  The rules for this are:
+When you want to copy a directory to a different name, use a trailing slash on
+the source directory to put the contents of the directory into any destination
+directory you like:
+
+>     rsync -ai foo/ bar/
+
+Rsync also has the ability to customize a destination file's name when copying
+a single item.  The rules for this are:
 
 - The transfer list must consist of a single item (either a file or an empty
   directory)
@@ -163,31 +169,28 @@ single item.  The rules for this are:
 - The destination path must not have been specified with a trailing slash
 
 Under those circumstances, rsync will set the name of the destination's single
-item to the last element of the destination path.
+item to the last element of the destination path.  Keep in mind that it is best
+to only use this idiom when copying a file and use the above trailing-slash
+idiom when copying a directory.
 
-For example, the following will copy the foo.c file as bar.c in the "dest" dir
+The following example copies file foo.c file as bar.c in the "dest" dir
 (assuming that bar.c isn't a directory):
 
 >     rsync -ai src/foo.c dest/bar.c
 
-This rule might accidentally bite you if you unknowingly copy a single item and
-specify a destination dir that doesn't exist (without using a trailing slash).
-For example:
+The single-item rename rule might accidentally bite you if you unknowingly copy
+a single item and specify a destination dir that doesn't exist (without using a
+trailing slash).  For example, if `src/*.c` matches just one file and
+`dest/dir` doesn't exist yet, this will confuse you by renaming the file to the
+destination path:
 
 >     rsync -ai src/*.c dest/dir
 
-If the `*.c` only matched one file and dest/dir does not yet exist, then rsync
-copies the single .c file to the name "dir" in "dest".  To prevent this, it is
-safest to specify a destination path with a trailing slash when you want it to
-be treated as a directory:
+To prevent accidental renaming, either make sure the destination dir already
+exists or specify a destination path with a trailing slash:
 
 >     rsync -ai src/*.c dest/dir/
 
-If you want to copy a **non-empty** directory to a different name, specify the
-source path with a trailing slash:
-
->     rsync -ai foo/ bar
-
 ## SORTED TRANSFER ORDER
 
 Rsync always sorts the specified filenames into its internal transfer list.
@@ -1155,9 +1158,9 @@ expand it.
 
     When specifying a destination path, including a trailing slash ensures that
     rsync always treats the whole path as the directory name to be created,
-    even if the source arg is a single filename. See the [COPYING A SINGLE
-    FILE](#) section for full details on how rsync decides if a final
-    destination path element is a directory or not.
+    even if the source arg is a single filename. See the [COPYING TO A
+    DIFFERENT NAME](#) section for full details on how rsync decides if a final
+    destination path element is a directory element or not.
 
     If you would like the newly-created destination dirs to match the dirs on
     the sending side, you should be using [`--relative`](#opt) (`-R`) instead
diff --git a/rsync.h b/rsync.h
index 2c5e5376..d3709fe0 100644
--- a/rsync.h
+++ b/rsync.h
@@ -366,16 +366,10 @@ enum delret {
 #include <sys/socket.h>
 #endif
 
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#else
-#include <time.h>
-#endif
 #endif
+#include <time.h>
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>


-- 
The rsync repository.



More information about the rsync-cvs mailing list