The branch, master has been updated via c528f8d5 Preparing for release of 3.2.0pre1 via 1d1c0f14 Make -4 & -6 also able to affect an ssh remote shell. via e63ff70e Some indentation fixes. via 8a70f142 Some fixes for the release script & other helpers. from cdf58a7a Change alt_dest_name() to alt_dest_opt().
https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit c528f8d5c8aa7b16b20cda72a9f4119699890c28 Author: Wayne Davison <wa...@opencoder.net> Date: Sat Jun 13 19:16:26 2020 -0700 Preparing for release of 3.2.0pre1 commit 1d1c0f14e16a98ecbf0d11b46e13859076b69ffa Author: Wayne Davison <wa...@opencoder.net> Date: Sat Jun 13 18:49:52 2020 -0700 Make -4 & -6 also able to affect an ssh remote shell. commit e63ff70eae67530f7b8b23263c19cf88fac90bd2 Author: Wayne Davison <wa...@opencoder.net> Date: Sat Jun 13 18:19:12 2020 -0700 Some indentation fixes. commit 8a70f1420b4b2e47ae6ba0d314fb8f703746766c Author: Wayne Davison <wa...@opencoder.net> Date: Sat Jun 13 18:03:01 2020 -0700 Some fixes for the release script & other helpers. ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + NEWS.md | 3 +++ OLDNEWS.md | 2 +- access.c | 16 +++++------- acls.c | 15 ++++------- batch.c | 6 ++--- cleanup.c | 10 +++---- clientname.c | 13 ++++----- clientserver.c | 18 ++++++------- compat.c | 40 ++++++++++++++-------------- configure.ac | 2 +- delete.c | 6 ++--- exclude.c | 5 ++-- generator.c | 59 +++++++++++++++++------------------------ getfsdev.c | 3 +-- hlink.c | 8 +++--- io.c | 3 +-- log.c | 5 ++-- main.c | 68 +++++++++++++++++++++++++----------------------- match.c | 18 ++++++------- options.c | 45 ++++++++++++++------------------ packaging/lsb/rsync.spec | 12 ++++----- packaging/nightly-rsync | 4 +-- packaging/patch-update | 12 ++++----- packaging/pkglib.py | 2 +- packaging/release-rsync | 16 +++++++----- pipe.c | 24 ++++++++--------- progress.c | 9 +++---- receiver.c | 14 +++++----- rsync.1.md | 23 +++++++++++----- rsync.c | 11 ++++---- sender.c | 13 +++------ socket.c | 27 +++++++------------ syscall.c | 4 +-- t_unsafe.c | 3 +-- tls.c | 10 +++---- token.c | 19 +++++--------- uidlist.c | 17 ++++-------- util.c | 13 +++------ xattrs.c | 19 ++++++-------- 40 files changed, 268 insertions(+), 330 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitignore b/.gitignore index 9c287d14..00613f45 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,5 @@ aclocal.m4 /testsuite/devices-fake.test /testsuite/xattrs-hlink.test /patches +/SaVeDiR .deps diff --git a/NEWS.md b/NEWS.md index bfadccde..18a28545 100644 --- a/NEWS.md +++ b/NEWS.md @@ -134,6 +134,9 @@ Protocol: 31 (unchanged) - Made -V the short option for --version. + - Forward -4 & -6 options to the ssh command, making them easier to type than + "--rsh='ssh -4'" (or -6). + ### PACKAGING RELATED: - Add installed binary: /usr/bin/rsync-sll diff --git a/OLDNEWS.md b/OLDNEWS.md index 6cde4f45..659cc03a 100644 --- a/OLDNEWS.md +++ b/OLDNEWS.md @@ -3794,7 +3794,7 @@ Protocol: 25 (changed) | RELEASE DATE | VER. | DATE OF COMMIT\* | PROTOCOL | |--------------|--------|------------------|-------------| -| ?? Jun 2020 | 3.2.0 | | ?? | +| ?? Jun 2020 | 3.2.0 | | 31 | | 28 Jan 2018 | 3.1.3 | | 31 | | 21 Dec 2015 | 3.1.2 | | 31 | | 22 Jun 2014 | 3.1.1 | | 31 | diff --git a/access.c b/access.c index 80e2b50c..5b662901 100644 --- a/access.c +++ b/access.c @@ -2,7 +2,7 @@ * Routines to authenticate access to a daemon (hosts allow/deny). * * Copyright (C) 1998 Andrew Tridgell - * Copyright (C) 2004-2019 Wayne Davison + * Copyright (C) 2004-2020 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -158,8 +158,7 @@ static int match_address(const char *addr, const char *tok) break; #ifdef INET6 - case PF_INET6: - { + case PF_INET6: { struct sockaddr_in6 *sin6a, *sin6t; sin6a = (struct sockaddr_in6 *)resa->ai_addr; @@ -171,20 +170,19 @@ static int match_address(const char *addr, const char *tok) addrlen = 16; #ifdef HAVE_SOCKADDR_IN6_SCOPE_ID - if (sin6t->sin6_scope_id && - sin6a->sin6_scope_id != sin6t->sin6_scope_id) { + if (sin6t->sin6_scope_id && sin6a->sin6_scope_id != sin6t->sin6_scope_id) { ret = 0; goto out; } #endif break; - } + } #endif default: - rprintf(FLOG, "unknown family %u\n", rest->ai_family); - ret = 0; - goto out; + rprintf(FLOG, "unknown family %u\n", rest->ai_family); + ret = 0; + goto out; } bits = -1; diff --git a/acls.c b/acls.c index 02bfe366..0b5dec6a 100644 --- a/acls.c +++ b/acls.c @@ -332,14 +332,12 @@ static BOOL unpack_smb_acl(SMB_ACL_T sacl, rsync_acl *racl) if (temp_ida_list.count) { #ifdef SMB_ACL_NEED_SORT if (temp_ida_list.count > 1) { - qsort(temp_ida_list.items, temp_ida_list.count, - sizeof (id_access), id_access_sorter); + qsort(temp_ida_list.items, temp_ida_list.count, sizeof (id_access), id_access_sorter); } #endif if (!(racl->names.idas = new_array(id_access, temp_ida_list.count))) out_of_memory("unpack_smb_acl"); - memcpy(racl->names.idas, temp_ida_list.items, - temp_ida_list.count * sizeof (id_access)); + memcpy(racl->names.idas, temp_ida_list.items, temp_ida_list.count * sizeof (id_access)); } else racl->names.idas = NULL; @@ -825,14 +823,12 @@ void cache_tmp_acl(struct file_struct *file, stat_x *sxp) if (prior_access_count == (size_t)-1) prior_access_count = access_acl_list.count; - F_ACL(file) = cache_rsync_acl(sxp->acc_acl, - SMB_ACL_TYPE_ACCESS, &access_acl_list); + F_ACL(file) = cache_rsync_acl(sxp->acc_acl, SMB_ACL_TYPE_ACCESS, &access_acl_list); if (S_ISDIR(sxp->st.st_mode)) { if (prior_default_count == (size_t)-1) prior_default_count = default_acl_list.count; - F_DIR_DEFACL(file) = cache_rsync_acl(sxp->def_acl, - SMB_ACL_TYPE_DEFAULT, &default_acl_list); + F_DIR_DEFACL(file) = cache_rsync_acl(sxp->def_acl, SMB_ACL_TYPE_DEFAULT, &default_acl_list); } } @@ -996,8 +992,7 @@ static int set_rsync_acl(const char *fname, acl_duo *duo_item, mode = 0; /* eliminate compiler warning */ #else if (type == SMB_ACL_TYPE_ACCESS) { - cur_mode = change_sacl_perms(duo_item->sacl, &duo_item->racl, - cur_mode, mode); + cur_mode = change_sacl_perms(duo_item->sacl, &duo_item->racl, cur_mode, mode); if (cur_mode == (mode_t)-1) return 0; } diff --git a/batch.c b/batch.c index b81d9556..83bc8341 100644 --- a/batch.c +++ b/batch.c @@ -289,9 +289,9 @@ void write_batch_shell_file(void) if (!(p = raw_argv[i])) continue; if (strncmp(p, "--files-from", 12) == 0 - || strncmp(p, "--filter", 8) == 0 - || strncmp(p, "--include", 9) == 0 - || strncmp(p, "--exclude", 9) == 0) { + || strncmp(p, "--filter", 8) == 0 + || strncmp(p, "--include", 9) == 0 + || strncmp(p, "--exclude", 9) == 0) { if (strchr(p, '=') == NULL) i++; continue; diff --git a/cleanup.c b/cleanup.c index b477e660..cf8330ac 100644 --- a/cleanup.c +++ b/cleanup.c @@ -172,11 +172,11 @@ NORETURN void _exit_cleanup(int code, const char *file, int line) const char *fname = cleanup_fname; cleanup_fname = NULL; if (!partial_dir) { - /* We don't want to leave a partial file with a modern time or it - * could be skipped via --update. Setting the time to something - * really old also helps it to stand out as unfinished in an ls. */ - tweak_modtime = 1; - cleanup_file->modtime = 0; + /* We don't want to leave a partial file with a modern time or it + * could be skipped via --update. Setting the time to something + * really old also helps it to stand out as unfinished in an ls. */ + tweak_modtime = 1; + cleanup_file->modtime = 0; } finish_transfer(cleanup_new_fname, fname, NULL, NULL, cleanup_file, tweak_modtime, !partial_dir); diff --git a/clientname.c b/clientname.c index 6a9f98b9..b73d11c6 100644 --- a/clientname.c +++ b/clientname.c @@ -325,8 +325,8 @@ static void client_sockaddr(int fd, struct sockaddr_storage *ss, socklen_t *ss_l } #ifdef INET6 - if (GET_SOCKADDR_FAMILY(ss) == AF_INET6 && - IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)ss)->sin6_addr)) { + if (GET_SOCKADDR_FAMILY(ss) == AF_INET6 + && IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)ss)->sin6_addr)) { /* OK, so ss is in the IPv6 family, but it is really * an IPv4 address: something like * "::ffff:10.130.1.2". If we use it as-is, then the @@ -349,8 +349,7 @@ static void client_sockaddr(int fd, struct sockaddr_storage *ss, socklen_t *ss_l /* There is a macro to extract the mapped part * (IN6_V4MAPPED_TO_SINADDR ?), but it does not seem * to be present in the Linux headers. */ - memcpy(&sin->sin_addr, &sin6.sin6_addr.s6_addr[12], - sizeof sin->sin_addr); + memcpy(&sin->sin_addr, &sin6.sin6_addr.s6_addr[12], sizeof sin->sin_addr); } #endif } @@ -379,8 +378,7 @@ static int compare_addrinfo_sockaddr(const struct addrinfo *ai, const struct soc sin1 = (const struct sockaddr_in *) ss; sin2 = (const struct sockaddr_in *) ai->ai_addr; - return memcmp(&sin1->sin_addr, &sin2->sin_addr, - sizeof sin1->sin_addr); + return memcmp(&sin1->sin_addr, &sin2->sin_addr, sizeof sin1->sin_addr); } #ifdef INET6 @@ -396,8 +394,7 @@ static int compare_addrinfo_sockaddr(const struct addrinfo *ai, const struct soc return 1; } - if (memcmp(&sin1->sin6_addr, &sin2->sin6_addr, - sizeof sin1->sin6_addr)) + if (memcmp(&sin1->sin6_addr, &sin2->sin6_addr, sizeof sin1->sin6_addr)) return 1; #ifdef HAVE_SOCKADDR_IN6_SCOPE_ID diff --git a/clientserver.c b/clientserver.c index b0908e35..d4304ae6 100644 --- a/clientserver.c +++ b/clientserver.c @@ -123,8 +123,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[], *p = '\0'; } - fd = open_socket_out_wrapped(host, rsync_port, bind_address, - default_af_hint); + fd = open_socket_out_wrapped(host, rsync_port, bind_address, default_af_hint); if (fd == -1) exit_cleanup(RERR_SOCKETIO); @@ -755,24 +754,24 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char p = lp_filter(i); parse_filter_str(&daemon_filter_list, p, rule_template(FILTRULE_WORD_SPLIT), - XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3); + XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3); p = lp_include_from(i); parse_filter_file(&daemon_filter_list, p, rule_template(FILTRULE_INCLUDE), - XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES | XFLG_FATAL_ERRORS); + XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES | XFLG_FATAL_ERRORS); p = lp_include(i); parse_filter_str(&daemon_filter_list, p, - rule_template(FILTRULE_INCLUDE | FILTRULE_WORD_SPLIT), - XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES); + rule_template(FILTRULE_INCLUDE | FILTRULE_WORD_SPLIT), + XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES); p = lp_exclude_from(i); parse_filter_file(&daemon_filter_list, p, rule_template(0), - XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES | XFLG_FATAL_ERRORS); + XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES | XFLG_FATAL_ERRORS); p = lp_exclude(i); parse_filter_str(&daemon_filter_list, p, rule_template(FILTRULE_WORD_SPLIT), - XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES); + XFLG_ABS_IF_SLASH | XFLG_DIR2WILD3 | XFLG_OLD_PREFIXES); log_init(1); @@ -996,8 +995,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char limit_output_verbosity(lp_max_verbosity(i)); #endif - if (protocol_version < 23 - && (protocol_version == 22 || am_sender)) + if (protocol_version < 23 && (protocol_version == 22 || am_sender)) io_start_multiplex_out(f_out); else if (!ret || err_msg) { /* We have to get I/O multiplexing started so that we can diff --git a/compat.c b/compat.c index e01adfbd..855eae98 100644 --- a/compat.c +++ b/compat.c @@ -531,16 +531,16 @@ void setup_protocol(int f_out,int f_in) append_mode = 2; if (preserve_acls && !local_server) { rprintf(FERROR, - "--acls requires protocol 30 or higher" - " (negotiated %d).\n", - protocol_version); + "--acls requires protocol 30 or higher" + " (negotiated %d).\n", + protocol_version); exit_cleanup(RERR_PROTOCOL); } if (preserve_xattrs && !local_server) { rprintf(FERROR, - "--xattrs requires protocol 30 or higher" - " (negotiated %d).\n", - protocol_version); + "--xattrs requires protocol 30 or higher" + " (negotiated %d).\n", + protocol_version); exit_cleanup(RERR_PROTOCOL); } } @@ -555,33 +555,33 @@ void setup_protocol(int f_out,int f_in) if (protocol_version < 29) { if (fuzzy_basis) { rprintf(FERROR, - "--fuzzy requires protocol 29 or higher" - " (negotiated %d).\n", - protocol_version); + "--fuzzy requires protocol 29 or higher" + " (negotiated %d).\n", + protocol_version); exit_cleanup(RERR_PROTOCOL); } if (basis_dir_cnt && inplace) { rprintf(FERROR, - "%s with --inplace requires protocol 29 or higher" - " (negotiated %d).\n", - alt_dest_opt(0), protocol_version); + "%s with --inplace requires protocol 29 or higher" + " (negotiated %d).\n", + alt_dest_opt(0), protocol_version); exit_cleanup(RERR_PROTOCOL); } if (basis_dir_cnt > 1) { rprintf(FERROR, - "Using more than one %s option requires protocol" - " 29 or higher (negotiated %d).\n", - alt_dest_opt(0), protocol_version); + "Using more than one %s option requires protocol" + " 29 or higher (negotiated %d).\n", + alt_dest_opt(0), protocol_version); exit_cleanup(RERR_PROTOCOL); } if (prune_empty_dirs) { rprintf(FERROR, - "--prune-empty-dirs requires protocol 29 or higher" - " (negotiated %d).\n", - protocol_version); + "--prune-empty-dirs requires protocol 29 or higher" + " (negotiated %d).\n", + protocol_version); exit_cleanup(RERR_PROTOCOL); } } else if (protocol_version >= 30) { @@ -640,8 +640,8 @@ void setup_protocol(int f_out,int f_in) if (inc_recurse && !allow_inc_recurse) { /* This should only be able to happen in a batch. */ fprintf(stderr, - "Incompatible options specified for inc-recursive %s.\n", - read_batch ? "batch file" : "connection"); + "Incompatible options specified for inc-recursive %s.\n", + read_batch ? "batch file" : "connection"); exit_cleanup(RERR_SYNTAX); } use_safe_inc_flist = (compat_flags & CF_SAFE_FLIST) || protocol_version >= 31; diff --git a/configure.ac b/configure.ac index 17b0a637..2b3a3665 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([rsync],[3.2.0dev],[http://rsync.samba.org/bugzilla.html]) +AC_INIT([rsync],[3.2.0pre1],[http://rsync.samba.org/bugzilla.html]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([byteorder.h]) diff --git a/delete.c b/delete.c index 4cb2878d..4a294853 100644 --- a/delete.c +++ b/delete.c @@ -4,7 +4,7 @@ * Copyright (C) 1996-2000 Andrew Tridgell * Copyright (C) 1996 Paul Mackerras * Copyright (C) 2002 Martin Pool <m...@samba.org> - * Copyright (C) 2003-2019 Wayne Davison + * Copyright (C) 2003-2020 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -89,8 +89,8 @@ static enum delret delete_dir_contents(char *fname, uint16 flags) if (fp->flags & FLAG_MOUNT_DIR && S_ISDIR(fp->mode)) { if (DEBUG_GTE(DEL, 1)) { rprintf(FINFO, - "mount point, %s, pins parent directory\n", - f_name(fp, NULL)); + "mount point, %s, pins parent directory\n", + f_name(fp, NULL)); } ret = DR_NOT_EMPTY; continue; diff --git a/exclude.c b/exclude.c index a15a4bb3..d3122b57 100644 --- a/exclude.c +++ b/exclude.c @@ -4,7 +4,7 @@ * Copyright (C) 1996-2001 Andrew Tridgell <tri...@samba.org> * Copyright (C) 1996 Paul Mackerras * Copyright (C) 2002 Martin Pool - * Copyright (C) 2003-2019 Wayne Davison + * Copyright (C) 2003-2020 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1406,8 +1406,7 @@ void recv_filter_list(int f_in) char line[BIGPATHBUFLEN]; int xflags = protocol_version >= 29 ? 0 : XFLG_OLD_PREFIXES; int receiver_wants_list = prune_empty_dirs - || (delete_mode - && (!delete_excluded || protocol_version >= 29)); + || (delete_mode && (!delete_excluded || protocol_version >= 29)); unsigned int len; if (!local_server && (am_sender || receiver_wants_list)) { diff --git a/generator.c b/generator.c index 39f8310d..8f9d6035 100644 --- a/generator.c +++ b/generator.c @@ -171,10 +171,8 @@ static int remember_delete(struct file_struct *file, const char *fname, int flag deldelay_buf[deldelay_cnt++] = '!'; while (1) { - len = snprintf(deldelay_buf + deldelay_cnt, - deldelay_size - deldelay_cnt, - "%x %s%c", - (int)file->mode, fname, '\0'); + len = snprintf(deldelay_buf + deldelay_cnt, deldelay_size - deldelay_cnt, + "%x %s%c", (int)file->mode, fname, '\0'); if ((deldelay_cnt += len) <= deldelay_size) break; deldelay_cnt -= len; @@ -211,8 +209,7 @@ static int read_delay_line(char *buf, int *flags_p) deldelay_size - deldelay_cnt); if (len == 0) { if (deldelay_cnt) { - rprintf(FERROR, - "ERROR: unexpected EOF in delete-delay file.\n"); + rprintf(FERROR, "ERROR: unexpected EOF in delete-delay file.\n"); } return -1; } @@ -528,8 +525,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre iflags |= ITEM_REPORT_PERMS; if (uid_ndx && am_root && (uid_t)F_OWNER(file) != sxp->st.st_uid) iflags |= ITEM_REPORT_OWNER; - if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) - && sxp->st.st_gid != (gid_t)F_GROUP(file)) + if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file)) iflags |= ITEM_REPORT_GROUP; #ifdef SUPPORT_ACLS if (preserve_acls && !S_ISLNK(file->mode)) { @@ -648,14 +644,14 @@ static void sum_sizes_sqroot(struct sum_struct *sum, int64 len) if (c < 0 || c >= max_blength) blength = max_blength; else { - blength = 0; - do { - blength |= c; - if (len < (int64)blength * blength) - blength &= ~c; - c >>= 1; - } while (c >= 8); /* round to multiple of 8 */ - blength = MAX(blength, BLOCK_SIZE); + blength = 0; + do { + blength |= c; + if (len < (int64)blength * blength) + blength &= ~c; + c >>= 1; + } while (c >= 8); /* round to multiple of 8 */ + blength = MAX(blength, BLOCK_SIZE); } } @@ -1415,12 +1411,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, if (file->flags & FLAG_DIR_CREATED) statret = -1; if (!preserve_perms) { /* See comment in non-dir code below. */ - file->mode = dest_mode(file->mode, sx.st.st_mode, - dflt_perms, statret == 0); + file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, statret == 0); } if (statret != 0 && basis_dir[0] != NULL) { - int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, - itemizing, code); + int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, itemizing, code); if (j == -2) { itemizing = 0; code = FNONE; @@ -1442,8 +1436,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, "recv_generator: mkdir %s failed", full_fname(fname)); skipping_dir_contents: - rprintf(FERROR, - "*** Skipping any contents from this failed directory ***\n"); + rprintf(FERROR, "*** Skipping any contents from this failed directory ***\n"); skip_dir = file; file->flags |= FLAG_MISSING_DIR; goto cleanup; -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs