Skip to content

Publish libredb-studio-bin to the AUR #971

Description

@cevheri

Problem

LibreDB Studio is absent from the AUR. Querying the AUR RPC for libredb today returns one unrelated package (libredblack), so Arch users have no packaged install path, and aur.archlinux.org is another registry domain that listing sites recognise on sight. Arch and its derivatives are heavily represented in the homelab audience we already reach through Unraid, CasaOS and TrueNAS.

Target: paru -S libredb-studio-bin installs the server, systemctl enable --now libredb-studio starts it.

Facts measured before filing (2026-09-19)

  • Arch ships nodejs 26.x and nodejs-lts-krypton 24.x in extra for x86_64 (corrected 2026-09-30). engines.node is >=24, but the payload's better-sqlite3 binding is built against the Node 24 ABI, so nodejs 26 would install and then fail at dlopen. The distro runtime to depend on is nodejs-lts-krypton, which also provides /usr/bin/node.
  • The AUR rules that bind us:
    • A package built from a prebuilt deliverable must carry the -bin suffix when sources are available. Our release tarball is prebuilt, so the package name is libredb-studio-bin.
    • Packages that do not support x86_64 are not allowed. We publish linux-x64 and linux-arm64, so arch=('x86_64' 'aarch64').
    • .SRCINFO must be committed and regenerated whenever PKGBUILD metadata changes, via makepkg --printsrcinfo > .SRCINFO. A push without it is rejected.
    • The PKGBUILD must open with a # Maintainer: Name <address> comment line.
    • Submission is a git push over SSH to ssh://aur@aur.archlinux.org/libredb-studio-bin.git, which needs an AUR account with a registered SSH key. We do not have one yet; creating it is step one and it is a human step.
    • Packages that violate the rules can be deleted without warning, and an unmaintained package gets orphaned. This is an ongoing commitment, not a one-off submission.
  • Arch layout rules relevant here: never /usr/local, application data in /usr/lib/<pkg>, persistent state in /var/lib/<pkg>, configuration in /etc/<pkg>, licenses in /usr/share/licenses/<pkg>. Custom variables in a PKGBUILD must be prefixed with _.
  • We already have all of this shaped correctly for deb/rpm: packaging/linux/nfpm.yaml installs the payload to /usr/lib/libredb-studio, the launcher to /usr/bin/libredb-studio, config to /etc/libredb-studio/env, state to /var/lib/libredb-studio, and packaging/linux/libredb-studio.service is a DynamicUser=yes unit with StateDirectory=libredb-studio. Reuse these, do not invent a second layout.

Scope

In scope: one AUR package, libredb-studio-bin, built from the published libredb-studio-standalone-<version>-linux-{x64,arm64}.tar.gz release assets, with the systemd unit and the /etc/libredb-studio/env config file.

Out of scope: a from-source libredb-studio package (it would need bun install with network access during build(), which is not acceptable) and a -git package.

Implementation notes

  • Drop the bundled Node runtime that the tarball carries under node/bin/node and depend on the distro one: depends=('nodejs-lts-krypton'). Bundling a second Node in /usr/lib is exactly what a reviewer will flag. The launcher does not honour an external runtime: it execs $LIBREDB_STUDIO_HOME/node/bin/node directly, so the PKGBUILD symlinks that path to /usr/bin/node and leaves the launcher untouched (corrected 2026-09-30, see the thread).
  • source entries are per-architecture (source_x86_64=, source_aarch64=) with sha256sums_x86_64= / sha256sums_aarch64=. The release already publishes SHA256SUMS; take the digests from there rather than recomputing by hand, and never use SKIP.
  • Mark the config file as configuration so pacman does not clobber a local edit: backup=('etc/libredb-studio/env').
  • The unit and the launcher come from the repo, so add them to source from the tagged tree, or carry a copy in the AUR repo and keep it in sync with packaging/linux/. Say in the PKGBUILD comment which one you chose.
  • Install the MIT licence to /usr/share/licenses/libredb-studio-bin/LICENSE.
  • An .install file should print the first-run note: the admin password is generated on first start and written once to the journal, and the state directory is /var/lib/libredb-studio.
  • Do not add the local-first bind as a surprise. The unit binds 127.0.0.1 on purpose; the .install message should say how to expose it (HOSTNAME=0.0.0.0 in /etc/libredb-studio/env, or a reverse proxy).

