Merge ~ahasenack/ubuntu/+source/ubuntu-advantage-tools:jammy-uat-apparmor-dpkg-2067810 into ubuntu/+source/ubuntu-advantage-tools:ubuntu/jammy-devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 4d33b6ba5b23038bedc91525e3be54386c84ecae
Merged at revision: 4d33b6ba5b23038bedc91525e3be54386c84ecae
Proposed branch: ~ahasenack/ubuntu/+source/ubuntu-advantage-tools:jammy-uat-apparmor-dpkg-2067810
Merge into: ubuntu/+source/ubuntu-advantage-tools:ubuntu/jammy-devel
Diff against target: 84 lines (+30/-1)
4 files modified
debian/apparmor/ubuntu_pro_esm_cache.jinja2 (+9/-0)
debian/changelog (+12/-0)
features/steps/machines.py (+8/-0)
uaclient/version.py (+1/-1)
Reviewer Review Type Date Requested Status
Renan Rodrigo (community) Approve
Canonical Server Core Reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+467192@code.launchpad.net

Description of the change

Adjust apparmor profile for /var/lib/dpkg/*.

The linked bug has the SRU template filled in, and testing details.

PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/uat-test

To post a comment you must log in.
Revision history for this message
Renan Rodrigo (renanrodrigo) :
review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, uploaded:
Uploading ubuntu-advantage-tools_32.3.1~22.04.dsc
Uploading ubuntu-advantage-tools_32.3.1~22.04.tar.xz
Uploading ubuntu-advantage-tools_32.3.1~22.04_source.buildinfo
Uploading ubuntu-advantage-tools_32.3.1~22.04_source.changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/apparmor/ubuntu_pro_esm_cache.jinja2 b/debian/apparmor/ubuntu_pro_esm_cache.jinja2
2index 97d9217..43d611a 100644
3--- a/debian/apparmor/ubuntu_pro_esm_cache.jinja2
4+++ b/debian/apparmor/ubuntu_pro_esm_cache.jinja2
5@@ -178,6 +178,9 @@ profile ubuntu_pro_esm_cache flags=(attach_disconnected) {
6
7 /{,usr/}bin/dpkg mr,
8
9+ # LP: #2067810
10+ /var/lib/dpkg/** r,
11+
12 }
13
14 profile ubuntu_distro_info flags=(attach_disconnected) {
15@@ -213,6 +216,9 @@ profile ubuntu_pro_esm_cache flags=(attach_disconnected) {
16
17 /usr/share/dpkg/** r,
18
19+ # LP: #2067810
20+ /var/lib/dpkg/** r,
21+
22 /var/lib/ubuntu-advantage/apt-esm/** rwk,
23
24 @{PROC}/@{pid}/cgroup r,
25@@ -252,6 +258,9 @@ profile ubuntu_pro_esm_cache flags=(attach_disconnected) {
26 /etc/apt/** r,
27 /var/lib/apt/** r,
28
29+ # LP: #2067810
30+ /var/lib/dpkg/** r,
31+
32 }
33
34 # Site-specific additions and overrides. See local/README for details.
35diff --git a/debian/changelog b/debian/changelog
36index e7129f5..1864cb2 100644
37--- a/debian/changelog
38+++ b/debian/changelog
39@@ -1,3 +1,15 @@
40+ubuntu-advantage-tools (32.3.1~22.04) jammy; urgency=medium
41+
42+ * Adjust the esm_cache apparmor profile to allow reading of dpkg data
43+ directory (LP: #2067810):
44+ - d/apparmor/ubuntu_pro_esm_cache.jinja2: allow /var/lib/dpkg/** for dpkg
45+ and other profiles
46+ - features/steps/machines.py: trigger the bug in the behave test suite,
47+ which tests the fix
48+ * version.py: update version to 32.3.1
49+
50+ -- Andreas Hasenack <andreas@canonical.com> Fri, 07 Jun 2024 14:52:55 -0300
51+
52 ubuntu-advantage-tools (32.3~22.04) jammy; urgency=medium
53
54 * Backport 32.3 to jammy (LP: #2060732)
55diff --git a/features/steps/machines.py b/features/steps/machines.py
56index 35a90f5..8fcc9be 100644
57--- a/features/steps/machines.py
58+++ b/features/steps/machines.py
59@@ -116,6 +116,14 @@ def given_a_machine(
60 context, "python3-coverage", machine_name=machine_name
61 )
62
63+ # trigger GH: #3137
64+ when_i_run_command(
65+ context,
66+ "touch /var/lib/dpkg/arch",
67+ "with sudo",
68+ machine_name=machine_name,
69+ )
70+
71 if cleanup:
72
73 def cleanup_instance():
74diff --git a/uaclient/version.py b/uaclient/version.py
75index 665a028..fe9b400 100644
76--- a/uaclient/version.py
77+++ b/uaclient/version.py
78@@ -15,7 +15,7 @@ from uaclient.defaults import CANDIDATE_CACHE_PATH, UAC_RUN_PATH
79 from uaclient.exceptions import ProcessExecutionError
80 from uaclient.system import subp
81
82-__VERSION__ = "32.3"
83+__VERSION__ = "32.3.1"
84 PACKAGED_VERSION = "@@PACKAGED_VERSION@@"
85
86

Subscribers

People subscribed via source and target branches

to status/vote changes: