Merge ~chad.smith/ubuntu/+source/update-notifier:ua-motd-focal into ubuntu/+source/update-notifier:ubuntu/focal-proposed

Proposed by Chad Smith
Status: Merged
Merge reported by: Chad Smith
Merged at revision: bb81a3c6ec7f3209605b742e829922a3697ebf26
Proposed branch: ~chad.smith/ubuntu/+source/update-notifier:ua-motd-focal
Merge into: ubuntu/+source/update-notifier:ubuntu/focal-proposed
Diff against target: 69 lines (+18/-4)
2 files modified
data/apt_check.py (+7/-4)
debian/changelog (+11/-0)
Reviewer Review Type Date Requested Status
Brian Murray (community) Approve
Review via email: mp+391846@code.launchpad.net

Description of the change

Cherry picks of upstream commits to support ESM Apps and ESM Infra for ubuntu-advantage-tools motd package counts and availability.

Not certain which branch should best be targeted for this merge and from whom to request review.

The following is a list of cherrypicks performed and merged:

cherry-pick ubuntu/devel commit c065e9ebd957ead33c7afc4d570b0ee0433f7601

This constitutes the following debian/changelog entry:

  [ Andreas Hasenack ]
  * data/apt_check.py: Update ESM security pockets names (LP: #1881632)
    - the UbuntuESM pocket was renamed from <distro>-security to
      <distro>-infra-security
    - new origin UbuntuESMApps, with a corresponding pocket of
      <distro>-apps-security

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

When this change landed in groovy it included an update to tests/apt_check.py. I'm not seeing that test modification in this PR. Am I missing something or could it be added?

review: Needs Fixing
Revision history for this message
Brian Murray (brian-murray) wrote :

Please fix the changelog version.

review: Needs Fixing
Revision history for this message
Brian Murray (brian-murray) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/data/apt_check.py b/data/apt_check.py
2index 4051460..ed729c9 100755
3--- a/data/apt_check.py
4+++ b/data/apt_check.py
5@@ -16,6 +16,8 @@ DISTRO = subprocess.check_output(
6 ["lsb_release", "-c", "-s"],
7 universal_newlines=True).strip()
8
9+ESM_ORIGINS = ("UbuntuESM", "UbuntuESMApps")
10+
11
12 def _(msg):
13 return gettext.dgettext("update-notifier", msg)
14@@ -45,7 +47,8 @@ def saveDistUpgrade(cache, depcache):
15 def isSecurityUpgrade(ver):
16 " check if the given version is a security update (or masks one) "
17 security_pockets = [("Ubuntu", "%s-security" % DISTRO),
18- ("UbuntuESM", "%s-security" % DISTRO),
19+ ("UbuntuESM", "%s-infra-security" % DISTRO),
20+ ("UbuntuESMApps", "%s-apps-security" % DISTRO),
21 ("gNewSense", "%s-security" % DISTRO),
22 ("Debian", "%s-updates" % DISTRO)]
23 for (file, index) in ver.file_list:
24@@ -58,7 +61,7 @@ def isSecurityUpgrade(ver):
25 def isESMUpgrade(ver):
26 " check if the given version is a security update (or masks one) "
27 for (file, index) in ver.file_list:
28- if file.origin == "UbuntuESM" and file.archive.startswith(DISTRO):
29+ if file.origin in ESM_ORIGINS and file.archive.startswith(DISTRO):
30 return True
31 return False
32
33@@ -152,7 +155,7 @@ def has_disabled_esm_security_update(depcache, pkg):
34 break
35
36 for (file, index) in ver.file_list:
37- if (file.origin == "UbuntuESM" and file.archive.startswith(DISTRO)
38+ if (file.origin in ESM_ORIGINS and file.archive.startswith(DISTRO)
39 and depcache.policy.get_priority(file) == -32768):
40 return True
41 return False
42@@ -202,7 +205,7 @@ def run(options=None):
43 # first place.
44 have_esm = None # None == does not exist
45 for file in cache.file_list:
46- if file.origin == "UbuntuESM" and file.archive.startswith(DISTRO):
47+ if file.origin in ESM_ORIGINS and file.archive.startswith(DISTRO):
48 # In case of multiple ESM repos, one enabled is sufficient.
49 if depcache.policy.get_priority(file) == -32768:
50 # We found a disabled ESM repository, but we'll only count
51diff --git a/debian/changelog b/debian/changelog
52index a432b22..18f4365 100644
53--- a/debian/changelog
54+++ b/debian/changelog
55@@ -1,3 +1,14 @@
56+update-notifier (3.192.30.1) focal; urgency=medium
57+
58+ [ Chad Smith ]
59+ * data/apt_check.py: Update ESM security pockets names (LP: #1881632)
60+ - the UbuntuESM pocket was renamed from <distro>-security to
61+ <distro>-infra-security
62+ - new origin UbuntuESMApps, with a corresponding pocket of
63+ <distro>-apps-security
64+
65+ -- Chad Smith <chad.smith@canonical.com> Fri, 11 Sep 2020 15:40:03 -0600
66+
67 update-notifier (3.192.30) focal; urgency=medium
68
69 * pixmaps/scalable/livepatch-ok,warning, src/livepatch-tray.c:

Subscribers

People subscribed via source and target branches