[SCM] The rsync repository. - branch master updated

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  7b1f8f57 Update rrsync & its opt-culling script.
  from  c32012d1 Need to indent a code block in the README.

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


- Log -
commit 7b1f8f57c3cb4ab1b855f398ef78ed305fa6ace6
Author: Wayne Davison 
Date:   Sat Jun 13 22:11:37 2020 -0700

Update rrsync & its opt-culling script.

---

Summary of changes:
 packaging/cull_options | 5 +++--
 support/rrsync | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/cull_options b/packaging/cull_options
index 91e64e76..c32a84dd 100755
--- a/packaging/cull_options
+++ b/packaging/cull_options
@@ -23,6 +23,7 @@ our %long_opt = ( # These include some extra long-args that 
BackupPC uses:
 'perms' => 0,
 'recursive' => 0,
 'times' => 0,
+'write-devices' => -1,
 );
 our $last_long_opt;
 
@@ -39,10 +40,10 @@ while () {
$last_long_opt = $1;
$long_opt{$1} = 0 unless exists $long_opt{$1};
 } elsif (defined($last_long_opt)
-   && /\Qargs[ac++]\E = ([^["\s]+);/ && $1 ne 'dest_option') {
+   && /\Qargs[ac++]\E = ([^["\s]+);/) {
$long_opt{$last_long_opt} = 2;
undef $last_long_opt;
-} elsif (/dest_option = "--([^"]+)"/) {
+} elsif (/return "--([^"]+-dest)";/) {
$long_opt{$1} = 2;
undef $last_long_opt;
 } elsif (/\Qasprintf(\E[^,]+, "--([^"=]+)=/ || /\Qargs[ac++]\E = 
"--([^"=]+)=/ || /fmt = .*: "--([^"=]+)=/) {
diff --git a/support/rrsync b/support/rrsync
index a538fbba..c9bf39f3 100644
--- a/support/rrsync
+++ b/support/rrsync
@@ -62,7 +62,7 @@ die "$0 reading from write-only server not allowed\n" if 
$only eq 'w' && $am_sen
 # To disable a short-named option, add its letter to this string:
 our $short_disabled = 's';
 
-our $short_no_arg = 'ACDEHIJKLORSUWXbcdgklmnoprstuvxyz'; # DO NOT REMOVE ANY
+our $short_no_arg = 'ACDEHIJKLORSUWXbcdgklmnopqrstuvxyz'; # DO NOT REMOVE ANY
 our $short_with_num = '@B'; # DO NOT REMOVE ANY
 
 # To disable a long-named option, change its value to a -1.  The values mean:
@@ -76,6 +76,7 @@ our %long_opt = (
   'checksum-choice' => 1,
   'checksum-seed' => 1,
   'compare-dest' => 2,
+  'compress-choice' => 1,
   'compress-level' => 1,
   'copy-dest' => 2,
   'copy-unsafe-links' => 0,
@@ -120,6 +121,7 @@ our %long_opt = (
   'no-relative' => 0,
   'no-specials' => 0,
   'numeric-ids' => 0,
+  'old-compress' => 0,
   'one-file-system' => 0,
   'only-write-batch' => 1,
   'open-noatime' => 0,


-- 
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

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  c32012d1 Need to indent a code block in the README.
  from  9ba6ce1b More release improvements.

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


- Log -
commit c32012d1997cab9eae113b8502e0ed9183f0bf4c
Author: Wayne Davison 
Date:   Sat Jun 13 21:31:26 2020 -0700

Need to indent a code block in the README.

---

Summary of changes:
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/README.md b/README.md
index 6323d0aa..d15399cf 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,7 @@ is hosted on github and on samba's site.  Feel free to 
access it here:
 
 or clone it from its samba repo:
 
-git clone git://git.samba.org/rsync.git
+> git clone git://git.samba.org/rsync.git
 
 See the download page for full details on all the ways to grab the
 source:


-- 
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

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  9ba6ce1b More release improvements.
   via  ca9e2477 Mention renamed .md files.
  from  f27a630e Don't use c++ comments.

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


- Log -
commit 9ba6ce1b67bd6d617c7fb59924a1a4c3c4c79069
Author: Wayne Davison 
Date:   Sat Jun 13 21:10:13 2020 -0700

More release improvements.

commit ca9e2477627ac5b9c6b6f52a03eb00d277305efb
Author: Wayne Davison 
Date:   Sat Jun 13 20:42:33 2020 -0700

Mention renamed .md files.

---

Summary of changes:
 NEWS.md |  3 ++
 packaging/md2html   | 87 +
 packaging/release-rsync | 17 ++
 3 files changed, 101 insertions(+), 6 deletions(-)
 create mode 100755 packaging/md2html


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index 18a28545..95fe78b6 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -143,6 +143,9 @@ Protocol: 31 (unchanged)
 
  - Add installed man page: /usr/man/man1/rsync-ssl.1
 
+ - Some "readme" files have changed names to be .md files, such as: README.md,
+   INSTALL.md, NEWS.md, & OLDNEWS.md.
+
  - The rsync-ssl script wants to run either openssl or stunnel4, so consider
adding a dependency for openssl (though it's probably fine to just let it
complain about being unable to find either program and let the user decide
diff --git a/packaging/md2html b/packaging/md2html
new file mode 100755
index ..f0f61cdc
--- /dev/null
+++ b/packaging/md2html
@@ -0,0 +1,87 @@
+#!/usr/bin/python3
+
+# Copyright (C) 2020 Wayne Davison
+#
+# This program is freely redistributable.
+
+import re, argparse
+
+HTML_START = """\
+
+%s
+https://fonts.googleapis.com/css2?family=Roboto=Roboto+Mono=swap;
 rel="stylesheet">
+
+body {
+  max-width: 50em;
+  margin: auto;
+}
+body, b, strong, u {
+  font-family: 'Roboto', sans-serif;
+}
+code {
+  font-family: 'Roboto Mono', monospace;
+  font-weight: bold;
+}
+pre code {
+  display: block;
+  font-weight: normal;
+}
+blockquote pre code {
+  background: #f1f1f1;
+}
+dd p:first-of-type {
+  margin-block-start: 0em;
+}
+
+
+"""
+
+HTML_END = """\
+
+"""
+
+md_parser = None
+
+def main():
+for mdfn in args.mdfiles:
+title = re.sub(r'.*/', '', mdfn).replace('.md', '')
+htfn = mdfn.replace('.md', '.html')
+
+print("Parsing", mdfn, '->', htfn)
+
+with open(mdfn, 'r', encoding='utf-8') as fh:
+txt = fh.read()
+
+html = md_parser(txt)
+
+with open(htfn, 'w', encoding='utf-8') as fh:
+fh.write(HTML_START % title)
+fh.write(html)
+fh.write(HTML_END)
+
+
+def html_via_cmarkgfm(txt):
+return cmarkgfm.markdown_to_html(txt)
+
+
+def html_via_commonmark(txt):
+return commonmark.HtmlRenderer().render(commonmark.Parser().parse(txt))
+
+
+if __name__ == '__main__':
+parser = argparse.ArgumentParser(description='Output html for md pages.', 
add_help=False)
+parser.add_argument("--help", "-h", action="help", help="Output this help 
message and exit.")
+parser.add_argument("mdfiles", nargs='+', help="The .md files to turn into 
.html files.")
+args = parser.parse_args()
+
+try:
+import cmarkgfm
+md_parser = html_via_cmarkgfm
+except:
+try:
+import commonmark
+md_parser = html_via_commonmark
+except:
+die("Failed to find cmarkgfm or commonmark for python3.")
+
+main()
diff --git a/packaging/release-rsync b/packaging/release-rsync
index ee771bd0..a4c193c6 100755
--- a/packaging/release-rsync
+++ b/packaging/release-rsync
@@ -329,13 +329,18 @@ About to:
 shutil.rmtree(rsync_ver)
 
 print(f"Updating the other files in {dest} ...")
-cmd_chk('rsync -a README.md NEWS.md OLDNEWS.md TODO'.split() + [dest])
-if os.path.lexists(news_file):
-os.unlink(news_file)
-os.link(f"{dest}/NEWS.md", news_file)
-cmd_chk(f"git log --name-status | gzip -9 >{dest}/ChangeLog.gz")
+md_files = 'README.md NEWS.md OLDNEWS.md'.split()
+html_files = [ fn for fn in gen_files if fn.endswith('.html') ]
+cmd_chk(['rsync', '-a', *md_files, *html_files, dest])
+cmd_chk(["packaging/md2html"] + [ dest +'/'+ fn for fn in md_files ])
+
+for topfn, verfn in (('NEWS.md', news_file), ('NEWS.html', 
news_file.replace('.md', '.html'))):
+topfn = dest + '/' + topfn
+if os.path.lexists(verfn):
+os.unlink(verfn)
+os.link(topfn, verfn)
 
-cmd_chk(['rsync', '-a', *glob.glob('*.[1-9].html'), os.path.join(dest, 
html_fn)])
+cmd_chk(f"git log --name-status | gzip -9 >{dest}/ChangeLog.gz")
 
 for fn in (srctar_file, pattar_file, diff_file):
 asc_fn = fn + '.asc'


-- 
The rsync repository.

___
rsync-cvs mailing list

[rsync-announce] Rsync 3.2.0pre1 released

2020-06-13 Thread Wayne Davison via rsync-announce
I have made rsync 3.2.0pre1 available for testing.  This release has a
bunch of fixes & new features.

Please test the code and send feedback via email to the rsync mailing list.
Bugs can be created via bugzilla tickets, github issues, or discussed on
the mailing list.

To see a summary of the changes since 3.1.3, visit this link:

http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.2.0pre1-NEWS

You can download the source tar file and its signature from here:

http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.2.0pre1.tar.gz
http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.2.0pre1.tar.gz.asc

The patches directory is in a separate tar file (for those that want one or
more of the patches):


http://rsync.samba.org/ftp/rsync/src-previews/rsync-patches-3.2.0pre1.tar.gz

http://rsync.samba.org/ftp/rsync/src-previews/rsync-patches-3.2.0pre1.tar.gz.asc

See the rsync website for other download methods, including diffs, etc.:

http://rsync.samba.org/

See also rsync on github:

https://github.com/WayneD/rsync

..wayne..
___
rsync-announce mailing list
rsync-announce@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-announce


Rsync 3.2.0pre1 released

2020-06-13 Thread Wayne Davison via rsync
I have made rsync 3.2.0pre1 available for testing.  This release has a
bunch of fixes & new features.

Please test the code and send feedback via email to the rsync mailing list.
Bugs can be created via bugzilla tickets, github issues, or discussed on
the mailing list.

To see a summary of the changes since 3.1.3, visit this link:

http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.2.0pre1-NEWS

You can download the source tar file and its signature from here:

http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.2.0pre1.tar.gz
http://rsync.samba.org/ftp/rsync/src-previews/rsync-3.2.0pre1.tar.gz.asc

The patches directory is in a separate tar file (for those that want one or
more of the patches):


http://rsync.samba.org/ftp/rsync/src-previews/rsync-patches-3.2.0pre1.tar.gz

http://rsync.samba.org/ftp/rsync/src-previews/rsync-patches-3.2.0pre1.tar.gz.asc

See the rsync website for other download methods, including diffs, etc.:

http://rsync.samba.org/

See also rsync on github:

https://github.com/WayneD/rsync

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  f27a630e Don't use c++ comments.
   via  243a9d9b A few more release script fixes.
  from  c528f8d5 Preparing for release of 3.2.0pre1

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


- Log -
commit f27a630e46d04dc3aede137dc9e898d50b305eba
Author: Wayne Davison 
Date:   Sat Jun 13 20:12:15 2020 -0700

Don't use c++ comments.

commit 243a9d9be0355b063cb982f1c9dff0e5ccc633eb
Author: Wayne Davison 
Date:   Sat Jun 13 20:11:06 2020 -0700

A few more release script fixes.

---

Summary of changes:
 log.c   |  8 
 packaging/release-rsync | 16 +---
 2 files changed, 13 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/log.c b/log.c
index 22b9f99d..2d8c5937 100644
--- a/log.c
+++ b/log.c
@@ -318,10 +318,10 @@ void rwrite(enum logcode code, const char *buf, int len, 
int is_utf8)
if (quiet)
return;
break;
-   //case FLOG:
-   //case FCLIENT:
-   //case FERROR_UTF8:
-   //case FERROR_SOCKET:
+   /*case FLOG:*/
+   /*case FCLIENT:*/
+   /*case FERROR_UTF8:*/
+   /*case FERROR_SOCKET:*/
default:
fprintf(stderr, "Bad logcode in rwrite(): %d [%s]\n", 
(int)code, who_am_i());
exit_cleanup(RERR_MESSAGEIO);
diff --git a/packaging/release-rsync b/packaging/release-rsync
index 7b969b0f..ee771bd0 100755
--- a/packaging/release-rsync
+++ b/packaging/release-rsync
@@ -254,10 +254,9 @@ About to:
 if re.match(r'^y', ans, re.I):
 print(f'\nVisiting all "patch/{args.master_branch}/*" branches ...')
 cmd_run(f"packaging/patch-update --branch={args.master_branch} 
--skip-check --shell")
-cmd_run("rm -f *.[o15] *.html")
-cmd_chk('rsync -a SaVeDiR/ .'.split())
-shutil.rmtree('SaVeDiR')
-cmd_chk('make gen'.split())
+
+cmd_run("rm -f *.[o15] *.html")
+cmd_chk('rsync -a SaVeDiR/ .'.split())
 
 if os.path.isdir('patches/.git'):
 s = cmd_run(f"cd patches && git commit -a -m 'The patches for 
{version}.'")
@@ -320,6 +319,11 @@ About to:
 os.mkdir(f"{rsync_ver}/patches", 0o755)
 cmd_chk(f"packaging/patch-update --skip-check 
--branch={args.master_branch} --gen={rsync_ver}/patches".split())
 
+cmd_run("rm -f *.[o15] *.html")
+cmd_chk('rsync -a SaVeDiR/ .'.split())
+shutil.rmtree('SaVeDiR')
+cmd_chk('make gen'.split())
+
 print(f"Creating {pattar_file} ...")
 cmd_chk(['fakeroot', 'tar', 'chzf', pattar_file, rsync_ver + '/patches'])
 shutil.rmtree(rsync_ver)
@@ -331,9 +335,7 @@ About to:
 os.link(f"{dest}/NEWS.md", news_file)
 cmd_chk(f"git log --name-status | gzip -9 >{dest}/ChangeLog.gz")
 
-for md_fn in glob.glob('*.[1-9].md'):
-html_fn = md_fn.replace('.md', '.html')
-cmd_chk(['rsync', '-a', html_fn, os.path.join(dest, html_fn)])
+cmd_chk(['rsync', '-a', *glob.glob('*.[1-9].html'), os.path.join(dest, 
html_fn)])
 
 for fn in (srctar_file, pattar_file, diff_file):
 asc_fn = fn + '.asc'


-- 
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

2020-06-13 Thread Rsync CVS commit messages
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 
Date:   Sat Jun 13 19:16:26 2020 -0700

Preparing for release of 3.2.0pre1

commit 1d1c0f14e16a98ecbf0d11b46e13859076b69ffa
Author: Wayne Davison 
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 
Date:   Sat Jun 13 18:19:12 2020 -0700

Some indentation fixes.

commit 8a70f1420b4b2e47ae6ba0d314fb8f703746766c
Author: Wayne Davison 
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)
  

[SCM] The rsync repository. - annotated tag v3.2.0pre1 created

2020-06-13 Thread Rsync CVS commit messages
The annotated tag, v3.2.0pre1 has been created
at  10cb0e085117ef888230e7539ec3424c14f46d02 (tag)
   tagging  c528f8d5c8aa7b16b20cda72a9f4119699890c28 (commit)
  replaces  v3.1.3
 tagged by  Wayne Davison
on  Sat Jun 13 19:31:54 2020 -0700

- Log -
Version 3.2.0pre1.
-BEGIN PGP SIGNATURE-

iG8EABECAC8WIQQASMiwJtTJbw5YnC9shZ+xS5aoxQUCXuWMGhEcd2F5bmVkQHNh
bWJhLm9yZwAKCRBshZ+xS5aoxVFmAKCbZeb+UZcSY9mpMRI6c/KomwqxSgCfXLjk
5s8py1tj3l/XRcruyPfiwe0=
=TdlP
-END PGP SIGNATURE-

Ethan Sommer via rsync (1):
  Replace mkproto.pl with mkproto.awk

Jorrit Jongma (5):
  SSE2/SSSE3 optimized version of get_checksum1() for x86-64
  AVX2 optimized version of get_checksum1() for x86-64
  Optimized assembler version of md5_process() for x86-64
  Improve performance of file_checksum()
  Move OpenSSL-related MD4/5 defines and imports to lib/mdigest.h

Sebastian Andrzej Siewior (1):
  Add OpenSSL license exception also to COPYING

Wayne Davison (227):
  Prepare the repository for more development.
  Allow some pre-/post-xfer exec shell restrictions.
  Avoid a compiler error/warning about shifting a negative value.
  Need to mark xattr rules in get_rule_prefix().
  Fix itemizing of wrong dir name on some --iconv transfers.
  Document how a leading comma changes the gid parsing.
  Don't force cygwin to solaris ACLs anymore.
  Try to be clearer that --append-verify isn't a general-purpose-copy 
option.
  Avoid a potential out-of-bounds read in daemon mode if argc is 0.
  Silence fall-through warnings.
  Avoid a failed test if dirs report 1 hlink (e.g. WSL weirdness).
  Fix 2 spelling errors pointed out by bug 13734.
  Avoid a yodl macro warning.
  Make sure that some memory zeroing always happens.
  Avoid a yodl macro warning.
  No need to strdup each new section since we stopped using free().
  Save each expanded daemon-config string on first use to
  Improve check for ".." and guard against dash args.
  Reject --log-file when read-only.
  Fix --prealloc to keep file-size 0 when possible.
  Avoid leaving a file open on error return.
  Avoid warning about leaked mem (didn't affect rsync's pool use).
  Use a separate pass-by-value pointer for clarity.
  Update option culling to handle latest changes.
  Improve write-only --sender check & handle 2 new options.
  Handle a run from down inside the checkout tree.
  Fix --remove-source-files sanity check w/--copy-links the right way.
  Tweak the copyright year.
  Fix zlib CVE-2016-9840.
  Fix zlib CVE-2016-9841.
  Fix zlib CVE-2016-9842.
  Fix zlib CVE-2016-9843.
  Some doc tweaks suggested by Clément Pit-Claudel.
  Clarify the cut-off point for --copy-safe-links.
  Fix bug in try_dests_reg that Florian Zumbiehl pointed out.
  Try to fix the iconv crash in bug 11338.
  Match the latest git "clean" text.
  Add a --copy-as=USER[:GROUP] option
  Use nanosleep if it is available.
  Make the --copy-links caveat a little clearer.
  Enhance the validation of --block-size for older protocols.
  Make exit_cleanup() use _exit() if called from a signal handler.
  Added the --write-devices option.
  No need to forward --write-devices to a remote sender.
  Add progress output via SIGINFO and SIGVTALRM
  Some configure improvements for strict C99 compilers (based on a patch by 
Florian Weimer).
  Use "exit 1" in atomic-rsync for error exit.
  Don't throw an error if a potential fuzzy dir isn't a dir
  Tweak some indentation.
  Another tweak for a change in git status.
  A quick fix for some perl patch-helper scripts.
  Set RSYNC_PORT in the env for a daemon-over-rsh connection.
  Make use of the new RSYNC_PORT env var.
  Avoid the include warnings for major().
  Tweak the grep to look for sys/sysmacros.h.
  Fix the default skip-compress list.
  Switch RSYNC_PORT to -1 in check_for_hostspec().
  Set Copyright years and make them easier to update
  Put the year-tweak script into packaging dir.
  Use the --quiet option.
  Add a (pending) release line for 3.1.4.
  Change some packaging tools into python3 and make a few improvements.
  A few file-data improvements.
  Spelling fixes from a Fossies run done by Jens.
  Two more spelling fixes and some year updates.
  Change the rsync-ssl helper script
  Change the name of the rsh-ssl-rsync script.
  Some more rsync-ssl improvements:
  Turn nightly-rsync into a python script.
  Eliminate .in for rsync-ssl.
  Mention more changes in the NEWS.
  Added --atimes and --set-noatime options.
  Change --set-notime to --open-noatime.
  Change do_setattrlist_times() to use an stp arg.
  Change pending version to 3.2.0 (currently 3.2.0dev).
  Update 

[Bug 14407] New: link_stat ... failed: No such file or directory: should mention which end of the connection it is talking about

2020-06-13 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=14407

Bug ID: 14407
   Summary: link_stat ... failed: No such file or directory:
should mention which end of the connection it is
talking about
   Product: rsync
   Version: 3.2.0
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P5
 Component: core
  Assignee: wa...@opencoder.net
  Reporter: jida...@jidanni.org
QA Contact: rsync...@samba.org
  Target Milestone: ---

Messages like
rsync: link_stat "/home/ralph/x/y/z" failed: No such file or directory (2)
perhaps should mention if they are talking about the source, or the
destination, as often the paths are the same.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 13321] Rsync --copy-dest issue

2020-06-13 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=13321

Wayne Davison  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|NEW |RESOLVED

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  cdf58a7a Change alt_dest_name() to alt_dest_opt().
  from  1d6c9676 Change 3 alt-dest vars to just one + some defines.

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


- Log -
commit cdf58a7aba23e31653661c950c2c870b96de08fa
Author: Wayne Davison 
Date:   Sat Jun 13 12:04:13 2020 -0700

Change alt_dest_name() to alt_dest_opt().

---

Summary of changes:
 compat.c  | 4 ++--
 main.c| 4 ++--
 options.c | 8 
 3 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/compat.c b/compat.c
index 19d054bf..e01adfbd 100644
--- a/compat.c
+++ b/compat.c
@@ -565,7 +565,7 @@ void setup_protocol(int f_out,int f_in)
rprintf(FERROR,
"%s with --inplace requires protocol 29 or higher"
" (negotiated %d).\n",
-   alt_dest_name(0), protocol_version);
+   alt_dest_opt(0), protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
 
@@ -573,7 +573,7 @@ void setup_protocol(int f_out,int f_in)
rprintf(FERROR,
"Using more than one %s option requires protocol"
" 29 or higher (negotiated %d).\n",
-   alt_dest_name(0), protocol_version);
+   alt_dest_opt(0), protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
 
diff --git a/main.c b/main.c
index 5ccfabe3..6f86eb90 100644
--- a/main.c
+++ b/main.c
@@ -833,9 +833,9 @@ static void check_alt_basis_dirs(void)
basis_dir[j] = bdir = new;
}
if (do_stat(bdir, ) < 0)
-   rprintf(FWARNING, "%s arg does not exist: %s\n", 
alt_dest_name(0), bdir);
+   rprintf(FWARNING, "%s arg does not exist: %s\n", 
alt_dest_opt(0), bdir);
else if (!S_ISDIR(st.st_mode))
-   rprintf(FWARNING, "%s arg is not a dir: %s\n", 
alt_dest_name(0), bdir);
+   rprintf(FWARNING, "%s arg is not a dir: %s\n", 
alt_dest_opt(0), bdir);
}
 }
 
diff --git a/options.c b/options.c
index d865a8e1..a4f4262e 100644
--- a/options.c
+++ b/options.c
@@ -1297,7 +1297,7 @@ static void popt_unalias(poptContext con, const char *opt)
poptAddAlias(con, unalias, 0);
 }
 
-char *alt_dest_name(int type)
+char *alt_dest_opt(int type)
 {
if (!type)
type = alt_dest_type;
@@ -1699,7 +1699,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (alt_dest_type && alt_dest_type != want_dest_type) {
snprintf(err_buf, sizeof err_buf,
"ERROR: the %s option conflicts with 
the %s option\n",
-   alt_dest_name(want_dest_type), 
alt_dest_name(0));
+   alt_dest_opt(want_dest_type), 
alt_dest_opt(0));
return 0;
}
alt_dest_type = want_dest_type;
@@ -1707,7 +1707,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (basis_dir_cnt >= MAX_BASIS_DIRS) {
snprintf(err_buf, sizeof err_buf,
"ERROR: at most %d %s args may be 
specified\n",
-   MAX_BASIS_DIRS, alt_dest_name(0));
+   MAX_BASIS_DIRS, alt_dest_opt(0));
return 0;
}
/* We defer sanitizing this arg until we know what
@@ -2797,7 +2797,7 @@ void server_options(char **args, int *argc_p)
 *   option, so don't send it if client is the sender.
 */
for (i = 0; i < basis_dir_cnt; i++) {
-   args[ac++] = alt_dest_name(0);
+   args[ac++] = alt_dest_opt(0);
args[ac++] = basis_dir[i];
}
}


-- 
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

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  1d6c9676 Change 3 alt-dest vars to just one + some defines.
   via  3d29fa99 Tweak a couple var names.
  from  d1679358 Change a function name.

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


- Log -
commit 1d6c9676f9a11f9d6e8a1a77b9c00333c0e6f11e
Author: Wayne Davison 
Date:   Sat Jun 13 11:47:08 2020 -0700

Change 3 alt-dest vars to just one + some defines.

commit 3d29fa99ecc4d7bc89908e9768764de8c6bede64
Author: Wayne Davison 
Date:   Sat Jun 13 11:24:30 2020 -0700

Tweak a couple var names.

---

Summary of changes:
 compat.c|  5 ++---
 generator.c | 24 +++-
 hlink.c |  4 ++--
 main.c  |  5 ++---
 options.c   | 62 +++--
 rsync.h |  4 
 syscall.c   |  8 
 7 files changed, 61 insertions(+), 51 deletions(-)


Changeset truncated at 500 lines:

diff --git a/compat.c b/compat.c
index 91b2771d..19d054bf 100644
--- a/compat.c
+++ b/compat.c
@@ -51,7 +51,6 @@ extern int do_compression;
 extern int do_compression_level;
 extern char *shell_cmd;
 extern char *partial_dir;
-extern char *dest_option;
 extern char *files_from;
 extern char *filesfrom_host;
 extern const char *checksum_choice;
@@ -566,7 +565,7 @@ void setup_protocol(int f_out,int f_in)
rprintf(FERROR,
"%s with --inplace requires protocol 29 or higher"
" (negotiated %d).\n",
-   dest_option, protocol_version);
+   alt_dest_name(0), protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
 
@@ -574,7 +573,7 @@ void setup_protocol(int f_out,int f_in)
rprintf(FERROR,
"Using more than one %s option requires protocol"
" 29 or higher (negotiated %d).\n",
-   dest_option, protocol_version);
+   alt_dest_name(0), protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
 
diff --git a/generator.c b/generator.c
index b0755a30..39f8310d 100644
--- a/generator.c
+++ b/generator.c
@@ -78,9 +78,7 @@ extern int fuzzy_basis;
 extern int always_checksum;
 extern int flist_csum_len;
 extern char *partial_dir;
-extern int compare_dest;
-extern int copy_dest;
-extern int link_dest;
+extern int alt_dest_type;
 extern int whole_file;
 extern int list_only;
 extern int read_batch;
@@ -916,15 +914,15 @@ static int try_dests_reg(struct file_struct *file, char 
*fname, int ndx,
goto got_nothing_for_ya;
}
 
-   if (match_level == 3 && !copy_dest) {
+   if (match_level == 3 && alt_dest_type != COPY_DEST) {
if (find_exact_for_existing) {
-   if (link_dest && real_st.st_dev == sxp->st.st_dev && 
real_st.st_ino == sxp->st.st_ino)
+   if (alt_dest_type == LINK_DEST && real_st.st_dev == 
sxp->st.st_dev && real_st.st_ino == sxp->st.st_ino)
return -1;
if (do_unlink(fname) < 0 && errno != ENOENT)
goto got_nothing_for_ya;
}
 #ifdef SUPPORT_HARD_LINKS
-   if (link_dest) {
+   if (alt_dest_type == LINK_DEST) {
if (!hard_link_one(file, fname, cmpbuf, 1))
goto try_a_copy;
if (atimes_ndx)
@@ -1094,7 +1092,7 @@ static int try_dests_non(struct file_struct *file, char 
*fname, int ndx,
 
if (match_level == 3) {
 #ifdef SUPPORT_HARD_LINKS
-   if (link_dest
+   if (alt_dest_type == LINK_DEST
 #ifndef CAN_HARDLINK_SYMLINK
 && !S_ISLNK(file->mode)
 #endif
@@ -1115,7 +1113,7 @@ static int try_dests_non(struct file_struct *file, char 
*fname, int ndx,
match_level = 2;
if (itemizing && stdout_format_has_i
 && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) {
-   int chg = compare_dest && type != TYPE_DIR ? 0
+   int chg = alt_dest_type == COMPARE_DEST && type != 
TYPE_DIR ? 0
: ITEM_LOCAL_CHANGE + (match_level == 3 ? 
ITEM_XNAME_FOLLOWS : 0);
char *lp = match_level == 3 ? "" : NULL;
itemize(cmpbuf, file, ndx, 0, sxp, chg + ITEM_MATCHED, 
0, lp);
@@ -1550,11 +1548,11 @@ static void recv_generator(char *fname, struct 
file_struct *file, int ndx,
  itemizing, code);
if (j == -2) {
 #ifndef CAN_HARDLINK_SYMLINK
-   if (link_dest) {
+   if 

[Bug 13364] rsyncd clips trims relative symlinks outside of source tree

2020-06-13 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=13364

Wayne Davison  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #4 from Wayne Davison  ---
As long as "munge symlinks = false" is set for your module (which is the
default with "use chroot = true" and a normal path value is set), then rsync
doesn't tweak the symlinks in the transfer at all.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[Bug 13385] rsync sometimes silently transfers more or fewer mtimes than it should

2020-06-13 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=13385

Wayne Davison  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Wayne Davison  ---
Thanks for pointing that out. The code was honoring the modify window when
checking if the file needed to be transferred, but the code checking if it
needed to call utime on a file had lost its modify-window logic. It was also
coded to not force just a nano-seconds change for a file that hadn't been
transferred or checksummed, but that seems like the wrong thing to do with
-@-1. Changes committed to git.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  d1679358 Change a function name.
  from  d3269612 Fix overzealous setting of mtime & tweak time comparisons

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


- Log -
commit d1679358744176d1947668f601328268511716c4
Author: Wayne Davison 
Date:   Sat Jun 13 03:03:33 2020 -0700

Change a function name.

---

Summary of changes:
 generator.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/generator.c b/generator.c
index 70e11374..b0755a30 100644
--- a/generator.c
+++ b/generator.c
@@ -392,7 +392,7 @@ static void do_delete_pass(void)
rprintf(FINFO, "\r");
 }
 
-static inline int time_differs(STRUCT_STAT *stp, struct file_struct *file)
+static inline int mtime_differs(STRUCT_STAT *stp, struct file_struct *file)
 {
 #ifdef ST_MTIME_NSEC
return !same_time(stp->st_mtime, stp->ST_MTIME_NSEC, file->modtime, 
F_MOD_NSEC_or_0(file));
@@ -455,7 +455,7 @@ int unchanged_attrs(const char *fname, struct file_struct 
*file, stat_x *sxp)
 {
if (S_ISLNK(file->mode)) {
 #ifdef CAN_SET_SYMLINK_TIMES
-   if (preserve_times & PRESERVE_LINK_TIMES && 
time_differs(>st, file))
+   if (preserve_times & PRESERVE_LINK_TIMES && 
mtime_differs(>st, file))
return 0;
 #endif
 #ifdef CAN_CHMOD_SYMLINK
@@ -475,7 +475,7 @@ int unchanged_attrs(const char *fname, struct file_struct 
*file, stat_x *sxp)
return 0;
 #endif
} else {
-   if (preserve_times && time_differs(>st, file))
+   if (preserve_times && mtime_differs(>st, file))
return 0;
if (perms_differ(file, sxp))
return 0;
@@ -510,7 +510,7 @@ void itemize(const char *fnamecmp, struct file_struct 
*file, int ndx, int statre
if (iflags & ITEM_LOCAL_CHANGE)
iflags |= symlink_timeset_failed_flags;
} else if (keep_time
-? time_differs(>st, file)
+? mtime_differs(>st, file)
 : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & 
ITEM_MATCHED)
  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
iflags |= ITEM_REPORT_TIME;
@@ -605,7 +605,7 @@ int unchanged_file(char *fn, struct file_struct *file, 
STRUCT_STAT *st)
if (ignore_times)
return 0;
 
-   return !time_differs(st, file);
+   return !mtime_differs(st, file);
 }
 
 
@@ -2089,7 +2089,7 @@ static void touch_up_dirs(struct file_list *flist, int 
ndx)
do_chmod(fname, file->mode);
if (need_retouch_dir_times) {
STRUCT_STAT st;
-   if (link_stat(fname, , 0) == 0 && time_differs(, 
file)) {
+   if (link_stat(fname, , 0) == 0 && mtime_differs(, 
file)) {
st.st_mtime = file->modtime;
 #ifdef ST_MTIME_NSEC
st.ST_MTIME_NSEC = F_MOD_NSEC_or_0(file);


-- 
The rsync repository.

___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs


Re: bug: xattr filter rule treated as file filter rule on the remote side

2020-06-13 Thread Wayne Davison via rsync
On Wed, May 16, 2018 at 10:03 AM Andras Nagy wrote:

> Summary: an xattr filter rule (e.g. --filter='-x! user.*’, which is
> suggested by the documentation) is treated as a file filter rule on the
> remote side.
>

This got fixed in git a long time ago, but I (sadly) haven't yet made a new
release that includes it. It will be in 3.2.0.

The issue was that the filter-sending code was not modified to include the
'x' qualifier when writing out these rules.

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Rsync 3.1.3 segfault

2020-06-13 Thread Wayne Davison via rsync
On Mon, May 28, 2018 at 7:22 AM Marcin Krol wrote:

> The code responsible for segfault is new popt_unalias function added
> in 3.1.3. To be exact this line causes segfault:
> poptAddAlias(con, unalias, 0);
>

I have never seen this crash occur, but it dawned on me that the reason is
most likely that the function calling poptAddAlias() created an argv array
with only one element in it instead of the more proper 2-element array with
room for a trailing NULL.  I've tweaked the code to change that.

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[SCM] The rsync repository. - branch master updated

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  d3269612 Fix overzealous setting of mtime & tweak time comparisons
   via  7dec4029 Convert a couple files to UTF-8; more Copyright years.
  from  ab0189c8 Make use of poptDupArgv().

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


- Log -
commit d32696129097fcc2c0560da2f6b1d481b854a2b9
Author: Wayne Davison 
Date:   Sat Jun 13 02:32:15 2020 -0700

Fix overzealous setting of mtime & tweak time comparisons

- Stop setting the mtime on a file we didn't transfer (or didn't verify
  the checksum) when the time diff is within the modify window.
- Stop computing a time difference (-1|0|1) when all we care about is
  time equality.

commit 7dec4029ee4580e5990c062f0b3093e39f800fbf
Author: Wayne Davison 
Date:   Sat Jun 13 02:31:00 2020 -0700

Convert a couple files to UTF-8; more Copyright years.

---

Summary of changes:
 backup.c  |  4 ++--
 generator.c   | 29 +++--
 hashtable.c   |  2 +-
 hlink.c   |  2 +-
 packaging/year-tweak  |  7 ---
 rsync.c   | 28 +++-
 rsync.h   |  2 +-
 testsuite/backup.test |  2 +-
 testsuite/chmod-temp-dir.test |  2 +-
 testsuite/chmod.test  |  2 +-
 testsuite/compare-dest.test   |  2 +-
 testsuite/delete.test |  2 +-
 testsuite/exclude.test| 22 +-
 testsuite/files-from.test |  2 +-
 testsuite/fuzzy.test  |  2 +-
 testsuite/itemize.test|  2 +-
 testsuite/merge.test  |  2 +-
 testsuite/relative.test   |  2 +-
 testsuite/unsafe-byname.test  |  2 +-
 testsuite/unsafe-links.test   |  2 +-
 testsuite/wildmatch.test  |  2 +-
 util.c| 33 ++---
 22 files changed, 87 insertions(+), 68 deletions(-)


Changeset truncated at 500 lines:

diff --git a/backup.c b/backup.c
index 326ecac2..be406bef 100644
--- a/backup.c
+++ b/backup.c
@@ -2,7 +2,7 @@
  * Backup handling code.
  *
  * Copyright (C) 1999 Andrew Tridgell
- * 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
@@ -336,7 +336,7 @@ int make_backup(const char *fname, BOOL prefer_rename)
 
save_preserve_xattrs = preserve_xattrs;
preserve_xattrs = 0;
-   set_file_attrs(buf, file, NULL, fname, ATTRS_SET_NANO);
+   set_file_attrs(buf, file, NULL, fname, ATTRS_ACCURATE_TIME);
preserve_xattrs = save_preserve_xattrs;
 
unmake_file(file);
diff --git a/generator.c b/generator.c
index 210e5f31..70e11374 100644
--- a/generator.c
+++ b/generator.c
@@ -59,6 +59,7 @@ extern int human_readable;
 extern int ignore_existing;
 extern int ignore_non_existing;
 extern int want_xattr_optim;
+extern int modify_window;
 extern int inplace;
 extern int append_mode;
 extern int make_backups;
@@ -100,7 +101,7 @@ extern struct file_list *cur_flist, *first_flist, 
*dir_flist;
 extern filter_rule_list filter_list, daemon_filter_list;
 
 int maybe_ATTRS_REPORT = 0;
-int maybe_ATTRS_SET_NANO = 0;
+int maybe_ATTRS_ACCURATE_TIME = 0;
 
 static dev_t dev_zero;
 static int deldelay_size = 0, deldelay_cnt = 0;
@@ -391,12 +392,12 @@ static void do_delete_pass(void)
rprintf(FINFO, "\r");
 }
 
-static inline int time_diff(STRUCT_STAT *stp, struct file_struct *file)
+static inline int time_differs(STRUCT_STAT *stp, struct file_struct *file)
 {
 #ifdef ST_MTIME_NSEC
-   return cmp_time(stp->st_mtime, stp->ST_MTIME_NSEC, file->modtime, 
F_MOD_NSEC_or_0(file));
+   return !same_time(stp->st_mtime, stp->ST_MTIME_NSEC, file->modtime, 
F_MOD_NSEC_or_0(file));
 #else
-   return cmp_time(stp->st_mtime, 0L, file->modtime, 0L);
+   return !same_time(stp->st_mtime, 0, file->modtime, 0);
 #endif
 }
 
@@ -454,7 +455,7 @@ int unchanged_attrs(const char *fname, struct file_struct 
*file, stat_x *sxp)
 {
if (S_ISLNK(file->mode)) {
 #ifdef CAN_SET_SYMLINK_TIMES
-   if (preserve_times & PRESERVE_LINK_TIMES && time_diff(>st, 
file))
+   if (preserve_times & PRESERVE_LINK_TIMES && 
time_differs(>st, file))
return 0;
 #endif
 #ifdef CAN_CHMOD_SYMLINK
@@ -474,7 +475,7 @@ int unchanged_attrs(const char *fname, struct file_struct 
*file, stat_x *sxp)
return 0;
 #endif
} else {
-   if (preserve_times && time_diff(>st, file))
+   if (preserve_times && time_differs(>st, file))
return 0;
if (perms_differ(file, sxp))
return 0;
@@ -509,12 

[SCM] The rsync repository. - branch master updated

2020-06-13 Thread Rsync CVS commit messages
The branch, master has been updated
   via  ab0189c8 Make use of poptDupArgv().
   via  bb484a79 The unalias argv array needs room for a trailing NULL.
  from  ad9f1571 Add hashtable to delete_in_dir() to fix -x deletions

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


- Log -
commit ab0189c81365c0b00e8235a29be67e60cf89a1ab
Author: Wayne Davison 
Date:   Fri Jun 12 23:10:44 2020 -0700

Make use of poptDupArgv().

commit bb484a799e289d3654adeb549b9990fcd9480a5f
Author: Wayne Davison 
Date:   Fri Jun 12 23:10:32 2020 -0700

The unalias argv array needs room for a trailing NULL.

---

Summary of changes:
 NEWS.md   |  6 --
 main.c| 11 ---
 options.c |  5 +++--
 3 files changed, 11 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index 14a11d7e..bfadccde 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -33,8 +33,6 @@ Protocol: 31 (unchanged)
 
  - Some rrsync fixes and enhancements to handle the latest options.
 
- - Fixed a crash in the `--iconv` code.
-
  - Fixed a problem with the `--link-dest`|`--copy-dest` code when `--xattrs`
was specified along with multiple alternate-destination directories (it
could possibly choose a bad file match while trying to find a better xattr
@@ -50,6 +48,10 @@ Protocol: 31 (unchanged)
  - Fixed a mismatch in the RSYNC_PID values when running both a `pre-xfer exec`
and a `post-xfer exec`.
 
+ - Fixed a crash in the `--iconv` code.
+
+ - Fixed a rare crash in the popt_unalias() code.
+
 ### ENHANCEMENTS:
 
  - Various checksum enhancements, including the optional use of openssl's MD4 &
diff --git a/main.c b/main.c
index 155b178c..90ab43db 100644
--- a/main.c
+++ b/main.c
@@ -26,6 +26,7 @@
 #if defined CONFIG_LOCALE && defined HAVE_LOCALE_H
 #include 
 #endif
+#include 
 
 extern int dry_run;
 extern int list_only;
@@ -1706,13 +1707,9 @@ int main(int argc,char *argv[])
option_error();
exit_cleanup(RERR_SYNTAX);
}
-   if (write_batch) {
-   int j;
-   cooked_argc = argc;
-   cooked_argv = new_array(char*, argc+1);
-   for (j = 0; j <= argc; j++)
-   cooked_argv[j] = argv[j];
-   }
+   if (write_batch
+&& poptDupArgv(argc, (const char **)argv, _argc, (const char 
***)_argv) != 0)
+   out_of_memory("main");
 
SIGACTMASK(SIGINT, sig_int);
SIGACTMASK(SIGHUP, sig_int);
diff --git a/options.c b/options.c
index 2e0f9da2..b6088405 100644
--- a/options.c
+++ b/options.c
@@ -1287,10 +1287,11 @@ static void popt_unalias(poptContext con, const char 
*opt)
 {
struct poptAlias unalias;
 
+   memset(, 0, sizeof unalias);
+
unalias.longName = opt + 2; /* point past the leading "--" */
-   unalias.shortName = '\0';
unalias.argc = 1;
-   unalias.argv = new_array(const char*, 1);
+   unalias.argv = new_array0(const char*, 2);
unalias.argv[0] = strdup(opt);
 
poptAddAlias(con, unalias, 0);


-- 
The rsync repository.

___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs