Merge ~renanrodrigo/ubuntu/+source/ubuntu-advantage-tools:upload-27.14.1-lunar into ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel

Proposed by Renan Rodrigo
Status: Merged
Merged at revision: cdfe9942d801bfda60849384fcf12ac869880161
Proposed branch: ~renanrodrigo/ubuntu/+source/ubuntu-advantage-tools:upload-27.14.1-lunar
Merge into: ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel
Diff against target: 106 lines (+30/-25)
4 files modified
debian/changelog (+8/-0)
uaclient/apt.py (+21/-22)
uaclient/security_status.py (+0/-2)
uaclient/version.py (+1/-1)
Reviewer Review Type Date Requested Status
Athos Ribeiro (community) Approve
Canonical Server Core Reviewers Pending
Review via email: mp+439507@code.launchpad.net

Description of the change

This is the 27.14.1 release of ubuntu-advantage-tools.
It brings a bugfix to an apt config leak.

See the CHANGELOG and related bug for more information.

To post a comment you must log in.
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :
Download full text (7.2 KiB)

Test links:

Xenial:
    + amd64: https://autopkgtest.ubuntu.com/request.cgi?release=xenial&package=ubuntu-advantage-tools&arch=amd64&trigger=ubuntu-advantage-tools%2F27.14.1~16.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + arm64: https://autopkgtest.ubuntu.com/request.cgi?release=xenial&package=ubuntu-advantage-tools&arch=arm64&trigger=ubuntu-advantage-tools%2F27.14.1~16.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + armhf: https://autopkgtest.ubuntu.com/request.cgi?release=xenial&package=ubuntu-advantage-tools&arch=armhf&trigger=ubuntu-advantage-tools%2F27.14.1~16.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + i386: https://autopkgtest.ubuntu.com/request.cgi?release=xenial&package=ubuntu-advantage-tools&arch=i386&trigger=ubuntu-advantage-tools%2F27.14.1~16.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + ppc64el: https://autopkgtest.ubuntu.com/request.cgi?release=xenial&package=ubuntu-advantage-tools&arch=ppc64el&trigger=ubuntu-advantage-tools%2F27.14.1~16.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + s390x: https://autopkgtest.ubuntu.com/request.cgi?release=xenial&package=ubuntu-advantage-tools&arch=s390x&trigger=ubuntu-advantage-tools%2F27.14.1~16.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging

Bionic:
    + amd64: https://autopkgtest.ubuntu.com/request.cgi?release=bionic&package=ubuntu-advantage-tools&arch=amd64&trigger=ubuntu-advantage-tools%2F27.14.1~18.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + arm64: https://autopkgtest.ubuntu.com/request.cgi?release=bionic&package=ubuntu-advantage-tools&arch=arm64&trigger=ubuntu-advantage-tools%2F27.14.1~18.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + armhf: https://autopkgtest.ubuntu.com/request.cgi?release=bionic&package=ubuntu-advantage-tools&arch=armhf&trigger=ubuntu-advantage-tools%2F27.14.1~18.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + i386: https://autopkgtest.ubuntu.com/request.cgi?release=bionic&package=ubuntu-advantage-tools&arch=i386&trigger=ubuntu-advantage-tools%2F27.14.1~18.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + ppc64el: https://autopkgtest.ubuntu.com/request.cgi?release=bionic&package=ubuntu-advantage-tools&arch=ppc64el&trigger=ubuntu-advantage-tools%2F27.14.1~18.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + s390x: https://autopkgtest.ubuntu.com/request.cgi?release=bionic&package=ubuntu-advantage-tools&arch=s390x&trigger=ubuntu-advantage-tools%2F27.14.1~18.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging

Focal:
    + amd64: https://autopkgtest.ubuntu.com/request.cgi?release=focal&package=ubuntu-advantage-tools&arch=amd64&trigger=ubuntu-advantage-tools%2F27.14.1~20.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + arm64: https://autopkgtest.ubuntu.com/request.cgi?release=focal&package=ubuntu-advantage-tools&arch=arm64&trigger=ubuntu-advantage-tools%2F27.14.1~20.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + armhf: https://autopkgtest.ubuntu.com/request.cgi?release=focal&package=ubuntu-advantage-tools&arch=armhf&trigger=ubuntu-advantage-tools%2F27.14.1~20.04.1~rc1%2Bnoflake8&ppa=ua-client%2Fstaging
    + ppc64el: https://autopkgtest.ubuntu.com/request.cgi?release=focal&package=ubuntu-advantage-tools&arch=ppc64el&trigger=ubuntu-advantage-tools...

