From 43a3ba347b49d75ae6b92d5e040ed5a17a616ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20=22Pisco=22=20Fernandes?= Date: Mon, 16 Jun 2025 15:33:23 +0100 Subject: [PATCH] TUN-9495: Remove references to cloudflare-go ## Summary When bumping cloudflared to use go1.24, we no longer need cloudflare-go, since most of the PQ and FIPS compliant curves are already available in go 1.24. Therefore, we can remove everything related with installing our go toolchain. --- .teamcity/install-cloudflare-go.sh | 8 -------- .teamcity/mac/install-cloudflare-go.sh | 10 ---------- .teamcity/windows/install-cloudflare-go.ps1 | 16 ---------------- .teamcity/windows/install-go-msi.ps1 | 20 -------------------- Makefile | 13 +------------ README.md | 4 ++-- 6 files changed, 3 insertions(+), 68 deletions(-) delete mode 100755 .teamcity/install-cloudflare-go.sh delete mode 100755 .teamcity/mac/install-cloudflare-go.sh delete mode 100644 .teamcity/windows/install-cloudflare-go.ps1 delete mode 100644 .teamcity/windows/install-go-msi.ps1 diff --git a/.teamcity/install-cloudflare-go.sh b/.teamcity/install-cloudflare-go.sh deleted file mode 100755 index 96d7056b..00000000 --- a/.teamcity/install-cloudflare-go.sh +++ /dev/null @@ -1,8 +0,0 @@ -# !/usr/bin/env bash - -cd /tmp -git clone -q https://github.com/cloudflare/go -cd go/src -# https://github.com/cloudflare/go/tree/af19da5605ca11f85776ef7af3384a02a315a52b is version go1.22.5-devel-cf -git checkout -q af19da5605ca11f85776ef7af3384a02a315a52b -./make.bash diff --git a/.teamcity/mac/install-cloudflare-go.sh b/.teamcity/mac/install-cloudflare-go.sh deleted file mode 100755 index b688ed43..00000000 --- a/.teamcity/mac/install-cloudflare-go.sh +++ /dev/null @@ -1,10 +0,0 @@ -rm -rf /tmp/go -export GOCACHE=/tmp/gocache -rm -rf $GOCACHE - -./.teamcity/install-cloudflare-go.sh - -export PATH="/tmp/go/bin:$PATH" -go version -which go -go env diff --git a/.teamcity/windows/install-cloudflare-go.ps1 b/.teamcity/windows/install-cloudflare-go.ps1 deleted file mode 100644 index a7ed1e11..00000000 --- a/.teamcity/windows/install-cloudflare-go.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -Set-StrictMode -Version Latest -$ErrorActionPreference = "Stop" -$ProgressPreference = "SilentlyContinue" - -Write-Output "Downloading cloudflare go..." - -Set-Location "$Env:Temp" - -git clone -q https://github.com/cloudflare/go -Write-Output "Building go..." -cd go/src -# https://github.com/cloudflare/go/tree/af19da5605ca11f85776ef7af3384a02a315a52b is version go1.22.5-devel-cf -git checkout -q af19da5605ca11f85776ef7af3384a02a315a52b -& ./make.bat - -Write-Output "Installed" diff --git a/.teamcity/windows/install-go-msi.ps1 b/.teamcity/windows/install-go-msi.ps1 deleted file mode 100644 index 7756c1c4..00000000 --- a/.teamcity/windows/install-go-msi.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -$ErrorActionPreference = "Stop" -$ProgressPreference = "SilentlyContinue" -$GoMsiVersion = "go1.22.5.windows-amd64.msi" - -Write-Output "Downloading go installer..." - -Set-Location "$Env:Temp" - -(New-Object System.Net.WebClient).DownloadFile( - "https://go.dev/dl/$GoMsiVersion", - "$Env:Temp\$GoMsiVersion" -) - -Write-Output "Installing go..." -Install-Package "$Env:Temp\$GoMsiVersion" -Force - -# Go installer updates global $PATH -go env - -Write-Output "Installed" diff --git a/Makefile b/Makefile index 7ea42e32..e9b411dc 100644 --- a/Makefile +++ b/Makefile @@ -56,8 +56,6 @@ PACKAGE_DIR := $(CURDIR)/packaging PREFIX := /usr INSTALL_BINDIR := $(PREFIX)/bin/ INSTALL_MANDIR := $(PREFIX)/share/man/man1/ -CF_GO_PATH := /tmp/go -PATH := $(CF_GO_PATH)/bin:$(PATH) LOCAL_ARCH ?= $(shell uname -m) ifneq ($(GOARCH),) @@ -183,19 +181,10 @@ fuzz: @go test -fuzz=FuzzNewIdentity -fuzztime=600s ./tracing @go test -fuzz=FuzzNewAccessValidator -fuzztime=600s ./validation -.PHONY: install-go -install-go: - rm -rf ${CF_GO_PATH} - ./.teamcity/install-cloudflare-go.sh - -.PHONY: cleanup-go -cleanup-go: - rm -rf ${CF_GO_PATH} - cloudflared.1: cloudflared_man_template sed -e 's/\$${VERSION}/$(VERSION)/; s/\$${DATE}/$(DATE)/' cloudflared_man_template > cloudflared.1 -install: install-go cloudflared cloudflared.1 cleanup-go +install: cloudflared cloudflared.1 mkdir -p $(DESTDIR)$(INSTALL_BINDIR) $(DESTDIR)$(INSTALL_MANDIR) install -m755 cloudflared $(DESTDIR)$(INSTALL_BINDIR)/cloudflared install -m644 cloudflared.1 $(DESTDIR)$(INSTALL_MANDIR)/cloudflared.1 diff --git a/README.md b/README.md index 76bb0ba2..14281ac0 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Downloads are available as standalone binaries, a Docker image, and Debian, RPM, * Binaries, Debian, and RPM packages for Linux [can be found here](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation#linux) * A Docker image of `cloudflared` is [available on DockerHub](https://hub.docker.com/r/cloudflare/cloudflared) * You can install on Windows machines with the [steps here](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation#windows) -* To build from source, first you need to download the go toolchain by running `./.teamcity/install-cloudflare-go.sh` and follow the output. Then you can run `make cloudflared` +* To build from source, install the required version of go, mentioned in the [Development](#development) section below. Then you can run `make cloudflared`. User documentation for Cloudflare Tunnel can be found at https://developers.cloudflare.com/cloudflare-one/connections/connect-apps @@ -62,7 +62,7 @@ For example, as of January 2023 Cloudflare will support cloudflared version 2023 ### Requirements - [GNU Make](https://www.gnu.org/software/make/) - [capnp](https://capnproto.org/install.html) -- [cloudflare go toolchain](https://github.com/cloudflare/go) +- [go >= 1.24](https://go.dev/doc/install) - Optional tools: - [capnpc-go](https://pkg.go.dev/zombiezen.com/go/capnproto2/capnpc-go) - [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports)