From: Hans Kristian Rosbach Date: Sun, 26 Jan 2025 14:05:24 +0000 (+0100) Subject: s390x: Add workaround to install custom Clang 19.1.5 rpms to actions-runner X-Git-Tag: 2.2.4~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0fa24710c8faa1a746a20cfd5c7c24571e15ca4;p=thirdparty%2Fzlib-ng.git s390x: Add workaround to install custom Clang 19.1.5 rpms to actions-runner image in order to avoid the VX compiler bug in older clang versions. --- diff --git a/arch/s390/self-hosted-builder/actions-runner b/arch/s390/self-hosted-builder/actions-runner index a1d031bc..8d194bac 100755 --- a/arch/s390/self-hosted-builder/actions-runner +++ b/arch/s390/self-hosted-builder/actions-runner @@ -44,6 +44,7 @@ if [ $REG_TOKEN = "null" ]; then fi # (Re-)register the runner. +./config.sh remove --token "$REG_TOKEN" || true set -x ./config.sh \ --url "https://github.com/$REPO" \ diff --git a/arch/s390/self-hosted-builder/actions-runner-rebuild.sh b/arch/s390/self-hosted-builder/actions-runner-rebuild.sh index eb39f929..703448fc 100644 --- a/arch/s390/self-hosted-builder/actions-runner-rebuild.sh +++ b/arch/s390/self-hosted-builder/actions-runner-rebuild.sh @@ -1,17 +1,24 @@ #!/usr/bin/bash set -ex +TMPDIR="$(mktemp -d)" + if [ -f actions-runner.Dockerfile ]; then MODE=1 + cp actions-runner.Dockerfile actions-runner entrypoint $TMPDIR + cd $TMPDIR else MODE=2 - TMPDIR="$(mktemp -d)" cd $TMPDIR wget https://raw.githubusercontent.com/zlib-ng/zlib-ng/refs/heads/develop/arch/s390/self-hosted-builder/actions-runner.Dockerfile wget https://raw.githubusercontent.com/zlib-ng/zlib-ng/refs/heads/develop/arch/s390/self-hosted-builder/actions-runner wget https://raw.githubusercontent.com/zlib-ng/zlib-ng/refs/heads/develop/arch/s390/self-hosted-builder/entrypoint fi +# Copy rpms needed to workaround VX compiler bug, ref #1852 +mkdir clang +cp /clang-19/*.rpm clang/ + # Stop service systemctl stop actions-runner || true @@ -19,7 +26,7 @@ systemctl stop actions-runner || true podman container rm gaplib-actions-runner || true # Delete old image -podman image rm localhost/zlib-ng/actions-runner +podman image rm localhost/zlib-ng/actions-runner || true # Build new image podman build --squash -f actions-runner.Dockerfile --tag zlib-ng/actions-runner . 2>&1 | tee /var/log/actions-runner-build.log @@ -40,6 +47,7 @@ if [ "$MODE" == "2" ] ; then rm actions-runner.Dockerfile rm actions-runner rm entrypoint + rm -rf clang cd .. rmdir $TMPDIR echo "Deleted tempfiles." diff --git a/arch/s390/self-hosted-builder/actions-runner.Dockerfile b/arch/s390/self-hosted-builder/actions-runner.Dockerfile index 9f4666b1..f43ab85f 100644 --- a/arch/s390/self-hosted-builder/actions-runner.Dockerfile +++ b/arch/s390/self-hosted-builder/actions-runner.Dockerfile @@ -32,6 +32,15 @@ RUN tar -xf /tmp/runner/_package/*.tar.gz -C /home/actions-runner && \ #VOLUME /home/actions-runner +# Workaround: Install custom clang version to avoid compiler bug, ref #1852 +RUN mkdir /tmp/clang + +COPY clang/*.rpm /tmp/clang + +RUN dnf -y upgrade /tmp/clang/*.rpm && \ + rm -rf /tmp/clang + +# Cleanup RUN rm -rf /tmp/runner /var/cache/dnf/* /tmp/runner.patch /tmp/global.json && \ dnf clean all