ScoopInstaller / Extras

📦 The Extras bucket for Scoop.
https://scoop.sh
The Unlicense
1.79k stars 1.35k forks source link

[Tailscale]: Service is not installed after tailscale install #13460

Open evalexp opened 3 months ago

evalexp commented 3 months ago

Prerequisites

Package Name

tailscale

Expected/Current Behaviour

There's no service install when install tailscale, but install it via msi will install that service on windows.

Steps to Reproduce

➜ gsudo scoop install tailscale
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Installing 'tailscale' (1.68.1) [64bit] from 'extras' bucket
Loading tailscale-setup-1.68.1-amd64.msi from cache.
Checking hash of tailscale-setup-1.68.1-amd64.msi ... ok.
Extracting tailscale-setup-1.68.1-amd64.msi ... done.
Running pre_install script...
Linking D:\Scoop\Applications\apps\tailscale\current => D:\Scoop\Applications\apps\tailscale\1.68.1
Creating shim for 'tailscale'.
Creating shim for 'tailscale-ipn'.
Making D:\Scoop\Applications\shims\tailscale-ipn.exe a GUI binary.
Creating shim for 'tailscaled'.
Creating shortcut for Tailscale (tailscale-ipn.exe)
Running post_install script...
'tailscale' (1.68.1) was installed successfully!
Notes
-----
Start Tailscale with Windows by running:
reg import "D:\Scoop\Applications\apps\tailscale\current\add-startup.reg"

Possible Solution

Install a service on scoop post-install step.

Scoop and Buckets Version

➜ scoop --version
Current Scoop version:
d337bb1f (HEAD -> master, tag: v0.4.2, origin/master, origin/HEAD) chore(release): Bump to version 0.4.2 (#5964)

'main' bucket:
8e45f60ae (HEAD -> master, origin/master, origin/HEAD) kubeshark: Update to version 52.3.68

'extras' bucket:
2563320b4 (HEAD -> master, origin/master, origin/HEAD) vrcx: Update to version 2024.06.12

'versions' bucket:
199bf97b7 (HEAD -> master, origin/master, origin/HEAD) zig-dev: Update to version 0.14.0-dev.42

'nirsoft' bucket:
62f97d6 (HEAD -> master, origin/master, origin/HEAD) Update README.md

'sysinternals' bucket:
b29cb67 (HEAD -> main, origin/main, origin/HEAD) sysinternals-suite: Update to version 2024.05.28

'php' bucket:
0239a73 (HEAD -> master, origin/master, origin/HEAD) php8.3: Update to version 8.3.8

'nerd-fonts' bucket:
128ad78f (HEAD -> master, origin/master, origin/HEAD) SarasaGothic: Update to version 1.0.14

'nonportable' bucket:
7d9edc62 (HEAD -> master, origin/master, origin/HEAD) 10x-np: Update to version 1.0.170

'java' bucket:
8a6f8513 (HEAD -> master, origin/master, origin/HEAD) temurin8-nightly-jre: Update to version 8.0.422-3.0.202406071553

Scoop Config

➜ scoop config

last_update   : 2024/6/17 12:51:48
gh_token      : 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
aria2-options : --check-certificate=false
scoop_branch  : master
scoop_repo    : https://github.com/ScoopInstaller/Scoop

PowerShell Version

➜ $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

LeLeMoe commented 3 months ago

It looks like the source of the problem is that scoop depends on /install command of tailscale-ipn.exe to install service, but which was removed since 1.68.

Here's the output from 1.66:

> ./tailscale-ipn /help

...

Usage: tailscale-ipn.exe [</install|/uninstall|/uninstallwintun|/rmbundle <UpgradeCode> [WaitPID]|/setprocessmitigations|/push <filename>|/url <url>]

And here's the 1.68 one:

> ./tailscale-ipn /help

...

Usage: tailscale-ipn.exe [/uninstallwintun|/rmbundle <UpgradeCode> [WaitPID]|/setprocessmitigations|/push <filename>|/url <url>|/syncevent <eventname>]
soulflyman commented 3 months ago

There is an undocumented sub command for the tailscaled.exe (https://github.com/tailscale/tailscale/blob/5ffb2668ef3af0d7fe56ad81d05fde9db1dc103a/cmd/tailscaled/tailscaled.go#L145) that installs the service.

Running the following command as Administrator will register Tailscale as a service.

.\tailscaled.exe install-system-daemon
evalexp commented 3 months ago

There is an undocumented sub command for the tailscaled.exe (https://github.com/tailscale/tailscale/blob/5ffb2668ef3af0d7fe56ad81d05fde9db1dc103a/cmd/tailscaled/tailscaled.go#L145) that installs the service.

Running the following command as Administrator will register Tailscale as a service.

.\tailscaled.exe install-system-daemon

yes, you are right, and https://github.com/ScoopInstaller/Extras/pull/13482 would solve this problem, now I am waiting for it to be merged.