Unverified Commit d9e4d0c3 authored by Mike Perry's avatar Mike Perry Committed by boklm
Browse files

Switch from rsync to tar for copy-to-target.

In Ubuntu 14.04, rsync now fails on dangling symlinks.
parent 8d050d67
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -47,8 +47,7 @@ if [ $# = 0 ] ; then
fi

if [ -z "$USE_LXC" ]; then
    src="${1%/}"  # remove trailing / which triggers special rsync behaviour
    rsync --checksum -a $QUIET_FLAG -e "ssh -oConnectTimeout=30 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_rsa -p $VM_SSH_PORT" "${src}" "$TUSER@localhost:$2"
    tar -h -C `dirname "$1"` -cf - `basename "$1"` | ssh $QUIET_FLAG -oConnectTimeout=30 -oNoHostAuthenticationForLocalhost=yes -i ${GITIAN_BASE:-.}/var/id_rsa -p $VM_SSH_PORT $TUSER@localhost -- tar -C "$2" -xf -
else
    config-lxc
    tar -h -C `dirname "$1"` -cf - `basename "$1"` | sudo $LXC_EXECUTE -n gitian -f var/lxc.config -- sudo -i -u $TUSER tar -C "$2" -xf -