From f4ef3ddcfbe389ee57a0ae98681ba452cf0b0856 Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Thu, 28 May 2026 19:04:57 +0200 Subject: [PATCH 1/3] Update install-protoc script to look for cachi2 file --- scripts/environment/install-protoc.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/environment/install-protoc.sh b/scripts/environment/install-protoc.sh index dc0eaa09037a2..70e598bc64f4e 100755 --- a/scripts/environment/install-protoc.sh +++ b/scripts/environment/install-protoc.sh @@ -52,12 +52,21 @@ install_protoc() { local install_path=$2 local base_url="https://github.com/protocolbuffers/protobuf/releases/download" - local url - url="${base_url}/v${version}/protoc-${version}-$(get_platform)-$(get_arch).zip" + local filename + filename="protoc-${version}-$(get_platform)-$(get_arch).zip" local download_path="${TMP_DIR}/protoc.zip" - echo "Downloading ${url}" - curl -fsSL "${url}" -o "${download_path}" + local cachi_file + cachi_file="/cachi2/output/deps/generic/${filename}" + if [ -e "${cachi_file}" ]; then + echo "Using ${filename} from cachi2" + cp "${cachi_file}" "${download_path}" + else + local url + url="${base_url}/v${version}/${filename}" + echo "Downloading ${url}" + curl -fsSL "${url}" -o "${download_path}" + fi unzip -qq "${download_path}" -d "${TMP_DIR}" mv -f -v "${TMP_DIR}/bin/protoc" "${install_path}" From de00230b8c53846903cd1199a9c0745108f95075 Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Thu, 28 May 2026 19:08:52 +0200 Subject: [PATCH 2/3] Use install-protoc script in ART build --- Dockerfile.art | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile.art b/Dockerfile.art index 3cb9343ac55d6..396fc2189e542 100644 --- a/Dockerfile.art +++ b/Dockerfile.art @@ -4,11 +4,11 @@ RUN INSTALL_PKGS=" \ gcc-c++ \ git \ make \ + unzip \ openssl-devel \ llvm-toolset \ rust-toolset-1.88.0 \ crypto-policies-scripts \ - protobuf-compiler \ " && \ microdnf install -y $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS @@ -19,6 +19,7 @@ RUN update-crypto-policies --set DEFAULT:PQ COPY . /opt/app-root/src WORKDIR /opt/app-root/src +RUN scripts/environment/install-protoc.sh RUN make build-offline # Strip binary to reduce image size for DaemonSet deployment From f2bf77822c8b55ddeacd028b3a66c0591505b452 Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Thu, 28 May 2026 20:13:57 +0200 Subject: [PATCH 3/3] Fix filenames for s390x and ppc64le --- scripts/environment/install-protoc.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/environment/install-protoc.sh b/scripts/environment/install-protoc.sh index 70e598bc64f4e..c945be408f1ca 100755 --- a/scripts/environment/install-protoc.sh +++ b/scripts/environment/install-protoc.sh @@ -42,6 +42,10 @@ get_arch() { echo "aarch_64" elif [[ "${os}" == "Linux" && "${arch}" == "aarch64" ]]; then echo "aarch_64" + elif [[ "${arch}" == "s390x" ]]; then + echo "s390_64" + elif [[ "${arch}" == "ppc64le" ]]; then + echo "ppcle_64" else echo "${arch}" fi