From 7ebedfd62a928e61b0fb8d48911cab8a4bf17330 Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Fri, 23 Jul 2021 15:55:24 -0700 Subject: [PATCH] Require Tailscale go toolchain in $PATH. Setting GOBIN was not sufficient, something deeper in the build process is invoking the go tool without $GOBIN. Instead, require it be first in $PATH. This is necessary to fix https://github.com/tailscale/tailscale/issues/2450 and (hopefully) https://github.com/tailscale/tailscale/issues/2478 which are a SECCOMP crash in accept() which we have patched in the Tailscale toolchain by pulling in an early patch from go 1.17. Signed-off-by: Denton Gentry --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7cfc09f..0e97c45 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ tag_release: git tag -a "$(VERSION_LONG)" $(DEBUG_APK): + (go version | grep -- "-ts") || (echo Must set have Tailscale production toolchain in PATH; exit 1) mkdir -p android/libs go run gioui.org/cmd/gogio -buildmode archive -target android -appid $(APPID) -o $(AAR) github.com/tailscale/tailscale-android/cmd/tailscale (cd android && ./gradlew assemblePlayDebug) @@ -38,7 +39,7 @@ $(DEBUG_APK): # This target is also used by the F-Droid builder. release_aar: - (${GOBIN}/go version | grep -- "-ts") || (echo Must set GOBIN to Tailscale production toolchain; exit 1) + (go version | grep -- "-ts") || (echo Must set have Tailscale production toolchain in PATH; exit 1) mkdir -p android/libs go run gioui.org/cmd/gogio -ldflags "-X tailscale.com/version.Long=$(VERSIONNAME) -X tailscale.com/version.Short=$(VERSIONNAME_SHORT) -X tailscale.com/version.GitCommit=$(TAILSCALE_COMMIT) -X tailscale.com/version.ExtraGitCommit=$(OUR_VERSION)" -tags xversion -buildmode archive -target android -appid $(APPID) -o $(AAR) github.com/tailscale/tailscale-android/cmd/tailscale