Em Sun, Sep 30, 2012 at 06:47:28PM +0200, Reto Gantenbein escreveu:
> I quickly wrote a patch to resolve the quoting issue. At least I can use
> the rsync handler again now. However I didn't test if there is no
> regression towards to original bug #677410.

Hi Reno, thanks for your patch. I haven't tested it yet as I came with an
alternative sollution (see attached patch) as I think we can avoid excessive
use of commands to preserve or quotings.

I don't know either if my patch adds a regression from the original #677410,
but if that's the case I'm willing to test your patch :)

I confirm this bug to happen on wheezy, but I cannot reproduce on squeeze.
That's why it took me a while to reproduce it.

I'm adding Paul into the loop as he's the #677971 reporter. Paul, could you
test if either suggested patches don't add a regression to #677971?

Thank you all :)

-- 
rhatto at riseup.net
pubkey 64E39FCA / keys.indymedia.org
diff --git a/handlers/rsync.in b/handlers/rsync.in
index 1954fc1..b2c4b59 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -1136,9 +1136,10 @@ for SECTION in $include; do
   set_dest
 
   info "Syncing $SECTION on $dest_path..."
-  debug $nice $rsync ${rsync_options[@]} $filelist_flag $excludes $batch_option $orig $dest_path
+  command="$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path"
+  debug $nice su -c "$command"
   set_pipefail
-  $nice su -c "$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path" | tee -a $log
+  $nice su -c "$command" | tee -a $log
 
   check_rsync_exit_status $?
   restore_pipefail

Attachment: signature.asc
Description: Digital signature

Reply via email to