From 20595747f524939e89b799dbe00f3e2d1918a12d Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Wed, 12 Oct 2022 19:29:55 +0200 Subject: [PATCH] tailscale: fix -version tailscale version, tailscaled -version and the web UI reported the wrong version number which doesn't cause any issues, but it can be confusing. This is fixed by specifying the version in go ldflags similar to how it's done in many other go packages and the official tailscale Dockerfile. version.Long version can not be specified in GO_PKG_LDFLAGS_X because it contains a space and GO_PKG_LDFLAGS_X is always split at a space. Signed-off-by: Michal Vasilek (cherry picked from commit 738f44be4f39191aa4640086f37ef62420442e06) --- net/tailscale/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tailscale/Makefile b/net/tailscale/Makefile index c6825996b8..e74854d163 100644 --- a/net/tailscale/Makefile +++ b/net/tailscale/Makefile @@ -27,6 +27,8 @@ PKG_USE_MIPS16:=0 GO_PKG:=\ tailscale.com/cmd/tailscale \ tailscale.com/cmd/tailscaled +GO_PKG_LDFLAGS:=-X 'tailscale.com/version.Long=$(PKG_VERSION)-$(PKG_RELEASE) (OpenWrt)' +GO_PKG_LDFLAGS_X:=tailscale.com/version.Short=$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk include ../../lang/golang/golang-package.mk -- 2.30.2