tests/docker: hexagon fix podman untar, 22.1.8
v3 cover tests/docker: hexagon fix podman untar, 22.1.8
The --no-same-owner and --no-same-permissions tar flags from the v2 patch would reduce some of the noise but not address the lchown issue that was the main cause. Masking the failure would have been effective but would've masked any other legitimate failure mode too.
Instead, a new approach: use the .deb packages provided and avoid tar/podman interaction altogether.
Also -- some Hexagon compiler bugs fixed by 22.1.8:
* https://github.com/llvm/llvm-project/issues/195495
* https://github.com/llvm/llvm-project/issues/184531
v2: https://lore.kernel.org/qemu-devel/[email protected]/
Brian Cain (1):
tests/docker: hexagon fix podman untar, 22.1.8
.../dockerfiles/debian-hexagon-cross.docker | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-)
Signature · 1 line
2.34.1
PATCH v3 1/1 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 errorstar 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.
--- .../dockerfiles/debian-hexagon-cross.docker | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-)
tests/docker/dockerfiles/debian-hexagon-cross.docker +17 -10
@@ -17,13 +17,13 @@ RUN apt-get update && \ # Install common build utilities apt-get install -y --no-install-recommends \ curl \ + wget \ + gnupg \ + lsb-release \ ccache \ xz-utils \ zstd \ ca-certificates \ - libc++1 \ - libc++abi1 \ - libunwind-19 \ bison \ flex \ git \
@@ -43,15 +43,22 @@ RUN apt-get update && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc && \ dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt -ENV TOOLCHAIN_INSTALL=/opt -ENV TOOLCHAIN_RELEASE=22.1.0 -ENV TOOLCHAIN_BASENAME=clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl -ENV TOOLCHAIN_URL=https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}_/${TOOLCHAIN_BASENAME}.tar.zst +ENV LLVM_VERSION=22 +ENV TOOLCHAIN_RELEASE=22.1.8 +ENV TOOLCHAIN_URL=https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}________/hexagon-debs-${TOOLCHAIN_RELEASE}________.tar.gz ENV CCACHE_WRAPPERSDIR=/usr/libexec/ccache-wrappers - -RUN curl -#SL "$TOOLCHAIN_URL" | tar --zstd -xC "$TOOLCHAIN_INSTALL" -ENV PATH=$PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin ENV MAKE=/usr/bin/make + +RUN curl -#SL https://apt.llvm.org/llvm.sh -o /tmp/llvm.sh && \ + chmod +x /tmp/llvm.sh && \ + DEBIAN_FRONTEND=noninteractive eatmydata /tmp/llvm.sh ${LLVM_VERSION} && \ + rm -f /tmp/llvm.sh && \ + mkdir -p /tmp/hexagon-debs && \ + curl -#SL "$TOOLCHAIN_URL" | tar -xzC /tmp/hexagon-debs && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt-get install -y /tmp/hexagon-debs/*.deb && \ + rm -rf /tmp/hexagon-debs + # As a final step configure the user (if env is defined) ARG USER ARG UID
Signature · 1 line
2.34.1
Quoted 17 lines · On Sat, 11 Jul 2026 11:54:33 -0700 Brian Cain <[email protected]>…
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 errorstar then exits non-zero and aborts the build, so debian-hexagon-cross only builds reliably under docker, not rootless podman.
Quoted 7 lines
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.
Signed-off-by Brian Cain <[email protected]>---
Quoted 12 lines · Brian Cain
The --no-same-owner and --no-same-permissions tar flags from the v2 patch would reduce some of the noise but not address the lchown issue that was the main cause. Masking the failure would have been effective but would've masked any other legitimate failure mode too.
Instead, a new approach: use the .deb packages provided and avoid tar/podman interaction altogether.
Also -- some Hexagon compiler bugs fixed by 22.1.8:
* https://github.com/llvm/llvm-project/issues/195495
* https://github.com/llvm/llvm-project/issues/184531
Quoted 8 lines
v2: https://lore.kernel.org/qemu-devel/[email protected]/
Brian Cain (1):
tests/docker: hexagon fix podman untar, 22.1.8.../dockerfiles/debian-hexagon-cross.docker | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-)