brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: unattended-upgrades updates a third party repository with Origins-Pattern

Unattended-Upgrades
~/tips/tip-unattended-upgrades-third-party-repo

apt-cache policy

Include packages from an extra repository in your automatic updates.

Out of the box only the Ubuntu security sources are updated automatically. Software from an extra repository stays where it is until you upgrade it yourself.

Find out how the repository labels itself:

apt-cache policy

Look at the release line under the repository. The o= field is the origin and a= is the archive. Then add a pattern in your local config:

# /etc/apt/apt.conf.d/52unattended-upgrades-local
Unattended-Upgrade::Origins-Pattern {
    "origin=Docker";
};

Replace Docker with whatever your o= field says. You can combine keywords on one line, separated by commas, and every keyword on that line has to match. This adds to the sources that are already allowed.

sudo unattended-upgrade --dry-run --debug

The debug run prints the allowed origins, so you can see your line was picked up.

I would be choosy here. Distribution security updates are built to be low risk, while a third party repository often ships new features straight into the same channel. A major version arriving at six in the morning can break a service. For anything with a database or a config format that changes, I prefer to upgrade by hand.

Further reading: unattended-upgrades README, unattended-upgrades Debian config

More Unattended-Upgrades tips sudo nano /etc/apt/apt.conf.d/52unattended-upgrades-local cat /etc/apt/apt.conf.d/20auto-upgrades Unattended-Upgrade::Mail "[email protected]"; sudo systemctl edit apt-daily-upgrade.timer Unattended-Upgrade::Automatic-Reboot "true"; All Unattended-Upgrades tips (7) All topics

Link