Read more...

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

LGTM! I will sponsor this as soon as we get the test results

review: Approve
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

- ubuntu-advantage-tools/27.14.1~16.04.1~rc1+noflake8
    + ✅ ubuntu-advantage-tools on xenial for amd64 @ 23.03.23 20:10:57 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on xenial for arm64 @ 23.03.23 19:55:17 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on xenial for armhf @ 23.03.23 19:52:44 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on xenial for i386 @ 23.03.23 20:01:03 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on xenial for ppc64el @ 23.03.23 19:54:49 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on xenial for s390x @ 23.03.23 19:54:21 Log️ 🗒️

- ubuntu-advantage-tools/27.14.1~18.04.1~rc1+noflake8
    + ✅ ubuntu-advantage-tools on bionic for amd64 @ 23.03.23 20:15:53 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on bionic for arm64 @ 23.03.23 19:56:43 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on bionic for armhf @ 23.03.23 19:53:11 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on bionic for i386 @ 23.03.23 20:28:27 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on bionic for ppc64el @ 23.03.23 19:54:25 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on bionic for s390x @ 23.03.23 19:51:42 Log️ 🗒️

The remaining releases are still running

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

- ubuntu-advantage-tools/27.14.1~20.04.1~rc1+noflake8
    + ✅ ubuntu-advantage-tools on focal for amd64 @ 23.03.23 22:13:00 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on focal for arm64 @ 23.03.23 19:57:34 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on focal for armhf @ 23.03.23 19:53:26 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on focal for ppc64el @ 23.03.23 19:54:23 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on focal for s390x @ 23.03.23 19:54:21 Log️ 🗒️

- ubuntu-advantage-tools/27.14.1~22.04.1~rc1+noflake8
    + ✅ ubuntu-advantage-tools on jammy for amd64 @ 23.03.23 20:16:49 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on jammy for arm64 @ 23.03.23 20:00:05 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on jammy for armhf @ 23.03.23 19:54:25 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on jammy for ppc64el @ 23.03.23 19:54:02 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on jammy for s390x @ 23.03.23 19:52:38 Log️ 🗒️

- ubuntu-advantage-tools/27.14.1~22.10.1~rc1+noflake8
    + ✅ ubuntu-advantage-tools on kinetic for amd64 @ 23.03.23 20:18:00 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on kinetic for arm64 @ 23.03.23 19:55:36 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on kinetic for armhf @ 23.03.23 19:54:42 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on kinetic for ppc64el @ 23.03.23 19:53:38 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on kinetic for s390x @ 23.03.23 19:52:41 Log️ 🗒️

