|
1 | 1 | # Linux Packaging |
2 | 2 |
|
3 | | -## Debian package (`.deb`) |
| 3 | +## Build release artifacts locally |
| 4 | + |
| 5 | +From repo root: |
4 | 6 |
|
5 | 7 | ```bash |
6 | | -# Build .deb for amd64 |
7 | | -./build-deb.sh amd64 |
| 8 | +# Build .deb, .rpm, and .tar.gz for amd64 |
| 9 | +VERSION=1.0.0 ./Packaging.Linux/build-release-packages.sh amd64 |
| 10 | + |
| 11 | +# Build .deb, .rpm, and .tar.gz for arm64 |
| 12 | +VERSION=1.0.0 ./Packaging.Linux/build-release-packages.sh arm64 |
8 | 13 |
|
9 | | -# Build .deb for arm64 |
10 | | -VERSION=1.0.0 ./build-deb.sh arm64 |
| 14 | +# Build only one format |
| 15 | +VERSION=1.0.0 FORMATS=deb ./Packaging.Linux/build-release-packages.sh amd64 |
11 | 16 | ``` |
12 | 17 |
|
13 | | -The output package is written to the repository root as: |
| 18 | +Artifacts are written to `./dist/` by default. |
| 19 | + |
| 20 | +Generated formats: |
14 | 21 |
|
15 | 22 | - `coder-desktop_<version>_amd64.deb` |
16 | 23 | - `coder-desktop_<version>_arm64.deb` |
| 24 | +- `coder-desktop-<version>-1.x86_64.rpm` |
| 25 | +- `coder-desktop-<version>-1.aarch64.rpm` |
| 26 | +- `coder-desktop_<version>_amd64.tar.gz` |
| 27 | +- `coder-desktop_<version>_arm64.tar.gz` |
17 | 28 |
|
18 | | -## Arch / Manjaro package (`PKGBUILD`) |
19 | | - |
20 | | -A sample `PKGBUILD` and `coder-desktop.install` are provided for Arch-based |
21 | | -systems. |
| 29 | +## Build AUR source bundle |
22 | 30 |
|
23 | 31 | ```bash |
24 | | -cd Packaging.Linux |
25 | | -makepkg -si |
| 32 | +VERSION=1.0.0 ./Packaging.Linux/build-aur-source.sh |
26 | 33 | ``` |
27 | 34 |
|
28 | | -## Local development run helper |
| 35 | +Produces: |
29 | 36 |
|
30 | | -From repo root, use: |
31 | | - |
32 | | -```bash |
33 | | -./scripts/run-linux-dev.sh |
34 | | -``` |
| 37 | +- `coder-desktop_<version>_aur.tar.gz` |
35 | 38 |
|
36 | | -This script: |
| 39 | +This archive contains `PKGBUILD`, `coder-desktop.install`, unit/desktop files, |
| 40 | +and can be used as a source bundle for AUR packaging. |
37 | 41 |
|
38 | | -- builds `Vpn.Service` + `App.Avalonia` (unless `--no-build`) |
39 | | -- starts the service on a user-writable socket |
40 | | -- overrides `Manager:TunnelBinaryPath` to: |
41 | | - - `${XDG_CACHE_HOME:-$HOME/.cache}/coder-desktop-dev/coder-vpn` (default) |
42 | | - - `/tmp/coder-desktop-dev-root/coder-vpn` when `--sudo-service` is used |
43 | | -- sets `Manager:TunnelBinaryAllowVersionMismatch=true` for Linux dev runs because |
44 | | - Windows PE ProductVersion validation does not apply to Linux tunnel binaries |
45 | | -- can run the service via `--sudo-service` (recommended when testing real tunnel setup, |
46 | | - since creating/configuring TUN interfaces typically requires root privileges) |
47 | | -- starts the Avalonia app in visible mode (`--show` by default) |
48 | | -- writes logs under `${XDG_RUNTIME_DIR:-/tmp}/coder-desktop-dev/logs/` |
| 42 | +## Debian helper |
49 | 43 |
|
50 | | -Useful variants: |
| 44 | +`build-deb.sh` is retained as a convenience wrapper: |
51 | 45 |
|
52 | 46 | ```bash |
53 | | -./scripts/run-linux-dev.sh --no-build |
54 | | -./scripts/run-linux-dev.sh -- --minimized |
55 | | -./scripts/run-linux-dev.sh --sudo-service |
| 47 | +VERSION=1.0.0 ./Packaging.Linux/build-deb.sh amd64 |
56 | 48 | ``` |
57 | 49 |
|
58 | | -The app also writes bootstrap logs to: |
| 50 | +## Service behavior (root VPN service) |
59 | 51 |
|
60 | | -- `~/.local/state/coder-desktop/app-avalonia.log` |
| 52 | +Packages install a systemd unit (`coder-desktop.service`) that runs: |
| 53 | + |
| 54 | +- `User=root` |
| 55 | +- `ExecStart=/usr/bin/coder-vpn-service` |
| 56 | + |
| 57 | +Post-install scripts run `systemctl daemon-reload`, `enable`, and `start/restart` |
| 58 | +so the VPN service is active as root after installation (when systemd is |
| 59 | +available). |
61 | 60 |
|
62 | 61 | ## Package contents |
63 | 62 |
|
64 | 63 | - `/usr/lib/coder-desktop/app/` — Avalonia desktop app binaries |
65 | 64 | - `/usr/lib/coder-desktop/service/` — VPN service binaries |
66 | 65 | - `/usr/bin/coder-desktop` — Desktop app launcher wrapper |
67 | 66 | - `/usr/bin/coder-vpn-service` — Symlink to VPN service binary |
68 | | -- `/etc/systemd/system/coder-desktop.service` — systemd unit |
| 67 | +- `/usr/lib/systemd/system/coder-desktop.service` — systemd unit |
69 | 68 | - `/etc/coder-desktop/config.json` — Default configuration |
70 | 69 | - `/usr/share/applications/coder-desktop.desktop` — Desktop entry |
71 | 70 | - `/usr/share/pixmaps/coder-desktop.ico` — App icon |
72 | | - |
73 | | -## Runtime dependencies |
74 | | - |
75 | | -### Debian/Ubuntu package names |
76 | | - |
77 | | -- `dotnet-runtime-8.0` |
78 | | -- `libnotify-bin` |
79 | | -- `libsecret-tools` |
80 | | -- `freerdp2-x11` or `remmina` (optional) |
81 | | - |
82 | | -### Arch/Manjaro package names |
83 | | - |
84 | | -- `dotnet-runtime-8.0` |
85 | | -- `libnotify` |
86 | | -- `libsecret` |
87 | | -- `freerdp` or `remmina` (optional) |
0 commit comments