Set rsync_command for Haiku guests

At the time of writing, the Haiku rsync lacks old-style --compress due
to its external zlib. Pass `-zz` to the guest rsync.

This works with or without the `--compress` flag in the host's
`rsync__args`.
This commit is contained in:
Jeff Bonhag 2020-05-11 12:38:41 -04:00
parent a50432cf16
commit 2d4ecfbd23
No known key found for this signature in database
GPG Key ID: 32966F3FB5AC1129
3 changed files with 17 additions and 0 deletions

View File

@ -9,6 +9,10 @@ module VagrantPlugins
def self.rsync_install(machine)
machine.communicate.execute("pkgman install -y rsync")
end
def self.rsync_command(machine)
"rsync -zz"
end
end
end
end

View File

@ -40,6 +40,11 @@ module VagrantPlugins
require_relative "cap/rsync"
Cap::RSync
end
guest_capability(:haiku, :rsync_command) do
require_relative "cap/rsync"
Cap::RSync
end
end
end
end

View File

@ -35,4 +35,12 @@ describe "VagrantPlugins::GuestHaiku::Cap::RSync" do
cap.rsync_installed(machine)
end
end
describe ".rsync_command" do
let(:cap) { caps.get(:rsync_command) }
it "defaults to 'rsync -zz'" do
expect(cap.rsync_command(machine)).to eq("rsync -zz")
end
end
end