From e1287f7f59ae16b64bc85eb44ca1f17fa1336f12 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 16 Jul 2020 12:23:41 +0200 Subject: [PATCH] scripts/vagrant: Use custom rsync cmdline By default, vagrant executes rsync with --copy-links argument which instead of copying the actual symlink is actually copying the file given link points to. Since symlinks are part of the spdk repo, they need to be synced "as is" - when symlinks are replaced with actual regular files, git will report that as a typechange, messing up status checks that our tests perform. Change-Id: I72814547c3e876ab2adbc779159ca991f18cbe86 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3375 Tested-by: SPDK CI Jenkins Reviewed-by: Maciej Wawryk Reviewed-by: Tomasz Zawadzki Reviewed-by: Shuhei Matsumoto Community-CI: Mellanox Build Bot --- scripts/vagrant/Vagrantfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/vagrant/Vagrantfile b/scripts/vagrant/Vagrantfile index a4478460b..ccf6d632e 100644 --- a/scripts/vagrant/Vagrantfile +++ b/scripts/vagrant/Vagrantfile @@ -60,7 +60,11 @@ Vagrant.configure(2) do |config| # generic/fedora boxes on the other hand have problems running NFS # service so use sshfs+rsync combo instead. plugins_sync_backend = {type: :sshfs} - files_sync_backend = {type: "rsync", rsync__auto: false} + # Remove --copy-links from default rsync cmdline since we do want to sync + # actual symlinks as well. Also, since copy is made between host and its + # local VM we don't need to worry about saturating the local link so skip + # the compression to speed up the whole transfer. + files_sync_backend = {type: "rsync", rsync__auto: false, rsync__args: ["--archive", "--verbose", "--delete"]} if (distro.include? "freebsd") || (distro.include? "clearlinux") plugins_sync_backend = {type: :nfs, nfs_udp: false} files_sync_backend = {type: :nfs, nfs_udp: false, mount_options: ['ro']}