From ec1009cf197ed555b29b6f226adb300914ea5bd0 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 26 Jun 2014 08:22:47 -0400 Subject: 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 Change-Id: I5ab8898bd3cc2de18681fe3262cb784f7d9519ab --- tools/integration.sh | 28 ++++++++++++++++++++++++---- 1 file 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 < $tmpdir/pypi.conf ServerAdmin webmaster@localhost @@ -101,8 +108,21 @@ cat < $tmpdir/pypi.conf Options Indexes FollowSymLinks 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 -- cgit v1.2.1