@samitouri / QOSamiQemu / commits / 390bf4fbc3

tests/docker: hexagon fix podman untar, 22.1.8

The debian-hexagon-cross image previously unpacked the codelinaro clang+llvm hexagon toolchain by piping a .tar.zst archive straight into "tar --zstd -xC". GNU tar restores the archive's stored file modes on extraction, including lchmod() on symlinks. Under rootless podman, where the build runs in a user namespace on overlay storage, those chmod()/lchmod() calls are rejected with EPERM: tar: .../libclang_rt.builtins.a: Cannot change mode to rwxrwxrwx: \ Operation not permitted tar: .../x86_64-linux-gnu: Cannot change mode to rwxr-xr-x: \ Operation not permitted tar: Exiting with failure status due to previous errors tar then exits non-zero and aborts the build, so debian-hexagon-cross only builds reliably under docker, not rootless podman. So instead we can switch to a different packaging. clang, lld come from LLVM Debian builds from apt.llvm.org, instead of custom ones for hexagon. And only the hexagon linux sysroot is required, avoiding the tar issues. Reviewed-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

Brian Cain committed Jul 11, 2026 at 11:54 UTC 390bf4fbc311297cb91f620937d8c566ab35c8db
1 file changed +17 -10
tests/docker/dockerfiles/debian-hexagon-cross.docker
+17 -10
@@ -17,13 +17,13 @@ RUN apt-get update && \
17 # Install common build utilities
18 apt-get install -y --no-install-recommends \
19 curl \
20 + wget \
21 + gnupg \
22 + lsb-release \
23 ccache \
24 xz-utils \
25 zstd \
26 ca-certificates \
24 - libc++1 \
25 - libc++abi1 \
26 - libunwind-19 \
27 bison \
28 flex \
29 git \
@@ -43,15 +43,22 @@ RUN apt-get update && \
43 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc && \
44 dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
45
46 -ENV TOOLCHAIN_INSTALL=/opt
47 -ENV TOOLCHAIN_RELEASE=22.1.0
48 -ENV TOOLCHAIN_BASENAME=clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl
49 -ENV TOOLCHAIN_URL=https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}_/${TOOLCHAIN_BASENAME}.tar.zst
46 +ENV LLVM_VERSION=22
47 +ENV TOOLCHAIN_RELEASE=22.1.8
48 +ENV TOOLCHAIN_URL=https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}________/hexagon-debs-${TOOLCHAIN_RELEASE}________.tar.gz
49 ENV CCACHE_WRAPPERSDIR=/usr/libexec/ccache-wrappers
51 -
52 -RUN curl -#SL "$TOOLCHAIN_URL" | tar --zstd -xC "$TOOLCHAIN_INSTALL"
53 -ENV PATH=$PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin
50 ENV MAKE=/usr/bin/make
51 +
52 +RUN curl -#SL https://apt.llvm.org/llvm.sh -o /tmp/llvm.sh && \
53 + chmod +x /tmp/llvm.sh && \
54 + DEBIAN_FRONTEND=noninteractive eatmydata /tmp/llvm.sh ${LLVM_VERSION} && \
55 + rm -f /tmp/llvm.sh && \
56 + mkdir -p /tmp/hexagon-debs && \
57 + curl -#SL "$TOOLCHAIN_URL" | tar -xzC /tmp/hexagon-debs && \
58 + DEBIAN_FRONTEND=noninteractive eatmydata \
59 + apt-get install -y /tmp/hexagon-debs/*.deb && \
60 + rm -rf /tmp/hexagon-debs
61 +
62 # As a final step configure the user (if env is defined)
63 ARG USER
64 ARG UID