diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-24 19:05:38 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-25 02:53:40 +0000 |
commit | 5aaaa550fda8db0b06e438492d195b256fd02014 (patch) | |
tree | 2f8d6a8d99cae148f5047a8775356fcb4e795069 | |
parent | d1a81df8c04501c25d99cffd901dd4a289b0a05e (diff) |
Add basic Vagrant configuration
For non-linux developers this should somewhat simplify development with e.g.
valgrind and other useful tools.
Change-Id: I973ab7412ad9a61f0892c25c079ea3424208abd1
Reviewed-on: https://code.wireshark.org/review/9117
Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Vagrantfile | 27 | ||||
-rw-r--r-- | vagrant_build.sh | 7 | ||||
-rw-r--r-- | vagrant_provision.sh | 8 |
4 files changed, 43 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 9c92cebc7f..89ed2cfd2f 100644 --- a/.gitignore +++ b/.gitignore @@ -209,6 +209,7 @@ packaging/nsis/gtk-dll-manifest.nsh # Misc # ######## +.vagrant *.swp *~ .DS_Store diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000000..e5e952c12b --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,27 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + # Base box is Ubuntu 14.04 + config.vm.box = "ubuntu/trusty64" + + # Bump the default resources as building is expensive + config.vm.provider "virtualbox" do |v| + v.memory = 1024 + v.cpus = 2 + end + + # Share the source directory into the VM as `/wireshark` + config.vm.synced_folder ".", "/wireshark" + + # Permit X11 forwarding so running the graphical Wireshark works + config.ssh.forward_x11 = true + + # Install and build the various things (including wireshark!) + config.vm.provision :shell, path: 'vagrant_provision.sh' + config.vm.provision :shell, path: 'vagrant_build.sh', privileged: false +end diff --git a/vagrant_build.sh b/vagrant_build.sh new file mode 100644 index 0000000000..648ed3451b --- /dev/null +++ b/vagrant_build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +mkdir -p build +cd build +cmake /wireshark/ +make -j2 diff --git a/vagrant_provision.sh b/vagrant_provision.sh new file mode 100644 index 0000000000..95941133e3 --- /dev/null +++ b/vagrant_provision.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +apt-get update +apt-get build-dep -y wireshark +apt-get install -y cmake valgrind qt5-default \ + libqt5multimedia5 libqt5multimediawidgets5 qtmultimedia5-dev \ + qttools5-dev qttools5-dev-tools |