[SCM] The rsync repository. - branch master updated
The branch, master has been updated discards 9799c75b2463c725f1829b8e1b817f122af47835 (commit) via 42f83868 Improve `--mkpath` a bit more. from 9799c75b Improve `--mkpath` a bit more. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit 42f8386823b6776ee9b63c3e005557e2f5af859a Author: Wayne Davison Date: Sun Oct 16 12:23:39 2022 -0700 Improve `--mkpath` a bit more. --- Summary of changes: rsync.1.md | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/rsync.1.md b/rsync.1.md index 6cd783eb..ee0a4f39 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -436,7 +436,7 @@ has its own detailed description later in this manpage. --append-verify --append w/old data in file checksum --dirs, -d transfer directories without recursing --old-dirs, --old-d works like --dirs when talking to old rsync ---mkpath create the destination's path component +--mkpath create destination's missing path components --links, -l copy symlinks as symlinks --copy-links, -L transform symlink into referent file/dir --copy-unsafe-links only "unsafe" symlinks are transformed @@ -1149,11 +1149,13 @@ expand it. 0. `--mkpath` -Create a missing path component of the destination path. By default, rsync -allows only the final component of the destination path to not exist, which -is an attempt to help you to validate your destination path. With this -option, rsync creates all the missing destination-path components, just as -if `mkdir -p $DEST_PATH` had been run on the receiving side. +Create all missing path components of the destination path. + +By default, rsync allows only the final component of the destination path +to not exist, which is an attempt to help you to validate your destination +path. With this option, rsync creates all the missing destination-path +components, just as if `mkdir -p $DEST_PATH` had been run on the receiving +side. When specifying a destination path, including a trailing slash ensures that the whole path is treated as directory names to be created, even when the -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[SCM] The rsync repository. - branch master updated
The branch, master has been updated via 9799c75b Improve `--mkpath` a bit more. from ad6245f3 Include "buildall" flag in the release commit. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit 9799c75b2463c725f1829b8e1b817f122af47835 Author: Wayne Davison Date: Sun Oct 16 12:23:39 2022 -0700 Improve `--mkpath` a bit more. --- Summary of changes: rsync.1.md | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/rsync.1.md b/rsync.1.md index 65cf8815..6cd783eb 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -1150,22 +1150,22 @@ expand it. 0. `--mkpath` Create a missing path component of the destination path. By default, rsync -allows only the final element of the destination path to not exist, which +allows only the final component of the destination path to not exist, which is an attempt to help you to validate your destination path. With this -option, rsync creates all the missing destination-path components just as -if `mkdir -p $DEST_PATH` had been run. +option, rsync creates all the missing destination-path components, just as +if `mkdir -p $DEST_PATH` had been run on the receiving side. 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 TO A -DIFFERENT NAME](#) section for full details on how rsync decides if a final -destination path element is a directory element or not. +the whole path is treated as directory names to be created, even when the +file list has a single item. See the [COPYING TO A DIFFERENT NAME](#) +section for full details on how rsync decides if a final destination-path +component should be created as a directory 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 of `--mkpath`. For instance, the following two commands result in the same -destination tree, but it is only the second command that ensures that the -"some/extra/path" elements match the dirs on the sending side: +destination tree, but only the second command ensures that the +"some/extra/path" components match the dirs on the sending side: > rsync -ai --mkpath host:some/extra/path/*.c some/extra/path/ > rsync -aiR host:some/extra/path/*.c ./ -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[SCM] The rsync repository. - branch master updated
The branch, master has been updated via ad6245f3 Include "buildall" flag in the release commit. via ca980b58 Yet another manpage tweak. via 677aa0dc Fix version verification when "\|" doesn't work in sed. from 02559675 Silence autoconf warnings. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit ad6245f3944c6f1fefab044fd4836c0a050b8871 Author: Wayne Davison Date: Sun Oct 16 12:14:37 2022 -0700 Include "buildall" flag in the release commit. commit ca980b5863a91678a0777999381f1c0cabdb115e Author: Wayne Davison Date: Sun Oct 16 12:04:22 2022 -0700 Yet another manpage tweak. commit 677aa0dc911a452399e35e2c2b5bd18b25f5b55a Author: Wayne Davison Date: Sun Oct 16 11:14:15 2022 -0700 Fix version verification when "\|" doesn't work in sed. --- Summary of changes: mkgitver| 6 -- packaging/release-rsync | 2 +- rsync.1.md | 23 +++ 3 files changed, 16 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/mkgitver b/mkgitver index 75c9fe1e..0102b089 100755 --- a/mkgitver +++ b/mkgitver @@ -7,8 +7,10 @@ if [ ! -f git-version.h ]; then fi if test -d "$srcdir/.git" || test -f "$srcdir/.git"; then -gitver=`git describe --abbrev=8 2>/dev/null | sed -n '/^v3\.[0-9][0-9]*\.[0-9][0-9]*\(pre[0-9]*\)*\(-\|$\)/p'` -if [ -n "$gitver" ]; then +gitver=`git describe --abbrev=8 2>/dev/null` +# NOTE: I'm avoiding "|" in sed since I'm not sure if sed -r is portable and "\|" fails on some OSes. +verchk=`echo "$gitver-" | sed -n '/^v3\.[0-9][0-9]*\.[0-9][0-9]*\(pre[0-9]*\)*-/p'` +if [ -n "$verchk" ]; then echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h.new if ! diff git-version.h.new git-version.h >/dev/null; then echo "Updating git-version.h" diff --git a/packaging/release-rsync b/packaging/release-rsync index 9603fd10..511e90f1 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -256,7 +256,7 @@ About to: """) ans = input(" ") -s = cmd_run(['git', 'commit', '-a', '-m', f'Preparing for release of {version}']) +s = cmd_run(['git', 'commit', '-a', '-m', f'Preparing for release of {version} [buildall]']) if s.returncode: die('Aborting') diff --git a/rsync.1.md b/rsync.1.md index 21d2e2ff..65cf8815 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -173,23 +173,22 @@ 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. -The following example copies file foo.c file as bar.c in the "dest" dir -(assuming that bar.c isn't a directory): +The following example copies the `foo.c` file as `bar.c` in the `save` dir +(assuming that `bar.c` isn't a directory): -> rsync -ai src/foo.c dest/bar.c +> rsync -ai src/foo.c save/bar.c -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: +The single-item copy 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 one file and `save/dir` +doesn't exist, this will confuse you by naming the destination file `save/dir`: -> rsync -ai src/*.c dest/dir +> rsync -ai src/*.c save/dir -To prevent accidental renaming, either make sure the destination dir already -exists or specify a destination path with a trailing slash: +To prevent such an accident, either make sure the destination dir exists or +specify the destination path with a trailing slash: -> rsync -ai src/*.c dest/dir/ +> rsync -ai src/*.c save/dir/ ## SORTED TRANSFER ORDER -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[SCM] The rsync repository. - branch master updated
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 Date: Sun Oct 16 10:28:58 2022 -0700 Silence autoconf warnings. commit 449d9bf950d0c408d93263a545b1d0e9e48bf14b Author: Wayne Davison 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 #include #include @@ -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