disable shellescape for rsync 3.2.4

rsync 3.2.4 broke backwards-compatability by preventing exposing filenames
to the shell. Made the rsync and gcrypt special remotes detect this and
disable shellescape.

An alternative fix would have been to always set RSYNC_OLD_ARGS=1.
Which would avoid the overhead of probing rsync --help for each affected
remote. But that is really very fast to run, and it seemed better to switch
to the modern code path rather than keeping on using the bad old code path.

Sponsored-by: Tobias Ammann on Patreon
This commit is contained in:
Joey Hess 2022-05-03 12:12:25 -04:00
parent b760d31be1
commit 43701759a3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 35 additions and 13 deletions

View file

@ -26,13 +26,14 @@ These parameters can be passed to `git annex initremote` to configure rsync:
by [[git-annex-export]]. It will not be usable as a general-purpose
special remote.
* `shellescape` - Optional. Set to "no" to avoid shell escaping normally
done when using rsync over ssh. That escaping is needed with typical
setups, but not with some hosting providers that do not expose rsynced
filenames to the shell. You'll know you need this option if `git annex get`
from the special remote fails with an error message containing a single
quote (`'`) character. If that happens, you can run enableremote
setting shellescape=no.
* `shellescape` - Optional. This has no effect when using rsync 3.2.4 or
newer. Set to "no" to avoid shell escaping
normally done when using older versions of rsync over ssh. That escaping
is needed with typical setups, but not with some hosting providers that do
not expose rsynced filenames to the shell. You'll know you need this
option if `git annex get` from the special remote fails with an error
message containing a single quote (`'`) character. If that happens, you
can run enableremote setting shellescape=no.
* `chunk` - Enables [[chunking]] when storing large files.
This is typically not a win for rsync, so no need to enable it.