[SCM] The rsync repository. - branch master updated
The branch, master has been updated via 8809f65b A couple minor tweaks. from 5710d2fe Simplify the capabilities array. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit 8809f65b1394de9027fa73a0bc4dad84a8e036fd Author: Wayne Davison Date: Tue May 26 22:28:22 2020 -0700 A couple minor tweaks. --- Summary of changes: compat.c | 34 +- options.c | 2 ++ 2 files changed, 19 insertions(+), 17 deletions(-) Changeset truncated at 500 lines: diff --git a/compat.c b/compat.c index ccf9c3d7..a124c200 100644 --- a/compat.c +++ b/compat.c @@ -353,7 +353,14 @@ int get_default_nno_list(struct name_num_obj *nno, char *to_buf, int to_buf_len, { struct name_num_item *nni; int len = 0, cnt = 0; - char pre_char = '\0', post_char = '\0'; + char delim = '\0', post_delim; + + switch (dup_markup) { + case '(': post_delim = ')'; break; + case '[': post_delim = ']'; break; + case '{': post_delim = '}'; break; + default: post_delim = '\0'; break; + } init_nno_saw(nno, 0); @@ -361,26 +368,20 @@ int get_default_nno_list(struct name_num_obj *nno, char *to_buf, int to_buf_len, if (nni->main_name) { if (!dup_markup) continue; - pre_char = dup_markup; - switch (pre_char) { - case '(': post_char = ')'; break; - case '[': post_char = ']'; break; - case '{': post_char = '}'; break; - default: break; - } + delim = dup_markup; } if (len) to_buf[len++]= ' '; - if (pre_char) { - to_buf[len++]= pre_char; - pre_char = '\0'; + if (delim) { + to_buf[len++]= delim; + delim = post_delim; } len += strlcpy(to_buf+len, nni->name, to_buf_len - len); if (len >= to_buf_len - 3) exit_cleanup(RERR_UNSUPPORTED); /* IMPOSSIBLE... */ - if (post_char) { - to_buf[len++]= post_char; - post_char = '\0'; + if (delim) { + to_buf[len++]= delim; + delim = '\0'; } nno->saw[nni->num] = ++cnt; } @@ -411,9 +412,8 @@ static void send_negotiate_str(int f_out, struct name_num_obj *nno, const char * } else list_str = NULL; - if (!list_str || !*list_str) { - len = get_default_nno_list(nno, tmpbuf, sizeof tmpbuf, '\0'); - } + if (!list_str || !*list_str) + len = get_default_nno_list(nno, tmpbuf, MAX_NSTR_STRLEN, '\0'); if (DEBUG_GTE(NSTR, am_server ? 3 : 2)) { if (am_server) diff --git a/options.c b/options.c index d5b648cb..1650780e 100644 --- a/options.c +++ b/options.c @@ -605,6 +605,8 @@ static void print_capabilities(enum logcode f) #endif "IPv6", + "batchfiles", + #ifndef HAVE_FTRUNCATE "no " #endif -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
[Bug 12838] [PATCH] Log sent/received bytes even in case of error
https://bugzilla.samba.org/show_bug.cgi?id=12838 Ben RUBSON changed: What|Removed |Added Resolution|--- |MOVED Status|NEW |RESOLVED --- Comment #2 from Ben RUBSON --- Patch moved : https://github.com/WayneD/rsync/pull/5 -- 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 12819] [PATCH] sync() on receiving side for data consistency
https://bugzilla.samba.org/show_bug.cgi?id=12819 Ben RUBSON changed: What|Removed |Added Resolution|--- |MOVED Status|NEW |RESOLVED --- Comment #9 from Ben RUBSON --- Patch moved : https://github.com/WayneD/rsync/pull/4 -- 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 12525] [PATCH] Avoid uploading whole file when transfer fails
https://bugzilla.samba.org/show_bug.cgi?id=12525 Bug 12525 depends on bug 12522, which changed state. Bug 12522 Summary: [PATCH] Send last error messages to sender https://bugzilla.samba.org/show_bug.cgi?id=12522 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |MOVED -- 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 12525] [PATCH] Avoid uploading whole file when transfer fails
https://bugzilla.samba.org/show_bug.cgi?id=12525 Ben RUBSON changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |MOVED --- Comment #2 from Ben RUBSON --- Patch moved : https://github.com/WayneD/rsync/pull/3 -- 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 12522] [PATCH] Send last error messages to sender
https://bugzilla.samba.org/show_bug.cgi?id=12522 Ben RUBSON changed: What|Removed |Added Resolution|--- |MOVED Status|NEW |RESOLVED --- Comment #4 from Ben RUBSON --- Patch moved : https://github.com/WayneD/rsync/pull/2 -- 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 12498] --fuzzy --fuzzy hugely impacts performance even if its' not needed
https://bugzilla.samba.org/show_bug.cgi?id=12498 Ben RUBSON changed: What|Removed |Added Resolution|--- |MOVED Status|NEW |RESOLVED --- Comment #3 from Ben RUBSON --- Patch moved : https://github.com/WayneD/rsync/pull/1 -- 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 14395] New: Add an option to remove exclude files from the source
https://bugzilla.samba.org/show_bug.cgi?id=14395 Bug ID: 14395 Summary: Add an option to remove exclude files from the source Product: rsync Version: 3.2.0 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: core Assignee: wa...@opencoder.net Reporter: g...@zumbi.com.ar QA Contact: rsync...@samba.org Target Milestone: --- Hello rsync has the --delete-excluded option, I'd like to have the same but for the source to use with --remove-source-files. That way I'd only copy the files I want and remove everything else from the source. thanks for rsync! -- 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 14394] New: Add an option for --remove-source-files to remove files right away
https://bugzilla.samba.org/show_bug.cgi?id=14394 Bug ID: 14394 Summary: Add an option for --remove-source-files to remove files right away Product: rsync Version: 3.2.0 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: core Assignee: wa...@opencoder.net Reporter: g...@zumbi.com.ar QA Contact: rsync...@samba.org Target Milestone: --- Hello I want to have an option to change the behavior of --remove-source-files to remove the file right after it was transfer instead of after the whole operation finished. My use case is to move files between systems with bad connectivity and low disk space, on the recv side the files are deleted soon after receiving them making rsync to download them again if the last sync operation didn't finish correctly. I use rsync like a queue in this case, sort of thank you so much for the wonderful rsync! -- 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
The branch, master has been updated via 5710d2fe Simplify the capabilities array. from bcb0a24a Convert NEWS & OLDNEWS into .md files. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit 5710d2fe2eb752f058bbf0dac305b413e0f24504 Author: Wayne Davison Date: Tue May 26 07:38:45 2020 -0700 Simplify the capabilities array. --- Summary of changes: options.c | 93 +-- 1 file changed, 36 insertions(+), 57 deletions(-) Changeset truncated at 500 lines: diff --git a/options.c b/options.c index 04b84a72..d5b648cb 100644 --- a/options.c +++ b/options.c @@ -576,103 +576,82 @@ static char *istring(const char *fmt, int val) static void print_capabilities(enum logcode f) { - char *capabilities[256]; /* Just overallocate this so it's impossible to overflow... */ - char line_buf[75]; STRUCT_STAT *dumstat; - int line_len, cnt = 0; - -#define add(str,val) capabilities[cnt++] = istring(str, val) - - add("%d-bit files", (int)(sizeof (OFF_T) * 8)); - add("%d-bit inums", (int)(sizeof dumstat->st_ino * 8)); /* Don't check ino_t! */ - add("%d-bit timestamps", (int)(sizeof (time_t) * 8)); - add("%d-bit long ints", (int)(sizeof (int64) * 8)); - -#undef add -#define add(str) capabilities[cnt++] = str + char line_buf[75]; + int line_len, j; + char *capabilities[] = { + istring("%d-bit files", (int)(sizeof (OFF_T) * 8)), + istring("%d-bit inums", (int)(sizeof dumstat->st_ino * 8)), /* Don't check ino_t! */ + istring("%d-bit timestamps", (int)(sizeof (time_t) * 8)), + istring("%d-bit long ints", (int)(sizeof (int64) * 8)), - add( #ifndef HAVE_SOCKETPAIR -"no " + "no " #endif -"socketpairs"); + "socketpairs", - add( #ifndef SUPPORT_HARD_LINKS -"no " + "no " #endif -"hardlinks"); + "hardlinks", - add( #ifndef SUPPORT_LINKS -"no " + "no " #endif -"symlinks"); + "symlinks", - add( #ifndef INET6 -"no " + "no " #endif -"IPv6"); - - add("batchfiles"); + "IPv6", - add( #ifndef HAVE_FTRUNCATE -"no " + "no " #endif -"inplace"); + "inplace", - add( #ifndef HAVE_FTRUNCATE -"no " + "no " #endif -"append"); + "append", - add( #ifndef SUPPORT_ACLS -" no" + "no " #endif -"ACLs"); + "ACLs", - add( #ifndef SUPPORT_XATTRS -" no" + "no " #endif -"xattrs"); + "xattrs", - add( #ifndef ICONV_OPTION -" no" + "no " #endif -"iconv"); + "iconv", - add( #ifndef CAN_SET_SYMLINK_TIMES -" no" + "no " #endif -"symtimes"); + "symtimes", - add( #ifndef SUPPORT_PREALLOCATION -"no " + "no " #endif -"prealloc"); + "prealloc", - add( #ifndef HAVE_SIMD -"no " + "no " #endif -"SIMD"); - - add(NULL); + "SIMD", -#undef add + NULL + }; - for (line_len = 0, cnt = 0; ; cnt++) { - char *cap = capabilities[cnt]; + for (line_len = 0, j = 0; ; j++) { + char *cap = capabilities[j]; int cap_len = cap ? strlen(cap) : 1000; - int need_comma = cap && capabilities[cnt+1] != NULL ? 1 : 0; + int need_comma = cap && capabilities[j+1] != NULL ? 1 : 0; if (line_len + 1 + cap_len + need_comma >= (int)sizeof line_buf) { rprintf(f, " %s\n", line_buf); line_len = 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
The branch, master has been updated via bcb0a24a Convert NEWS & OLDNEWS into .md files. from 96ed96da Fix the parsing of the --version capabilities. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit bcb0a24a8fc8db02deea6f9bfaf55cfa2b9b47c8 Author: Wayne Davison Date: Tue May 26 02:14:05 2020 -0700 Convert NEWS & OLDNEWS into .md files. --- Summary of changes: NEWS | 111 -- NEWS.md | 115 ++ OLDNEWS | 3814 - OLDNEWS.md | 3863 ++ packaging/lsb/rsync.spec |2 +- packaging/pkglib.py |4 +- packaging/release-rsync | 24 +- 7 files changed, 3993 insertions(+), 3940 deletions(-) delete mode 100644 NEWS create mode 100644 NEWS.md delete mode 100644 OLDNEWS create mode 100644 OLDNEWS.md Changeset truncated at 500 lines: diff --git a/NEWS b/NEWS deleted file mode 100644 index 541d65d9.. --- a/NEWS +++ /dev/null @@ -1,111 +0,0 @@ -NEWS for rsync 3.2.0 (UNRELEASED) -Protocol: 31 (unchanged) -Changes since 3.1.3: - - BUG FIXES: - -- Avoid a potential out-of-bounds read in daemon mode if argc can be made - to become 0. - -- Fix the default list of skip-compress files for non-daemon transfers. - -- Fix xattr filter rules losing an 'x' attribute in a non-local transfer. - -- Avoid an error when a check for a potential fuzzy file happens to - reference a directory. - -- Make the atomic-rsync helper script have a more consistent error-exit. - -- Make sure that a signal handler calls _exit() instead of exit(). - -- Various zlib fixes, including security fixes for CVE-2016-9843, - CVE-2016-9842, CVE-2016-9841, and CVE-2016-9840. - -- Fixed an issue with --remove-source-files not removing a source symlink - when combined with --copy-links. - -- Fixed a bug where the daemon would fail to write early fatal error - messages to the client, such as refused or unknown command-line options. - -- Fixed the block-size validation logic when dealing with older protocols. - -- Some rrsync fixes and enhancements to handle the latest options. - -- Fixed a crash in the --iconv code. - -- Fixed a bug in the writing of the batch.sh file (w/--write-batch) when - the source & destination args were not last on the command-line. - - ENHANCEMENTS: - -- Various checksum enhancements, including the optional use of openssl's - MD4 & MD5 checksum algorithms, some x86_64 optimizations for the rolling - checksum, some x86_64 optimizations for the (non-openssl) MD5 checksum, - the addition of xxhash checksum support, and a negotiation heuristic that - ensures that it is easier to add new checksum algorithms in the future. - Currently the x86_64 optimizations require the use of the --enable-simd - flag to configure, but they will probably be enabled by default in the - near future. The environment variable RSYNC_CHECKSUM_LIST can be used - to customize the preference order of the negotiation. - -- Various compression enhancements, including a negotiation heuristic that - tries to pick the best compression option supported by both sides. The - environment variable RSYNC_COMPRESS_LIST can be used to customize the - preference order of the heuristic (which will be more useful when new - compression options are added). - -- Added the --atimes option based on the long-standing patch (just with - some fixes that the patch has been needing). - -- Added --open-noatime option to open files using O_NOATIME. - -- Added the --write-devices option based on the long-standing patch. - -- Added openssl support to the rsync-ssl script via its renamed helper - script, rsync-ssl-rsh. Both bash scripts are now installed by default - (removing the install-ssl-client make target). Rsync was also enhanced - to set the RSYNC_PORT environment variable when running a daemon-over-rsh - script. Its value is the user-specified port number (set via --port or an - rsync:// URL) or 0 if the user didn't override the port. - -- Added negated matching to the daemon's "refuse options" setting by using - match strings that start with a "!" (such as "!compress*"). - -- Added status output in response to a signal (via both SIGINFO & SIGVTALRM). - -- Added a --copy-as=USER option to give some extra security to root-run - rsync commands into/from untrusted directories (such as backups and - restores). - -- When resuming the transfer of a file in the --partial-dir, rsync will now - update that partial file in-place instead of creating yet another tmp - file copy. This requires both sender &
[SCM] The rsync repository. - branch master updated
The branch, master has been updated via 96ed96da Fix the parsing of the --version capabilities. via 8ad2ca9a Install yodl for the CI builds. from 23a37eca Get indent right. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit 96ed96dabda2e535929eb69ab5f38b057650ef47 Author: Wayne Davison Date: Mon May 25 23:42:33 2020 -0700 Fix the parsing of the --version capabilities. commit 8ad2ca9ae2220d795ae7f96fdbb4d9c8353ec414 Author: Wayne Davison Date: Mon May 25 23:41:39 2020 -0700 Install yodl for the CI builds. --- Summary of changes: .github/workflows/ccpp.yml | 2 +- testsuite/acls.test | 2 +- testsuite/chown.test| 2 +- testsuite/default-acls.test | 2 +- testsuite/devices.test | 2 +- testsuite/itemize.test | 2 +- testsuite/xattrs.test | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 6bc75b48..131890ea 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: prepare-packages - run: sudo apt-get install fakeroot acl libacl1-dev attr libattr1-dev liblz4-dev + run: sudo apt-get install fakeroot acl libacl1-dev attr libattr1-dev liblz4-dev yodl - name: prepare-source run: ./prepare-source - name: configure diff --git a/testsuite/acls.test b/testsuite/acls.test index 40490a67..5728cd57 100644 --- a/testsuite/acls.test +++ b/testsuite/acls.test @@ -7,7 +7,7 @@ . $suitedir/rsync.fns -$RSYNC --version | grep ", ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support" +$RSYNC --version | grep "[, ] ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support" makepath "$fromdir/foo" echo something >"$fromdir/file1" diff --git a/testsuite/chown.test b/testsuite/chown.test index 30a3a94d..aa4958d8 100644 --- a/testsuite/chown.test +++ b/testsuite/chown.test @@ -15,7 +15,7 @@ case $0 in *fake*) -$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests" +$RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests" RSYNC="$RSYNC --fake-super" TLS_ARGS="$TLS_ARGS --fake-super" case "$HOST_OS" in diff --git a/testsuite/default-acls.test b/testsuite/default-acls.test index eb41a6ff..17893f93 100644 --- a/testsuite/default-acls.test +++ b/testsuite/default-acls.test @@ -7,7 +7,7 @@ . $suitedir/rsync.fns -$RSYNC --version | grep ", ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support" +$RSYNC --version | grep "[, ] ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support" case "$setfacl_nodef" in true) test_skipped "I don't know how to use your setfacl command" ;; diff --git a/testsuite/devices.test b/testsuite/devices.test index a9245138..0af0428b 100644 --- a/testsuite/devices.test +++ b/testsuite/devices.test @@ -16,7 +16,7 @@ outfile="$scratchdir/rsync.out" case $0 in *fake*) -$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests" +$RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests" RSYNC="$RSYNC --fake-super" TLS_ARGS="$TLS_ARGS --fake-super" case "$HOST_OS" in diff --git a/testsuite/itemize.test b/testsuite/itemize.test index 78637ca4..3a5af1c3 100644 --- a/testsuite/itemize.test +++ b/testsuite/itemize.test @@ -40,7 +40,7 @@ case "$RSYNC" in T=.T ;; *) -if $RSYNC --version | grep ", symtimes" >/dev/null; then +if $RSYNC --version | grep "[, ] symtimes" >/dev/null; then T=.t else T=.T diff --git a/testsuite/xattrs.test b/testsuite/xattrs.test index 86165e0c..5931ffcd 100644 --- a/testsuite/xattrs.test +++ b/testsuite/xattrs.test @@ -8,7 +8,7 @@ . $suitedir/rsync.fns lnkdir="$tmpdir/lnk" -$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync is configured without xattr support" +$RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync is configured without xattr support" case "$HOST_OS" in darwin*) -- 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 23a37eca Get indent right. via 47bae3ab Improve output of capabilities in --version list. from dff9dd56 Remove xxhash from capabilities list. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit 23a37ecac4bba997948fa30e72eb4aa8e317e394 Author: Wayne Davison Date: Mon May 25 23:33:11 2020 -0700 Get indent right. commit 47bae3abf66027e97f32e1cdbf189664ed1a7e99 Author: Wayne Davison Date: Mon May 25 22:43:33 2020 -0700 Improve output of capabilities in --version list. It now wraps better as the "no " prefixes change, and it makes it easier to maintain patches that add items into the capabilities list. --- Summary of changes: options.c | 167 +++--- 1 file changed, 115 insertions(+), 52 deletions(-) Changeset truncated at 500 lines: diff --git a/options.c b/options.c index 9f5a24d6..04b84a72 100644 --- a/options.c +++ b/options.c @@ -566,83 +566,146 @@ void negate_output_levels(void) debug_levels[j] *= -1; } -static void print_rsync_version(enum logcode f) +static char *istring(const char *fmt, int val) +{ + char *str; + if (asprintf(, fmt, val) < 0) + out_of_memory("istring"); + return str; +} + +static void print_capabilities(enum logcode f) { - char tmpbuf[256]; - char *subprotocol = ""; - char const *got_socketpair = "no "; - char const *have_inplace = "no "; - char const *hardlinks = "no "; - char const *prealloc = "no "; - char const *symtimes = "no "; - char const *acls = "no "; - char const *xattrs = "no "; - char const *links = "no "; - char const *iconv = "no "; - char const *ipv6 = "no "; - char const *simd = "no "; + char *capabilities[256]; /* Just overallocate this so it's impossible to overflow... */ + char line_buf[75]; STRUCT_STAT *dumstat; + int line_len, cnt = 0; -#if SUBPROTOCOL_VERSION != 0 - if (asprintf(, ".PR%d", SUBPROTOCOL_VERSION) < 0) - out_of_memory("print_rsync_version"); +#define add(str,val) capabilities[cnt++] = istring(str, val) + + add("%d-bit files", (int)(sizeof (OFF_T) * 8)); + add("%d-bit inums", (int)(sizeof dumstat->st_ino * 8)); /* Don't check ino_t! */ + add("%d-bit timestamps", (int)(sizeof (time_t) * 8)); + add("%d-bit long ints", (int)(sizeof (int64) * 8)); + +#undef add +#define add(str) capabilities[cnt++] = str + + add( +#ifndef HAVE_SOCKETPAIR +"no " #endif -#ifdef HAVE_SOCKETPAIR - got_socketpair = ""; +"socketpairs"); + + add( +#ifndef SUPPORT_HARD_LINKS +"no " #endif -#ifdef HAVE_FTRUNCATE - have_inplace = ""; +"hardlinks"); + + add( +#ifndef SUPPORT_LINKS +"no " #endif -#ifdef SUPPORT_HARD_LINKS - hardlinks = ""; +"symlinks"); + + add( +#ifndef INET6 +"no " #endif -#ifdef SUPPORT_PREALLOCATION - prealloc = ""; +"IPv6"); + + add("batchfiles"); + + add( +#ifndef HAVE_FTRUNCATE +"no " #endif -#ifdef SUPPORT_ACLS - acls = ""; +"inplace"); + + add( +#ifndef HAVE_FTRUNCATE +"no " #endif -#ifdef SUPPORT_XATTRS - xattrs = ""; +"append"); + + add( +#ifndef SUPPORT_ACLS +" no" #endif -#ifdef SUPPORT_LINKS - links = ""; +"ACLs"); + + add( +#ifndef SUPPORT_XATTRS +" no" #endif -#ifdef INET6 - ipv6 = ""; +"xattrs"); + + add( +#ifndef ICONV_OPTION +" no" #endif -#ifdef ICONV_OPTION - iconv = ""; +"iconv"); + + add( +#ifndef CAN_SET_SYMLINK_TIMES +" no" #endif -#ifdef CAN_SET_SYMLINK_TIMES - symtimes = ""; +"symtimes"); + + add( +#ifndef SUPPORT_PREALLOCATION +"no " #endif -#ifdef HAVE_SIMD - simd = ""; +"prealloc"); + + add( +#ifndef HAVE_SIMD +"no " #endif +"SIMD"); + + add(NULL); +#undef add + + for (line_len = 0, cnt = 0; ; cnt++) { + char *cap = capabilities[cnt]; + int cap_len = cap ? strlen(cap) : 1000; + int need_comma = cap && capabilities[cnt+1] != NULL ? 1 : 0; + if (line_len + 1 + cap_len + need_comma >= (int)sizeof line_buf) { + rprintf(f, " %s\n", line_buf); + line_len = 0; + } + if (!cap) + break; + line_len += snprintf(line_buf+line_len, sizeof line_buf - line_len, " %s%s", cap, need_comma ? "," : ""); + } +} + +static void print_rsync_version(enum logcode f) +{ + char tmpbuf[256], *subprotocol = ""; + +#if