[SCM] The rsync repository. - branch master updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Tue Jul 28 00:32:56 UTC 2020
The branch, master has been updated
via 14c4656f A couple more NEWS updates.
via 13cec31f Set LANG to C to help with some remote build hosts.
via 5db7e4b1 Use linkat() if available
via 54693fa9 Add a few more skip-compress suffixes.
via 3f83bcb4 Make the `--append*` options have more warnings.
via e1e546d6 Don't allow a completely empty source arg.
from 3714084f Mention an implied option.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 14c4656fb8ecd2b41035cb3e1c264ec03f26dcc0
Author: Wayne Davison <wayne at opencoder.net>
Date: Mon Jul 27 16:50:47 2020 -0700
A couple more NEWS updates.
commit 13cec31f7f80c4e486380ff0b40b3061df5216d2
Author: Wayne Davison <wayne at opencoder.net>
Date: Mon Jul 27 16:48:48 2020 -0700
Set LANG to C to help with some remote build hosts.
commit 5db7e4b1eefb3fab6a5e5808d718bfe74ee79bc0
Author: Wayne Davison <wayne at opencoder.net>
Date: Mon Jul 27 16:36:55 2020 -0700
Use linkat() if available
Some OSes have a more capable linkat() function that can hard-link
syslinks, so use linkat() when it is available.
commit 54693fa992f6c8f66a6caee164117d752ab89cad
Author: Wayne Davison <wayne at opencoder.net>
Date: Mon Jul 27 15:56:48 2020 -0700
Add a few more skip-compress suffixes.
commit 3f83bcb4af0aecaab0107d18897491f0f6e41d89
Author: Wayne Davison <wayne at opencoder.net>
Date: Mon Jul 27 15:05:11 2020 -0700
Make the `--append*` options have more warnings.
commit e1e546d67e72a83d6e6b6d9ed54f2a4d7e1a6d27
Author: Wayne Davison <wayne at opencoder.net>
Date: Mon Jul 27 14:42:21 2020 -0700
Don't allow a completely empty source arg.
-----------------------------------------------------------------------
Summary of changes:
NEWS.md | 8 ++++++
configure.ac | 11 +++++++-
main.c | 7 +++++
packaging/smart-make | 2 ++
rsync.1.md | 79 ++++++++++++++++++++++++++++++++++++++--------------
syscall.c | 6 +++-
6 files changed, 90 insertions(+), 23 deletions(-)
Changeset truncated at 500 lines:
diff --git a/NEWS.md b/NEWS.md
index 66b88758..49eafefb 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -26,6 +26,9 @@
- Rsync now complains about a missing `--temp-dir` before starting any file
transfers.
+ - A completely empty source arg is now a fatal error. This doesn't change
+ the handling of implied dot-dir args such as "localhost:" and such.
+
### ENHANCEMENTS:
- Allow `--max-alloc=0` to specify no limit to the alloc sanity check.
@@ -69,6 +72,9 @@
`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
+ linkat() function when it is available.
+
- Output file+line info on out-of-memory & overflow errors while also avoiding
the output of alternate build-dir path info that is not useful to the user.
@@ -80,6 +86,8 @@
- Improved the INSTALL.md info.
+ - Added a few more suffixes to the default skip-compress list.
+
### INTERNAL:
- Use a simpler overflow check idiom in a few spots.
diff --git a/configure.ac b/configure.ac
index 8030eebc..b271e363 100644
--- a/configure.ac
+++ b/configure.ac
@@ -822,7 +822,7 @@ AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(waitpid wait4 getcwd chown chmod lchmod mknod mkfifo \
fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
- chflags getattrlist mktime innetgr \
+ chflags getattrlist mktime innetgr linkat \
memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
@@ -946,6 +946,11 @@ fi
AC_CACHE_CHECK([whether link() can hard-link symlinks],rsync_cv_can_hardlink_symlink,[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#elif defined HAVE_SYS_FCNTL_H
+# include <sys/fcntl.h>
+#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -956,7 +961,11 @@ int main(void) {
unlink(FILENAME);
if (symlink("conftest.no-such", FILENAME) < 0) abort();
unlink(FILENAME "2");
+#ifdef HAVE_LINKAT
+ if (linkat(AT_FDCWD, FILENAME, AT_FDCWD, FILENAME "2", 0) < 0) return 1;
+#else
if (link(FILENAME, FILENAME "2") < 0) return 1;
+#endif
return 0;
}]])],[rsync_cv_can_hardlink_symlink=yes],[rsync_cv_can_hardlink_symlink=no],[rsync_cv_can_hardlink_symlink=no])])
if test $rsync_cv_can_hardlink_symlink = yes; then
diff --git a/main.c b/main.c
index bfb69797..46b97b58 100644
--- a/main.c
+++ b/main.c
@@ -1482,8 +1482,15 @@ static int start_client(int argc, char *argv[])
char *dummy_host;
int dummy_port = rsync_port;
int i;
+ if (!argv[0][0])
+ goto invalid_empty;
/* For local source, extra source args must not have hostspec. */
for (i = 1; i < argc; i++) {
+ if (!argv[i][0]) {
+ invalid_empty:
+ rprintf(FERROR, "Empty source arg specified.\n");
+ exit_cleanup(RERR_SYNTAX);
+ }
if (check_for_hostspec(argv[i], &dummy_host, &dummy_port)) {
rprintf(FERROR, "Unexpected remote arg: %s\n", argv[i]);
exit_cleanup(RERR_SYNTAX);
diff --git a/packaging/smart-make b/packaging/smart-make
index 6b7aa9bf..6f634d64 100755
--- a/packaging/smart-make
+++ b/packaging/smart-make
@@ -2,6 +2,8 @@
set -e
+export LANG=C
+
make=`which gmake 2>/dev/null` || make=`which make 2>/dev/null`
branch=`packaging/prep-auto-dir`
diff --git a/rsync.1.md b/rsync.1.md
index 6c2b565a..b1ef84e1 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -938,30 +938,31 @@ your home directory (remove the '=' for that).
0. `--append`
- This causes rsync to update a file by appending data onto the end of the
- file, which presumes that the data that already exists on the receiving
- side is identical with the start of the file on the sending side. If a
- file needs to be transferred and its size on the receiver is the same or
- longer than the size on the sender, the file is skipped. This does not
- interfere with the updating of a file's non-content attributes (e.g.
- permissions, ownership, etc.) when the file does not need to be
- transferred, nor does it affect the updating of any non-regular files.
- Implies `--inplace`.
-
- The use of `--append` can be dangerous if you aren't 100% sure that the
- files that are longer have only grown by the appending of data onto the
- end. You should thus use include/exclude/filter rules to ensure that such
- a transfer is only affecting files that you know to be growing via appended
- data.
+ This special copy mode only works to efficiently update files that are
+ known to be growing larger where any existing content on the receiving side
+ is also known to be the same as the content on the sender. The use of
+ `--append` **can be dangerous** if you aren't 100% sure that all the files
+ in the transfer are shared, growing files. You should thus use filter
+ rules to ensure that you weed out any files that do not fit this criteria.
+
+ Rsync updates these growing file in-place without verifying any of the
+ existing content in the file (it only verifies the content that it is
+ appending). Rsync skips any files that exist on the receiving side that
+ are not shorter than the associated file on the sending side (which means
+ that new files are trasnferred).
+
+ This does not interfere with the updating of a file's non-content
+ attributes (e.g. permissions, ownership, etc.) when the file does not need
+ to be transferred, nor does it affect the updating of any directories or
+ non-regular files.
0. `--append-verify`
- This works just like the `--append` option, but the existing data on the
- receiving side is included in the full-file checksum verification step,
- which will cause a file to be resent if the final verification step fails
- (rsync uses a normal, non-appending `--inplace` transfer for the resend).
- It otherwise has the exact same caveats for files that have not grown
- larger, so don't use this for a general copy.
+ This special copy mode works like `--append` except that all the data in
+ the file is included in the checksum verification (making it much less
+ efficient but also potentially safer). This option **can be dangerous** if
+ you aren't 100% sure that all the files in the transfer are shared, growing
+ files. See the `--append` option for more details.
Note: prior to rsync 3.0.0, the `--append` option worked like
`--append-verify`, so if you are interacting with an older rsync (or the
@@ -2459,27 +2460,53 @@ your home directory (remove the '=' for that).
[comment]: # (This list gets used for the default-dont-compress.h file.)
+ > 3g2
+ > 3gp
> 7z
+ > aac
> ace
> apk
> avi
> bz2
> deb
+ > dmg
+ > ear
+ > f4v
> flac
+ > flv
> gpg
> gz
> iso
> jar
> jpeg
> jpg
+ > lrz
> lz
> lz4
> lzma
> lzo
+ > m1a
+ > m1v
+ > m2a
+ > m2ts
+ > m2v
+ > m4a
+ > m4b
+ > m4p
+ > m4r
+ > m4v
+ > mka
> mkv
> mov
+ > mp1
+ > mp2
> mp3
> mp4
+ > mpa
+ > mpeg
+ > mpg
+ > mpv
+ > mts
> odb
> odf
> odg
@@ -2488,8 +2515,11 @@ your home directory (remove the '=' for that).
> odp
> ods
> odt
+ > oga
> ogg
+ > ogm
> ogv
+ > ogx
> opus
> otg
> oth
@@ -2498,21 +2528,28 @@ your home directory (remove the '=' for that).
> ott
> oxt
> png
+ > qt
> rar
> rpm
> rz
> rzip
+ > spx
> squashfs
> sxc
> sxd
> sxg
> sxm
> sxw
+ > sz
> tbz
+ > tbz2
> tgz
> tlz
+ > ts
> txz
> tzo
+ > vob
+ > war
> webm
> webp
> xz
diff --git a/syscall.c b/syscall.c
index 80cac204..b9c3b4ef 100644
--- a/syscall.c
+++ b/syscall.c
@@ -129,12 +129,16 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz)
#endif
#endif
-#ifdef HAVE_LINK
+#if defined HAVE_LINK || defined HAVE_LINKAT
int do_link(const char *old_path, const char *new_path)
{
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
+#ifdef HAVE_LINKAT
+ return linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0);
+#else
return link(old_path, new_path);
+#endif
}
#endif
--
The rsync repository.
More information about the rsync-cvs
mailing list