* [LTP] [PATCH v2 1/1] travis: Fix openSUSE Tumbleweed
@ 2021-04-14 18:28 Petr Vorel
2021-04-14 18:34 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2021-04-14 18:28 UTC (permalink / raw)
To: ltp
openSUSE Tumbleweed build fails due broken permission detection 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 [3] nor to Tumbleweed
downstream glibc [4].
Using podman requires sudo to workaround running out of subuids/subgids:
tar: ./LICENSE: Cannot change ownership to uid 339315, gid 578953: Invalid argument
Sooner or later it will be required for more distros (Fedora, Debian
Ubuntu), but don't waste build time until required.
Also add --network=host to avoid problems on certain Travis setup:
Error: /usr/bin/slirp4netns failed: "open(\"/dev/net/tun\"): No such device
[1] https://github.com/opencontainers/runc/pull/2750
[2] https://sourceware.org/pipermail/libc-alpha/2020-November/119955.html
[3] https://sourceware.org/pipermail/libc-alpha/2020-November/119978.html
[4] https://bugzilla.opensuse.org/1182451
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2:
* Add --network=host parameter (found by Mimi)
* Remove --runtime=/usr/bin/runc, it's the default thus not needed to be set
Kind regards,
Petr
.travis.yml | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index e73b24e..3053c5d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,7 @@
+# Copyright (c) 2017-2021 Petr Vorel <pvorel@suse.cz>
+
dist: bionic
+sudo: required
language: C
services:
- docker
@@ -30,7 +33,7 @@ matrix:
# glibc (gcc/clang)
- os: linux
- env: DISTRO=opensuse/tumbleweed TSS=ibmtss
+ env: DISTRO=opensuse/tumbleweed TSS=ibmtss CONTAINER=podman CONTAINER_ARGS="--network=host"
compiler: clang
- os: linux
@@ -66,13 +69,29 @@ matrix:
compiler: gcc
before_install:
- - df -hT
+ # Tumbleweed requires podman and newest runc due docker incompatible with glibc 2.33 (faccessat2)
+ - CONTAINER="${CONTAINER:-docker}"
+ - >
+ if [ "$CONTAINER" = "podman" ]; then
+ # podman
+ . /etc/os-release
+ 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"
+ wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
+ sudo apt update
+ sudo apt -y install podman slirp4netns
+
+ # runc
+ sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.0.0-rc93/runc.amd64 -o /usr/bin/runc
+ sudo chmod +x /usr/bin/runc
+ fi
+ - $CONTAINER info
+
- DIR="/usr/src/ima-evm-utils"
- printf "FROM $DISTRO\nRUN mkdir -p $DIR\nWORKDIR $DIR\nCOPY . $DIR\n" > Dockerfile
- cat Dockerfile
- - docker build -t ima-evm-utils .
+ - $CONTAINER build $CONTAINER_ARGS -t ima-evm-utils .
script:
- INSTALL="${DISTRO%%:*}"
- INSTALL="${INSTALL%%/*}"
- - docker run -t ima-evm-utils /bin/sh -c "cd travis && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || ../tests/install-swtpm.sh; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ../build.sh"
+ - sudo $CONTAINER run $CONTAINER_ARGS -t ima-evm-utils /bin/sh -c "cd travis && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || ../tests/install-swtpm.sh; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ../build.sh"
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [LTP] [PATCH v2 1/1] travis: Fix openSUSE Tumbleweed
2021-04-14 18:28 [LTP] [PATCH v2 1/1] travis: Fix openSUSE Tumbleweed Petr Vorel
@ 2021-04-14 18:34 ` Petr Vorel
2021-04-14 18:39 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2021-04-14 18:34 UTC (permalink / raw)
To: ltp
Hi,
still some errors for podman[1]:
$ sudo $CONTAINER run $CONTAINER_ARGS -t ima-evm-utils /bin/sh -c "cd travis && if [ \"$VARIANT\" ]; then ARCH=\"$ARCH\" ./$INSTALL.$VARIANT.sh; fi && ARCH=\"$ARCH\" CC=\"$CC\" TSS=\"$TSS\" ./$INSTALL.sh && if [ ! \"$VARIANT\" ]; then which tpm_server || which swtpm || ../tests/install-swtpm.sh; fi && CC=\"$CC\" VARIANT=\"$VARIANT\" ../build.sh"
WARN[0001] Error validating CNI config file /etc/cni/net.d/87-podman-bridge.conflist: [
failed to find plugin "bridge" in path [/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin]
failed to find plugin "portmap" in path [/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin]
failed to find plugin "firewall" in path [/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin]
failed to find plugin "tuning" in path [/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin]]
? Please select an image:
? docker.io/library/ima-evm-utils:latest
quay.io/ima-evm-utils:latest
Sorry for overlooking it.
Kind regards,
Petr
[1] https://travis-ci.org/github/pevik/ima-evm-utils/jobs/762170220#L491
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-14 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-14 18:28 [LTP] [PATCH v2 1/1] travis: Fix openSUSE Tumbleweed Petr Vorel
2021-04-14 18:34 ` Petr Vorel
2021-04-14 18:39 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox