]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Modernize freebsd vagrant config.
authorBen Darnell <ben@bendarnell.com>
Mon, 1 Sep 2014 03:32:41 +0000 (23:32 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 1 Sep 2014 03:33:15 +0000 (23:33 -0400)
maint/vm/freebsd/Vagrantfile
maint/vm/freebsd/setup.sh
maint/vm/freebsd/tox.ini

index b86bd807a88fed10b328ada7dc913be0bb3532c2..b968f45aca4e311f25cac98e72b0ffe5980a68ab 100644 (file)
@@ -1,23 +1,25 @@
-Vagrant::Config.run do |config|
-    # A freebsd image can be created with veewee
-    # https://github.com/jedi4ever/veewee
-    # 
-    # vagrant basebox define freebsd freebsd-8.2-pcbsd-i386-netboot
-    # vagrant basebox build freebsd
-    # vagrant basebox export freebsd
-    # vagrant box add freebsd freebsd.box
-    config.vm.box = "freebsd"
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
 
-    config.vm.guest = :freebsd
-    
-    # Note that virtualbox shared folders don't work with freebsd, so
-    # we'd need nfs shared folders here even if virtualbox gains
-    # support for symlinks.
-    config.vm.network :hostonly, "172.19.1.3"
-    # Name this v-root to clobber the default /vagrant mount point.
-    # We can't mount it over nfs because there are apparently issues
-    # when one nfs export is a subfolder of another.
-    config.vm.share_folder("v-root", "/tornado", "../../..", :nfs => true)
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
 
-    config.vm.provision :shell, :path => "setup.sh"
-end
\ No newline at end of file
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+  config.vm.box = "chef/freebsd-10.0"
+
+  config.vm.network "private_network", type: "dhcp"
+
+  # Share an additional folder to the guest VM. The first argument is
+  # the path on the host to the actual folder. The second argument is
+  # the path on the guest to mount the folder. And the optional third
+  # argument is a set of non-required options.
+  config.vm.synced_folder "../../..", "/tornado", type: "nfs"
+
+  # Override the default /vagrant mapping to use nfs, since freebsd doesn't
+  # support other folder types.
+  config.vm.synced_folder ".", "/vagrant", type: "nfs"
+
+  config.ssh.shell = "/bin/sh"
+
+  config.vm.provision :shell, :path => "setup.sh"
+end
index 3a55226fd9584a937f9f6466760c5f60410b0828..f1d0147a8b5f2ec1ecbb658b2e12a622eeee24f5 100644 (file)
@@ -2,15 +2,12 @@
 
 chsh -s bash vagrant
 
-# This doesn't get created automatically for freebsd since virtualbox
-# shared folders don't work.
-ln -snf /tornado/maint/vm/freebsd /vagrant
-
-PORTS="
-lang/python27
-devel/py-pip
-devel/py-virtualenv
-ftp/curl
+PACKAGES="
+curl
+python
+python34
+py27-pip
+py27-virtualenv
 "
 
 PIP_PACKAGES="
@@ -19,13 +16,8 @@ pycurl
 tox
 "
 
-cd /usr/ports
-
-for port in $PORTS; do
-    make -C $port -DBATCH install
-done
+ASSUME_ALWAYS_YES=true pkg install $PACKAGES
 
 pip install $PIP_PACKAGES
 
 /tornado/maint/vm/shared-setup.sh
-
index 6a4d1e2f96ea6d339b52f1a130844ec7b3ac22fc..c9e5ca7b790f646801607df806a83eaf48748038 100644 (file)
@@ -1,5 +1,5 @@
 [tox]
-envlist=py27-full, py27
+envlist=py27-full, py27, py34
 setupdir=/tornado
 # /home is a symlink to /usr/home, but tox doesn't like symlinks here
 toxworkdir=/usr/home/vagrant/tox-tornado