Include UnattendedUpgrades

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
aftensleuk
Posts: 21
Joined: Sun Jul 21, 2019 7:27 pm

Include UnattendedUpgrades

Post by aftensleuk » Mon Jul 29, 2019 9:55 am

Hi!

I think it would be a good idea to include UnattendedUpgrades-package into DietPi with an option to configure it in "dietpi-config". Any thoughts?

User avatar
MichaIng
Legend
Posts: 1620
Joined: Sat Nov 18, 2017 5:21 pm

Re: Include UnattendedUpgrades

Post by MichaIng » Sat Aug 10, 2019 7:59 pm

@aftensleuk
The reason we initially masked/disabled them is that those block APT access at random times. So when running install scripts you might run into cryptic APT errors (for end users) simply because some unattended update/upgrade is currently running. Also I find this implementation a bid in-transparent. Only a specific type of upgrades are applied, "security" updates, but not only those from the security repo. And there are other cases where of course newer APT packages include security relevant changes as well, but those are skipped then. So it was never 100% clear to me which upgrades are actually included and which not...

We though about implementing automated APT upgrades ourselves: https://github.com/MichaIng/DietPi/issues/2622
An DietPi update check is done daily. A dietpi.txt and dietpi-update UI setting could allow to run apt update and apt upgrade instead, if no DietPi update has been found.
This would be more lightweight and easier to control, since our update check is a cron job that is stopped on all other maintenance tasks/installs anyway.

But aside all of this, of course one can manually install the unattended-upgrades package and unmask the related services/timers:
for i in apt-daily{,-upgrade}.{service,timer}; do systemctl unmask $i; done
apt install unattended-upgrades

aftensleuk
Posts: 21
Joined: Sun Jul 21, 2019 7:27 pm

Re: Include UnattendedUpgrades

Post by aftensleuk » Wed Aug 14, 2019 4:35 pm

Hey @MichaIng

Thanks for your extensive answer. I’d surely want apt-update && apt-upgrade integrated as an option for dietpi. Automation is king, right?

I do see the problem you’re describing. A couple of days I created my own cron job script which works wonders. Wish I could do it natively in dietpi-config though!

Post Reply