vagrant: fix NFS capability detection

Upstream PR waiting for review:
https://github.com/hashicorp/vagrant/pull/10713
This commit is contained in:
Renato Aguiar 2019-03-05 10:12:55 -08:00 committed by maxice8
parent 7f8cfe7e32
commit 3ab94f6f27
2 changed files with 24 additions and 3 deletions

View file

@ -0,0 +1,22 @@
--- plugins/hosts/void/cap/nfs.rb
+++ plugins/hosts/void/cap/nfs.rb
@@ -15,7 +15,7 @@ module VagrantPlugins
end
def self.nfs_installed(env)
- result = Vagrant::Util::Subprocess.execute("/usr/bin/xbps-query nfs-utils")
+ result = Vagrant::Util::Subprocess.execute("/usr/bin/xbps-query", "nfs-utils")
result.exit_code == 0
end
end
--- test/unit/plugins/hosts/void/cap/nfs_test.rb
+++ test/unit/plugins/hosts/void/cap/nfs_test.rb
@@ -39,7 +39,7 @@ describe VagrantPlugins::HostVoid::Cap::NFS do
let(:result) { Vagrant::Util::Subprocess::Result.new(exit_code, "", "") }
before { allow(Vagrant::Util::Subprocess).to receive(:execute).
- with(/xbps-query nfs-utils/).and_return(result) }
+ with("/usr/bin/xbps-query", "nfs-utils").and_return(result) }
it "should provide nfs_installed capability" do
expect(caps.get(:nfs_installed)).to eq(described_class)

View file

@ -1,7 +1,8 @@
# Template file for 'vagrant'
pkgname=vagrant
version=2.2.4
revision=1
revision=2
archs="i686 x86_64"
hostmakedepends="ruby"
makedepends="ruby-devel zlib-devel"
depends="openssh curl bsdtar"
@ -13,8 +14,6 @@ distfiles="https://github.com/mitchellh/${pkgname}/archive/v${version}.tar.gz"
checksum=4f8ce6ede5d47a2be1ce46a29d22d41d1f4ba9d99fe9496b2424f98ae4dab2d6
nocross=yes
archs="i686 x86_64"
post_extract() {
sed -i 's|\,\ "<\ 2\.5"||g' $pkgname.gemspec
}