Package: gentoo-update
Gentoo Updatergentoo-updateis a tool that automates updates on Gentoo Linux.
By default it only installs security updates fromGLSA,
but it can also be used to update all packages on the system, i.e.@world.This projectoriginatesfrom 2023 Google Summer of Code, more about it can be found in theblog postandGentoo Forums.gentoo-updatehas 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 ormobile app.Feature Listupdaterupdate security patches from GLSA by default, and optionally update@worldinsert additional flags to@worldupdatedo not start the update if available disk space is lower than a certain thresholdestimate update timeshow package list before the updateparsershow update status (success/failure) in the reportshow package info after successful update: ebuilds, blocks, uninstalls etc.detect different errors during an updateblocked packagesUSE flag conflictsissues with Licensesnetwork issues during an updateOOM during an updateshow disk usage before/after an updatenotifiersend update report via IRC botsend update report via email using SendGridsend update report via email using local relaysend update report via mobile appsend a short report with only the update status instead of a full reportgeneralCLI: add option to choose from which log file to generate a reportCLI: add emoji to console output like in k3sexport report in machine readible output (JSON, YAML, TOML)comprehensive set of unit tests (test coverage > 50%)Installationgentoo-updateis inGURUoverlay, and can be installed usingemerge. First, enable the overlay:emerge--askapp-eselect/eselect-repository
eselectrepositoryenableguru
emerge--syncAll packages in GURU overlay need an~archkeyword.
For example, on amd64 architecture add it using:echo'app-admin/gentoo_update ~amd64'>/etc/portage/package.accept_keywords/gentoo_updateand then install it:emerge--askapp-admin/gentoo_updateAlternatively, it can be installed with pip in a virtual environment:python-mvenvgentoo_updatesourcegentoo_update/bin/activate
python-mpipinstallgentoo_updateUsageThe updater creates a subdirectory in Portage's defaultPORTAGE_LOGDIRlocated at/var/log/portage/gentoo-update.
However, if this variable is set to a different value inmake.conf, it will use the new location instead of the default.Here are some usage examples:Basic security updategentoo-updateupdateFull system update with extra update parametersgentoo-updateupdate-mfull-a"--color=y --keep-going --exclude=glibc"Full system update, show elogs and newsgentoo-updateupdate-mfull-l-nRead last update report:gentoo-updatereportShow the last 3 logs filenames, and generate a report for one of it:# gentoo-update report -o 3Thelast3logfilefilenames
log_2023-09-23-09-19
log_2023-10-02-20-19
log_2023-10-07-13-14# gentoo-update report -r log_2023-10-02-20-19==========>GentooUpdateReport<==========updatestatus:SUCCESS
......Send the last update report to an IRC channel:exportIRC_CHANNEL="#<irc_channel_name>"exportIRC_BOT_NICKNAME="<bot_name>"exportIRC_BOT_PASSWORD="<bot_password>"gentoo-updatereport-sircSend the last update report via email:# install Sengrid library# need to unmask these packages: dev-python/sendgrid, dev-python/python-http-client, dev-python/starkbank-ecdsaemerge--askdev-python/sendgrid# export token and other info via env variablesexportSENDGRID_TO='<to_address>'exportSENDGRID_FROM='<from_address>'exportSENDGRID_API_KEY='<api_key>'# send the latest report, or a specific onegentoo-updatereport-semail
gentoo-updatereport-r<log_name>-semailHelpThe detailed explanation of command flags can be found in CLI's help message:gentoo-update--helpInformation on testing can be found in tests directoryreadme.To get help or request additional features feel free to create an issue in this GitHub repo.
Or just contact me directly via email atlabbrat_social@pm.meor on IRC.
I am also in most of the #gentoo IRC groups and my nick there is #LabBrat.