Feature request: don't fail if using -z from --with-included-zlib=yes to --with-included-zlib=no
samueloph at debian.org
Wed May 20 20:40:07 UTC 2020
I'm one of the Debian maintainers of rsync and I'm currently
investigating the switch from "--with-included-zlib=yes" to "no" for
the next stable release (ETA 2021). So basically I'm investigating
what are the impacts of using upstream's zlib instead of rsync's
For the investigation I did simple transfers (1 file) using both "-z"
and "-zz" parameters against different versions of rsync. With the
focus being on 3.1.3 with dynamically linked zlib.
Please note that versions lower than 3.1.1 (2014) are not so impactful
as they don't support the new "-zz" parameter and almost all systems
with those versions are already EOL, the ones which aren't (RHEL6
, Amazon Linux1, Centos6) are already at the late
stage of their support and they're planned to go EOL by the end of the
Versions I used for the tests were:
3.1.3 (let's call this one 3.1.3dynamicLink)
A) 3.0.9 and 3.1.3dynamicLink: 3.0.9 only supports receiving "-z"
transfers from 3.1.3dynamicLink, this transfer is downgraded to a
non-compressed one but it works.
B) 3.0.9 and others: "-z" works both ways but "-zz" fails.
3.1.1, 3.1.2, 3.1.3 and 3.1.3dynamicLink:
C) Parameter "-zz" works both ways for all versions.
D) Parameter "-z" only works if 3.1.3dynamicLink is the destination,
not the other way around, this transfer is downgraded to a
"both ways" means transfers "versionA -> version B" AND "versionB -> versionA"
Finding D means that the introduction of an rsync using upstream's
zlib will change the behavior of system's interoperability in two
1) Sending to bundled zlib versions with "-z" will fallback to a
non-compressed transfer, but still work.
2) Receiving from bundled zlib versions with "-z" will fail.
Issue number 1 is not a big deal since the transfer still happens, but
issue number 2 might cause issues for users who don't migrate their
old systems to use the parameter "-zz" instead of " -z".
The error message that I get from FIndingD, Issue 2, is:
"rsync: This rsync lacks old-style --compress due to its external
zlib. Try -zz."
Which suggests that rsync realizes "-zz" could work.
So my feature request is to implement some auto fallback to
non-compressed or perform the transfer with "-zz" automatically if
that happens. I believe it would make the transition to upstream's
zlib easier as at least the systems with up-to-date bundled rsyncs
won't break when transferring with "-z".
FWIW this is the error (3.1.3 transfering with -z to 3.1.3dynamicLink):
rsync: This rsync lacks old-style --compress due to its external zlib. Try -zz.
rsync error: syntax or usage error (code 1) at main.c(1596) [server=3.1.3]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at
[sender] _exit_cleanup(code=12, file=io.c, line=235): about to call exit(12)
Feel free to ask for more information about the tests, if needed, I
tried to not be too much verbose on the email.
What are your thoughts on this?
Samuel Henrique <samueloph>
More information about the rsync