From 0ee7ebcc706f5e94d89d726a3cde33f042ab9620 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Fri, 21 Sep 2018 17:34:11 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/426422 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Paul Luse Reviewed-by: Karol Latecki Reviewed-by: Jim Harris --- scripts/vagrant/Vagrantfile | 6 ++++++ scripts/vagrant/create_vbox.sh | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/scripts/vagrant/Vagrantfile b/scripts/vagrant/Vagrantfile index 230495805..2988f6f1d 100644 --- a/scripts/vagrant/Vagrantfile +++ b/scripts/vagrant/Vagrantfile @@ -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!") diff --git a/scripts/vagrant/create_vbox.sh b/scripts/vagrant/create_vbox.sh index f7a75f650..869a46e90 100755 --- a/scripts/vagrant/create_vbox.sh +++ b/scripts/vagrant/create_vbox.sh @@ -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 <