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
This commit is contained in:
parent
b07a50bfdd
commit
ec1009cf19
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue