pacroller/README.md

56 lines
2.8 KiB
Markdown
Raw Permalink Normal View History

2021-01-15 23:30:01 +08:00
# Pacroller
2021-07-11 15:38:35 +08:00
The "Unattended Upgrades" for Arch Linux.
2021-01-15 23:30:01 +08:00
2021-01-16 12:37:59 +08:00
## Concept
2021-07-11 15:38:35 +08:00
Parsing the output of pacman and pacman.log, searching for known patterns and notifying the user whether there is a potential error.
Currently the design is regex-based, any output that is unable to match a set of regex is reported back to the user.
2021-01-16 12:37:59 +08:00
## Installation
`yay -S pacroller`
## Usage
2021-07-11 15:38:35 +08:00
pacroller has the following subcommands
2021-01-16 12:37:59 +08:00
```
run [-d --debug]
start an upgrade
if the upgrade fails or pacroller determines that human action is required,
pacroller writes an exception to the status database, and refuses to run again
without resetting its failure status.
status [-v --verbose] [-m --max <number>]
2021-05-25 15:36:06 +08:00
print details of a previously successful upgrade
2021-04-22 11:27:04 +08:00
reset
2021-01-16 12:37:59 +08:00
reset the current failure status
2021-07-11 15:38:35 +08:00
test-smtp
send an test email to the configured address
2021-01-16 12:37:59 +08:00
```
2021-07-11 15:38:35 +08:00
There is also a systemd timer for scheduled automatic upgrades.
2021-01-16 12:37:59 +08:00
## Configuration
2021-07-11 15:38:35 +08:00
Pacroller reads `/etc/pacroller/config.json` on startup.
2021-01-16 12:37:59 +08:00
### custom sync commands
2021-07-11 15:38:35 +08:00
Pacroller can be configured to use custom sync commands, which allows the usage of a different set of mirrors when syncing the database. Enable the "custom_sync" option and write your custom `/etc/pacroller/sync.sh`.
2021-01-16 12:37:59 +08:00
### needrestart
2021-07-11 15:38:35 +08:00
If the "needrestart" option is enabled, needrestart should be called after a successful upgrade.
2021-01-16 12:37:59 +08:00
### hold packages
2021-07-11 15:38:35 +08:00
Put your hold packages in a json keyval {package name: regex}, where the regex should have at least one matching group.
If pacroller observes any changes of the matching group or the hold package is to be removed, it refuses to upgrade further.
2021-01-16 12:37:59 +08:00
### ignored pacnew
2021-07-11 15:38:35 +08:00
A list of pacnew files that are silently ignored during parsing, any other pacnews will trigger a warning and prevent further upgrades.
### custom pacman hooks and packages
2021-07-11 15:38:35 +08:00
Custom pacman hooks and packages output matching is configurable via `/etc/pacroller/known_output_override.py`.
2021-05-25 15:36:06 +08:00
### check systemd status
2021-07-11 15:38:35 +08:00
The "systemd-check" option allows pacroller to check fo degraded systemd services before an upgrade.
2021-05-25 15:36:06 +08:00
### clear package cache
2021-07-11 15:38:35 +08:00
Pacroller wipes /var/cache/pacman/pkg after a successful upgrade if the option "clear_pkg_cache" is set.
2021-05-25 15:36:06 +08:00
### save pacman output
2021-07-11 15:38:35 +08:00
Every time an upgrade is performed, the pacman output is stored into /var/log/pacroller. This can be configured via the "save_stdout" keyword.
## Smtp
Configure `/etc/pacroller/smtp.json` to receive an email notification when an upgrade fails. Note that pacroller will not send any email if stdin is a tty (can be overridden by the `--interactive` switch).
2021-01-30 11:57:04 +08:00
## Limitations
2021-04-08 23:24:25 +08:00
- Your favourite package may not be supported, however it's easy to add another set of rules.
2021-01-30 11:57:04 +08:00
- Restarting the whole system after a kernel upgrade is not implemented.
- Human interaction is required occasionally.
- Does not check news from archlinux.org