fix: download Go tarball matching host architecture - #369
Open
imposecost wants to merge 1 commit into
Open
imposecost wants to merge 1 commit into
imposecost wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #370
Summary
pre_install_linux_all.shalways downloadedlinux-amd64. On aarch64 that installs an x86-64gobinary, so later commands fail withexec format error.uname -mto the go.dev tarball name (x86_64→amd64,aarch64→arm64, and other official Linux arches).go versionafter install so a wrong-arch binary fails in the preinstall script.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 hardcodeslinux-amd64.mainhas the same bug (Go 1.25.4). This PR targetstesting-v2.0.Test plan
go1.26.5.linux-amd64.tar.gz;go versionprintslinux/amd64go1.26.5.linux-arm64.tar.gz;go versionprintslinux/arm64uname -mexits with a clear errorlinux-arm64(client AppImage stage remains x86_64-only)