]> git.proxmox.com Git - mirror_ovs.git/blame - Vagrantfile-FreeBSD
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / Vagrantfile-FreeBSD
CommitLineData
ef9c432c
WT
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4# All Vagrant configuration is done below. The "2" in Vagrant.configure
5# configures the configuration version (we support older styles for
6# backwards compatibility). Please don't change it unless you know what
7# you're doing.
8
9VAGRANTFILE_API_VERSION = "2"
10Vagrant.require_version ">=1.7.0"
11
12$bootstrap_freebsd = <<SCRIPT
13sed -e 's/\#DEFAULT_ALWAYS_YES = false/DEFAULT_ALWAYS_YES = true/g' -e 's/\#ASSUME_ALWAYS_YES = false/ASSUME_ALWAYS_YES = true/g' /usr/local/etc/pkg.conf > /tmp/pkg.conf
14mv -f /tmp/pkg.conf /usr/local/etc/pkg.conf
0c4d144a 15pkg install automake libtool wget py37 gmake lftp
ef9c432c
WT
16SCRIPT
17
18$configure_ovs = <<SCRIPT
19cd /vagrant
20./boot.sh
21mkdir -p ~/build
22cd ~/build
23sudo /vagrant/configure --disable-libcapng --enable-silent-rules
24SCRIPT
25
26$build_ovs = <<SCRIPT
27cd ~/build
28gmake
29SCRIPT
30
31$test_userspace = <<SCRIPT
32cd ~/build
33gmake check
34SCRIPT
35
36Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
37 # Use NFS due to capability 'mount_virtualbox_shared_folder'
38 # does not work on FreeBSD.
39 config.vm.network :private_network, ip: "10.0.0.2"
40 config.vm.synced_folder ".", "/vagrant", :nfs => true
41
42 config.vm.define "freebsd-10.2" do |freebsd|
43 freebsd.vm.box = "bento/freebsd-10.2"
44 freebsd.vm.provision "bootstrap", type: "shell", inline: $bootstrap_freebsd
45 freebsd.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
46 freebsd.vm.provision "build_ovs", type: "shell", inline: $build_ovs
47 freebsd.vm.provision "test_userspace", type: "shell", inline: $test_userspace
48 end
49end