From 0b05d8f9cf718f1f68bba5196a81ee13e2f2789f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Tue, 26 Nov 2019 20:19:34 -0300 Subject: [PATCH] fix(centos6): install correct pip version closes #18 --- .travis.yml | 4 ++-- Dockerfile.yum | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 864d8b7..6818b5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,8 +46,8 @@ env: - DN=centos DV=7 PI=yum SV=2019.2 SIM=stable PV=3 EP="python3 python3-pip python3-devel openssl-devel swig gcc-g++ zeromq zeromq-devel" - DN=centos DV=7 PI=yum SV=2019.2 SIM=stable PV=2 EP="python2-pip" - DN=centos DV=7 PI=yum SV=2018.3 SIM=stable PV=2 EP="python2-pip" - - DN=centos DV=6 PI=yum SV=2018.3 SIM=stable PV=2 EP="python-pip" - - DN=centos DV=6 PI=yum SV=2017.7 SIM=stable PV=2 EP="python-pip" + - DN=centos DV=6 PI=yum SV=2018.3 SIM=stable PV=2 EP="python27-pip" + - DN=centos DV=6 PI=yum SV=2017.7 SIM=stable PV=2 EP="python27-pip" # DEBIAN - DN=debian DV=10 PI=apt SV=master SIM=git PV=3 EP="python3-apt python3-pip" diff --git a/Dockerfile.yum b/Dockerfile.yum index 4d55330..619071b 100644 --- a/Dockerfile.yum +++ b/Dockerfile.yum @@ -13,8 +13,8 @@ ARG EXTRA_PACKAGES="" ARG PKGS="udev git net-tools sudo curl openssh-server openssh-clients which $EXTRA_PACKAGES" -# Centos 7 and 6 requires EPEL repo before being able to install python2-pip -RUN if [ "${DISTRO_NAME}" = "centos" ]; \ +# Centos 7 requires EPEL repo before being able to install python2-pip +RUN if [ "${DISTRO_NAME}" = "centos" -a "${DISTRO_NAME}" = "7" ]; \ then yum -y install epel-release; \ fi RUN yum -y update && yum -y install ${PKGS} @@ -25,6 +25,11 @@ RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/b sed "s/python34/python3/g" | \ sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION +# Centos 6 installs python27-pip from the salt repo +RUN if [ "${DISTRO_NAME}" = "centos" -a "${DISTRO_VERSION}" = "6" ]; \ + then yum -y update && yum -y install $EXTRA_PACKAGES; \ + ln -s /usr/bin/pip2.7 /usr/bin/pip; \ + fi RUN rm -rf /var/cache/{salt,yum} \ && (find / -name "*pyc" ; find / -name "__pycache__") |grep -v /proc | xargs rm -rf