travis: Reenable openSUSE Tumbleweed
openSUSE Tumbleweed was temporarily removed in f0c64bbb2 due
faccessat2() incompatibility in libseccomp/runc used in old docker with
old kernel on Ubuntu Focal on hosts in Travis CI together with guests
with the newest glibc 2.33.
Fixing Tumbleweed required switch to podman and downloading newest runc
release (v1.0.0-rc93) which contains the fix [1], because proposed glibc
fix [2] aren't going to merged to upstream not to distros.
[1] https://github.com/opencontainers/runc/pull/2750
[2] https://sourceware.org/pipermail/libc-alpha/2020-November/119955.html
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Petr Vorel
3 years ago
0 | 0 | --- |
1 | # Copyright (c) 2019-2020 Petr Vorel <pvorel@suse.cz> | |
1 | # Copyright (c) 2019-2021 Petr Vorel <pvorel@suse.cz> | |
2 | 2 | |
3 | dist: bionic | |
3 | 4 | sudo: required |
4 | 5 | language: c |
5 | 6 | services: |
29 | 30 | compiler: gcc |
30 | 31 | |
31 | 32 | # glibc (gcc/clang) |
33 | - os: linux | |
34 | env: DISTRO=opensuse/tumbleweed CONTAINER=podman CONTAINER_ARGS="--runtime=/usr/bin/runc" | |
35 | compiler: gcc | |
36 | ||
32 | 37 | - os: linux |
33 | 38 | env: DISTRO=opensuse/leap |
34 | 39 | compiler: clang |
62 | 67 | compiler: clang |
63 | 68 | |
64 | 69 | before_install: |
70 | # Tumbleweed requires podman and newest runc due docker incompatible with glibc 2.33 (faccessat2) | |
71 | - CONTAINER="${CONTAINER:-docker}" | |
72 | - > | |
73 | if [ "$CONTAINER" = "podman" ]; then | |
74 | # podman | |
75 | . /etc/os-release | |
76 | sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" | |
77 | wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add - | |
78 | sudo apt update | |
79 | sudo apt -y install podman slirp4netns | |
80 | ||
81 | # runc | |
82 | sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.0.0-rc93/runc.amd64 -o /usr/bin/runc | |
83 | sudo chmod +x /usr/bin/runc | |
84 | fi | |
65 | 85 | - DIR="/usr/src/iputils" |
66 | 86 | - printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile |
67 | 87 | - echo "cat Dockerfile"; cat Dockerfile |
68 | - docker build -t iputils . | |
88 | - $CONTAINER $CONTAINER_ARGS build -t iputils . | |
69 | 89 | |
70 | 90 | script: |
71 | 91 | - INSTALL="${DISTRO%%:*}" |
72 | 92 | - INSTALL="${INSTALL%%/*}" |
73 | 93 | - DISTRO_VERSION="${DISTRO#*:}" |
74 | 94 | - case $VARIANT in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac |
75 | - docker run -it iputils /bin/sh -c "cd travis && DISTRO_VERSION=\"$DISTRO_VERSION\" ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CC=$CC EXTRA_BUILD_OPTS=\"$EXTRA_BUILD_OPTS\" ../build.sh" | |
95 | - $CONTAINER $CONTAINER_ARGS run -it iputils /bin/sh -c "cd travis && DISTRO_VERSION=\"$DISTRO_VERSION\" ./$INSTALL.sh && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && CC=$CC EXTRA_BUILD_OPTS=\"$EXTRA_BUILD_OPTS\" ../build.sh" |