diff --git a/Dockerfile b/Dockerfile index e2eba91b..0e61f6ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,10 @@ MAINTAINER Sergey Skripnick COPY . /tmp/rally RUN apt-get update && \ apt-get -y install git python2.7 bash-completion python-dev libffi-dev \ - libxml2-dev libxslt1-dev libssl-dev &&\ + libxml2-dev libxslt1-dev libssl-dev libpq-dev wget \ + build-essential &&\ + wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O /tmp/pip.py &&\ + python /tmp/pip.py && rm /tmp/pip.py &&\ cd /tmp/rally &&\ ./install_rally.sh &&\ pip install -r optional-requirements.txt &&\ diff --git a/setup.cfg b/setup.cfg index 34bb26dc..106062d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,10 +23,6 @@ classifier = packages = rally -data_files = - /etc/bash_completion.d = - etc/rally.bash_completion - [entry_points] console_scripts = rally = rally.cmd.main:main diff --git a/setup.py b/setup.py index 73637574..e1e3cef6 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. - +# # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools @@ -25,6 +25,17 @@ try: except ImportError: pass +import os +if os.getuid() == 0: + data_files = [ + ('/etc/bash_completion.d', ['etc/rally.bash_completion']), + ] +else: + data_files = [ + ('etc/bash_completion.d', ['etc/rally.bash_completion']), + ] + setuptools.setup( setup_requires=['pbr'], + data_files=data_files, pbr=True) diff --git a/tests/ci/test_install.sh b/tests/ci/test_install.sh index 71fb47af..3f0790df 100755 --- a/tests/ci/test_install.sh +++ b/tests/ci/test_install.sh @@ -15,9 +15,18 @@ # License for the specific language governing permissions and limitations # under the License. +env -sudo ./install_rally.sh +sudo ./install_rally.sh --system --yes rally deployment list -sudo ./install_rally.sh +sudo ./install_rally.sh --system --yes rally deployment list + +sudo ./install_rally.sh --yes -d /tmp/rallytest_root/ +/tmp/rallytest_root/bin/rally deployment list + +sudo rm -fr ~/.rally + +./install_rally.sh --yes -d /tmp/rallytest_user +/tmp/rallytest_user/bin/rally deployment list