Skip to main content

unattended upgrade for archlinux

Project description

Pacroller

The "Unattended Upgrades" for Arch Linux.

Concept

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.

Installation

yay -S pacroller

Usage

pacroller has the following subcommands

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>]
    print details of a previously successful upgrade
reset
    reset the current failure status
test-mail
    send test mails to all configured notification destinations

There is also a systemd timer for scheduled automatic upgrades.

Configuration

Pacroller reads /etc/pacroller/config.json on startup.

custom sync commands

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.

needrestart

If the "needrestart" option is enabled, needrestart should be called after a successful upgrade.

hold packages

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.

ignored pacnew

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

Custom pacman hooks and packages output matching is configurable via /etc/pacroller/known_output_override.py.

check systemd status

The "systemd-check" option allows pacroller to check fo degraded systemd services before an upgrade.

check news from archinux.org

Automatically checks news before upgrade, unless "news-check" is set to false.

clear package cache

Pacroller wipes /var/cache/pacman/pkg after a successful upgrade if the option "clear_pkg_cache" is set.

save pacman output

Every time an upgrade is performed, the pacman output is stored into /var/log/pacroller. This can be configured via the "save_stdout" keyword.

Notification

When configuring your notification system, please note that pacroller will not send any notification if stdin is a tty (can be overridden by the --interactive switch). Notification will be sent through all configured methods when it requires manual inspection. Currently, two notification methods are supported: SMTP and telegram

SMTP

Configure /etc/pacroller/smtp.json to receive email notifications.

Telegram

Configure /etc/pacroller/telegram.json to receive telegram notifications.

Limitations

  • Your favourite package may not be supported, however it's easy to add another set of rules.
  • Restarting the whole system after a kernel upgrade is not implemented.
  • Human interaction is required occasionally.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pacroller-0.1.8.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

pacroller-0.1.8-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file pacroller-0.1.8.tar.gz.

File metadata

  • Download URL: pacroller-0.1.8.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pacroller-0.1.8.tar.gz
Algorithm Hash digest
SHA256 6e84a75e54602fb8b646a3ccca327935ed479fc86def809e9c3e3ac1f78f8f6d
MD5 aefd5621b8389eb2f46543f4c846c58a
BLAKE2b-256 597192b209040679367452b3da31a1857973ad9c8cd1b636bbe676509ac8fb15

See more details on using hashes here.

File details

Details for the file pacroller-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: pacroller-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pacroller-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8eebb3c5d119a0c3c578f07367efb7bbf78f320f14b82dde7767d22362154304
MD5 739cde2df46c56172e3c32fb040e26df
BLAKE2b-256 86144a3189b50735a5594863fb7199f86b3237efeb475e396769fb00a829b63b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page