summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Dague <sean@dague.net>2014-06-26 08:22:47 -0400
committerSean Dague <sean@dague.net>2014-06-26 11:37:02 -0400
commitec1009cf197ed555b29b6f226adb300914ea5bd0 (patch)
tree235e34bbd4842a948a67a45e58754b87e770097f
parentb07a50bfddda1cbb10faa64dc096ca9d855c483c (diff)
downloadpbr-ec1009cf197ed555b29b6f226adb300914ea5bd0.tar.gz
Update integration script for Apache 2.4
Apache 2.4 requires site configuration files to have a ".conf" extension, and Apache 2.2 does not want the extension. Add logic to figure out the right name for the file so we can run the tests against both versions of Apache. Fixes bug: #1334326 install required libraries for mixed c things use build-dep to install the required libraries needed for the python build deps. Without this we can get cryptic library compilation issues. And use ccache explicitly Change-Id: Ia750e4221b119097521cf373752aae364759913b squashed into this one because we can't move forward without both. Co-Authored-By: Sean Dague <sean@dague.net> Change-Id: I5ab8898bd3cc2de18681fe3262cb784f7d9519ab
-rw-r--r--tools/integration.sh28
1 files changed, 24 insertions, 4 deletions
diff --git a/tools/integration.sh b/tools/integration.sh
index b6021f3..8c2db5e 100644
--- a/tools/integration.sh
+++ b/tools/integration.sh
@@ -43,7 +43,14 @@ BASE=${BASE:-/opt/stack}
REPODIR=${REPODIR:-$BASE/new}
# TODO: Figure out how to get this on to the box properly
-sudo apt-get install -y --force-yes libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev libnspr4-dev pkg-config libsqlite3-dev libzmq-dev libffi-dev libldap2-dev libsasl2-dev
+sudo apt-get install -y --force-yes libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev libnspr4-dev pkg-config libsqlite3-dev libzmq-dev libffi-dev libldap2-dev libsasl2-dev ccache
+
+# FOR numpy / pyyaml
+sudo apt-get build-dep -y --force-yes python-numpy
+sudo apt-get build-dep -y --force-yes python-yaml
+
+# And use ccache explitly
+export PATH=/usr/lib/ccache:$PATH
tmpdir=$(mktemp -d)
@@ -93,7 +100,7 @@ if [ ! -d /etc/apache2/sites-enabled/ ] ; then
exit 1
fi
-sudo rm /etc/apache2/sites-enabled/*
+sudo rm -f /etc/apache2/sites-enabled/*
cat <<EOF > $tmpdir/pypi.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
@@ -101,8 +108,21 @@ cat <<EOF > $tmpdir/pypi.conf
Options Indexes FollowSymLinks
</VirtualHost>
EOF
-sudo mv $tmpdir/pypi.conf /etc/apache2/sites-available/pypi
-sudo chown root:root /etc/apache2/sites-available/pypi
+
+# NOTE(dhellmann): This logic is copied from apache_site_config_for
+# devstack/lib/apache with non-Ubuntu OSes left out because we don't
+# run this integration test anywhere else for now.
+apache_version=$(/usr/sbin/apache2ctl -v | awk '/Server version/ {print $3}' | cut -f2 -d/)
+if [[ "$apache_version" =~ ^2\.2\. ]]
+then
+ # Ubuntu 12.04 - Apache 2.2
+ apache_conf=/etc/apache2/sites-available/pypi
+else
+ # Ubuntu 14.04 - Apache 2.4
+ apache_conf=/etc/apache2/sites-available/pypi.conf
+fi
+sudo mv $tmpdir/pypi.conf $apache_conf
+sudo chown root:root $apache_conf
sudo a2ensite pypi
sudo service apache2 reload