summaryrefslogtreecommitdiffhomepage
path: root/clientupdate/clientupdate_test.go
AgeCommit message (Collapse)AuthorFilesLines
2024-06-17clientupdate: allow switching from unstable to stable tracks (#12477)Andrew Lytvynov1-0/+104
Previously, we would only compare the current version to resolved latest version for track. When running `tailscale update --track=stable` from an unstable build, it would almost always fail because the stable version is "older". But we should support explicitly switching tracks like that. Fixes #12347 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-04-16all: use Go 1.22 range-over-intBrad Fitzpatrick1-1/+1
Updates #11058 Change-Id: I35e7ef9b90e83cac04ca93fd964ad00ed5b48430 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-02-29clientupdate: handle multiple versions in "apk info tailscale" output (#11310)Andrew Lytvynov1-0/+23
The package info output can list multiple package versions, and not in descending order. Find the newest version in the output, instead of the first one. Fixes #11309 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-11-28clientupdate: implement update for Unraid (#10344)Andrew Lytvynov1-0/+28
Use the [`plugin` CLI](https://forums.unraid.net/topic/72240-solved-is-there-a-way-to-installuninstall-plugins-from-script/#comment-676870) to fetch and apply the update. Updates https://github.com/tailscale/tailscale/issues/10184 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-11-02clientupdate: do not recursively delete dirs in cleanupOldDownloads (#10093)Andrew Lytvynov1-0/+112
In case there's a wild symlink in one of the target paths, we don't want to accidentally delete too much. Limit `cleanupOldDownloads` to deleting individual files only. Updates https://github.com/tailscale/tailscale/issues/10082 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-20clientupdate: change Mac App Store support (#9891)Andrew Lytvynov1-78/+0
In the sandboxed app from the app store, we cannot check `/Library/Preferences/com.apple.commerce.plist` or run `softwareupdate`. We can at most print a helpful message and open the app store page. Also, reenable macsys update function to mark it as supporting c2n updates. macsys support in `tailscale update` was fixed. Updates #755 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-30clientupdate: add linux tarball updates (#9144)Andrew Lytvynov1-0/+259
As a fallback to package managers, allow updating tailscale that was self-installed in some way. There are some tricky bits around updating the systemd unit (should we stick to local binary paths or to the ones in tailscaled.service?), so leaving that out for now. Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-24clientupdate: remove Arch support (#9081)Andrew Lytvynov1-102/+0
An Arch Linux maintainer asked us to not implement "tailscale update" on Arch-based distros: https://github.com/tailscale/tailscale/issues/6995#issuecomment-1687080106 Return an error to the user if they try to run "tailscale update". Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-17clientupdate: parse /etc/synoinfo.conf to get CPU arch (#8940)Andrew Lytvynov1-20/+140
The hardware version in `/proc/sys/kernel/syno_hw_version` does not map exactly to versions in https://github.com/SynoCommunity/spksrc/wiki/Synology-and-SynoCommunity-Package-Architectures. It contains some slightly different version formats. Instead, `/etc/synoinfo.conf` exists and contains a `unique` line with the CPU architecture encoded. Parse that out and filter through the list of architectures that we have SPKs for. Tested on DS218 and DS413j. Updates #8927 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-11clientupdate: implement updates for Synology (#8858)Andrew Lytvynov1-0/+44
Implement naive update for Synology packages, using latest versions from pkgs.tailscale.com. This is naive because we completely trust pkgs.tailscale.com to give us a safe package. We should switch this to some better signing mechanism later. I've only tested this on one DS218 box, so all the CPU architecture munging is purely based on docs. Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-10cmd/tailscale/cli,clientupdate: extract new clientupdate package (#8827)Andrew Lytvynov1-0/+442
Extract the self-update logic from cmd/tailscale/cli into a standalone package that could be used from tailscaled later. Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>