summaryrefslogtreecommitdiffhomepage
path: root/cmd/tailscaled/install_darwin.go
AgeCommit message (Collapse)AuthorFilesLines
2023-01-27all: update copyright and license headersWill Norris1-3/+2
This updates all source files to use a new standard header for copyright and license declaration. Notably, copyright no longer includes a date, and we now use the standard SPDX-License-Identifier header. This commit was done almost entirely mechanically with perl, and then some minimal manual fixes. Updates #6865 Signed-off-by: Will Norris <will@tailscale.com>
2022-11-04all: remove old +build tagsBrad Fitzpatrick1-1/+0
The //go:build syntax was introduced in Go 1.17: https://go.dev/doc/go1.17#build-lines gofmt has kept the +build and go:build lines in sync since then, but enough time has passed. Time to remove them. Done with: perl -i -npe 's,^// \+build.*\n,,' $(git grep -l -F '+build') Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-10-11cmd/tailscaled: handle tailscaled symlink on macOSAnton Tolchanov1-19/+63
When Tailscale is installed via Homebrew, `/usr/local/bin/tailscaled` is a symlink to the actual binary. Now when `tailscaled install-system-daemon` runs, it will not attempt to overwrite that symlink if it already points to the tailscaled binary. However, if executed binary and the link target differ, the path will he overwritten - this can happen when a user decides to replace Homebrew-installed tailscaled with a one compiled from source code. Fixes #5353 Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2022-09-15refactor: move from io/ioutil to io and os packagesEng Zer Jun1-2/+1
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Reference: https://golang.org/doc/go1.16#ioutil Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-08-02all: require Go 1.19Brad Fitzpatrick1-2/+2
Updates #5210 Change-Id: I2e950b4776636b4ea89b6566b60e4a87596a3a43 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-03-18cmd/tailscaled: make build fail nicely on older Go versionsBrad Fitzpatrick1-0/+3
Due to a bug in Go (golang/go#51778), cmd/go doesn't warn about your Go version being older than the go.mod's declared Go version in that case that package loading fails before the build starts, such as when you use packages that are only in the current version of Go, like our use of net/netip. This change works around that Go bug by adding build tags and a pre-Go1.18-only file that will cause Go 1.17 and earlier to fail like: $ ~/sdk/go1.17/bin/go install ./cmd/tailscaled # tailscale.com/cmd/tailscaled ./required_version.go:11:2: undefined: you_need_Go_1_18_to_compile_Tailscale note: module requires Go 1.18 Change-Id: I39f5820de646703e19dde448dd86a7022252f75c Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-31cmd/tailscaled: remove tailscaled binary on uninstall-system-daemonMaisem Ali1-6/+15
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-03-25Revert "cmd/tailscaled: split package main into main shim + package"Brad Fitzpatrick1-0/+146
This reverts commit b81bd8025b71f35295201d18011855c1cfae630e. Not needed. See: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
2021-03-24cmd/tailscaled: split package main into main shim + packageBrad Fitzpatrick1-146/+0
So we can empty import the guts of cmd/tailscaled from another module for go mod tidy reasons. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-02-25cmd/tailscaled: create /usr/local/bin on macOS install-system-daemon if neededBrad Fitzpatrick1-0/+4
Fixes #1400 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-02-14cmd/tailscaled: fix up install-system-daemon on darwin, add uninstall tooBrad Fitzpatrick1-5/+43
Tangentially related to #987, #177, #594, #925, #505
2021-02-13cmd/tailscaled: add subcommand on darwin to install+start tailscaled under ↵Brad Fitzpatrick1-0/+104
launchd Tangentially related to #987, #177, #594, #925.