Documentation - lbr38/linupdate GitHub Wiki
linupdate 3
is regulary tested and should run fine on following systems (python3 required):
- Debian 11, 12 and derivatives (Ubuntu, Mint, ...)
- CentOS 8, 9 and derivatives (Rocky, Alma, ...)
Older OS can still run linupdate 2.x.x
(bash version) but will not be supported anymore:
- Debian 10
- CentOS 7
Login as root
or use sudo
to proceed installation.
DEB and RPM packages are hosted on my personal repository.
Install linupdate 3.x
Add linupdate repository key:
curl -sS https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/packages.repomanager.net.gpg
Add linupdate repository:
Debian 12 (Bookworm)
echo "deb https://packages.repomanager.net/repo/linupdate3/bookworm/main_prod bookworm main" > /etc/apt/sources.list.d/linupdate.list
Debian 11 (Bullseye)
echo "deb https://packages.repomanager.net/repo/linupdate3/bullseye/main_prod bullseye main" > /etc/apt/sources.list.d/linupdate.list
Ubuntu 24.04 (Noble)
echo "deb https://packages.repomanager.net/repo/linupdate3/noble/main_prod noble main" > /etc/apt/sources.list.d/linupdate.list
Ubuntu 22.04 (Jammy)
echo "deb https://packages.repomanager.net/repo/linupdate3/jammy/main_prod jammy main" > /etc/apt/sources.list.d/linupdate.list
Install:
apt update && apt install linupdate
Important: Be sure to have EPEL repository enabled (Fedora EPEL, CentOS EPEL, Oracle EPEL or whatever...) as it provides the necessary python3 packages.
Add linupdate repository:
RHEL 8 and derivatives (CentOS, Alma, Rocky ...)
echo -e "[repomanager-linupdate3-el8_prod]
name=linupdate3-el8 repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/linupdate3-el8_prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo
RHEL 9 and derivatives (CentOS, Alma, Rocky ...)
echo -e "[repomanager-linupdate3-el9_prod]
name=linupdate3-el9 repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/linupdate3-el9_prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo
Install:
dnf install linupdate
Install linupdate 2.x for older OS
Add linupdate repository key:
curl -sS https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/packages.repomanager.net.gpg
Add linupdate repository:
Debian 10 (Buster)
echo "deb https://packages.repomanager.net/repo/linupdate/buster/main_prod buster main" > /etc/apt/sources.list.d/linupdate.list
Install:
apt update && apt install linupdate
Add linupdate repository:
RHEL 7 and derivatives (CentOS)
echo -e "[linupdate]
name=linupdate repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/linupdate_prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo
Install:
yum install linupdate
It will print the current configuration of linupdate and its enabled modules in a YAML format.
linupdate --show-conf
On a basic usage of linupdate, profile and environment are useless, but some modules (e.g. reposerver
) can use profile and environment to provide different configurations.
linupdate --profile
linupdate --profile <PROFILE>
linupdate --env
linupdate --env <ENV>
Mail report is send on every update performed by linupdate. You may have a local mail server running on your system to send mail (e.g. postfix
).
linupdate --mail-enable <true/false>
linupdate --get-mail-recipient
Multiple recipients can be specified by separating them with a comma.
linupdate --mail-recipient <EMAIL>
linupdate --check-updates
linupdate
linupdate --dist-upgrade
The -y
(assume yes) parameter must be specified to avoid any confirmation prompt.
linupdate -y
Notes:
By default, the update will keep current packages configuration files (Dpkg::Options::=--force-confdef
& Dpkg::Options::=--force-confold
)
linupdate --ignore-exclude
- Packages must be separated by a comma.
- You can use
.*
regex to match all packages name starting with specified pattern.
linupdate --exclude httpd,mysql.*,php.*
This will exclude package(s) from being updated only if the available release version update is a major version.
- Packages must be separated by a comma.
- You can use
.*
regex to match all packages name starting with specified pattern.
linupdate --exclude-major httpd,mysql.*,php.*
Notes:
Linupdate consider it's a major update if the first digit of the version is changing. e.g:
- Current version is:
1.8.1
- Available version is:
2.0.0
Services must be separated by a comma. Services will be ignored if they are not installed on the system.
linupdate --restart-service httpd,mysql
By default, linupdate will use one_by_one
method to update packages, meaning that it will update packages one by one (using one dnf or apt command per package). Another global
method is available to update all packages at once (using one dnf or apt command for all packages).
Recommended method: one_by_one
.
linupdate --set-update-method <one_by_one/global>
If set to true
and when update method is one_by_one
, linupdate will immediately exit if an error occurs during package update and do not update the remaining packages
linupdate --exit-on-package-update-error <true/false>
linupdate --mod-list
linupdate --mod-enable <MODULE>
linupdate --mod-disable <MODULE>
linupdate --mod-exec <MODULE> --help
linupdate --mod-exec <MODULE> <MODULE_PARAM>
linupdate agent is a systemd
service that is running in background to execute modules commands on a regular basis.
systemctl status linupdate
If any module is enabled, it will run its agent and execute its commands. E.g. when reposerver
module is enabled:
août 22 10:28:45 host service.py[45881]: [linupdate] Hi, I'm linupdate service. I will start all enabled module agents and let them run in background. Stop me and I will stop all module agents.
août 22 10:28:48 host service.py[45881]: [linupdate] Starting reposerver module agent
août 22 10:28:48 host service.py[45902]: [reposerver-agent] Hi, I'm reposerver module agent
août 22 10:28:50 host service.py[45902]: [reposerver-agent] Periodically sending informations about this host to the repomanager server
août 22 10:28:50 host service.py[45902]: Sending general informations to http://repomanager-dev.localhost:
[...]
Restarting the service will stop all enabled module agents and start them again.
systemctl restart linupdate