Commit 0ee7ebcc authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

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: default avatarSeth 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent e80b3d5f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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!")
+7 −0
Original line number Diff line number Diff line
@@ -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 ""