Packaging

.deb, PKGBUILD, RPM, and install scripts.

Packaging

Build binaries first, then package.

Prerequisites

  • LDC + dub
  • Ubuntu .deb: dpkg-deb (dpkg-dev)
  • CachyOS/Arch: makepkg (base-devel)
  • Fedora/RHEL .rpm: podman (rpmbuild runs inside a Fedora container)
  • openSUSE .rpm: podman (rpmbuild runs inside an openSUSE container)

Local install (no package)

dub build --compiler=ldc2
(cd cli && dub build --compiler=ldc2)
(cd admin && rm -rf node_modules && npm ci && npm run build)   # Vue admin → admin/dist
sudo ./packaging/install-server.sh

(cd client && dub build --compiler=ldc2)
sudo ./client/packaging/install.sh

Ubuntu .deb

dub build --compiler=ldc2 --build=release
(cd cli && dub build --compiler=ldc2 --build=release)
(cd admin && rm -rf node_modules && npm ci && npm run build)
./scripts/packaging/build-deb-server.sh

(cd client && dub build --compiler=ldc2 --build=release)
./scripts/packaging/build-deb-client.sh
# → dist/lindir-server_*.deb  dist/lindir-client_*.deb
sudo dpkg -i dist/lindir-server_*.deb

CachyOS / Arch

Fast path (from source tree) — preferred while developing:

paru -S libnss-extrausers                 # AUR; required for password login
sudo ./client/packaging/install.sh        # from repo root: rebuilds + installs
sudo lindir-client enroll --url URL --token TOKEN --skip-vpn
sudo lindir-client sync
getent passwd alice

install.sh places /usr/bin/lindir-client, /usr/lib/lindir/configure-login.sh, and enables lindir-sync.timer. Root enroll runs configure-login; if already enrolled: sudo lindir-client configure-login.

PKGBUILD path (packaged install):

paru -S libnss-extrausers
cd packaging/cachyos && makepkg -si
cd ../../client/packaging/cachyos && makepkg -si

PKGBUILDs build from the repository checkout (two/three levels up from the PKGBUILD). The client PKGBUILD depends on libnss-extrausers.

Fedora / RHEL (.rpm via Podman)

Binaries are compiled on the host; rpmbuild runs in a Fedora container so you do not need rpm-build on Arch/Ubuntu:

dub build --compiler=ldc2 --build=release
(cd cli && dub build --compiler=ldc2 --build=release)
./scripts/packaging/build-rpm-server.sh
# → dist/lindir-server-*.rpm

(cd client && dub build --compiler=ldc2 --build=release)
./scripts/packaging/build-rpm-client.sh
# → dist/lindir-client-*.rpm

Specs and units: packaging/fedora/, client/packaging/fedora/.

Note: an RPM built on the host glibc may not run on older RHEL/Rocky; for matching glibc, build the client inside an image that matches the target distribution.

openSUSE (.rpm via Podman)

(cd client && dub build --compiler=ldc2 --build=release)
./scripts/packaging/build-rpm-client-opensuse.sh
# → dist/lindir-client-*.rpm

Spec: client/packaging/opensuse/.