From e9a447da4de30e1568cde6f0df9ce268488cc8fa Mon Sep 17 00:00:00 2001 From: Mistercoolertyper <84140706+Mistercoolertyper@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:38:13 +0100 Subject: [PATCH] preseed: bring the readable vdi-post.sh copy back in line with what runs 15d6518 rewrote the late_command payload (inline pkcon sequence -> delegation to /usr/local/sbin/vdi-offline-update, plus enabling vdi-offline-update.timer) but left the readable comment copy of the same script ~100 lines above it unchanged. The two are meant to be the same script, so anyone reading preseed.cfg to learn what a Debian install does was reading something that no longer matched the payload. Caught by 8cc5's validator, which compares them byte-for-byte. No behaviour change: the runtime payload was already correct. Also fixes a stale comment - packagekit-tools was described as being used by /root/auto_update.sh, which now delegates; the helper is what calls pkcon, and packagekit-tools is still required for it. Verified independently by running the reassembled late_command against a fake /target: the generated script is 70 lines, parses, delegates, contains no inline pkcon sequence, enables the timer, and is byte-identical to the comment copy. Also tightens the README's claim about other updaters: unattended-upgrades is absent, and apt.systemd.daily gates every install step on 'command -v unattended-upgrade', so apt-daily-upgrade only refreshes the index. Checked rather than asserted. --- README.md | 11 +++++++++-- debian/preseed.cfg | 22 ++++++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6780d00..af824e8 100644 --- a/README.md +++ b/README.md @@ -229,8 +229,15 @@ updates from the first boot. Debian's usual answer for automatic updates is `unattended-upgrades`, and it is the wrong instrument here: it *installs* security updates silently while the user is working, which is the thing the offline-update flow exists to avoid, and it -does not give a desktop user a no-password update button. It is left uninstalled. -`pkgsel/update-policy` is set to `none` in the preseed for the same reason. +does not give a desktop user a no-password update button. It is left uninstalled, +and `pkgsel/update-policy` is `none` in the preseed so the installer does not pull +it in. + +Debian still ships `apt-daily.timer` and `apt-daily-upgrade.timer`, which run +regardless. They are not a second updater in practice: `/usr/lib/apt/apt.systemd.daily` +gates every install step on `command -v unattended-upgrade`, so with that package +absent the timer refreshes the package index and stops. Verified on trixie - the +only effect is a cache refresh, not a silent upgrade. ## Building an install ISO diff --git a/debian/preseed.cfg b/debian/preseed.cfg index 587345b..5f90182 100644 --- a/debian/preseed.cfg +++ b/debian/preseed.cfg @@ -315,7 +315,10 @@ tasksel tasksel/first multiselect standard, kde-desktop # succeed with a warning and leave VDI-ADMIN unable to sudo. # cron - the kickstart appends to /etc/crontab and restarts crond; # Debian does not install cron by default. -# packagekit-tools - provides pkcon, used by /root/auto_update.sh. +# packagekit-tools - provides pkcon. /root/auto_update.sh no longer calls pkcon +# directly (it delegates to /usr/local/sbin/vdi-offline-update); +# that helper, which update_local_repo.py installs, is what +# runs pkcon refresh/update and the offline prepare/trigger. # iputils-ping - the @reboot cron line waits on `ping google.com`. d-i pkgsel/include string git python3 python3-tqdm python3-venv firefox-esr apt-utils cron sudo ca-certificates wget iputils-ping packagekit-tools systemd d-i pkgsel/run_tasksel boolean true @@ -410,13 +413,12 @@ d-i cdrom-detect/eject boolean false # apt-get install -y teamviewer || echo "teamviewer install failed" # cat > /root/auto_update.sh </dev/null 2>&1; then -# pkcon offline-trigger -# fi -# " +# # Delegates to the single offline-update implementation, which +# # update_local_repo.py installs and vdi-offline-update.timer also runs every 6h. +# if [ -x /usr/local/sbin/vdi-offline-update ]; then +# exec /usr/local/sbin/vdi-offline-update +# fi +# echo "auto_update.sh: vdi-offline-update not installed yet" # EOF # chmod +x /root/auto_update.sh # cat > /etc/systemd/system/disable-sleep.service </dev/null 2>&1; do sleep 1; done;\" && cd /root/ && ./auto_update.sh >> /var/log/update_local_repo.log 2>&1" >> /etc/crontab # systemctl enable disable-sleep.service || echo "enable disable-sleep failed" # systemctl enable cron || echo "enable cron failed" +# # The offline-update timer is normally enabled by update_local_repo.py, but that +# # only runs on the 10-minute cron. Enabling it here too means a fresh install +# # gets offline updates from the first boot, not ten minutes in. +# systemctl enable vdi-offline-update.timer 2>/dev/null || true # echo "VDI post-install complete" # ---8<--- end /root/vdi-post.sh ---8<--- #