Disabling apt spam results in a conffile prompt on upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Critical
|
Unassigned |
Bug Description
[Impact]
Users who have disabled apt-news will get prompted regarding their uaclient configuration file, even if they didn't touch the file for anything else.
Given this command may be executed by people who are not even aware of the internals of the configuration and how it was implemented, this prompt is undesired.
[Test Case]
Run a ubuntu machine with ubuntu-
After every scenario below, ensure that:
1. /etc/ubuntu-
2. /var/lib/
present
Scenarios:
A: perform the upgrade. There should be no conffile prompt. apt_news
should be enabled. The conffile should be on the new package default.
B: pro config set apt_news=false, then perform the upgrade. There should
be no conffile prompt. apt_news should remain disabled.
C: pro config set apt_news=false then pro config set apt_news=true
again. Then perform the upgrade. There should be no conffile prompt.
apt_news should remain enabled. The conffile should be on the new
package default.
D: make an unrelated change to the conffile (eg. add a comment). Perform
the upgrade. There should be a conffile prompt.
E (error unwind check): pro config set apt_news=false. Note the md5 of
the conffile. Arrange for the preinst to fail *at the end* (I hacked it
to exit 1). Perform the upgrade. The conffile hash should not have
changed.
[Regression Potential]
If the fix with the checksums is flawed, then users will still see the prompt for no reason. There is little to no regression potential - the worse that can happen is that the regression already introduced is still present. Even in this case, the tests show us that the expected majority of use cases is covered, and there is no clear sign of corner cases.
[Discussion]
The next release of ubuntu-
The team will make sure to not change anything else in this conffile in future releases until this issue is completely sorted out and tested.
comment from racb in the txt below:
> the restore_
> restore the correct version of the conffile based on the previous
> version supplied by dpkg in $2. It will work fine right now but not on
> the subsequent upload. At that point, both previous conffile versions
> will need to remain indefinitely, since users might upgrade from any
> previous version we shipped.
[Original Description]
Due to "product interest", ubuntu-
On upgrading to the most recent version of ubuntu-
--- /etc/ubuntu-
+++ /etc/ubuntu-
@@ -1,24 +1,18 @@
-# Ubuntu Pro client config file.
+# Ubuntu Pro Client config file.
# If you modify this file, run "pro refresh config" to ensure changes are
-# picked up by Ubuntu Pro client.
+# picked up by Ubuntu Pro Client.
contract_url: https:/
-daemon_log_file: /var/log/
data_dir: /var/lib/
log_file: /var/log/
log_level: debug
security_url: https:/
timer_log_file: /var/log/
+daemon_log_file: /var/log/
ua_config:
apt_http_proxy: null
apt_https_proxy: null
- apt_news: false
- global_
- global_
http_proxy: null
https_proxy: null
- metering_timer: 14400
- ua_apt_http_proxy: null
- ua_apt_https_proxy: null
update_
- update_
+ metering_timer: 14400
Please stop wasting Ubuntu users' time: either disable this output by default, or make ubuntu-
Related branches
- Andreas Hasenack: Approve
-
Diff: 396 lines (+179/-22)14 files modifiedapt-hook/20apt-esm-hook.conf (+1/-1)
debian/changelog (+11/-0)
debian/ubuntu-advantage-tools.postinst (+17/-0)
debian/ubuntu-advantage-tools.postrm (+9/-0)
debian/ubuntu-advantage-tools.preinst (+54/-0)
features/attached_enable.feature (+0/-1)
features/fix.feature (+5/-5)
features/steps/machines.py (+2/-1)
features/steps/output.py (+10/-10)
features/ubuntu_pro.feature (+1/-1)
features/ubuntu_upgrade_unattached.feature (+2/-2)
sru/release-27.13.2/python-apt-snippet.py (+5/-0)
sru/release-27.13.2/test-apt-hook-nonroot.sh (+61/-0)
uaclient/version.py (+1/-1)
description: | updated |
description: | updated |
description: | updated |
description: | updated |
It's worth noting: I, and any other users who have followed the advice of ubuntu- advantage- tools' own messaging, will now have to deal with this conffile prompt every time uaclient.conf changes.