diff --git a/tools/tuf/test/README.md b/tools/tuf/test/README.md index 6b893e376b..dacac03e75 100644 --- a/tools/tuf/test/README.md +++ b/tools/tuf/test/README.md @@ -55,6 +55,14 @@ LINUX_TEST_EXTENSIONS="./tools/test_extensions/hello_world/linux/hello_world_lin ./tools/tuf/test/main.sh ``` +To build for a specific architecture, you can pass the `GOARCH` environment variable: +``` shell +[...] +GOARCH=arm64 # defaults to amd64 +[...] +./tools/tuf/test/main.sh +``` + # Add new updates To add new updates (osqueryd or orbit), use `push_target.sh`. diff --git a/tools/tuf/test/create_repository.sh b/tools/tuf/test/create_repository.sh index 42ca58ddc5..2633f096bb 100755 --- a/tools/tuf/test/create_repository.sh +++ b/tools/tuf/test/create_repository.sh @@ -61,13 +61,9 @@ for system in $SYSTEMS; do rm $osqueryd_path goose_value="$system" - goarch_value="" # leave it empty to use the default for the system + goarch_value=${GOARCH:-} if [[ $system == "macos" ]]; then goose_value="darwin" - # for all platforms except Darwin, GOARCH is hardcoded to amd64 to - # prevent cross compilation issues when building macOS arm64 binaries - # from Linux (CGO + libraries are required) - goarch_value="amd64" fi orbit_target=orbit-$system if [[ $system == "windows" ]]; then