tailscale: improve packaging
Nobody has claimed this yet.
- #19090 by @CAFxX — closed without merging
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @BKPepe (?)
Environment: OpenWrt 21.02.3, r16554-1d4dea6d4f
Description:
The tailscale and tailscaled binaries are quite large, even when squashfs'd:

The tailscale documentation mentions that, exactly to address this, tailscaled can be optionally built including the cli functionality, so that it can be symlinked busybox-style to support both the tailscaled and tailscale cli roles:
go build -o tailscale.combined -tags ts_include_cli ./cmd/tailscaled
ln -s tailscale.combined tailscale
ln -s tailscale.combined tailscaled
As currently tailscale depends on tailscaled, we could maybe move from the current two packages
- tailscaled
- tailscale (depends: tailscaled)
to two packages and a virtual package
- tailscaled
- tailscale-combined (provides: tailscale, tailscaled)
where tailscale-combined is the tailscaled command built using the ts_include_ci tag.
Quickly building the packages locally and compressing with upx (as a stand-in for squashfs) seems to indicate that this approach would save ~1.3MB in a firmware image that includes tailscale (e.g. such as those built via attended-sysupgrades).
File size Ratio Format Name
-------------------- ------ ----------- -----------
9961472 -> 2308728 23.18% linux/mips tailscale
26083328 -> 4790500 18.37% linux/mips tailscale.combined
17235968 -> 3765896 21.85% linux/mips tailscaled
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the OpenWrt package definitions for tailscaled and tailscale, then review the tailscale documentation on small builds and the ./cmd/tailscaled entry point. Compare separate builds with a ts_include_cli combined build, and verify that the resulting packages provide the requested tailscale and tailscaled commands while reducing installed size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100