[5/5] travis: fix python2 package installation

Submitted by Adrian Reber on May 14, 2018, 1:07 p.m.

Details

Message ID 1526303231-10750-6-git-send-email-adrian@lisas.de
State Accepted
Series "Series without cover letter"
Headers show

Commit Message

Adrian Reber May 14, 2018, 1:07 p.m.
From: Adrian Reber <areber@redhat.com>

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 <areber@redhat.com>
---
 scripts/build/Dockerfile.alpine      | 3 ++-
 scripts/build/Dockerfile.fedora.tmpl | 9 +++++----
 scripts/build/Dockerfile.s390x.hdr   | 2 +-
 scripts/build/Dockerfile.tmpl        | 3 ++-
 scripts/travis/travis-tests          | 4 ++--
 5 files changed, 12 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/scripts/build/Dockerfile.alpine b/scripts/build/Dockerfile.alpine
index eb33a9c..271f492 100644
--- a/scripts/build/Dockerfile.alpine
+++ b/scripts/build/Dockerfile.alpine
@@ -27,6 +27,7 @@  RUN mv .ccache /tmp && make mrproper && ccache -sz && \
 RUN apk add \
 	py-yaml \
 	py-pip	\
+	py2-future \
 	ip6tables \
 	iptables \
 	iproute2 \
@@ -34,5 +35,5 @@  RUN apk add \
 	bash \
 	go
 
-RUN pip install protobuf ipaddr
+RUN pip install protobuf ipaddress
 RUN make -C test/zdtm
diff --git a/scripts/build/Dockerfile.fedora.tmpl b/scripts/build/Dockerfile.fedora.tmpl
index 85ff596..eb4cbd3 100644
--- a/scripts/build/Dockerfile.fedora.tmpl
+++ b/scripts/build/Dockerfile.fedora.tmpl
@@ -17,10 +17,11 @@  RUN dnf install -y \
 	procps-ng \
 	protobuf-c-devel \
 	protobuf-devel \
-	protobuf-python \
-	python \
-	python-ipaddr \
-	python-yaml \
+	python2-protobuf \
+	python2 \
+	python2-ipaddress \
+	python2-pyyaml \
+	python2-future \
 	tar
 
 # Replace coreutils-single with "traditional" coreutils
diff --git a/scripts/build/Dockerfile.s390x.hdr b/scripts/build/Dockerfile.s390x.hdr
index be75712..37ff208 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 f1fff3a..bdfdf71 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 eac1b0f..86a598e 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,7 @@  travis_prep () {
 
 	apt-get update -qq
 	apt-get install -qq --no-install-recommends $TRAVIS_PKGS
-	pip install junit-xml
+	pip install junit-xml future ipaddress
 	chmod a+x $HOME
 }