- ubuntu-advantage-tools/27.14.1~23.04.1~rc1+noflake8
    + ✅ ubuntu-advantage-tools on lunar for amd64 @ 23.03.23 21:21:58 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on lunar for arm64 @ 23.03.23 20:10:11 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on lunar for armhf @ 23.03.23 19:54:17 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on lunar for ppc64el @ 23.03.23 19:53:46 Log️ 🗒️
    + ✅ ubuntu-advantage-tools on lunar for s390x @ 23.03.23 19:54:15 Log️ 🗒️

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thank you, Renan! Uploaded.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.14.1~16.04.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.14.1~16.04.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.14.1~16.04.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.14.1~16.04.1_source.changes: done.
Successfully uploaded packages.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.14.1~18.04.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.14.1~18.04.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.14.1~18.04.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.14.1~18.04.1_source.changes: done.
Successfully uploaded packages.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.14.1~20.04.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.14.1~20.04.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.14.1~20.04.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.14.1~20.04.1_source.changes: done.
Successfully uploaded packages.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.14.1~22.04.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.14.1~22.04.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.14.1~22.04.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.14.1~22.04.1_source.changes: done.
Successfully uploaded packages.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.14.1~22.10.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.14.1~22.10.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.14.1~22.10.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.14.1~22.10.1_source.changes: done.
Successfully uploaded packages.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.14.1~23.04.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.14.1~23.04.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.14.1~23.04.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.14.1~23.04.1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 29fcf04..0e09663 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+ubuntu-advantage-tools (27.14.1~23.04.1) lunar; urgency=medium
7+
8+ * New upstream release 27.14.1
9+ - apt: fix a configuration leak in the apt.get_pkg_candidate_version
10+ function (LP: #2012642)
11+
12+ -- Renan Rodrigo <renanrodrigo@canonical.com> Thu, 23 Mar 2023 13:41:05 -0300
13+
14 ubuntu-advantage-tools (27.14~23.04.1) lunar; urgency=medium
15
16 * d/ubuntu-advantage-tools.{postinst,postrm,preinst}:
17diff --git a/uaclient/apt.py b/uaclient/apt.py
18index 1589931..a3b98d9 100644
19--- a/uaclient/apt.py
20+++ b/uaclient/apt.py
21@@ -265,38 +265,37 @@ def get_esm_cache():
22
23
24 def get_pkg_candidate_version(pkg: str) -> Optional[str]:
25- cache = get_apt_cache()
26-
27- try:
28- package = cache[pkg]
29- except Exception:
30- return None
31+ with PreserveAptCfg(get_apt_cache) as cache:
32+ try:
33+ package = cache[pkg]
34+ except Exception:
35+ return None
36
37- if not package.candidate:
38- return None
39+ if not package.candidate:
40+ return None
41
42- pkg_candidate = getattr(package.candidate, "version")
43+ pkg_candidate = getattr(package.candidate, "version")
44
45 if not pkg_candidate:
46 return None
47
48- esm_cache = get_esm_cache()
49- if esm_cache:
50- try:
51- esm_package = esm_cache[pkg]
52- except Exception:
53- return pkg_candidate
54+ with PreserveAptCfg(get_esm_cache) as esm_cache:
55+ if esm_cache:
56+ try:
57+ esm_package = esm_cache[pkg]
58+ except Exception:
59+ return pkg_candidate
60
61- if not esm_package.candidate:
62- return pkg_candidate
63+ if not esm_package.candidate:
64+ return pkg_candidate
65
66- esm_pkg_candidate = getattr(esm_package.candidate, "version")
67+ esm_pkg_candidate = getattr(esm_package.candidate, "version")
68
69- if not esm_pkg_candidate:
70- return pkg_candidate
71+ if not esm_pkg_candidate:
72+ return pkg_candidate
73
74- if compare_versions(esm_pkg_candidate, pkg_candidate, "ge"):
75- return esm_pkg_candidate
76+ if compare_versions(esm_pkg_candidate, pkg_candidate, "ge"):
77+ return esm_pkg_candidate
78
79 return pkg_candidate
80
81diff --git a/uaclient/security_status.py b/uaclient/security_status.py
82index 800b00c..aefe431 100644
83--- a/uaclient/security_status.py
84+++ b/uaclient/security_status.py
85@@ -138,8 +138,6 @@ def filter_security_updates(
86 # sources live in a private folder, we need a different apt cache
87 # to access them.
88 with PreserveAptCfg(get_esm_cache) as esm_cache:
89- esm_cache = get_esm_cache()
90-
91 for package in packages:
92 if package.is_installed:
93 for version in package.versions:
94diff --git a/uaclient/version.py b/uaclient/version.py
95index 8018154..1a95545 100644
96--- a/uaclient/version.py
97+++ b/uaclient/version.py
98@@ -15,7 +15,7 @@ from uaclient.defaults import CANDIDATE_CACHE_PATH, UAC_RUN_PATH
99 from uaclient.exceptions import ProcessExecutionError
100 from uaclient.system import subp
101
102-__VERSION__ = "27.14"
103+__VERSION__ = "27.14.1"
104 PACKAGED_VERSION = "@@PACKAGED_VERSION@@"
105
106 CANDIDATE_REGEX = r"Candidate: (?P<candidate>.*?)\n"

Subscribers

People subscribed via source and target branches

to status/vote changes: