Skip to content

fix: download Go tarball matching host architecture - #369

Open
imposecost wants to merge 1 commit into
Adaptix-Framework:testing-v2.0from
imposecost:fix/go-tarball-host-arch
Open

imposecost wants to merge 1 commit into
Adaptix-Framework:testing-v2.0from
imposecost:fix/go-tarball-host-arch

Conversation

@imposecost

@imposecost imposecost commented Sep 12, 2026

Copy link
Copy Markdown

Fixes #370

Summary

  • pre_install_linux_all.sh always downloaded linux-amd64. On aarch64 that installs an x86-64 go binary, so later commands fail with exec format error.
  • Map uname -m to the go.dev tarball name (x86_64amd64, aarch64arm64, and other official Linux arches).
  • Exit on download/extract/link failure instead of continuing with a broken toolchain.
  • Run go version after install so a wrong-arch binary fails in the preinstall script.
  • Same tarball selection in the runtime Dockerfile via TARGETARCH.

The docs still point at main (https://raw.githubusercontent.com/Adaptix-Framework/AdaptixC2/refs/heads/main/pre_install_linux_all.sh) and the Manual tab also hardcodes linux-amd64. main has the same bug (Go 1.25.4). This PR targets testing-v2.0.

Test plan

  • amd64 Linux: fetches go1.26.5.linux-amd64.tar.gz; go version prints linux/amd64
  • aarch64 Linux: fetches go1.26.5.linux-arm64.tar.gz; go version prints linux/arm64
  • unsupported uname -m exits with a clear error
  • Docker runtime stage on arm64 installs linux-arm64 (client AppImage stage remains x86_64-only)

pre_install_linux_all.sh and the runtime Dockerfile always fetched
linux-amd64. On aarch64 that installs an x86-64 go binary, so later
commands fail with "exec format error".

Map uname -m (and Docker TARGETARCH) to the matching go.dev tarball,
stop on download/extract/link failure, and verify the installed go
binary can actually run.
@imposecost
imposecost changed the base branch from testing-v2.0 to main September 12, 2026 02:30
@imposecost
imposecost changed the base branch from main to testing-v2.0 September 12, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pre_install_linux_all.sh installs linux-amd64 Go on aarch64 (exec format error)

1 participant