Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

archnotes

Find out what changed after pacman -Syu, package by package.

Arch tells you which packages moved. archnotes follows those exact version changes back to upstream release notes, local changelogs, and AUR context, then builds one readable digest. The package transaction stays fast: a small root hook writes an event and an unprivileged user service does the network work.

Why it is built this way

  • The pacman hook never fetches from the network.
  • Root and user processes exchange one JSON event through a shared spool directory.
  • Resolution order is explicit and traceable instead of silently guessing.
  • Bodies are size-bounded, cached, and rendered as plain text or Markdown.
  • Missing notes remain visible; they are not filled with generated summaries.

Components

Binary Role
archnotes-hook Tiny pacman PostTransaction hook: drops a JSON event into the spool.
archnotesd User systemd service: watches the spool, fetches notes, builds digest.
archnotes CLI: show, list, config, trace, status.

The hook and daemon need neither setuid helpers nor a D-Bus service.

Quick start

cargo build --release
sudo packaging/install.sh
systemctl --user daemon-reload
systemctl --user enable --now archnotesd.service

Configuration

~/.config/archnotes/config.toml (created with defaults on first run).

[filter]
mode = "allow_all"              # allow_all | denylist | allowlist
deny = ["linux-headers"]
semver_min = "patch"            # patch | minor | major
include_non_semver = true

[sources]
github = true
gitlab = true
gitea = true                    # Codeberg / Gitea / Forgejo (shared /api/v1)
changelog_files = true
aur = true

[sources.github_options]
token_env = "GITHUB_TOKEN"      # raises rate limit from 60/h to 5000/h

[notify]
desktop = true
coalesce_secs = 5               # merge nearby pacman transactions into one digest

[cache]
notes_ttl_days = 90
max_body_kb = 8

notify.summary, notify.open_action, notify.terminal, and cache.max_size_mb are accepted by the current config parser for compatibility, but are not active controls: desktop notifications currently contain the digest path and cache eviction is governed by notes_ttl_days.

Manual usage

archnotes show              # latest digest, ANSI colored
archnotes show --plain      # no ANSI
archnotes show 1715253812-* # specific transaction
archnotes list
archnotes trace firefox     # see what sources resolver tried
archnotes status
archnotes config edit

Sources, in order

  1. A previously successful source, if one is cached for the package
  2. GitHub Releases API (when pacman -Qi's URL points to github.com)
  3. GitLab Releases API (gitlab.com or self-hosted gitlab.*)
  4. Gitea Releases API (codeberg.org or self-hosted gitea/forgejo hosts) — one /api/v1 implementation covers Codeberg, Gitea, and Forgejo
  5. Local CHANGELOG/NEWS shipped under /usr/share/doc/<pkg>/
  6. AUR package page as a fallback link when no other candidate was found

Successful source selections are cached under the XDG cache directory (normally ~/.cache/archnotes/resolver.json) so subsequent transactions can try the same source first.

Verification

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --locked
echo 'foo' | /usr/lib/archnotes/archnotes-hook   # smoke test (writes spool event as root)
journalctl --user -u archnotesd -n 100
archnotes show

License

MIT. See LICENSE.

About

Per-package upstream release-notes digests after Arch Linux upgrades.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages