← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 2015420] Re: motd: can't disable esm-related messages

 

This bug was fixed in the package update-notifier - 3.192.67

---------------
update-notifier (3.192.67) noble; urgency=medium

  * apt-check: add option to hide ESM messages from the human readable output.
    (LP: #2015420)

 -- Renan Rodrigo Barbosa <renanrodrigo@xxxxxxxxxxxxx>  Wed, 31 Jan 2024
11:40:02 -0300

** Changed in: update-notifier (Ubuntu)
       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/2015420

Title:
  motd: can't disable esm-related messages

Status in update-notifier package in Ubuntu:
  Fix Released
Status in update-notifier source package in Xenial:
  In Progress
Status in update-notifier source package in Bionic:
  In Progress
Status in update-notifier source package in Focal:
  In Progress
Status in update-notifier source package in Jammy:
  In Progress

Bug description:
  [ Impact ]

  If ESM Infra/Apps is available for a system, users will always see
  messages related to those Ubuntu Pro services in their MOTDs. As
  stated in the original description, there have been complains on how
  hard it is to disable those messages - we have users who don't want
  Pro and don't want to be reminded of Pro all the time.

  The fix here is making it easier for people to disable the ESM related
  messages in the update-related MOTD, by giving them a way to opt-out.
  Users will have the option to add the --no-esm-messages flag to
  /etc/apt/apt.conf.d/99update-notifier, where the message generation
  script is executed as a hook.

  [ Test Plan ]

  Compare the messages before and after installing the new version of the package, and make sure they are exactly the same in different scenarios:
  - ESM status: unavailable, disabled, enabled
  - LTS system: yes or no
  - updates available: yes or no

  Thankfully, the unit test suite in tests/test_motd.py covers all of
  those scenarios functionality-wise. Manual checks on real systems may
  endorse the functionality.

  New tests were added to the suite making sure the flag hides the ESM
  related messages when it is present.

  On real systems, adding --no-esm-messages to the conf script and
  making sure it updates the MOTDs should remove ESM related messages
  for the same scenarios above.

  
  [ Where problems could occur ]

  - Other software may be relying on the apt-check script to generate
  human-readable messages. A mistake here could intefere with the
  message generated, changing expectation on stable releases, or causing
  errors. To mitigate that, the new flag is set to False as default, and
  all existing functionality is preserved.

  - Users may make mistakes when writing the new flag in the
  /etc/apt/apt.conf.d/99update-notifier configuration file. We will
  mitigate that by having comprehensible documentation with a clear
  explanation of what the flag does and where to put it.

  - If the user makes the mistake even following the documented steps,
  then it is out of our control. The impact of breaking the
  configuration file is that There will be no MOTD related to updates at
  all (as errors are redirected to /dev/null), or the errors themselves
  will appear in the apt update screen, or in the MOTD, if the user
  messes up the redirection.

  [ Other Info ]
   
  As opposed to what was in the original description, the proposed changeset does not separate esm messages from the regular updates messages - this ensures current users and potential callers get exactly the same result when checking their outputs after the change lands.

  As suggested in the original description, we understand that it is not
  easy and straightforward to add a flag to a script when compared to
  running a command or clicking a button. However, the messages are
  there for a product decision, and it is a product decision not to have
  a "too easy opt-out". On the other hand, users who want to disable
  this are capable of editing the file, and it will be way easier for
  them than making the changes in the python script itself - plus the
  configuration is kept between upgrades.

  If the default configuration file shipped by update-notifier changes
  in the future, the user may see a debconf prompt when upgrading the
  package - that is expected, as the user has made changes to a config
  file for a reason and needs to decide on keeping those or not.

  [ Original Description ]

  See https://github.com/canonical/ubuntu-pro-client/issues/2458 for the
  origin of the conversation.

  We don't think it needs to be _easy_, but it should probably be less
  burdensome to disable ESM update notifications in MOTD without
  disabling all update notifications in MOTD.

  One idea to accomplish this is to separate the /etc/update-motd.d/
  files into two. One would print the normal update message, and the
  other would print the ESM message. Then, if an admin knows what
  they're doing and is willing to accept the risk, they can remove or
  edit the ESM update-notifier motd conffile. This is similar to how you
  can remove the APT ESM messages by removing/editing
  /etc/apt/apt.conf.d/20apt-esm-hook.conf if you know what you're doing.

  This would also require some changes to how the messages are created,
  since currently it is all in apt_check.py and printed into a single
  message file. They'll need to be separated somehow.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/2015420/+subscriptions