#1008682 Security: updates & upgrades too delayed

#1008682#5
Date:
2022-03-30 15:47:38 UTC
From:
To:
Dear Maintainer,

Unattended-upgrade installs security upgrades with too much (random) delay, more
than 24h after DSA and mirror availability.
On a pool of about twenty debian 11 VM, the majority ends with 2 day of lagg on published DSA.

I expect things like in pre-systemd debian : all upgrades applied before
the start of the current working day.

I believe it's mostly an apt problem with /usr/lib/apt/apt.systemd.daily.
I've reported this as #1008679 on src:apt.

I create a BR against unattended-upgrades because it set in /etc/apt/apt.conf.d/20auto-upgrades :
APT::Periodic::Update-Package-Lists "1";

Witch is mostly bad with the default (apt) /lib/systemd/system/apt-daily.timer :
OnCalendar=*-*-* 6,18:00 (twice a day)

"1" random skip apt update for 36h in worst cases I believe. Extra delay
is added with apt-daily-upgrade.timer.

APT::Periodic::Update-Package-Lists "always"; may be an other value to consider (or not).

Code using APT::Periodic::Update-Package-Lists is currently very complicated. (in debian 11 at least).

/etc/apt/apt.conf.d/20auto-upgrades does not provide comments for helping admins about tuning that.
Be cautious: the comment in /usr/lib/apt/apt.systemd.daily about Update-Package-Lists
seems wrong and misleading for me.

I have detailed everything I can in #1008679.

Cheers,
Ludovic Pouzenc