update-notifier should not alert users about esm-apps in a ESM machine
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-notifier (Ubuntu) |
Fix Released
|
Undecided
|
Lucas Albuquerque Medeiros de Moura | ||
Xenial |
Fix Released
|
Undecided
|
Lucas Albuquerque Medeiros de Moura | ||
Bionic |
Fix Released
|
Undecided
|
Lucas Albuquerque Medeiros de Moura | ||
Focal |
Fix Released
|
Undecided
|
Lucas Albuquerque Medeiros de Moura | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
When users are running an ESM distro and looking at the MOTD they may be surprised by an alert generated by update-notifier that both esm-infra and esm-apps could be enabled in the machine to receive future updates. However, esm-apps will not bring much to an ESM distro. This means that users will be receiving alerts about esm-apps unnecessarily.
[Test case]
To reproduce the issue:
1. Launch a xenial container
2. Create the file /etc/ubuntu-
# Ubuntu-Advantage client config file.
contract_url: 'https:/
security_url: 'https:/
data_dir: /var/lib/
log_level: debug
log_file: /var/log/
features:
allow_beta: true
3. Install ubuntu-
https:/
PS: Make sure to not allow the installation to override the config file you have just created.
4. Update the version of update-notifier to the one in proposed
5. Run `/usr/lib/
6. Verify that both esm-infra and esm-apps alerts appear at the end of the message
To verify that the error is fixed:
1. Run the past scenario until step 3
2. Install the new update-notifier from this ppa:
https:/
3. Run `/usr/lib/
4. Verify that only esm-infra is now showing an alert message at the end
[Where problems could occur]
We are changing some aspects of the package that could generate problems:
1) We are changing the condition for when to output esm-apps alerts. If that condition is not right, we may miss displaying the messages to users that need them.
2) We are adding a new dependency to the package, lsb-release. But since the package was already relying on that dependency, we are just fixing a packaging mistake here.
3) Instead of relying on `lsb_release` for distro-info, we are now getting that info directly from `/etc/os-release`. Since is an attempt to not rely on subprocess python calls on that script. However, since we are adding more python code, logic errors can not happen because of that new chunk of code.
4) Since we are touching translatable message, translation errors can happen because of the modifications we are providing here.
5) We are now adding a ESM Apps headers for the case where users now have
esm-apps source files in the system. If our logic is incorrect, we could be displaying that info on situations that are not needed.
However, we believe that all of the risks mentioned above are manageable and should not block the changes we are bringing to the package.
[Discussion]
When running /usr/lib/
-------
Enable UA Apps: ESM to receive additional future security updates.
See https:/
Enable UA Infra: ESM to receive additional future security updates.
See https:/
-------
This is not ideal, since ESM machines will not gain much from esm-apps.
Also, this messaging may hide the importance of using esm-infra on ESM
machines, since the users will not know beforehand which service to
prioritize.
Furthermore, we are also bringing back the message:
0 updates can be applied immediately
When the system has no packages to install. This is because users found that omission confusing, since they thought that maybe something went wrong with motd if display no messages when the system is up to date.
Additionally, we are adding an esm-apps header to the `apt-check` message if the system is a LTS one with esm-apps source files on it. The header should behave exactly like the one we have for esm-infra:
UA Apps: Extended Security Maintenance (ESM) is (enabled|disabled).
We doing this to be consistent with the message we have on ESM distros
Finally, we are no longer relying on `lsb_release` on `apt-check` to get distro info, like name and version. We are parsing `/etc/os-release` for that now. The rationale for this change is some errors we have saw regarding the use of `subprocess.
== Changelog ==
* debian/control: add lsb-release to the update-
* data/apt_check.py
- Only show esm-apps alerts on lts and non-esm distros (LP: #1926990)
- Update esm-infra alert for distros on ESM mode
- Show message with number of upgradable packages even if that
number is zero (LP: #1926819)
- Get distro name and version directly from /etc/os-release
- Show esm-apps status header when running on LTS distro that
has not yet entered Extended Security Maintenance
Related branches
- git-ubuntu import: Pending requested
-
Diff: 29251 lines (+12561/-0) (has conflicts)173 files modified.bzr-builddeb/default.conf (+5/-0)
.bzrignore (+31/-0)
autogen.sh (+17/-0)
config.h.in (+3/-0)
configure.ac (+11/-0)
data/Makefile.am (+11/-0)
data/apt_check.py (+46/-0)
data/backend_helper.py (+6/-0)
data/com.ubuntu.update-notifier.gschema.xml.in (+4/-0)
data/notify-reboot-required (+3/-0)
data/package-data-downloader (+6/-0)
data/update-motd-fsck-at-reboot (+7/-0)
data/update-motd-hwe-eol (+14/-0)
data/update-motd-updates-available (+3/-0)
debian/90-updates-available (+3/-0)
debian/95-hwe-eol (+3/-0)
debian/changelog (+128/-0)
debian/compat (+4/-0)
debian/control (+28/-0)
debian/rules (+7/-0)
debian/systemd/unicast-local-avahi.override (+1/-0)
debian/systemd/unicast-local-avahi.path (+6/-0)
debian/systemd/unicast-local-avahi.service (+6/-0)
debian/systemd/update-notifier-crash.path (+3/-0)
debian/systemd/update-notifier-crash.service (+6/-0)
debian/tests/control (+4/-0)
debian/unicast-local-avahi.conf (+14/-0)
debian/update-notifier-common.cron.daily (+8/-0)
debian/update-notifier-common.cron.weekly (+15/-0)
debian/update-notifier-common.install (+6/-0)
debian/update-notifier-common.postinst (+7/-0)
debian/update-notifier-common.postrm (+8/-0)
debian/update-notifier-common.preinst (+8/-0)
debian/update-notifier-common.triggers (+4/-0)
debian/update-notifier-crash (+3/-0)
debian/update-notifier.install (+21/-0)
debian/update-notifier.links (+4/-0)
pixmaps/scalable/livepatch-on.svg (+1/-0)
pixmaps/scalable/livepatch-warning.svg (+1/-0)
po/POTFILES.in (+10/-0)
po/ace.po (+93/-0)
po/af.po (+103/-0)
po/am.po (+97/-0)
po/an.po (+100/-0)
po/ar.po (+106/-0)
po/ast.po (+102/-0)
po/az.po (+96/-0)
po/be.po (+103/-0)
po/bem.po (+93/-0)
po/bg.po (+102/-0)
po/bn.po (+102/-0)
po/bo.po (+93/-0)
po/br.po (+102/-0)
po/bs.po (+103/-0)
po/ca.po (+103/-0)
po/ca@valencia.po (+103/-0)
po/ckb.po (+96/-0)
po/crh.po (+103/-0)
po/cs.po (+103/-0)
po/csb.po (+104/-0)
po/cv.po (+93/-0)
po/cy.po (+105/-0)
po/da.po (+103/-0)
po/de.po (+103/-0)
po/de_DE.po (+93/-0)
po/dv.po (+93/-0)
po/el.po (+102/-0)
po/en.po (+93/-0)
po/en_AU.po (+103/-0)
po/en_CA.po (+103/-0)
po/en_GB.po (+103/-0)
po/eo.po (+102/-0)
po/es.po (+102/-0)
po/et.po (+102/-0)
po/eu.po (+103/-0)
po/fa.po (+101/-0)
po/fa_AF.po (+93/-0)
po/fi.po (+103/-0)
po/fil.po (+97/-0)
po/fo.po (+102/-0)
po/fr.po (+103/-0)
po/fr_CA.po (+93/-0)
po/fur.po (+98/-0)
po/fy.po (+102/-0)
po/ga.po (+98/-0)
po/gd.po (+105/-0)
po/gl.po (+103/-0)
po/gu.po (+97/-0)
po/he.po (+102/-0)
po/hi.po (+102/-0)
po/hr.po (+104/-0)
po/hu.po (+103/-0)
po/hy.po (+93/-0)
po/id.po (+102/-0)
po/is.po (+102/-0)
po/it.po (+103/-0)
po/ja.po (+101/-0)
po/jv.po (+93/-0)
po/ka.po (+101/-0)
po/kk.po (+101/-0)
po/km.po (+101/-0)
po/kn.po (+93/-0)
po/ko.po (+101/-0)
po/ku.po (+100/-0)
po/ky.po (+93/-0)
po/lo.po (+93/-0)
po/lt.po (+103/-0)
po/lv.po (+103/-0)
po/mhr.po (+93/-0)
po/mi.po (+93/-0)
po/mk.po (+99/-0)
po/ml.po (+97/-0)
po/mn.po (+102/-0)
po/mr.po (+97/-0)
po/ms.po (+103/-0)
po/mt.po (+93/-0)
po/my.po (+96/-0)
po/nb.po (+103/-0)
po/nds.po (+102/-0)
po/ne.po (+97/-0)
po/nl.po (+103/-0)
po/nn.po (+103/-0)
po/oc.po (+103/-0)
po/pa.po (+100/-0)
po/pl.po (+104/-0)
po/ps.po (+93/-0)
po/pt.po (+103/-0)
po/pt_BR.po (+103/-0)
po/pt_PT.po (+93/-0)
po/qu.po (+93/-0)
po/ro.po (+104/-0)
po/ru.po (+103/-0)
po/sco.po (+93/-0)
po/sd.po (+93/-0)
po/se.po (+93/-0)
po/shn.po (+93/-0)
po/si.po (+100/-0)
po/sk.po (+103/-0)
po/sl.po (+105/-0)
po/sq.po (+103/-0)
po/sr.po (+103/-0)
po/st.po (+93/-0)
po/sv.po (+103/-0)
po/ta.po (+97/-0)
po/te.po (+102/-0)
po/tg.po (+103/-0)
po/th.po (+101/-0)
po/tl.po (+99/-0)
po/tr.po (+102/-0)
po/ug.po (+101/-0)
po/uk.po (+103/-0)
po/ur.po (+93/-0)
po/uz.po (+99/-0)
po/vi.po (+101/-0)
po/xh.po (+93/-0)
po/zh_CN.po (+101/-0)
po/zh_HK.po (+101/-0)
po/zh_TW.po (+101/-0)
src/Makefile.am (+23/-0)
src/avahi.c (+47/-0)
src/avahi.h (+3/-0)
src/crash.c (+13/-0)
src/hooks.c (+6/-0)
src/livepatch-tray.c (+16/-0)
src/livepatch-utils.c (+4/-0)
src/livepatch-utils.h (+9/-0)
src/system-crash.c (+8/-0)
src/update-notifier.c (+43/-0)
src/update-notifier.h (+16/-0)
src/update.c (+8/-0)
tests/pyflakes.exclude (+4/-0)
tests/test_motd.py (+88/-0)
tests/test_pep8.py (+39/-0)
description: | updated |
summary: |
- update-notifier should not alert users about esm-infra in a ESM machine + update-notifier should not alert users about esm-apps in a ESM machine |
Changed in update-notifier (Ubuntu): | |
assignee: | nobody → Lucas Albuquerque Medeiros de Moura (lamoura) |
description: | updated |
description: | updated |
description: | updated |
Changed in update-notifier (Ubuntu Xenial): | |
assignee: | nobody → Lucas Albuquerque Medeiros de Moura (lamoura) |
Changed in update-notifier (Ubuntu Bionic): | |
assignee: | nobody → Lucas Albuquerque Medeiros de Moura (lamoura) |
Changed in update-notifier (Ubuntu Focal): | |
assignee: | nobody → Lucas Albuquerque Medeiros de Moura (lamoura) |
This bug was fixed in the package update-notifier - 3.192.44
---------------
update-notifier (3.192.44) impish; urgency=medium
[ Lucas Moura ]
* data/apt_check.py
- Show esm-apps status header when running on LTS distro that
has not yet entered Extended Security Maintenance
-- Brian Murray <email address hidden> Thu, 13 May 2021 14:47:01 -0700