Package: unattended-upgrades
Version: 0.92
Severity: normal
Dear Maintainer,
as far as I can see, changing the setting whether upgrades should
automatically be downloaded and applied does not work with debconf in
noninteractive mode.
The corresponding debconf parameter is
"unattended-upgrades/enable_auto_updates"
By default, it is set to 'true':
root@debian:~# debconf-show unattended-upgrades
unattended-upgrades/enable_auto_updates: true
unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";
The following command changes the value to 'false':
root@debian:~# echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean false" | debconf-set-selections
root@debian:~# debconf-show unattended-upgrades
* unattended-upgrades/enable_auto_updates: false
unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";
However, that new value is not taken into account when running
"dpkg-reconfigure" with the noninteractive frontend:
root@debian:~# dpkg-reconfigure -fnoninteractive unattended-upgrades
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
root@debian:~# debconf-show unattended-upgrades
* unattended-upgrades/enable_auto_updates: true
unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";
I would have expected the value to still be "false" and the automatic
downloading and installing of newer packages disabled in the configuration
file. This is not the case.
This might - among others - break the possibility to configure
unattended-upgrades using systems for automatic deployment that rely on
the noninteractive debconf interface.
The reason seems to be the following section in the config script (which
seems to be related to the following GitHub issue:
https://github.com/mvo5/unattended-upgrades/issues/18):
# Load configuration from disk, if it exists.
if [ -e "$AUTO_UPGRADE" ]; then
if grep -q 'APT::Periodic::Unattended-Upgrade "1";' $AUTO_UPGRADE ; then
db_set unattended-upgrades/enable_auto_updates true
elif grep -q 'APT::Periodic::Unattended-Upgrade "0";' $AUTO_UPGRADE ; then
db_set unattended-upgrades/enable_auto_updates false
fi
fi
Best regards,
Michael
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.5.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages unattended-upgrades depends on:
ii apt 1.2.12
ii apt-utils 1.2.12
ii debconf [debconf-2.0] 1.5.59
ii init-system-helpers 1.33
ii lsb-base 9.20160110
ii lsb-release 9.20160110
ii python3 3.5.1-3
ii python3-apt 1.1.0~beta2
ii ucf 3.0036
ii xz-utils 5.1.1alpha+20120614-2.1
Versions of packages unattended-upgrades recommends:
ii cron [cron-daemon] 3.0pl1-128
Versions of packages unattended-upgrades suggests:
pn bsd-mailx <none>
ii exim4-daemon-light [mail-transport-agent] 4.87-3
-- debconf information:
* unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";
* unattended-upgrades/enable_auto_updates: false