From c7901b4e408a9cfe389a1cbbae0db4e88723fa43 Mon Sep 17 00:00:00 2001 From: chenhb-zte Date: Wed, 16 Nov 2016 14:15:15 +0800 Subject: [PATCH] [Bindep]Use bindep lib to install system packages 1.Fix install_rally.sh.Move all system packages from install_rally.sh script to separate file bindep.txt add call to bindep from install_rally.sh script 2.Add bindep command to tox.ini, we can use "tox -e bindep" to check the required system packages which is missing. 3.Install bindep when running Dockerfile Change-Id: If4568c22d3b4f1c393c217d935cda233bd41d45e --- Dockerfile | 5 ++++- bindep.txt | 23 +++++++++++++++++++++++ tox.ini | 8 ++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 bindep.txt diff --git a/Dockerfile b/Dockerfile index 82ff9faa..16d43e8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:16.04 MAINTAINER Sergey Skripnick # install prereqs -RUN apt-get update && apt-get install --yes wget python vim bash-completion gcc +RUN apt-get update && apt-get install --yes wget python vim bash-completion gcc lsb-release # ubuntu's pip is too old to work with the version of requests we # require, so get pip with get-pip.py @@ -10,6 +10,9 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && \ python get-pip.py && \ rm -f get-pip.py +# install bindep +RUN pip install bindep + # create rally user RUN apt-get install sudo && \ useradd -u 65500 -m rally && \ diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 00000000..09909038 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,23 @@ +# This is a cross-platform list tracking distribution packages needed by tests; +# see http://docs.openstack.org/infra/bindep/ for additional information. + +build-essential [platform:dpkg] +gcc [platform:rpm] +git +gmp-devel [platform:rpm] +libffi-dev [platform:dpkg] +libffi-devel [platform:rpm !platform:opensuse] +libffi48-devel [platform:opensuse] +libpq-dev [platform:dpkg] +libssl-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxml2-devel [platform:rpm] +libxslt1-dev [platform:dpkg] +libxslt-devel [platform:rpm] +openssl-devel [platform:rpm] +postgresql-devel [platform:rpm !platform:opensuse] +postgresql93-devel [platform:opensuse] +python-dev [platform:dpkg] +python-devel [platform:rpm] +redhat-rpm-config [platform:rpm] +wget diff --git a/tox.ini b/tox.ini index 5515826d..98ddc465 100644 --- a/tox.ini +++ b/tox.ini @@ -83,3 +83,11 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build,setup.py [hacking] import_exceptions = rally.common.i18n local-check-factory = tests.hacking.checks.factory + +[testenv:bindep] +# Do not install any requirements. We want this to be fast and work even if +# system dependencies are missing, since it's used to tell you what system +# dependencies are missing! This also means that bindep must be installed +# separately, outside of the requirements files. +deps = bindep +commands = bindep