mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
clientupdate: don't link distsign on platforms that don't download
Updates tailscale/corp#20099 Change-Id: Ie3b782379b19d5f7890a8d3a378096b4f3e8a612 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
db1519cc9f
commit
1938685d39
@ -27,7 +27,6 @@
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"tailscale.com/clientupdate/distsign"
|
|
||||||
"tailscale.com/types/logger"
|
"tailscale.com/types/logger"
|
||||||
"tailscale.com/util/cmpver"
|
"tailscale.com/util/cmpver"
|
||||||
"tailscale.com/version"
|
"tailscale.com/version"
|
||||||
@ -778,14 +777,6 @@ func (up *Updater) cleanupOldDownloads(glob string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) {
|
|
||||||
c, err := distsign.NewClient(up.Logf, up.PkgsAddr)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return c.Download(context.Background(), pathSrc, fileDst)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (up *Updater) updateFreeBSD() (err error) {
|
func (up *Updater) updateFreeBSD() (err error) {
|
||||||
if up.Version != "" {
|
if up.Version != "" {
|
||||||
return errors.New("installing a specific version on FreeBSD is not supported")
|
return errors.New("installing a specific version on FreeBSD is not supported")
|
||||||
|
20
clientupdate/clientupdate_downloads.go
Normal file
20
clientupdate/clientupdate_downloads.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
//go:build (linux && !android) || windows
|
||||||
|
|
||||||
|
package clientupdate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"tailscale.com/clientupdate/distsign"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) {
|
||||||
|
c, err := distsign.NewClient(up.Logf, up.PkgsAddr)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return c.Download(context.Background(), pathSrc, fileDst)
|
||||||
|
}
|
10
clientupdate/clientupdate_not_downloads.go
Normal file
10
clientupdate/clientupdate_not_downloads.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
//go:build !((linux && !android) || windows)
|
||||||
|
|
||||||
|
package clientupdate
|
||||||
|
|
||||||
|
func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) {
|
||||||
|
panic("unreachable")
|
||||||
|
}
|
@ -654,7 +654,7 @@ tailscale.com/cmd/k8s-operator dependencies: (generated by github.com/tailscale/
|
|||||||
tailscale.com/client/tailscale/apitype from tailscale.com/client/tailscale+
|
tailscale.com/client/tailscale/apitype from tailscale.com/client/tailscale+
|
||||||
tailscale.com/client/web from tailscale.com/ipn/ipnlocal
|
tailscale.com/client/web from tailscale.com/ipn/ipnlocal
|
||||||
tailscale.com/clientupdate from tailscale.com/client/web+
|
tailscale.com/clientupdate from tailscale.com/client/web+
|
||||||
tailscale.com/clientupdate/distsign from tailscale.com/clientupdate
|
LW tailscale.com/clientupdate/distsign from tailscale.com/clientupdate
|
||||||
tailscale.com/control/controlbase from tailscale.com/control/controlhttp+
|
tailscale.com/control/controlbase from tailscale.com/control/controlhttp+
|
||||||
tailscale.com/control/controlclient from tailscale.com/ipn/ipnlocal+
|
tailscale.com/control/controlclient from tailscale.com/ipn/ipnlocal+
|
||||||
tailscale.com/control/controlhttp from tailscale.com/control/controlclient
|
tailscale.com/control/controlhttp from tailscale.com/control/controlclient
|
||||||
|
@ -80,7 +80,7 @@ tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/dep
|
|||||||
tailscale.com/client/tailscale/apitype from tailscale.com/client/tailscale+
|
tailscale.com/client/tailscale/apitype from tailscale.com/client/tailscale+
|
||||||
tailscale.com/client/web from tailscale.com/cmd/tailscale/cli
|
tailscale.com/client/web from tailscale.com/cmd/tailscale/cli
|
||||||
tailscale.com/clientupdate from tailscale.com/client/web+
|
tailscale.com/clientupdate from tailscale.com/client/web+
|
||||||
tailscale.com/clientupdate/distsign from tailscale.com/clientupdate
|
LW tailscale.com/clientupdate/distsign from tailscale.com/clientupdate
|
||||||
tailscale.com/cmd/tailscale/cli from tailscale.com/cmd/tailscale
|
tailscale.com/cmd/tailscale/cli from tailscale.com/cmd/tailscale
|
||||||
tailscale.com/cmd/tailscale/cli/ffcomplete from tailscale.com/cmd/tailscale/cli
|
tailscale.com/cmd/tailscale/cli/ffcomplete from tailscale.com/cmd/tailscale/cli
|
||||||
tailscale.com/cmd/tailscale/cli/ffcomplete/internal from tailscale.com/cmd/tailscale/cli/ffcomplete
|
tailscale.com/cmd/tailscale/cli/ffcomplete/internal from tailscale.com/cmd/tailscale/cli/ffcomplete
|
||||||
|
@ -244,7 +244,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
|
|||||||
tailscale.com/client/tailscale/apitype from tailscale.com/client/tailscale+
|
tailscale.com/client/tailscale/apitype from tailscale.com/client/tailscale+
|
||||||
tailscale.com/client/web from tailscale.com/ipn/ipnlocal
|
tailscale.com/client/web from tailscale.com/ipn/ipnlocal
|
||||||
tailscale.com/clientupdate from tailscale.com/client/web+
|
tailscale.com/clientupdate from tailscale.com/client/web+
|
||||||
tailscale.com/clientupdate/distsign from tailscale.com/clientupdate
|
LW tailscale.com/clientupdate/distsign from tailscale.com/clientupdate
|
||||||
tailscale.com/cmd/tailscaled/childproc from tailscale.com/cmd/tailscaled+
|
tailscale.com/cmd/tailscaled/childproc from tailscale.com/cmd/tailscaled+
|
||||||
tailscale.com/control/controlbase from tailscale.com/control/controlhttp+
|
tailscale.com/control/controlbase from tailscale.com/control/controlhttp+
|
||||||
tailscale.com/control/controlclient from tailscale.com/cmd/tailscaled+
|
tailscale.com/control/controlclient from tailscale.com/cmd/tailscaled+
|
||||||
|
@ -14,14 +14,15 @@ func TestDeps(t *testing.T) {
|
|||||||
GOOS: "ios",
|
GOOS: "ios",
|
||||||
GOARCH: "arm64",
|
GOARCH: "arm64",
|
||||||
BadDeps: map[string]string{
|
BadDeps: map[string]string{
|
||||||
"testing": "do not use testing package in production code",
|
"testing": "do not use testing package in production code",
|
||||||
"text/template": "linker bloat (MethodByName)",
|
"text/template": "linker bloat (MethodByName)",
|
||||||
"html/template": "linker bloat (MethodByName)",
|
"html/template": "linker bloat (MethodByName)",
|
||||||
"tailscale.com/net/wsconn": "https://github.com/tailscale/tailscale/issues/13762",
|
"tailscale.com/net/wsconn": "https://github.com/tailscale/tailscale/issues/13762",
|
||||||
"github.com/coder/websocket": "https://github.com/tailscale/tailscale/issues/13762",
|
"github.com/coder/websocket": "https://github.com/tailscale/tailscale/issues/13762",
|
||||||
"github.com/mitchellh/go-ps": "https://github.com/tailscale/tailscale/pull/13759",
|
"github.com/mitchellh/go-ps": "https://github.com/tailscale/tailscale/pull/13759",
|
||||||
"database/sql/driver": "iOS doesn't use an SQL database",
|
"database/sql/driver": "iOS doesn't use an SQL database",
|
||||||
"github.com/google/uuid": "see tailscale/tailscale#13760",
|
"github.com/google/uuid": "see tailscale/tailscale#13760",
|
||||||
|
"tailscale.com/clientupdate/distsign": "downloads via AppStore, not distsign",
|
||||||
},
|
},
|
||||||
}.Check(t)
|
}.Check(t)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user