diff --git a/docs/SPEC.md b/docs/SPEC.md index 15b3273..637eada 100644 --- a/docs/SPEC.md +++ b/docs/SPEC.md @@ -435,8 +435,10 @@ Open questions on the schema: systemctl --user enable --now pkgwatch.timer ``` - *`pkgwatch.service` sets `WorkingDirectory` to `~/dev/pkgwatch` because - `packages.d/`, `state/` and `work/` resolve relative to cwd.)* + *`pkgwatch.service` runs the release binary from the checkout and sets + no `WorkingDirectory`: config, state and work dirs come from the XDG + paths above, so the service needs `~/.config/pkgwatch/packages.d` set + up first — see the migration note under Paths.)* - **Notifications**: `notifier.rs` sends a desktop notification (`notify-send`) when a tier 4-6 release is newly queued for review or a tier 1-3 release is published; both are best-effort and never fail a diff --git a/systemd/pkgwatch.service b/systemd/pkgwatch.service index 232a5d4..0bb604d 100644 --- a/systemd/pkgwatch.service +++ b/systemd/pkgwatch.service @@ -1,9 +1,9 @@ # User-level oneshot: one check -> fetch -> verify -> build -> publish pass. # Install: see docs/SPEC.md > Scheduling. # -# WorkingDirectory matters: packages.d/, state/ and work/ are all resolved -# relative to the cwd, so this must be the main checkout, not a worktree. -# The binary is the release build in that same checkout (`cargo build +# No WorkingDirectory: config, state and work dirs come from the XDG paths +# in src/paths.rs (see docs/SPEC.md > Paths), not the cwd. +# The binary is the release build in the main checkout (`cargo build # --release`), so a rebuild is what picks up code changes. [Unit] Description=pkgwatch: check tracked packages for new upstream releases @@ -11,7 +11,6 @@ OnFailure=pkgwatch-failure.service [Service] Type=oneshot -WorkingDirectory=%h/dev/pkgwatch ExecStart=%h/dev/pkgwatch/target/release/pkgwatch # Builds (makepkg, large Go/Rust binaries) can legitimately take a while. TimeoutStartSec=30min