Vagrant: Supply pkg information to the guest.
The vagrant proxy plugin doesn't appear to support FreeBSD or pkg in the same way that it supports linux distros and their associated package managers. This change supplies the needed proxy configuration to get around this issue. Change-Id: I7dfbd963c5fd01d598c1456c5d8139be81777440 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/426422 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
e80b3d5f13
commit
0ee7ebcc70
6
scripts/vagrant/Vagrantfile
vendored
6
scripts/vagrant/Vagrantfile
vendored
@ -30,6 +30,12 @@ Vagrant.configure(2) do |config|
|
||||
when "freebsd11"
|
||||
#See: https://app.vagrantup.com/generic/boxes/freebsd11
|
||||
config.vm.box = "generic/freebsd11"
|
||||
if File.file?(File.expand_path("~/vagrant_pkg.conf"))
|
||||
config.vm.provision "file", source: "~/vagrant_pkg.conf", destination: "pkg.conf"
|
||||
config.vm.provision "shell", inline: "sudo mv pkg.conf /usr/local/etc/pkg.conf"
|
||||
config.vm.provision "shell", inline: "sudo chown root:wheel /usr/local/etc/pkg.conf"
|
||||
config.vm.provision "shell", inline: "sudo chmod 644 /usr/local/etc/pkg.conf"
|
||||
end
|
||||
else
|
||||
"Invalid argument #{distro}"
|
||||
abort("Invalid argument!")
|
||||
|
@ -181,6 +181,13 @@ if [ ${DRY_RUN} != 1 ]; then
|
||||
else
|
||||
vagrant plugin install vagrant-proxyconf
|
||||
fi
|
||||
if echo "$SPDK_VAGRANT_DISTRO" | grep -q freebsd; then
|
||||
cat >~/vagrant_pkg.conf <<EOF
|
||||
pkg_env: {
|
||||
http_proxy: ${http_proxy}
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
vagrant up $provider
|
||||
echo ""
|
||||
|
Loading…
Reference in New Issue
Block a user