Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vagrantfile for easier usage #16

Merged
merged 22 commits into from Oct 26, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions etc/Vagrantfile
@@ -0,0 +1,50 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/vivid64"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 8
end

config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y git clang cmake libssl-dev

cd /opt

# Build rust

git clone https://github.com/rust-lang/rust.git
cd rust
git checkout 717e8831b # https://github.com/frewsxcv/afl.rs/issues/11
./configure --enable-clang --disable-libcpp --enable-optimize --disable-docs
make -j 8
cd ..
echo "export PATH=\$PATH:/opt/rust/x86_64-unknown-linux-gnu/stage2/bin" >> /home/vagrant/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rust/x86_64-unknown-linux-gnu/stage2/lib/" >> /home/vagrant/.bashrc
source /home/vagrant/.bashrc

# Build cargo

git clone https://github.com/rust-lang/cargo
cd cargo
apt-get install -y pkg-config # https://github.com/frewsxcv/afl.rs/issues/11
git checkout 1ae683a1496be2e35f213e3e11645adcb3ed62b1 # https://github.com/frewsxcv/afl.rs/issues/11
./configure --local-rust-root=../rust/x86_64-unknown-linux-gnu/stage2/ --enable-optimize
make
echo "export PATH=\$PATH:/opt/cargo/target/x86_64-unknown-linux-gnu/release" >> /home/vagrant/.bashrc
source /home/vagrant/.bashrc

# Build afl

wget http://lcamtuf.coredump.cx/afl/releases/afl-1.94b.tgz
tar xf afl-1.94b.tgz
cd afl-1.94b
make
make install

# export CXX="$(which clang++) -Wno-c++11-extensions"
# export LLVM_CONFIG=$(which llvm-config-3.4)
# build repo with rust plugin
SHELL
end