TechEmpower/FrameworkBenchmarks — pull request #900 by hamiltont (2014-07-03 09:04:15+00:00)
Title: Compartmentalize install files

This seems like a big one, but it's basically switching us from using "bash-through-python" for the installation to using bash directly. This only changes the server installation - I've left the client and database as is. I have tested every single dependency shell script for correctness. I have tested running a benchmark with 2-3 frameworks.

The biggest benefits:
* The exclude and test flags apply to the installation stage. No need to install everything if all you want is nodejs
* Readability: It's a lot easier to parse than the previous approach
* Maintainability: I've found/fixed a few bugs already
* Future-proofing: Individual frameworks can use `fw_depends` to get the language/tool/etc that is current for FrameworkBenchmarks, or they can just ignore `fw_depends` and use the specific version they need. Best of both worlds :-)
* True installation stage: A lot of our setup.py scripts do some last-minute installation, which is annoying when you've waited all night to install and just want to start running. With each folder having an install.sh, we can move the installation there and fix the setup.py#start() usage to be as it was intended.

Basically this just declares a few bash functions in `toolset/setup/linux/bash_functions.sh` and then uses them everywhere. Each framework now has an install.sh file that declares it's dependencies (e.g. `fw_depends siena play1`) - if a dependency is unknown it's ignored. Each dependency has it's own bash script in the proper subfolder (e.g. `frameworks/play1.sh`) that is executed to install it. About 95% of these dependencies check if they have already been met before doing anything, so calling them repeatedly has no performance hit (e.g. `fw_depends nginx nginx nginx` just install once and then skip twice).

**Bugs Fixed**
* HHVM: Was forcing trusty install regardless of ubuntu version
* WT: was checking for installs/namak folder
* ruby: extra single quotes were breaking rvm source
* ruby: was trying to use rvm before sourcing ~/.profile

**Changes Needing Confirmation**
* ldconfig was running every single install, instead of just after mongrel. I've placed it into mongrel2.sh for now to only run after a clean mongrel install. Was it supposed to run every time?
* Could someone double-check install conditions for racket and treefrog? They passed my tests, but perhaps I missed something. Not sure why those chcek for two files when every other dependency checks for one

**Bugs and Improvements**
* [BUG] Wt doesn't install on Ubuntu 12.04 due to libboost1.54 not being available (default in the package manager is 1.49). We could use libboost-all-dev
* [BUG] Mongrel2 does not build. The zmc_compat.h that is used to patch the downloaded tar references a file zmq.h that does not exist
* [TODO] Don’t run apt if proper java is installed
* [TODO] Don't run cabal if proper yesod is installed

I've stuck to traditional sh code instead of bash code, so if we want to port this to a different OS it should br trivial (at least for this boilerplate part....not for the actual installations...)