Project

General

Profile

Bug #4019

Rsync handler badly quotes the --delete option

Added by rhatto about 5 years ago. Updated over 3 years ago.

Status:
Fix committed
Priority:
High
Assignee:
-
Category:
rsync handler
Target version:
Start date:
08/03/2012
Due date:
% Done:

100%

QA Check:
Pass

Description

History

#1 Updated by rhatto over 4 years ago

  • Status changed from New to In Progress

rhatto wrote:

From Debian bug #683731.

We have two alternative patches for this issue (see debian bug). One of them is at commit 94366b87ec2db69611173a00bcc2ebb7ff372ec7 from my bug/4019 branch.

#2 Updated by intrigeri over 4 years ago

  • Priority changed from Normal to High

With this patch applied I get:

Debug: nice -n 0 su -c /usr/bin/rsync "--archive --verbose --delete --acls" --rsync-path=rsync --delete-excluded    root@apt.lizard://etc/ /mnt/tails-backups/apt.lizard//etc//
rsync: --archive --verbose --delete --acls: unknown option
rsync error: syntax or usage error (code 1) at main.c(1453) [client=3.0.9]

Without this patch applied I get:

Debug: nice -n 0 /usr/bin/rsync "--archive --verbose --delete --acls" --rsync-path=rsync root@apt.lizard://etc/ /mnt/tails-backups/apt.lizard//etc//
su: unrecognized option '--verbose'

None of these allow me to use the rsync handler :(

One thing that seems to work better (but only with this patch applied) is removing the double quotes around the set of rsync_options in my .rsync file, against the provided example.rsync.

#3 Updated by rhatto over 4 years ago

intrigeri wrote:

One thing that seems to work better (but only with this patch applied) is removing the double quotes around the set of rsync_options in my .rsync file, against the provided example.rsync.

I'm unhappy with the current way we're handling with quotes. Looks like we cover one issue to uncover another. Maybe we need a better approach to run rsync. I was thinking about making a temporary sh script with the right command-line inside, like

echo rsync \"$opts\" > $TMP/rsync.sh
exec $TMP/rsync.sh
# check exit status, etc

Dunno if that's not an ugly sollution or if we could do something else that didn't need so much shell escaping around quotes.

#4 Updated by hcartiaux about 4 years ago

Fyi, this bug has been introduced in commit 7c66b699.
The last working rsync handler for me is 118d7587.

#5 Updated by rhatto almost 4 years ago

  • Assignee changed from rhatto to intrigeri
  • QA Check set to Ready for QA

Needs review to merge this patch into the master branch.

#6 Updated by intrigeri almost 4 years ago

  • Category set to rsync handler
  • Status changed from In Progress to Fix committed
  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass

Merged, thanks.

#7 Updated by intrigeri over 3 years ago

  • Target version set to 1.0.2
  • % Done changed from 0 to 100

Also available in: Atom PDF