[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-29 Thread Launchpad Bug Tracker
This bug was fixed in the package update-notifier - 3.192.1.10

---
update-notifier (3.192.1.10) bionic; urgency=medium

  * data/apt_check.py:
- Add support to handle packages from ESM Apps in addition to ESM Infra
  and only display alerts if the distro is ESM. (LP: #1924766)
- Do not display a count of ESM packages if the system does not have ESM
  enabled. (LP: #1883315)
- Make distinction between standard security updates and ESM updates
  when performing package counts. (LP: #1926208)
- use 'applied' instead of 'installed', redact 0 of these updates are
  security updates, and correct singular messages
  * debian/control: Add a dependency on python3-distro-info.

 -- Lucas Moura   Thu, 22 Apr 2021 18:39:19
-0300

** Changed in: update-notifier (Ubuntu Xenial)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-29 Thread Launchpad Bug Tracker
This bug was fixed in the package update-notifier - 3.168.14

---
update-notifier (3.168.14) xenial; urgency=medium

  * data/apt_check.py:
- Add support to handle packages from ESM Apps in addition to ESM Infra
  and only display alerts if the distro is ESM. (LP: #1924766)
- Do not display a count of ESM packages if the system does not have ESM
  enabled. (LP: #1883315)
- Make distinction betweem standard security updates and ESM updates
  when performing package counts. (LP: #1926208)
- use 'applied' instead of 'installed', redact 0 of these updates are
  security updates, and correct singular messages
  * debian/control: Add a dependency on python3-distro-info.

 -- Lucas Moura   Tue, 20 Apr 2021 10:20:21
-0300

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-29 Thread Launchpad Bug Tracker
This bug was fixed in the package update-notifier - 3.192.30.7

---
update-notifier (3.192.30.7) focal; urgency=medium

  * data/apt_check.py:
- Add support to handle packages from ESM Apps in addition to ESM Infra
  and only display alerts if the distro is ESM. (LP: #1924766)
- Do not display a count of ESM packages if the system does not have ESM
  enabled. (LP: #1883315)
- Make distinction between standard security updates and ESM updates
  when performing package counts. (LP: #1926208)
- use 'applied' instead of 'installed', redact 0 of these updates are
  security updates, and correct singular messages
  * data/backend_helper.py:
- fix pyflakes test
  * debian/control: Add a dependency on python3-distro-info.

 -- Lucas Moura   Thu, 22 Apr 2021 18:56:22
-0300

** Changed in: update-notifier (Ubuntu Focal)
   Status: Fix Committed => Fix Released

** Changed in: update-notifier (Ubuntu Bionic)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-29 Thread Launchpad Bug Tracker
This bug was fixed in the package update-notifier - 3.192.40.1

---
update-notifier (3.192.40.1) hirsute; urgency=medium

  [ Lucas Moura ]
  * data/apt_check.py:
- Add support to handle packages from ESM Apps in addition to ESM Infra
  and only display alerts if the distro is ESM. (LP: #1924766)
- Do not display a count of ESM packages if the system does not have ESM
  enabled. (LP: #1883315)
- Make distinction between standard security updates and ESM updates
  when performing package counts. (LP: #1926208)
- use 'applied' instead of 'installed', redact 0 of these updates are
  security updates, and correct singular messages
  * debian/control: Add a dependency on python3-distro-info.

 -- Chad Smith   Thu, 22 Apr 2021 17:47:19
-0600

** Changed in: update-notifier (Ubuntu Hirsute)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-28 Thread Launchpad Bug Tracker
This bug was fixed in the package update-notifier - 3.192.41

---
update-notifier (3.192.41) impish; urgency=medium

  [ Lucas Moura ]

  * data/apt_check.py:
- Add support to handle packages from ESM Apps in addition to ESM Infra
  and only display alerts if the distro is ESM. (LP: #1924766)
- Do not display a count of ESM packages if the system does not have ESM
  enabled. (LP: #1883315)
- Make distinction between standard security updates and ESM updates
  when performing package counts. (LP: #1926208)
- use 'applied' instead of 'installed', redact 0 of these updates are
  security updates, and correct singular messages
  * debian/control: Add a dependency on python3-distro-info.

 -- Chad Smith   Thu, 22 Apr 2021 17:47:19
-0600

** Changed in: update-notifier (Ubuntu Impish)
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-28 Thread Lucas Albuquerque Medeiros de Moura
I have tested this package for released xenial, bionic, focal and
hirsute with the following script:

--
#!/bin/sh
set -x

series=hirsute
name=$series-dev


function generate_motd_message() {
message=$1
echo "---"
echo $message
lxc exec $name -- /usr/lib/update-notifier/update-motd-updates-available 
--force
lxc exec $name -- update-motd
echo "---"
}

function turn_distro_into_esm_mode() {
# guarantee that xenial distro is on ESM mode
lxc exec $name -- sed -i 's/is_esm_supported and 
is_not_currently_supported/True #comment/' /usr/lib/update-notifier/apt-check
}

function turn_distro_into_non_esm_mode() {
# guarantee that xenial distro is on ESM mode
lxc exec $name -- sed -i 's/True #comment/False/' 
/usr/lib/update-notifier/apt-check
}

function setup_update_notifier() {
#lxc exec $name -- add-apt-repository ppa:lamoura/update-notifier-test-ppa 
-y
#lxc exec $name -- apt update
#lxc exec $name -- apt install update-notifier-common -y
#lxc exec $name -- apt update
#lxc exec $name -- apt install python3-distro-info
#lxc file push data/apt_check.py $name/usr/lib/update-notifier/apt-check
lxc exec $name -- sh -c "cat  /dev/null"
}

function install_ua() {
lxc exec $name -- add-apt-repository ppa:ua-client/daily -y
lxc exec $name -- sudo apt-get update
lxc exec $name -- sudo apt-get install ubuntu-advantage-tools -y
lxc exec $name -- ua version
lxc exec $name -- sudo apt-get update
}

function ua_attach() {
lxc exec $name -- sed -i 's/contracts.can/contracts.staging.can/' 
/etc/ubuntu-advantage/uaclient.conf
lxc exec $name -- ua attach $UACLIENT_BEHAVE_CONTRACT_TOKEN_STAGING
}

function ua_detach() {
lxc exec $name -- ua detach --assume-yes
}

function generate_ua_motd_messages() {
lxc exec $name -- python3 /usr/lib/ubuntu-advantage/ua_update_messaging.py
}

function install_update_motd() {
lxc exec $name -- apt install update-motd -yq
}

function turn_esm_apps_into_non_beta() {
lxc exec $name -- sh -c "echo 'features:\n  allow_beta: true' >> 
/etc/ubuntu-advantage/uaclient.conf"
}

function update_contract_effectiveto() {
operation=$1
num_days=$2
replace_date=$(date -d "$date $operation$num_days days" 
+"%Y-%m-%dT00:00:00Z")
echo $replace_date

lxc exec $name -- sed -i "s/\"effectiveTo\": \"[^\"]*\"/\"effectiveTo\": 
\"$replace_date\"/g" /var/lib/ubuntu-advantage/private/machine-token.json
}


lxc delete --force $name
lxc launch ubuntu-daily:$series $name
sleep 10

setup_update_notifier
install_update_motd
generate_motd_message "$series: ua not installed"
install_ua
turn_esm_apps_into_non_beta
generate_ua_motd_messages
turn_distro_into_esm_mode
generate_motd_message "$series esm: ua not attached"
ua_attach
generate_ua_motd_messages
generate_motd_message "$series esm: ua attached"
turn_distro_into_non_esm_mode
ua_detach
generate_ua_motd_messages
generate_motd_message "$series non-esm: ua not attached"
ua_attach
generate_ua_motd_messages
generate_motd_message "$series non-esm: ua attached"
update_contract_effectiveto - 30
generate_ua_motd_messages
generate_motd_message "$series esm: ua attached - contract expired"
update_contract_effectiveto - 5
generate_ua_motd_messages
generate_motd_message "$series esm: ua attached - contract grace period"
update_contract_effectiveto + 5
generate_ua_motd_messages
generate_motd_message "$series esm: ua attached - contract expire soon"

set +x
-

I can confirm that on all release, the package now in proposed is
working as expected

** Tags removed: verification-needed verification-needed-bionic 
verification-needed-focal verification-needed-hirsute verification-needed-xenial
** Tags added: verification-done verification-done-bionic 
verification-done-focal verification-done-hirsute verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-27 Thread Brian Murray
Hello Lucas, or anyone else affected,

Accepted update-notifier into xenial-proposed. The package will build
now and be available at https://launchpad.net/ubuntu/+source/update-
notifier/3.168.14 in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
xenial to verification-done-xenial. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-xenial. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: update-notifier (Ubuntu Xenial)
   Status: In Progress => Fix Committed

** Tags added: verification-needed-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-27 Thread Brian Murray
Hello Lucas, or anyone else affected,

Accepted update-notifier into hirsute-proposed. The package will build
now and be available at https://launchpad.net/ubuntu/+source/update-
notifier/3.192.40.1 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
hirsute to verification-done-hirsute. If it does not fix the bug for
you, please add a comment stating that, and change the tag to
verification-failed-hirsute. In either case, without details of your
testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: update-notifier (Ubuntu Hirsute)
   Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-hirsute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-26 Thread Bryce Harrington
** Changed in: update-notifier (Ubuntu Bionic)
   Status: New => In Progress

** Changed in: update-notifier (Ubuntu Focal)
   Status: New => In Progress

** Changed in: update-notifier (Ubuntu Hirsute)
   Status: New => In Progress

** Changed in: update-notifier (Ubuntu Impish)
   Status: New => In Progress

** Changed in: update-notifier (Ubuntu Bionic)
   Importance: Undecided => High

** Changed in: update-notifier (Ubuntu Focal)
   Importance: Undecided => High

** Changed in: update-notifier (Ubuntu Hirsute)
   Importance: Undecided => High

** Changed in: update-notifier (Ubuntu Impish)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-26 Thread Bryce Harrington
** Merge proposal linked:
   
https://code.launchpad.net/~lamoura/ubuntu/+source/update-notifier/+git/update-notifier/+merge/401473

** Merge proposal linked:
   
https://code.launchpad.net/~lamoura/ubuntu/+source/update-notifier/+git/update-notifier/+merge/401653

** Merge proposal linked:
   
https://code.launchpad.net/~lamoura/ubuntu/+source/update-notifier/+git/update-notifier/+merge/401657

** Merge proposal linked:
   
https://code.launchpad.net/~chad.smith/ubuntu/+source/update-notifier/+git/update-notifier/+merge/401662

** Merge proposal linked:
   
https://code.launchpad.net/~chad.smith/ubuntu/+source/update-notifier/+git/update-notifier/+merge/401826

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-26 Thread Bryce Harrington
** Changed in: update-notifier (Ubuntu Bionic)
 Assignee: (unassigned) => Lucas Albuquerque Medeiros de Moura (lamoura)

** Changed in: update-notifier (Ubuntu Focal)
 Assignee: (unassigned) => Lucas Albuquerque Medeiros de Moura (lamoura)

** Changed in: update-notifier (Ubuntu Hirsute)
 Assignee: (unassigned) => Chad Smith (chad.smith)

** Changed in: update-notifier (Ubuntu Impish)
 Assignee: (unassigned) => Chad Smith (chad.smith)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-26 Thread Bryce Harrington
** Also affects: update-notifier (Ubuntu Impish)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-26 Thread Bryce Harrington
** Changed in: update-notifier (Ubuntu Xenial)
   Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-22 Thread Lucas Albuquerque Medeiros de Moura
** Changed in: update-notifier (Ubuntu Xenial)
 Assignee: (unassigned) => Lucas Albuquerque Medeiros de Moura (lamoura)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-20 Thread Bryce Harrington
** Also affects: update-notifier (Ubuntu Focal)
   Importance: Undecided
   Status: New

** Also affects: update-notifier (Ubuntu Hirsute)
   Importance: Undecided
   Status: New

** Also affects: update-notifier (Ubuntu Groovy)
   Importance: Undecided
   Status: New

** Also affects: update-notifier (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Changed in: update-notifier (Ubuntu Xenial)
   Status: New => Triaged

** Changed in: update-notifier (Ubuntu Xenial)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1924766] Re: update-notifier does not handle ESM Apps in the apt-check script

2021-04-19 Thread Lucas Albuquerque Medeiros de Moura
For this SRU bug I have created the following test script:

---
#!/bin/sh
set -x

series=hirsute
name=$series-dev

function update-notifier-ua-not-installed () {
# Expects this output
# x packages can be updated.
# x of these updates are security updates.
echo "---"
echo "$series: ua not installed"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo "---"
}

function update-notifier-ua-not-attached-esm () {
# x updates can be installed immediately.
# x of these updates are security updates.
#   
# Enable UA Apps: ESM to receive x additional security updates.
# See https://ubuntu.com/security/esm or run: sudo ua status
echo "---"
echo "$series esm: ua not attached"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo "---"
}

function update-notifier-ua-not-attached () {
# Expects this output
# UA Infra: Extended Security Maintenance (ESM) is not enabled.
#   
# x updates can be installed immediately.
# x of these updates are security updates.
echo "---"
echo "$series non-esm: ua not attached"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo "---"
}

function update-notifier-ua-attached-esm () {
# Expects this output
# x updates can be installed immediately.
# x of these updates are fixed through UA Apps: ESM.
# x of these updates are security updates.
# To see these additional updates run: apt list --upgradable
echo "---"
echo "$series esm: ua attached"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo "---"
}

function update-notifier-ua-attached () {
# Expects this output
# x updates can be installed immediately.
# x of these updates are fixed through UA Apps: ESM.
# x of these updates are security updates.
# To see these additional updates run: apt list --upgradable
echo "---"
echo "$series non-esm: ua attached"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo "---"
}

function turn-distro-into-esm-mode() {
# guarantee that xenial distro is on ESM mode
lxc exec $name -- sed -i 's/is_esm_supported and 
is_not_currently_supported/True #comment/' /usr/lib/update-notifier/apt-check
}

function turn-distro-into-non-esm-mode() {
# guarantee that xenial distro is on ESM mode
lxc exec $name -- sed -i 's/True #comment/False/' 
/usr/lib/update-notifier/apt-check
}

function setup-update-notifier() {
lxc exec $name -- add-apt-repository ppa:lamoura/update-notifier-test-ppa -y
lxc exec $name -- apt update
lxc exec $name -- apt install update-notifier-common -y
}

function install-ua() {
lxc exec $name -- add-apt-repository ppa:ua-client/daily -y
lxc exec $name -- sudo apt-get update
lxc exec $name -- sudo apt-get install ubuntu-advantage-tools -y
lxc exec $name -- ua version
lxc exec $name -- sudo apt-get update
}

function ua-attach() {
lxc exec $name -- sed -i 's/contracts.can/contracts.staging.can/' 
/etc/ubuntu-advantage/uaclient.conf
lxc exec $name -- ua attach $UACLIENT_BEHAVE_CONTRACT_TOKEN_STAGING
}

function ua-detach() {
lxc exec $name -- ua detach --assume-yes
}

lxc delete --force $name
lxc launch ubuntu-daily:$series $name
sleep 10

setup-update-notifier
update-notifier-ua-not-installed
install-ua
turn-distro-into-esm-mode
update-notifier-ua-not-attached-esm
ua-attach
update-notifier-ua-attached-esm
turn-distro-into-non-esm-mode
ua-detach
update-notifier-ua-not-attached
ua-attach
update-notifier-ua-attached

set +x


I have used it to verify the behavior of the updated package on xenial and 
hirsute. The packages used to perform such testing are found on this ppa:
https://launchpad.net/~lamoura/+archive/ubuntu/update-notifier-test-ppa

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924766

Title:
  update-notifier does not handle ESM Apps in the apt-check script

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs