From 553dd546b5a895554d08d9f7cfb46d2cb090c494 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 16 May 2018 06:20:26 +0000 Subject: [PATCH] travis: fix python2 package installation For python2/python3 compatibility install additional (python2-future) and different (python2-ipaddress) packages during test. Also switch Fedora tests to explicitly install versioned python packages (python2-* instead of python-*). Signed-off-by: Adrian Reber Signed-off-by: Andrei Vagin --- scripts/build/Dockerfile.alpine | 3 ++- scripts/build/Dockerfile.centos | 6 ++++-- scripts/build/Dockerfile.fedora.tmpl | 12 ++++++++---- scripts/build/Dockerfile.s390x.hdr | 2 +- scripts/build/Dockerfile.tmpl | 3 ++- scripts/travis/travis-tests | 6 ++++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/scripts/build/Dockerfile.alpine b/scripts/build/Dockerfile.alpine index fa8258187..21647e1e1 100644 --- a/scripts/build/Dockerfile.alpine +++ b/scripts/build/Dockerfile.alpine @@ -26,11 +26,12 @@ RUN mv .ccache /tmp && make mrproper && ccache -sz && \ RUN apk add \ py-yaml \ py-pip \ + py2-future \ ip6tables \ iptables \ iproute2 \ tar \ bash -RUN pip install protobuf ipaddr +RUN pip install protobuf ipaddress RUN make -C test/zdtm diff --git a/scripts/build/Dockerfile.centos b/scripts/build/Dockerfile.centos index e26427d8e..75f0ed461 100644 --- a/scripts/build/Dockerfile.centos +++ b/scripts/build/Dockerfile.centos @@ -22,9 +22,11 @@ RUN yum install -y \ protobuf-devel \ protobuf-python \ python \ - python-ipaddr \ + python-ipaddress \ + python2-future \ python-yaml \ - tar + tar \ + which COPY . /criu WORKDIR /criu diff --git a/scripts/build/Dockerfile.fedora.tmpl b/scripts/build/Dockerfile.fedora.tmpl index 039cb1131..f6b374389 100644 --- a/scripts/build/Dockerfile.fedora.tmpl +++ b/scripts/build/Dockerfile.fedora.tmpl @@ -17,11 +17,15 @@ RUN dnf install -y \ procps-ng \ protobuf-c-devel \ protobuf-devel \ - protobuf-python \ - python \ - python-ipaddr \ + python2-protobuf \ + python2 \ + # Starting with Fedora 28 this is python2-ipaddress + python-ipaddress \ + # Starting with Fedora 28 this is python2-pyyaml python-yaml \ - tar + python2-future \ + tar \ + which # Replace coreutils-single with "traditional" coreutils # to fix the following error on Fedora 28/rawhide while diff --git a/scripts/build/Dockerfile.s390x.hdr b/scripts/build/Dockerfile.s390x.hdr index be75712f4..37ff20832 100644 --- a/scripts/build/Dockerfile.s390x.hdr +++ b/scripts/build/Dockerfile.s390x.hdr @@ -1,4 +1,4 @@ -FROM s390x/debian:jessie +FROM s390x/debian:jessie-backports ENV QEMU_CPU z900 COPY scripts/build/qemu-user-static/usr/bin/qemu-s390x-static /usr/bin/qemu-s390x-static diff --git a/scripts/build/Dockerfile.tmpl b/scripts/build/Dockerfile.tmpl index f1fff3a52..bdfdf713a 100644 --- a/scripts/build/Dockerfile.tmpl +++ b/scripts/build/Dockerfile.tmpl @@ -19,7 +19,8 @@ RUN apt-get update && apt-get install -y \ pkg-config \ protobuf-c-compiler \ protobuf-compiler \ - python-minimal + python-minimal \ + python-future COPY . /criu WORKDIR /criu diff --git a/scripts/travis/travis-tests b/scripts/travis/travis-tests index 17c8c231d..c642ae099 100755 --- a/scripts/travis/travis-tests +++ b/scripts/travis/travis-tests @@ -2,7 +2,7 @@ set -x -e TRAVIS_PKGS="protobuf-c-compiler libprotobuf-c0-dev libaio-dev - libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev + libprotobuf-dev protobuf-compiler libcap-dev libnl-3-dev gcc-multilib gdb bash python-protobuf libnet-dev util-linux asciidoc xmlto libnl-route-3-dev" @@ -45,7 +45,9 @@ travis_prep () { apt-get update -qq apt-get install -qq --no-install-recommends $TRAVIS_PKGS - pip install junit-xml + # travis is based on 14.04 and that does not have python + # packages for future and ipaddress (16.04 has those packages) + pip install junit-xml future ipaddress chmod a+x $HOME }