Acceptance criteria

  • namcap PKGBUILD and namcap libredb-studio-bin-<version>-1-x86_64.pkg.tar.zst both report no errors. Warnings that survive are listed in the PR or issue comment with a reason.
  • makepkg -si in a clean chroot (extra-x86_64-build) produces an installable package, and a second run with an unchanged version is reproducible.
  • After install: systemctl enable --now libredb-studio brings the service up, curl -fsS localhost:3000/api/db/health returns 200, the generated admin password appears once in journalctl -u libredb-studio, and state lands in /var/lib/libredb-studio.
  • One real connection against a live engine succeeds from the installed package, not just a health check.
  • pacman -R libredb-studio-bin leaves /var/lib/libredb-studio in place and removes everything else; a reinstall keeps the existing credentials.
  • .SRCINFO matches the PKGBUILD (makepkg --printsrcinfo produces no diff) and both are committed.
  • The AUR account exists, its SSH key is registered, and the package is pushed to ssh://aur@aur.archlinux.org/libredb-studio-bin.git.
  • A release-time update path exists: either a CI job that bumps pkgver, refreshes sha256sums from SHA256SUMS, regenerates .SRCINFO and pushes, or an explicit step in the release checklist. Decide which before closing this issue; an AUR package that silently goes stale gets flagged out-of-date and then orphaned.
  • distribution/channels.yaml gains an aur entry with a pin that reads the AUR RPC version, docs/DISTRIBUTION.md gains an install section, and the README install table lists it. Run bun run distribution:matrix after the edit.

Depends on

  • An AUR account with an SSH key, created by a human. Everything else is already in the repo.

Activity

  1. added
    enhancement
    deployment
    documentation
    good first issue
    hacktoberfest
    on Sep 18, 2026
  2. NormanSMA commented on Sep 30, 2026

    @NormanSMA
    Contributor

    Hi @cevheri, I would like to take this one. I checked the current state before asking: no open PR references #971, and release 0.17.0 already publishes the linux-x64 and linux-arm64 tarballs plus SHA256SUMS.

    One thing I found while reading packaging/linux/libredb-studio: the launcher execs $LIBREDB_STUDIO_HOME/node/bin/node directly, so it does not honour an external runtime yet. My plan is to keep the launcher untouched and have the PKGBUILD symlink that path to /usr/bin/node. I will also check whether the better-sqlite3 binding in the payload loads under Arch's current nodejs, since #983 notes it targets the Node 24 ABI.

    Plan: PKGBUILD + .install + .SRCINFO under packaging/aur/, reusing the unit and env file from packaging/linux/, then namcap on both, and the distribution/channels.yaml and docs edits.

    One question: the AUR account and SSH key are a human step. Should I register my own account and maintain the package, or do you prefer to push it yourself?

  3. added theissue type on Sep 30, 2026
  4. cevheri commented on Sep 30, 2026

    @cevheri
    MemberAuthor

    Thanks @NormanSMA, it's yours. Both findings check out: the launcher does exec the bundled node directly, so that line in the issue was wrong, and your symlink plan works for me. On the ABI question, Arch nodejs is 26.10 today, so please depend on nodejs-lts-krypton (24.x, also provides /usr/bin/node) instead of nodejs>=24. It is the same reason the Homebrew formula pins node@24. On the account: I will register the AUR account for the project and do the push, and I'm happy to add you as co-maintainer once it exists. Please open the PR with everything under packaging/aur/ plus the namcap and chroot output, and I will take it from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

deploymentdocumentationenhancementgood first issuehacktoberfest

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions