Drop the now-unneeded WorkingDirectory from the service
All checks were successful
CI / build (pull_request) Successful in 50s
CI / test (pull_request) Successful in 2m21s
CI / audit (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 4m52s

Paths no longer resolve relative to the cwd, so the unit's comment and
the SPEC's explanation of it were stale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Austin Schaefer 2026-09-20 10:03:24 +02:00
parent 00ce665038
commit 6188f7f0b7
2 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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