Skip to main content

Gentoo Linux updater

Project description

Gentoo Updater

gentoo-update is a tool that automates updates on Gentoo Linux. By default it only installs security updates from GLSA, but it can also be used to update all packages on the system. i.e. @world.

This project originates from 2023 Google Summer of Code, more about it can be found in the blog post and Gentoo Forums.

TLDR: gentoo_update has 3 main modules - updater, parser and notifier. Updater runs the update script and creates a log file. Parser reads the log file and composes a post-upgrade report which notifier then sends via email, IRC bot or mobile app.


Features

  • updater:
    • detect and patch security updates by default using glsa-check
    • update @world
    • insert additional flags to @world update
    • calculate disk usage before and after the update
    • do not start the update if available disk space is lower than a certain threshold
  • parser:
    • Compose a report that informs if the update was successful or not
    • Add package info after successful info, like updated packages, new versions and USE flags
    • Detect different errors during an update
      • Blocked Packages
      • USE flag conflicts
      • Issues with Licenses
      • Network issues during an update
      • OOM during an update
    • Add disk usage before/after an update to the report
  • notifier:
    • Send update report via IRC bot
    • Send full report via IRC bot if requested
    • Send update report via email using SendGrid
    • Send update report via email using local relay
    • Send update report via mobile app
  • Other:
    • Add an ebuild to GURU repository
    • Create a CI/CD pipeline that will run gentoo_update on newly published stage3 Docker containers

Usage

gentoo-update is in GURU overlay, and can be installed using emerge:

eselect repository enable guru
emerge --ask app-admin/gentoo_update

Alternatively, it can be installed with pip in a virtual environment:

python -m venv gentoo_update
source gentoo_update/bin/activate
python -m pip install gentoo_update

The updater creates a subdirectory in Portage's default PORTAGE_LOGDIR located at /var/log/portage/gentoo-update. However, if this variable is set to a different value in make.conf, it will use the new location instead of the default.

Here are some usage examples:

  • Basic security update
gentoo-update
  • Full system update with extra update parameters
gentoo-update --update-mode full --args "color=y keep-going"
  • Full system update, show elogs and news
gentoo-update --update-mode full --read-logs --read-news
  • Reading last update report (currently only successful update report):
gentoo-update --report
  • Send the last update report via IRC bot
export IRC_CHANNEL="#<irc_channel_name>"
export IRC_BOT_NICKNAME="<bot_name>"
export IRC_BOT_PASSWORD="<bot_password>"
gentoo-update --send-report irc

The detailed explanation of command flags can be found in --help.
Information on testing can be found in tests directory readme

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

gentoo-update-0.1.15.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gentoo_update-0.1.15-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file gentoo-update-0.1.15.tar.gz.

File metadata

  • Download URL: gentoo-update-0.1.15.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for gentoo-update-0.1.15.tar.gz
Algorithm Hash digest
SHA256 c8e577a4fa36d6c813f34d19ae46425f6cb0a3ee61cec542cf4d61e49e87a6a7
MD5 cc3c35ad1a247f95b2be4ab9b4180dd1
BLAKE2b-256 05f1c17f45e26aa053eacc6d77a8393fe3ee37b00fcc4de6978aa9a7df999d46

See more details on using hashes here.

File details

Details for the file gentoo_update-0.1.15-py3-none-any.whl.

File metadata

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

File hashes

Hashes for gentoo_update-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 26b0796a0989eaf5d2231394dcfae8cfc1a6c773f0791910c7eeec614883f227
MD5 63c2ba1520a5fb861571b5ed3b4cde6c
BLAKE2b-256 35671416918263a05800294d9b14bf334ecfe68c430a131d26910d8603a52d72

See more details on using hashes here.

Supported by

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