Merge pull request #6215 from gkurz/backport-6212-for-stable-3.0

Backport CI fixes for s390x and ppc64le to stable-3.0
This commit is contained in:
Greg Kurz 2023-02-04 17:55:22 +01:00 committed by GitHub
commit 3cbdec5a02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -8,6 +8,7 @@ ENV INSTALL_IN_GOPATH=false
COPY install_yq.sh /usr/bin/install_yq.sh COPY install_yq.sh /usr/bin/install_yq.sh
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install yq and docker # Install yq and docker
RUN apt-get update && \ RUN apt-get update && \
@ -18,6 +19,7 @@ RUN apt-get update && \
apt-get clean && rm -rf /var/lib/apt/lists/ && \ apt-get clean && rm -rf /var/lib/apt/lists/ && \
install_yq.sh && \ install_yq.sh && \
curl -fsSL https://get.docker.com -o get-docker.sh && \ curl -fsSL https://get.docker.com -o get-docker.sh && \
if uname -m | grep -Eq 's390x|ppc64le'; then export VERSION="v20.10"; fi && \
sh get-docker.sh sh get-docker.sh
ARG IMG_USER=kata-builder ARG IMG_USER=kata-builder

View File

@ -47,6 +47,7 @@ pull_virtiofsd_released_binary() {
init_env() { init_env() {
source "$HOME/.cargo/env" source "$HOME/.cargo/env"
extra_rust_flags=" -C link-self-contained=yes"
case ${ARCH} in case ${ARCH} in
"aarch64") "aarch64")
LIBC="musl" LIBC="musl"
@ -60,6 +61,7 @@ init_env() {
"s390x") "s390x")
LIBC="gnu" LIBC="gnu"
ARCH_LIBC=${ARCH}-linux-${LIBC} ARCH_LIBC=${ARCH}-linux-${LIBC}
extra_rust_flags=""
;; ;;
"x86_64") "x86_64")
LIBC="musl" LIBC="musl"
@ -76,7 +78,7 @@ build_virtiofsd_from_source() {
git clone --depth 1 --branch ${virtiofsd_version} ${virtiofsd_repo} virtiofsd git clone --depth 1 --branch ${virtiofsd_version} ${virtiofsd_repo} virtiofsd
pushd virtiofsd pushd virtiofsd
export RUSTFLAGS='-C target-feature=+crt-static -C link-self-contained=yes' export RUSTFLAGS='-C target-feature=+crt-static'${extra_rust_flags}
export LIBSECCOMP_LINK_TYPE=static export LIBSECCOMP_LINK_TYPE=static
export LIBSECCOMP_LIB_PATH=/usr/lib/${ARCH_LIBC} export LIBSECCOMP_LIB_PATH=/usr/lib/${ARCH_LIBC}
export LIBCAPNG_LINK_TYPE=static export LIBCAPNG_LINK_TYPE=static