← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 2003977] Re: Disabling apt spam results in a conffile prompt on upgrade

 

This bug was fixed in the package ubuntu-advantage-tools -
27.13.2~22.04.1

---------------
ubuntu-advantage-tools (27.13.2~22.04.1) jammy; urgency=medium

  * Backport new upstream release: (LP: #2003977) to jammy

ubuntu-advantage-tools (27.13.2~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.{postinst,postrm,preinst}:
    - avoid a dpkg conf prompt if the only change to the original config file
      was to the apt_news flag (LP: #2003977)
  * apt-hook:
    - only run the pro client pre-update hook services when the apt update is
      executed as root user (LP: #2004057)

 -- Renan Rodrigo <renanrodrigo@xxxxxxxxxxxxx>  Fri, 27 Jan 2023
20:14:10 -0300

** Changed in: ubuntu-advantage-tools (Ubuntu Jammy)
       Status: Fix Committed => Fix Released

** Changed in: ubuntu-advantage-tools (Ubuntu Focal)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/2003977

Title:
  Disabling apt spam results in a conffile prompt on upgrade

Status in ubuntu-advantage-tools package in Ubuntu:
  Triaged
Status in ubuntu-advantage-tools source package in Xenial:
  Fix Released
Status in ubuntu-advantage-tools source package in Bionic:
  Fix Released
Status in ubuntu-advantage-tools source package in Focal:
  Fix Released
Status in ubuntu-advantage-tools source package in Jammy:
  Fix Released
Status in ubuntu-advantage-tools source package in Kinetic:
  Fix Released
Status in ubuntu-advantage-tools source package in Lunar:
  Triaged

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-advantage-tools > 27.11 and < 27.13

  After every scenario below, ensure that:

  1. /etc/ubuntu-advantage/uaclient.conf.preinst-remove is not present

  2. /var/lib/ubuntu-advantage/preinst-detected-apt-news-disabled is not
  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-advantage-tools MUST have an update to those checksums to take into consideration the scenario where people already refused the prompt triggered by the current version.
  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_previous_conffile function will need updating to
  > 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-advantage-tools started polluting apt output: https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1992026.  Executing `pro config set apt_news=false` is given as the way of disabling this unnecessary output.

  On upgrading to the most recent version of ubuntu-advantage-tools in
  focal, having executed this command results in a conffile prompt:

  --- /etc/ubuntu-advantage/uaclient.conf 2022-11-28 16:15:17.609674342 +0000                                                                                          [0/1857]
  +++ /etc/ubuntu-advantage/uaclient.conf.dpkg-new        2023-01-23 15:28:43.000000000 +0000
  @@ -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://contracts.canonical.com
  -daemon_log_file: /var/log/ubuntu-advantage-daemon.log
   data_dir: /var/lib/ubuntu-advantage
   log_file: /var/log/ubuntu-advantage.log
   log_level: debug
   security_url: https://ubuntu.com/security
   timer_log_file: /var/log/ubuntu-advantage-timer.log
  +daemon_log_file: /var/log/ubuntu-advantage-daemon.log
   ua_config:
     apt_http_proxy: null
     apt_https_proxy: null
  -  apt_news: false
  -  global_apt_http_proxy: null
  -  global_apt_https_proxy: null
     http_proxy: null
     https_proxy: null
  -  metering_timer: 14400
  -  ua_apt_http_proxy: null
  -  ua_apt_https_proxy: null
     update_messaging_timer: 21600
  -  update_status_timer: 43200
  +  metering_timer: 14400

  Please stop wasting Ubuntu users' time: either disable this output by
  default, or make ubuntu-advantage-tools a Recommends of the seed(s)
  which include it (so users can remove it entirely and not have to
  worry about any future disruption caused by "product interest").

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2003977/+subscriptions