From 91a28422856937ac8a59bca817640744dcf47549 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 11 May 2016 12:23:08 +0100 Subject: [PATCH 1/3] Vagrantfile: unset locales in the virtual machine Setting locale fails when ssh-ing into the virtual machine. This unsets all the locales to avoid annoying warnings. It is up to user to install locales packages if she likes. Signed-off-by: Michele Di Giorgio --- Vagrantfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 8ccd46478..a99edd18b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -21,6 +21,10 @@ Vagrant.configure(2) do |config| ln -s /vagrant /home/vagrant/lisa chown vagrant.vagrant /home/vagrant/lisa echo cd /home/vagrant/lisa >> /home/vagrant/.bashrc + for LC in $(locale | cut -d= -f1); + do + echo unset $LC >> /home/vagrant/.bashrc + done echo source init_env >> /home/vagrant/.bashrc SHELL end -- GitLab From 65eceaa77bf7723d5742fe60573561b7ca75c9ae Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 24 May 2016 11:40:22 +0100 Subject: [PATCH 2/3] Vagrantfile: install Android SDK if not present Signed-off-by: Michele Di Giorgio --- .gitignore | 1 + Vagrantfile | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 652d40dfc..7dc4ee63b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ results* *.json *.log +tools/android-sdk-linux diff --git a/Vagrantfile b/Vagrantfile index a99edd18b..9ce1156c1 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,6 +1,7 @@ # -*- mode: ruby -*- # vi: set ft=ruby : + Vagrant.configure(2) do |config| config.vm.box = "ubuntu/trusty64" @@ -14,17 +15,40 @@ Vagrant.configure(2) do |config| config.vm.provision "shell", inline: <<-SHELL sudo apt-get update - sudo apt-get install -y autoconf automake build-essential git libfreetype6-dev libpng12-dev libtool nmap pkg-config python-all-dev python-matplotlib python-nose python-numpy python-pip python-zmq sshpass trace-cmd tree + sudo apt-get install -y autoconf automake build-essential expect git \ + libfreetype6-dev libpng12-dev libtool nmap openjdk-7-jdk \ + openjdk-7-jre pkg-config python-all-dev python-matplotlib \ + python-nose python-numpy python-pip python-zmq sshpass trace-cmd \ + tree wget sudo pip install ipython[notebook] pandas sudo apt-get remove -y w3m ln -s /vagrant /home/vagrant/lisa + + cd /home/vagrant/lisa + ANDROID_SDK_URL="https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz" + if [ ! -e ./tools/android-sdk-linux ]; then + echo "Downloading Android SDK [$ANDROID_SDK_URL]..." + wget -qO- $ANDROID_SDK_URL | tar xz -C tools + expect -c ' + set timeout -1; + spawn ./tools/android-sdk-linux/tools/android update sdk --no-ui \ + -t tool,platform-tool,platform; + expect { + "Do you accept the license" { exp_send "y\r" ; exp_continue } + eof + } + ' + fi + chown vagrant.vagrant /home/vagrant/lisa echo cd /home/vagrant/lisa >> /home/vagrant/.bashrc for LC in $(locale | cut -d= -f1); do echo unset $LC >> /home/vagrant/.bashrc done + echo "export ANDROID_HOME=/vagrant/tools/android-sdk-linux" >> /home/vagrant/.bashrc + echo "export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH" >> /home/vagrant/.bashrc echo source init_env >> /home/vagrant/.bashrc SHELL end -- GitLab From 57992d546c293de5f6be8d2771f4a728a99a50c3 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Fri, 24 Jun 2016 17:10:10 +0100 Subject: [PATCH 3/3] Vagrantfile: add VM installation completed message Signed-off-by: Michele Di Giorgio --- Vagrantfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 9ce1156c1..77cb5eb56 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -50,5 +50,17 @@ Vagrant.configure(2) do |config| echo "export ANDROID_HOME=/vagrant/tools/android-sdk-linux" >> /home/vagrant/.bashrc echo "export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH" >> /home/vagrant/.bashrc echo source init_env >> /home/vagrant/.bashrc + + echo "Virtual Machine Installation completed successfully! " + echo " " + echo "You can now access and use the virtual machine by running: " + echo " " + echo " $ vagrant ssh " + echo " " + echo "NOTE: if you exit, the virtual machine is still running. To shut it " + echo " down, please run: " + echo " " + echo " $ vagrant suspend " + echo " " SHELL end -- GitLab