From 5572d00013afe4bcd78995680807539f4d513dbb Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 14:22:01 +0100 Subject: [PATCH 01/10] Fixes to scripts: - hg updates to the parent revision (for cases that use bookmarks instead of branches - recommended when interacting with git) - ccache now points to the "external" cache --- vagrantSandbox/initGeneralScript.sh | 8 +++++--- vagrantSandbox/skel/.bashrc | 10 ++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 vagrantSandbox/skel/.bashrc diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 646896d3e..93e2034ae 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -44,10 +44,12 @@ then echo echo "Parent is mercurial. Hello Bernhard" echo - branchName=`hg branch -R $OFParent` +# branchName=`hg branch -R $OFParent` + idName=`hg id -i -R $OFParent | sed -e "s/\+//"` + # sed removes + in case of a 'tainted' parent - echo "Parent is on branch $branchName" - su vagrant - -c "hg clone -u $branchName $OFParent $OFClone" + echo "Parent is on id $idName" + su vagrant - -c "hg clone -u $idName $OFParent $OFClone" echo else echo diff --git a/vagrantSandbox/skel/.bashrc b/vagrantSandbox/skel/.bashrc new file mode 100644 index 000000000..fd2c4a1bf --- /dev/null +++ b/vagrantSandbox/skel/.bashrc @@ -0,0 +1,10 @@ +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# User specific aliases and functions + +export CCACHE_DIR=/vagrant/ccache4vm From 338173c01e34df08bd4d12a7969a4e44113897f5 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 14:34:45 +0100 Subject: [PATCH 02/10] Add a CentOS 6 Box. Installs but compilation is untested --HG-- rename : vagrantSandbox/initUbunutuScript.sh => vagrantSandbox/initCentOSRHELScript.sh --- vagrantSandbox/Vagrantfile | 9 ++++++++ vagrantSandbox/initCentOSRHELScript.sh | 32 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 vagrantSandbox/initCentOSRHELScript.sh diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index e3be2edb7..b1ea907f5 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -39,4 +39,13 @@ Vagrant.configure("2") do |config| end end + config.vm.define :centos65 do |centos65| + centos65.vm.box = "centos65" + centos65.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" + centos65.vm.provision :shell do |s| + s.args = "centos65" + s.path = "initCentOSRHELScript.sh" + end + end + end diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh new file mode 100755 index 000000000..08ccf9fc3 --- /dev/null +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -0,0 +1,32 @@ +#! /bin/bash + +boxName=$1 + +echo +echo "Init script for $boxName" +echo + +# some of these packages are already installed. But lets be sure + +neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build) +bonusPackages=(emacs csh tcsh zsh) + +for p in ${neededPackages[@]}; do + yum install -y $p +done + +for p in ${bonusPackages[@]}; do + yum install -y $p +done + +echo "Update mercurial to a more recent version" +rpm -Uhv http://pkgs.repoforge.org/mercurial/mercurial-2.2.2-1.el6.rfx.x86_64.rpm + +echo +echo "RHEL/CentOS-specific ended. Now doing general stuff" +echo + +/vagrant/initGeneralScript.sh + +echo +echo "Ended" From ad198e0854399014792ea1901f1ade5634c0518b Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 15:12:04 +0100 Subject: [PATCH 03/10] Fixes and a script to compile Foam in one go --HG-- extra : amend_source : 367e251b7df6b13cda03ddf956dbbfa9bec4b51d --- .gitignore | 3 +++ .hgignore | 3 +++ vagrantSandbox/README | 11 +++++++++-- vagrantSandbox/initCentOSRHELScript.sh | 2 +- vagrantSandbox/skel/.bashrc | 1 + vagrantSandbox/skel/bootstrapFoam.sh | 22 ++++++++++++++++++++++ 6 files changed, 39 insertions(+), 3 deletions(-) create mode 100755 vagrantSandbox/skel/bootstrapFoam.sh diff --git a/.gitignore b/.gitignore index 8f9f44c1c..2c91d7832 100644 --- a/.gitignore +++ b/.gitignore @@ -119,4 +119,7 @@ src/lduSolvers/amg/amgPolicy/samgPolicy.H src/lduSolvers/amg/amgPolicy/aamgPolicy.C src/lduSolvers/amg/amgPolicy/aamgPolicy.H +# vagrant stuff +vagrantSandbox/.vagrant/ + # end-of-file diff --git a/.hgignore b/.hgignore index 922d0258d..8a5db6955 100644 --- a/.hgignore +++ b/.hgignore @@ -108,4 +108,7 @@ src/lduSolvers/amg/amgPolicy/samgPolicy.H src/lduSolvers/amg/amgPolicy/aamgPolicy.C src/lduSolvers/amg/amgPolicy/aamgPolicy.H +# vagrant stuff +vagrantSandbox/.vagrant/ + # end-of-file diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 37057362a..9393d8ffa 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -16,11 +16,11 @@ One can then connect to the virtual machine with : vagrant ssh and will be in the =$HOME= directory of the user =vagrant= where in - the directory =~/OpenFOAM/OpenFOAM-1.6-ext= the sources are + the directory =~/foam/foam-extend-3.0= the sources are available. Modifications can be pushed "outside" the virtual machine with : hg push - There is also a symbolic link =~/OpenFOAM/OpenFOAM-1.6-ext-parent= + There is also a symbolic link =~/foam/foam-extend-3.0-parent= to the sources if you want to edit there directly. Use with care and don't compile in that directory unless you know what you're doing @@ -32,3 +32,10 @@ =postfix=-package) - maverick :: Tries to fix the problems with the =lucid=-machine. Not yet working + - centos65 :: A CentOS 6.5 machine with preinstalled development + tools +* Scripts + In the home directory these scripts are found + - bootstrapFoam.sh :: A script whose aim it is to compile Foam and + the ThirdParty-packages in one go (no paraview and QT). If this + works the box is considered operational diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index 08ccf9fc3..11cf62072 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -8,7 +8,7 @@ echo # some of these packages are already installed. But lets be sure -neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build) +neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/skel/.bashrc b/vagrantSandbox/skel/.bashrc index fd2c4a1bf..6aa500ab5 100644 --- a/vagrantSandbox/skel/.bashrc +++ b/vagrantSandbox/skel/.bashrc @@ -7,4 +7,5 @@ fi # User specific aliases and functions +export WM_SCHEDULER=ccache export CCACHE_DIR=/vagrant/ccache4vm diff --git a/vagrantSandbox/skel/bootstrapFoam.sh b/vagrantSandbox/skel/bootstrapFoam.sh new file mode 100755 index 000000000..c589bb4cc --- /dev/null +++ b/vagrantSandbox/skel/bootstrapFoam.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +# Just to be sure +export WM_SCHEDULER=ccache +export CCACHE_DIR=/vagrant/ccache4vm + +cd foam/foam-extend-3.0 +source etc/bashrc + +( cd wmake/src && make ) +cd $WM_THIRD_PARTY_DIR + +./AllMake.stage0 +./AllMake.stage1 +./AllMake.stage2 +./AllMake.stage3 + +cd $WM_PROJECT_DIR +# pick up installed packages +source etc/bashrc + +./Allwmake From b96880ab6e7281aa28cbade604b2788a7dea3061 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 16:34:06 +0100 Subject: [PATCH 04/10] FreeBSD and OpenSUSE-machines. Currently not working --HG-- rename : vagrantSandbox/initCentOSRHELScript.sh => vagrantSandbox/initFreeBSDScript.sh rename : vagrantSandbox/initCentOSRHELScript.sh => vagrantSandbox/initOpenSUSEScript.sh --- vagrantSandbox/README | 4 ++++ vagrantSandbox/Vagrantfile | 29 ++++++++++++++++++++++++++++ vagrantSandbox/initFreeBSDScript.sh | 16 +++++++++++++++ vagrantSandbox/initOpenSUSEScript.sh | 16 +++++++++++++++ 4 files changed, 65 insertions(+) create mode 100755 vagrantSandbox/initFreeBSDScript.sh create mode 100755 vagrantSandbox/initOpenSUSEScript.sh diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 9393d8ffa..ca36ba2ab 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -34,6 +34,10 @@ =lucid=-machine. Not yet working - centos65 :: A CentOS 6.5 machine with preinstalled development tools + - freebsd92 :: FreeBSD 9.2 32-bit machine. Untested + - freebsd10 :: FreeBSD 10.0 32-big machine. Currently does not boot + properly + - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned * Scripts In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index b1ea907f5..e07baee3b 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -48,4 +48,33 @@ Vagrant.configure("2") do |config| end end + config.vm.define :freebsd92 do |freebsd92| + freebsd92.vm.box = "freebsd92" +# freebsd92.vm.box_url = "https://wunki.org/files/freebsd-9.2-amd64-wunki.box" + freebsd92.vm.box_url = "http://iris.hosting.lv/freebsd-9.2-i386.box" + freebsd92.vm.provision :shell do |s| + s.args = "freebsd92" + s.path = "initFreeBSDScript.sh" + end + end + + config.vm.define :freebsd10 do |freebsd10| + freebsd10.vm.box = "freebsd10" +# freebsd10.vm.box_url = "https://wunki.org/files/freebsd-10.0-amd64-wunki.box" + freebsd10.vm.box_url = "http://iris.hosting.lv/freebsd-10.0-i386.box" + freebsd10.vm.provision :shell do |s| + s.args = "freebsd10" + s.path = "initFreeBSDScript.sh" + end + end + + config.vm.define :opensuse12 do |opensuse12| + opensuse12.vm.box = "opensuse12" + opensuse12.vm.box_url = "http://sourceforge.net/projects/opensusevagrant/files/12.3/opensuse-12.3-64.box/download" + opensuse12.vm.provision :shell do |s| + s.args = "opensuse12" + s.path = "initOpenSUSEScript.sh" + end + end + end diff --git a/vagrantSandbox/initFreeBSDScript.sh b/vagrantSandbox/initFreeBSDScript.sh new file mode 100755 index 000000000..0dd703394 --- /dev/null +++ b/vagrantSandbox/initFreeBSDScript.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +boxName=$1 + +echo +echo "Init script for $boxName" +echo + +echo +echo "FreeBSD-specific ended. Now doing general stuff" +echo + +/vagrant/initGeneralScript.sh + +echo +echo "Ended" diff --git a/vagrantSandbox/initOpenSUSEScript.sh b/vagrantSandbox/initOpenSUSEScript.sh new file mode 100755 index 000000000..0dd703394 --- /dev/null +++ b/vagrantSandbox/initOpenSUSEScript.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +boxName=$1 + +echo +echo "Init script for $boxName" +echo + +echo +echo "FreeBSD-specific ended. Now doing general stuff" +echo + +/vagrant/initGeneralScript.sh + +echo +echo "Ended" From 74c5ebe030aaae49328dd9a8dab3c795d6eca8db Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 18:03:40 +0100 Subject: [PATCH 05/10] Now OpenSUSE is provisioned. FreeBSD not working because it doesn't support shared folders in the virtual box --- vagrantSandbox/README | 7 +++++++ vagrantSandbox/initFreeBSDScript.sh | 13 +++++++++++++ vagrantSandbox/initGeneralScript.sh | 3 +++ vagrantSandbox/initOpenSUSEScript.sh | 18 +++++++++++++++++- 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index ca36ba2ab..4517f92b2 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -4,6 +4,11 @@ These virtual machines require - VirtualBox :: for running from [[https://www.virtualbox.org]] - Vagrant :: to automatically set them up from [[http://www.vagrantup.com]] + To make sure that for the boxes the have the newest + VirtualBox-additions do +: vagrant plugin install vagrant-vbguest + This installs a plugin that tries to update the guest addition if + they are for an older version of VirtualBox * Starting A virtual machine is set up with : vagrant up @@ -38,6 +43,8 @@ - freebsd10 :: FreeBSD 10.0 32-big machine. Currently does not boot properly - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned + Some machines (read: the BSD-boxes) need the =VirtualBox Extension + Pack= installed (because they have USB 2.0) * Scripts In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and diff --git a/vagrantSandbox/initFreeBSDScript.sh b/vagrantSandbox/initFreeBSDScript.sh index 0dd703394..48f738557 100755 --- a/vagrantSandbox/initFreeBSDScript.sh +++ b/vagrantSandbox/initFreeBSDScript.sh @@ -6,6 +6,19 @@ echo echo "Init script for $boxName" echo +pkg install -fy virtualbox-ose-additions + +neededPackages=(mercurial git flex bison ccache rpm wget) +bonusPackages=(emacs24 zsh) + +for p in ${neededPackages[@]}; do + pkg install -y $p +done + +for p in ${bonusPackages[@]}; do + pkg install -y $p +done + echo echo "FreeBSD-specific ended. Now doing general stuff" echo diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 93e2034ae..672f49af0 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -20,6 +20,9 @@ OFDIR=/home/vagrant/foam/ mkdir -vp $OFDIR chown -R vagrant:vagrant $OFDIR +# for distros that don't have group vagrant +chown -R vagrant $OFDIR + OFClone=$OFDIR/foam-extend-3.0 OFReference=$OFClone-parent diff --git a/vagrantSandbox/initOpenSUSEScript.sh b/vagrantSandbox/initOpenSUSEScript.sh index 0dd703394..d4be5b834 100755 --- a/vagrantSandbox/initOpenSUSEScript.sh +++ b/vagrantSandbox/initOpenSUSEScript.sh @@ -6,8 +6,24 @@ echo echo "Init script for $boxName" echo +# Otherwise python/mercurial won't install +zypper -n remove patterns-openSUSE-minimal_base-conflicts + +# patterns-openSUSE-devel_python + +neededPackages=(gcc-c++ mercurial git flex bison make ccache zlib-devel rpm-build) +bonusPackages=(emacs csh tcsh zsh) + +for p in ${neededPackages[@]}; do + zypper -n install $p +done + +for p in ${bonusPackages[@]}; do + zypper -n install $p +done + echo -echo "FreeBSD-specific ended. Now doing general stuff" +echo "OpenSUSE-specific ended. Now doing general stuff" echo /vagrant/initGeneralScript.sh From 8868132a9eb4f9517530dc75bc913afda3becadf Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 18:51:15 +0100 Subject: [PATCH 06/10] Try to make FreeBSD work --- vagrantSandbox/README | 7 ++++--- vagrantSandbox/Vagrantfile | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 4517f92b2..de590c01e 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -39,9 +39,10 @@ =lucid=-machine. Not yet working - centos65 :: A CentOS 6.5 machine with preinstalled development tools - - freebsd92 :: FreeBSD 9.2 32-bit machine. Untested - - freebsd10 :: FreeBSD 10.0 32-big machine. Currently does not boot - properly + - freebsd92 :: FreeBSD 9.2 32-bit machine. Does not work because + FreeBSD does not support shared folders + - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared + folders via NFS. Currently not working - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index e07baee3b..081f8ab5b 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -66,6 +66,16 @@ Vagrant.configure("2") do |config| s.args = "freebsd10" s.path = "initFreeBSDScript.sh" end + freebsd10.vm.network :private_network, ip: "10.0.0.2" + + # configure the NICs + freebsd10.vm.provider :virtualbox do |vb| + vb.customize ["modifyvm", :id, "--nictype1", "virtio"] + vb.customize ["modifyvm", :id, "--nictype2", "virtio"] + end + + # use NFS for the synced folder + freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true end config.vm.define :opensuse12 do |opensuse12| From 93062c01be569093de35b7fa8ebf71e7d883cb59 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Tue, 11 Feb 2014 11:29:18 +0100 Subject: [PATCH 07/10] Forgot one library (without liberty nothing links) --- vagrantSandbox/README | 3 ++- vagrantSandbox/initCentOSRHELScript.sh | 2 +- vagrantSandbox/initOpenSUSEScript.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index de590c01e..29045362f 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -43,7 +43,8 @@ FreeBSD does not support shared folders - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared folders via NFS. Currently not working - - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned + - opensuse12 :: OpenSUSE 12.3 machine. Currently not completely + compiling Foam Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) * Scripts diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index 11cf62072..b96b1f71e 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -8,7 +8,7 @@ echo # some of these packages are already installed. But lets be sure -neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel) +neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/initOpenSUSEScript.sh b/vagrantSandbox/initOpenSUSEScript.sh index d4be5b834..89d5fb7b8 100755 --- a/vagrantSandbox/initOpenSUSEScript.sh +++ b/vagrantSandbox/initOpenSUSEScript.sh @@ -11,7 +11,7 @@ zypper -n remove patterns-openSUSE-minimal_base-conflicts # patterns-openSUSE-devel_python -neededPackages=(gcc-c++ mercurial git flex bison make ccache zlib-devel rpm-build) +neededPackages=(gcc-c++ mercurial git flex bison make ccache zlib-devel rpm-build binutils-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do From a7d9a55024a09b04518e31f4b2e917df728a51cd Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Tue, 11 Feb 2014 14:01:59 +0100 Subject: [PATCH 08/10] Refactor the Ubuntu-script --- vagrantSandbox/README | 8 ++++++- vagrantSandbox/initUbunutuScript.sh | 33 +++++++++++------------------ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 29045362f..41d8b0f16 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -47,8 +47,14 @@ compiling Foam Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) -* Scripts +* Scripts in the machine In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and the ThirdParty-packages in one go (no paraview and QT). If this works the box is considered operational +* Provisioning scripts + Every "family" of machines has a specific script that makes sure + that the software packages necessary to compile =Foam= are installed + into the machine. In the end these scripts should call + =initGeneralScript.sh= which gets the sources into the machine. It + needs =git=, =mercurial= and =ccache= for that. diff --git a/vagrantSandbox/initUbunutuScript.sh b/vagrantSandbox/initUbunutuScript.sh index ea3de7bf2..d883e1df5 100755 --- a/vagrantSandbox/initUbunutuScript.sh +++ b/vagrantSandbox/initUbunutuScript.sh @@ -24,22 +24,16 @@ echo echo "Installing additional packages" echo -apt-get -y install mercurial -apt-get -y install bison -apt-get -y install flex -apt-get -y install g++ -apt-get -y install make -#apt-get -y install python-dev -apt-get -y install ccache -apt-get -y install cmake +neededPackages=(g++ bison flex mercurial git make ccache cmake rpm) +bonusPackages=(emacs csh tcsh zsh) -# test scripts with different shells -apt-get -y install csh -apt-get -y install tcsh -apt-get -y install zsh +for p in ${neededPackages[@]}; do + apt-get -y install $p +done -# to make the ThirdParty-Stuff work -apt-get -y install rpm +for p in ${bonusPackages[@]}; do + apt-get -y install $p +done # this is needed for the packaging stuff echo @@ -59,13 +53,10 @@ echo echo "Tools for packaging" echo -# Needed for packaging -apt-get -y install default-mta -apt-get -y install dpkg-dev -apt-get -y install debhelper devscripts cdbs - -# Not needed. Just to keep Bernhard happy -apt-get -y install emacs +packagingPackages=(default-mta dpkg-dev debhelper devscripts cdbs binutils-dev) +for p in ${packagingPackages[@]}; do + apt-get -y install $p +done echo echo "Ubuntu-specific ended. Now doing general stuff" From 240d710a6e48661d9590de85563c0dd6c12cecbe Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Thu, 13 Mar 2014 17:52:52 +0100 Subject: [PATCH 09/10] Adaption to new boxes available on vagrantcloud.com (use vagrant 1.5) --- vagrantSandbox/README | 16 ++++++-- vagrantSandbox/Vagrantfile | 51 ++++++++++++++++---------- vagrantSandbox/initCentOSRHELScript.sh | 5 ++- vagrantSandbox/initGeneralScript.sh | 5 +++ 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 41d8b0f16..367925f24 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -3,7 +3,10 @@ * Prerequisites These virtual machines require - VirtualBox :: for running from [[https://www.virtualbox.org]] - - Vagrant :: to automatically set them up from [[http://www.vagrantup.com]] + - Vagrant :: to automatically set them up from + [[http://www.vagrantup.com]] Make sure that you have at + least version 1.5 to be able to use the base boxes from + https://vagrantcloud.com/ To make sure that for the boxes the have the newest VirtualBox-additions do : vagrant plugin install vagrant-vbguest @@ -31,7 +34,7 @@ doing * Virtual machines Currently existing virtual machines are - - precise :: Latest LTS Ubuntu. + - precise :: Latest LTS Ubuntu. Currently the default machine to use - lucid :: Previous LTS Ubuntu. Currently problems with automatic setting up (something with the =postfix=-package) @@ -39,8 +42,13 @@ =lucid=-machine. Not yet working - centos65 :: A CentOS 6.5 machine with preinstalled development tools - - freebsd92 :: FreeBSD 9.2 32-bit machine. Does not work because - FreeBSD does not support shared folders + - freebsd92 :: FreeBSD 9.2 64-bit machine. Currently this machine + does not provision automatically. After the first + failure log in and do +: sudo pkg_add -r rsync +: sudo pkg_add -r bash + then halt the machine and bring it up again (with the + =--provision=-option) - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared folders via NFS. Currently not working - opensuse12 :: OpenSUSE 12.3 machine. Currently not completely diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 081f8ab5b..d3b3eedd4 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -12,6 +12,28 @@ Vagrant.configure("2") do |config| vb.customize ["modifyvm", :id, "--memory", "1024"] end + # default + config.vm.define :precise do |precise| + precise.vm.box = "hashicorp/precise64" + precise.vm.box_check_update = true + # precise.vm.box_url = "http://files.vagrantup.com/precise64.box" + precise.vm.provision :shell do |s| + s.args = "precise" + s.path = "initUbunutuScript.sh" + end + end + + config.vm.define :centos65 do |centos65| + centos65.vm.box = "chef/centos-6.5" + centos65.vm.box_check_update = true + # centos65.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" + centos65.vm.provision :shell do |s| + s.args = "centos65" + s.path = "initCentOSRHELScript.sh" + end + end + + # legacy config.vm.define :lucid do |lucid| lucid.vm.box = "lucid64" lucid.vm.box_url = "http://files.vagrantup.com/lucid64.box" @@ -21,6 +43,7 @@ Vagrant.configure("2") do |config| end end + #legacy config.vm.define :maverick do |maverick| maverick.vm.box = "maverick64" maverick.vm.box_url = "http://mathie-vagrant-boxes.s3.amazonaws.com/maverick64.box" @@ -30,34 +53,21 @@ Vagrant.configure("2") do |config| end end - config.vm.define :precise do |precise| - precise.vm.box = "precise64" - precise.vm.box_url = "http://files.vagrantup.com/precise64.box" - precise.vm.provision :shell do |s| - s.args = "precise" - s.path = "initUbunutuScript.sh" - end - end - - config.vm.define :centos65 do |centos65| - centos65.vm.box = "centos65" - centos65.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" - centos65.vm.provision :shell do |s| - s.args = "centos65" - s.path = "initCentOSRHELScript.sh" - end - end - + # experimental config.vm.define :freebsd92 do |freebsd92| - freebsd92.vm.box = "freebsd92" + freebsd92.vm.box = "chef/freebsd-9.2" + freebsd92.vm.box_check_update = true # freebsd92.vm.box_url = "https://wunki.org/files/freebsd-9.2-amd64-wunki.box" - freebsd92.vm.box_url = "http://iris.hosting.lv/freebsd-9.2-i386.box" +# freebsd92.vm.box_url = "http://iris.hosting.lv/freebsd-9.2-i386.box" freebsd92.vm.provision :shell do |s| s.args = "freebsd92" s.path = "initFreeBSDScript.sh" end + freebsd92.vm.synced_folder "..", "/FOAM-sources", type: "rsync", rsync__exclude: "vagrantSandbox/" + freebsd92.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "ccache4vm/" end + # legacy/experimental config.vm.define :freebsd10 do |freebsd10| freebsd10.vm.box = "freebsd10" # freebsd10.vm.box_url = "https://wunki.org/files/freebsd-10.0-amd64-wunki.box" @@ -78,6 +88,7 @@ Vagrant.configure("2") do |config| freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true end + # legacy config.vm.define :opensuse12 do |opensuse12| opensuse12.vm.box = "opensuse12" opensuse12.vm.box_url = "http://sourceforge.net/projects/opensusevagrant/files/12.3/opensuse-12.3-64.box/download" diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index b96b1f71e..4aca9927e 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -6,9 +6,12 @@ echo echo "Init script for $boxName" echo +echo "Install the EPEL-repository for additional software" +rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + # some of these packages are already installed. But lets be sure -neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel) +neededPackages=(gcc-c++ gcc-gfortran mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 672f49af0..0a0025808 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -37,8 +37,12 @@ then then echo echo "Parent is git" + echo "Cloning. This may take some time" echo + + # su -c not correctly working on FreeBSD su vagrant - -c "git clone $OFParent $OFClone" + echo echo "Git cloned: TODO: set same branch as parent" echo @@ -52,6 +56,7 @@ then # sed removes + in case of a 'tainted' parent echo "Parent is on id $idName" + echo "Cloning. This may take some time" su vagrant - -c "hg clone -u $idName $OFParent $OFClone" echo else From d1d83c21f45ab27c1c7be627232b92b39956481c Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Thu, 13 Mar 2014 18:33:45 +0100 Subject: [PATCH 10/10] Changes necessary for FreeBSD --- vagrantSandbox/initFreeBSDScript.sh | 4 ++-- vagrantSandbox/initGeneralScript.sh | 2 +- vagrantSandbox/skel/bootstrapFoam.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vagrantSandbox/initFreeBSDScript.sh b/vagrantSandbox/initFreeBSDScript.sh index 48f738557..a5c0514ec 100755 --- a/vagrantSandbox/initFreeBSDScript.sh +++ b/vagrantSandbox/initFreeBSDScript.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash boxName=$1 @@ -8,7 +8,7 @@ echo pkg install -fy virtualbox-ose-additions -neededPackages=(mercurial git flex bison ccache rpm wget) +neededPackages=(mercurial git flex bison ccache rpm4 wget) bonusPackages=(emacs24 zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 0a0025808..2dcc0af87 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash echo echo "Copying stuff from skeleton" diff --git a/vagrantSandbox/skel/bootstrapFoam.sh b/vagrantSandbox/skel/bootstrapFoam.sh index c589bb4cc..8bbd921b7 100755 --- a/vagrantSandbox/skel/bootstrapFoam.sh +++ b/vagrantSandbox/skel/bootstrapFoam.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # Just to be sure export WM_SCHEDULER=ccache