From 8aa7febc9aaf75d8b2ebaf8c60631384fce46fff Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Mon, 1 Jun 2015 13:30:32 -0400 Subject: [PATCH] Pin software dep versions in Foreman bootstrap Software released under 'Arno' should be pinned to at least the major version, to guarantee API backwards compatibility. This also moves some pip-based installs to yum, for simplicity and consistency. JIRA: BGS-54 Change-Id: If4f20a5740b989bd7e369a2ec5aefd559eb505b1 Signed-off-by: Daniel Farrell --- foreman/ci/bootstrap.sh | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/foreman/ci/bootstrap.sh b/foreman/ci/bootstrap.sh index 1b36478..839dfaa 100755 --- a/foreman/ci/bootstrap.sh +++ b/foreman/ci/bootstrap.sh @@ -20,25 +20,14 @@ green=`tput setaf 2` ##END VARS -##install EPEL -if ! yum repolist | grep "epel/"; then - if ! rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm; then - printf '%s\n' 'bootstrap.sh: Unable to configure EPEL repo' >&2 - exit 1 - fi -else - printf '%s\n' 'bootstrap.sh: Skipping EPEL repo as it is already configured.' -fi - -##install python,gcc,git -if ! yum -y install python-pip python-virtualenv gcc git; then - printf '%s\n' 'bootstrap.sh: Unable to install python,gcc,git packages' >&2 - exit 1 -fi - -##Install sshpass -if ! yum -y install sshpass; then - printf '%s\n' 'bootstrap.sh: Unable to install sshpass' >&2 +# Install EPEL repo for access to many other yum repos +# Major version is pinned to force some consistency for Arno +yum install -y epel-release-7* + +# Install other required packages +# Major version is pinned to force some consistency for Arno +if ! yum -y install python-pip-1* python-virtualenv-1* gcc-4* git-1* sshpass-1* ansible-1* python-requests-1*; then + printf '%s\n' 'bootstrap.sh: failed to install required packages' >&2 exit 1 fi @@ -53,17 +42,6 @@ if [ ! -d khaleesi ]; then fi fi -if ! pip install ansible; then - printf '%s\n' 'bootstrap.sh: Unable to install ansible' >&2 - exit 1 -fi - -if ! pip install requests; then - printf '%s\n' 'bootstrap.sh: Unable to install requests python package' >&2 - exit 1 -fi - - cd khaleesi cp ansible.cfg.example ansible.cfg -- 2.16.6