Linux: install and update Revue from a package manager (apt, dnf, pacman/AUR, Nix) #74
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today Linux gets a tarball (
revue-vX.Y.Z-linux-x86_64.tar.gzwithtask install) and a flake. Users of every distribution should be able to install Revue with their package manager and get updates through it too.Plan
1. Build the packages from the release binary
packaging/nfpm.yaml(nfpm, one static binary): one file builds .deb, .rpm and Arch .pkg.tar.zst from the binaryrelease:build:linuxalready makes inrust:1-bookworm(glibc 2.36, so Debian 12+, Ubuntu 22.04+, Fedora and Arch all work)./usr/bin/revue,revue.desktop(check it hasMimeType=x-scheme-handler/revue;sorevue://links work without registering in Settings), hicolor icons, licenses.NEEDEDentries (objdump -p), then map them to package names for each format: libxkbcommon(-x11), wayland, vulkan loader, libxcb, fontconfig, freetype, alsa, zstd. Addgittoo. Recommendgh.task package PLATFORM=linuxto also write the three files, each with a.sha256.2. Host apt, dnf and pacman repositories on our own Forgejo
Forgejo (16 here) has built-in Debian, RPM and Arch package registries, and it signs them with its own GPG key. That gives us real repositories with no extra infrastructure:
release:publish:linux: PUT each package to/api/packages/thatrichan/{debian,rpm,arch}/…. Call it fromrelease.yml'slinuxjob after the upload. It needs a token withwrite:package: either widenRELEASE_TOKENor add aPACKAGE_TOKEN.apt install revue,dnf install revueandpacman -S revue(after adding the repo once), and updates come with the system's own.3. AUR:
revue-binPKGBUILDtemplate that installs from the release tarball, with its sha256. Have a task write thePKGBUILDand.SRCINFOfrom a template, becausemakepkg --printsrcinfoneeds Arch.ssh://aur@aur.archlinux.org/revue-bin.gitfromrelease.yml, with a dedicated SSH key as the secretAUR_SSH_KEY. The namerevueis free on the AUR. Later, arevuesource package if anyone asks.4. Nix
nix profile install). Check thattask version:*bumpsflake.nix.pkgs/by-name/re/revueto nixpkgs (based on the flake's derivation) so NixOS users get it without the flake. That makes us maintainers there, and the version bumps become PRs to nixpkgs.5. The in-app updater must leave packaged installs alone
/usr/bin/revuebelongs to root and the package manager. Self-updating it fails, or makes it disagree with the package database.update::managed_by_nix()(src/update.rs:72, used insrc/ui/updater.rs,app.rs,settings.rs) into "managed by a package manager": in the Nix store, or the executable's directory isn't writable by the user. This is a general check, with no list of distribution paths.6. Docs
docs/getting-started.md(Install on Linux: one short block each for apt, dnf, pacman and the AUR, plus Nix), the install table inREADME.md, anddocs/updates.md.Not now (and why)
git,ghand language servers from the host, clones into any folder). Reconsider if users ask.Decisions for you
PACKAGE_TOKEN, or widenRELEASE_TOKEN?Order
5 (updater) → 1 → 2 → 3 → 6 → 4.
AUR registration is paused (a wave of automated sign-ups, no date given), so step 3 (
revue-bin) waits until it reopens. Arch users are covered in the meantime by the Forgejo Arch registry (pacman -S revueafter adding the repo). Going ahead with 1, 2, 5 and 6.worktree-linux-packages(11d68ae). It builds .deb/.rpm/Arch with nfpm, publishes them to the Forgejo registries withtask release:publish:linux(secretPACKAGE_TOKEN), and leaves installs Revue can't write to (/usr/bin, Nix) to their package manager. Not merged yet.revue: init at 0.42.0). Later versions will come from the r-ryantm update bot.Shipped in
83a0975(with the fix inffb2899), released in v0.43.x: .deb/.rpm/Arch packages published to the Forgejo registries, and the updater leaves installs it can't write to (/usr/bin, Nix) to the package manager. nixpkgs is in review (NixOS/nixpkgs#587188). What's left, the AURrevue-binonce registration reopens, is tracked in #77. Closing.