Skip to content

Install and run isbell on Linux, as on a Mac - #206

Open
bencode wants to merge 1 commit into
mainfrom
linux
Open

bencode wants to merge 1 commit into
mainfrom
linux

Conversation

@bencode

@bencode bencode commented Dec 2, 2026

Copy link
Copy Markdown
Owner

What

Linux, x86_64 or arm64, gets what a Mac with Apple silicon has:

  • a ready-made build;
  • the one-line installer;
  • gateway install as a login service;
  • the web app's one-click upgrade.

How

  • Release: builds x86_64-unknown-linux-musl and aarch64-unknown-linux-musl beside aarch64-apple-darwin.
    • The Linux builds are static (musl), so they run on any distribution.
    • A separate publish job runs on tags only.
    • This PR, by touching the workflow, builds all three targets without publishing.
  • install.sh:
    • picks the build from uname -sm;
    • uses sha256sum when present, else shasum;
    • after installing, restarts the systemd unit when it runs this binary (launchd on a Mac, as before);
    • points to ~/.zshrc, ~/.bashrc or ~/.profile by $SHELL for the PATH hint.
  • update.sh (isbell-tools): checks checksums the same way.
  • service/ (was service.rs):
    • launchd.rs is the old code;
    • systemd.rs writes ~/.config/systemd/user/isbell-gateway.service, then runs daemon-reload, enable and restart;
      • Restart=on-failure matches launchd's SuccessfulExit=false;
      • KillMode=process matches AbandonProcessGroup: the herdr server and the upgrade's install script outlive a restart;
    • mod.rs chooses between them at runtime, so both compile, and their tests run, everywhere.
  • gateway install: on Linux without lingering, it prints how to keep the service running after logout (sudo loginctl enable-linger $USER). This goes to stderr, so the JSON stays clean.
  • The JSON field plist is now file.
  • Logs: ~/.local/state/isbell ($XDG_STATE_HOME) on Linux, upgrade.log included.
  • Docs and copy:
    • README, setup.md and install.md say Mac or Linux;
    • setup.md asks about lingering on Linux;
    • the landing page's setup prompt says "this machine";
    • four locale strings change in en and zh.

Checked

  • cargo clippy, cargo test -p isbell (133, with a new test of the unit's quoting).
  • Web: typecheck, lint and tests (237).
  • On Ubuntu 24.04 arm64 (a Colima VM), with an aarch64-unknown-linux-musl build made as CI makes it:
    • install: the installer, run against a local copy of the release, checks the download and installs it; it gives the PATH hint for bash;
    • gateway install: the unit is active and enabled; the gateway connects to the relay and starts herdr, and the machine shows online with os: linux;
    • reinstall: the gateway restarts with a new PID, and herdr keeps its PID;
    • linger: with linger off, gateway install prints the hint;
    • hook: the pi hook installs and uninstalls;
    • gateway uninstall: removes the unit and its wants link and leaves herdr running; run again, it returns removed: false;
    • web app: the machine shows in the web app, with Terminal, Files and its info panel.

Not yet

  • x86_64 at runtime: this PR's CI builds it; a smoke test follows.
  • One-click upgrade: it fetches the live install.sh, so it can be tested only after the release, from 0.11.1 to 0.12.0 on the same VM.
  • Version: bumping to 0.12.0 comes in its own release PR. Until that release is mirrored, the live installer still serves only Macs.

isbell had a ready-made build, an installer and a gateway service only for Macs with Apple silicon.
Now Linux, x86_64 or arm64, has them too:

- The release builds isbell for x86_64 and aarch64 Linux, static with musl, for any distribution.
  A pull request that changes the workflow builds all three targets, without publishing.
- install.sh picks the build for the system, checks it with sha256sum where shasum is missing,
  restarts a systemd gateway service after an upgrade, and names the startup file of the user's
  shell when ~/.local/bin is not on PATH. The skill's update.sh checks the same way.
- `gateway install`, `status` and `uninstall` use a systemd user unit on Linux. KillMode=process
  keeps the herdr server and the install script running when it restarts, as AbandonProcessGroup
  does on a Mac. Without lingering, `gateway install` says how to keep the service running after
  logout. Its JSON names the service file `file` rather than `plist`.
- Logs go to ~/.local/state/isbell on Linux, upgrade.log included.
- The README, setup.md, install.md and the landing page say Mac or Linux, and the setup prompt
  says this machine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant