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
diff --git a/data/apt_check.py b/data/apt_check.py
index 4051460..ed729c9 100755
--- a/data/apt_check.py
+++ b/data/apt_check.py
@@ -16,6 +16,8 @@ DISTRO = subprocess.check_output(
16 ["lsb_release", "-c", "-s"],16 ["lsb_release", "-c", "-s"],
17 universal_newlines=True).strip()17 universal_newlines=True).strip()
1818
19ESM_ORIGINS = ("UbuntuESM", "UbuntuESMApps")
20
1921
20def _(msg):22def _(msg):
21 return gettext.dgettext("update-notifier", msg)23 return gettext.dgettext("update-notifier", msg)
@@ -45,7 +47,8 @@ def saveDistUpgrade(cache, depcache):
45def isSecurityUpgrade(ver):47def isSecurityUpgrade(ver):
46 " check if the given version is a security update (or masks one) "48 " check if the given version is a security update (or masks one) "
47 security_pockets = [("Ubuntu", "%s-security" % DISTRO),49 security_pockets = [("Ubuntu", "%s-security" % DISTRO),
48 ("UbuntuESM", "%s-security" % DISTRO),50 ("UbuntuESM", "%s-infra-security" % DISTRO),
51 ("UbuntuESMApps", "%s-apps-security" % DISTRO),
49 ("gNewSense", "%s-security" % DISTRO),52 ("gNewSense", "%s-security" % DISTRO),
50 ("Debian", "%s-updates" % DISTRO)]53 ("Debian", "%s-updates" % DISTRO)]
51 for (file, index) in ver.file_list:54 for (file, index) in ver.file_list:
@@ -58,7 +61,7 @@ def isSecurityUpgrade(ver):
58def isESMUpgrade(ver):61def isESMUpgrade(ver):
59 " check if the given version is a security update (or masks one) "62 " check if the given version is a security update (or masks one) "
60 for (file, index) in ver.file_list:63 for (file, index) in ver.file_list:
61 if file.origin == "UbuntuESM" and file.archive.startswith(DISTRO):64 if file.origin in ESM_ORIGINS and file.archive.startswith(DISTRO):
62 return True65 return True
63 return False66 return False
6467
@@ -152,7 +155,7 @@ def has_disabled_esm_security_update(depcache, pkg):
152 break155 break
153156
154 for (file, index) in ver.file_list:157 for (file, index) in ver.file_list:
155 if (file.origin == "UbuntuESM" and file.archive.startswith(DISTRO)158 if (file.origin in ESM_ORIGINS and file.archive.startswith(DISTRO)
156 and depcache.policy.get_priority(file) == -32768):159 and depcache.policy.get_priority(file) == -32768):
157 return True160 return True
158 return False161 return False
@@ -202,7 +205,7 @@ def run(options=None):
202 # first place.205 # first place.
203 have_esm = None # None == does not exist206 have_esm = None # None == does not exist
204 for file in cache.file_list:207 for file in cache.file_list:
205 if file.origin == "UbuntuESM" and file.archive.startswith(DISTRO):208 if file.origin in ESM_ORIGINS and file.archive.startswith(DISTRO):
206 # In case of multiple ESM repos, one enabled is sufficient.209 # In case of multiple ESM repos, one enabled is sufficient.
207 if depcache.policy.get_priority(file) == -32768:210 if depcache.policy.get_priority(file) == -32768:
208 # We found a disabled ESM repository, but we'll only count211 # We found a disabled ESM repository, but we'll only count
diff --git a/debian/changelog b/debian/changelog
index a432b22..18f4365 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
1update-notifier (3.192.30.1) focal; urgency=medium
2
3 [ Chad Smith ]
4 * data/apt_check.py: Update ESM security pockets names (LP: #1881632)
5 - the UbuntuESM pocket was renamed from <distro>-security to
6 <distro>-infra-security
7 - new origin UbuntuESMApps, with a corresponding pocket of
8 <distro>-apps-security
9
10 -- Chad Smith <chad.smith@canonical.com> Fri, 11 Sep 2020 15:40:03 -0600
11
1update-notifier (3.192.30) focal; urgency=medium12update-notifier (3.192.30) focal; urgency=medium
213
3 * pixmaps/scalable/livepatch-ok,warning, src/livepatch-tray.c:14 * pixmaps/scalable/livepatch-ok,warning, src/livepatch-tray.c:

Subscribers

People subscribed via source and target branches