diff --git a/Makefile b/Makefile index 2f945dfe92e3f..7012ac04e823d 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,12 @@ GO_LDFLAGS ?= -w -s $(KUBECTL_SETVERSION) ifeq ("$(TELEPORT_DEBUG)","true") BUILDFLAGS ?= $(ADDFLAGS) -gcflags=all="-N -l" BUILDFLAGS_TBOT ?= $(ADDFLAGS) -gcflags=all="-N -l" +BUILDFLAGS_TELEPORT_UPDATE ?= $(ADDFLAGS) -gcflags=all="-N -l" else BUILDFLAGS ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath -buildmode=pie BUILDFLAGS_TBOT ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath +# teleport-update builds with disabled cgo, buildmode=pie is not required. +BUILDFLAGS_TELEPORT_UPDATE ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath endif GO_ENV_OS := $(shell go env GOOS) @@ -240,7 +243,8 @@ endif # On Windows only build tsh. On all other platforms build teleport, tctl, # and tsh. -BINS_default = teleport tctl tsh tbot fdpass-teleport +BINS_default = teleport tctl tsh tbot fdpass-teleport teleport-update +BINS_darwin = teleport tctl tsh tbot fdpass-teleport BINS_windows = tsh tctl BINS = $(or $(BINS_$(OS)),$(BINS_default)) BINARIES = $(addprefix $(BUILDDIR)/,$(BINS)) @@ -312,6 +316,8 @@ endif CGOFLAG = CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ BUILDFLAGS = $(ADDFLAGS) -ldflags '-w -s $(KUBECTL_SETVERSION)' -trimpath -buildmode=pie BUILDFLAGS_TBOT = $(ADDFLAGS) -ldflags '-w -s $(KUBECTL_SETVERSION)' -trimpath +# teleport-update builds with disabled cgo, buildmode=pie is not required. +BUILDFLAGS_TELEPORT_UPDATE = $(ADDFLAGS) -ldflags '-w -s $(KUBECTL_SETVERSION)' -trimpath endif ifeq ("$(OS)","darwin") @@ -397,7 +403,7 @@ $(BUILDDIR)/tbot: .PHONY: $(BUILDDIR)/teleport-update $(BUILDDIR)/teleport-update: - GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS) ./tool/teleport-update + GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS_TELEPORT_UPDATE) ./tool/teleport-update TELEPORT_ARGS ?= start .PHONY: teleport-hot-reload diff --git a/assets/install-scripts/install.sh b/assets/install-scripts/install.sh index 9381051da484a..d105e2ee9bcfa 100755 --- a/assets/install-scripts/install.sh +++ b/assets/install-scripts/install.sh @@ -207,7 +207,7 @@ install_via_zypper() { } -# download .tar.gz file via curl/wget, unzip it and run the install sript +# download .tar.gz file via curl/wget, unzip it and run the install script install_via_curl() { TEMP_DIR=$(mktemp -d -t teleport-XXXXXXXXXX) @@ -387,6 +387,9 @@ install_teleport() { if type fdpass-teleport &>/dev/null; then echo " fdpass-teleport - Teleport Machine ID client." fi + if type teleport-update &>/dev/null; then + echo " teleport-update - Teleport auto-update agent." + fi } # The suffix is "-ent" if we are installing a commercial edition of Teleport and diff --git a/build.assets/install b/build.assets/install index 691c627d192ce..eb52ec7d99959 100755 --- a/build.assets/install +++ b/build.assets/install @@ -14,7 +14,7 @@ VARDIR=/var/lib/teleport echo "Starting Teleport installation..." cd $(dirname $0) mkdir -p $VARDIR $BINDIR -cp -f teleport tctl tsh tbot $BINDIR/ || exit 1 +cp -f teleport tctl tsh tbot teleport-update $BINDIR/ || exit 1 # # What operating system is the user running? diff --git a/lib/web/scripts/node-join/install.sh b/lib/web/scripts/node-join/install.sh index f1d82b2b3be58..1889bb59ad34b 100755 --- a/lib/web/scripts/node-join/install.sh +++ b/lib/web/scripts/node-join/install.sh @@ -17,7 +17,7 @@ SYSTEMD_UNIT_PATH="/lib/systemd/system/teleport.service" TARGET_PORT_DEFAULT=443 TELEPORT_ARCHIVE_PATH='{{.packageName}}' TELEPORT_BINARY_DIR="/usr/local/bin" -TELEPORT_BINARY_LIST="teleport tctl tsh" +TELEPORT_BINARY_LIST="teleport tctl tsh teleport-update" TELEPORT_CONFIG_PATH="/etc/teleport.yaml" TELEPORT_DATA_DIR="/var/lib/teleport" TELEPORT_DOCS_URL="https://goteleport.com/docs/"