From 0954c6520878e073c7822fc4a8f4a752474f5d7a Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Fri, 29 May 2026 12:23:30 +0900 Subject: fix(packaging): convert dispatch-systemd from user units to system template units (User=%i) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-user systemd manager (user@UID.service) fails to start on WSL (kernel 6.6.87.2, microsoft/WSL#13186 — 'Failed to spawn executor: Device or resource busy'), which breaks pacman's 30-systemd-daemon-reload-user.hook on install. Changes: - New dispatch-api@.service + dispatch-frontend@.service system template units with User=%i (run as the named instance user) - Remove old user-scope dispatch-api.service / dispatch-frontend.service - Install to /usr/lib/systemd/system/ instead of .../systemd/user/ - Update PKGBUILD, .install hints, and bin/service to use sudo systemctl dispatch-api@ --- packaging/dispatch-systemd.install | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'packaging/dispatch-systemd.install') diff --git a/packaging/dispatch-systemd.install b/packaging/dispatch-systemd.install index 3bd29be..5ebf261 100644 --- a/packaging/dispatch-systemd.install +++ b/packaging/dispatch-systemd.install @@ -1,24 +1,25 @@ post_install() { echo "" - echo "==> Dispatch systemd user units installed." - echo " Enable and start:" - echo " systemctl --user daemon-reload" - echo " systemctl --user enable --now dispatch-api dispatch-frontend" + echo "==> Dispatch systemd system unit templates installed." + echo " These run as the user named in the instance (replace )." + echo " Enable and start (e.g. for user 'tradam'):" + echo " sudo systemctl daemon-reload" + echo " sudo systemctl enable --now dispatch-api@ dispatch-frontend@" echo "" } post_upgrade() { echo "" echo "==> Dispatch systemd units upgraded." - echo " Reload and restart:" - echo " systemctl --user daemon-reload" - echo " systemctl --user restart dispatch-api dispatch-frontend" + echo " Reload and restart your instances (replace ):" + echo " sudo systemctl daemon-reload" + echo " sudo systemctl restart dispatch-api@ dispatch-frontend@" echo "" } pre_remove() { echo "" - echo "==> Stop dispatch services before removal:" - echo " systemctl --user disable --now dispatch-api dispatch-frontend" + echo "==> Stop dispatch services before removal (replace ):" + echo " sudo systemctl disable --now dispatch-api@ dispatch-frontend@" echo "" } -- cgit v1.2.3