The branch, master has been updated via f6967eca Complain about a missing/non-dir `--temp-dir`. via 8455bf66 Don't include config.h in proto.h rule. via 00e59e01 Mention awk/gawk/nawk dependency. from 91eaffe1 Mention `--protect-args` in `--chown` info.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f6967eca58c7438ebc99a435a49549487bb9af75 Author: Wayne Davison <wa...@opencoder.net> Date: Sun Jul 26 01:56:30 2020 -0700 Complain about a missing/non-dir `--temp-dir`. commit 8455bf66c28d8e180cab72f3c9fa99ee2397fb52 Author: Wayne Davison <wa...@opencoder.net> Date: Sun Jul 26 01:40:55 2020 -0700 Don't include config.h in proto.h rule. commit 00e59e01e3a76e97bce79d24da27a1ee8ee8dd9a Author: Wayne Davison <wa...@opencoder.net> Date: Sun Jul 26 01:40:43 2020 -0700 Mention awk/gawk/nawk dependency. ----------------------------------------------------------------------- Summary of changes: INSTALL.md | 15 ++++++++------- Makefile.in | 2 +- NEWS.md | 3 +++ main.c | 18 ++++++++++++++++++ 4 files changed, 30 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/INSTALL.md b/INSTALL.md index 3e57db7d..02628c69 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,11 +10,12 @@ features (the impatient can skip down to the package summary): ## The basic setup You need to have a C compiler installed and optionally a C++ compiler in order -to try to build some hardware-accelerated checksum routines. If you're -installing from the git repo (instead of a release tar file) you'll also need -the GNU autotools (autoconf & automake) and your choice of 2 python3 markdown -libraries: cmarkgfm or commonmark (needed to generate the man pages). +to try to build some hardware-accelerated checksum routines. Rsync also needs +a modern awk, which might be provides via gawk or nawk on some OSes. +If you're installing from the git repo (instead of a release tar file) you'll +also need the GNU autotools (autoconf & automake) and your choice of 2 python3 +markdown libraries: cmarkgfm or commonmark (needed to generate the man pages). If your OS doesn't provide a python3-cmarkgfm or python3-commonmark package, you can run the following to install the commonmark python library for your build user (after installing python3's pip package): @@ -80,7 +81,7 @@ like. - For Debian and Ubuntu (Debian Buster users may want to briefly(?) enable buster-backports to update zstd from 1.3 to 1.4): - > sudo apt install -y gcc g++ autoconf automake python3-cmarkgfm + > sudo apt install -y gcc g++ gawk autoconf automake python3-cmarkgfm > sudo apt install -y acl libacl1-dev > sudo apt install -y attr libattr1-dev > sudo apt install -y libxxhash-dev @@ -91,7 +92,7 @@ like. - For CentOS (use EPEL for python3-pip): > sudo yum -y install epel-release - > sudo yum -y install gcc g++ autoconf automake python3-pip + > sudo yum -y install gcc g++ gawk autoconf automake python3-pip > sudo yum -y install acl libacl-devel > sudo yum -y install attr libattr-devel > sudo yum -y install xxhash-devel @@ -117,7 +118,7 @@ like. - For Cygwin (with all cygwin programs stopped, run the appropriate setup program from a cmd shell): - > .\setup-x86_64.exe --quiet-mode -P make,autoconf,automake,gcc-core,python3,python36-commonmark + > .\setup-x86_64.exe --quiet-mode -P make,gawk,autoconf,automake,gcc-core,python3,python36-commonmark > .\setup-x86_64.exe --quiet-mode -P attr,libattr-devel > .\setup-x86_64.exe --quiet-mode -P libzstd-devel > .\setup-x86_64.exe --quiet-mode -P liblz4-devel diff --git a/Makefile.in b/Makefile.in index a6ce0366..1c040172 100644 --- a/Makefile.in +++ b/Makefile.in @@ -231,7 +231,7 @@ proto: proto.h-tstamp proto.h: proto.h-tstamp @if test -f proto.h; then :; else cp -p $(srcdir)/proto.h .; fi -proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h daemon-parm.h +proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h $(AWK) -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h .PHONY: man diff --git a/NEWS.md b/NEWS.md index 03c0e5cb..66b88758 100644 --- a/NEWS.md +++ b/NEWS.md @@ -23,6 +23,9 @@ get out of sync between the sender and the receiver, which could cause a device to get created with the wrong major value in its major,minor pair. + - Rsync now complains about a missing `--temp-dir` before starting any file + transfers. + ### ENHANCEMENTS: - Allow `--max-alloc=0` to specify no limit to the alloc sanity check. diff --git a/main.c b/main.c index e68d73c4..bfb69797 100644 --- a/main.c +++ b/main.c @@ -97,6 +97,7 @@ extern char *shell_cmd; extern char *password_file; extern char *backup_dir; extern char *copy_as; +extern char *tmpdir; extern char curr_dir[MAXPATHLEN]; extern char backup_dir_buf[MAXPATHLEN]; extern char *basis_dir[MAX_BASIS_DIRS+1]; @@ -1002,6 +1003,23 @@ static int do_recv(int f_in, int f_out, char *local_name) backup_dir_buf[backup_dir_len-1] = '/'; } + if (tmpdir) { + STRUCT_STAT st; + int ret = do_stat(tmpdir, &st); + if (ret < 0 || !S_ISDIR(st.st_mode)) { + if (ret == 0) { + rprintf(FERROR, "The temp-dir is not a directory: %s\n", tmpdir); + exit_cleanup(RERR_SYNTAX); + } + if (errno == ENOENT) { + rprintf(FERROR, "The temp-dir does not exist: %s\n", tmpdir); + exit_cleanup(RERR_SYNTAX); + } + rprintf(FERROR, "Failed to stat temp-dir %s: %s\n", tmpdir, strerror(errno)); + exit_cleanup(RERR_FILEIO); + } + } + io_flush(FULL_FLUSH); if ((pid = do_fork()) == -1) { -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs