1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
From: Philip Hands <phil@hands.com>
Date: Wed, 12 Nov 2025 09:41:14 +0100
Subject: switch to dpkg-query --list for worker package list
---
etc/openqa/workers.ini | 2 +-
profiles/apparmor.d/usr.share.openqa.script.worker | 17 +++++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/etc/openqa/workers.ini b/etc/openqa/workers.ini
index 35be33d..ed8f8d7 100644
--- a/etc/openqa/workers.ini
+++ b/etc/openqa/workers.ini
@@ -75,7 +75,7 @@
# packages against the list of packages during the previous last good job.
# Configuring this variable provides a command line to list the packages and
# their versions in plain text.
-#PACKAGES_CMD = apt list --installed
+#PACKAGES_CMD = dpkg-query --list
# Specifies the threshold to consider the load on the machine critical. If the
# average load (over the last 15 minutes) exceeds the specified value the worker
diff --git a/profiles/apparmor.d/usr.share.openqa.script.worker b/profiles/apparmor.d/usr.share.openqa.script.worker
index 71d53d3..6b00b1e 100644
--- a/profiles/apparmor.d/usr.share.openqa.script.worker
+++ b/profiles/apparmor.d/usr.share.openqa.script.worker
@@ -30,7 +30,6 @@
/dev/ptmx rw,
/dev/pts/* rw,
/dev/tty rw,
- /etc/apt/** r,
/etc/dpkg/dpkg.cfg{,.d,.d/*} r,
/etc/gitconfig r,
/etc/libnl/classid r,
@@ -75,6 +74,7 @@
/proc/loadavg r,
/proc/sys/vm/overcommit_memory r,
/proc/sys/fs/pipe-max-size r,
+ /proc/sys/vm/max_map_count r,
/proc/sys/vm/nr_hugepages r,
/run/nscd/group r,
/run/openqa/vde.ctl/* rw,
@@ -92,7 +92,7 @@
/sys/kernel/mm/transparent_hugepage/hpage_pmd_size r,
/tmp/** rwk,
/usr/bin/Xvnc rCx,
- /usr/bin/apt rix,
+ /usr/bin/dpkg-query rix,
/{usr/,}bin/cat rix,
/usr/bin/chattr rix,
/usr/bin/cksum rix,
@@ -149,7 +149,6 @@
/usr/bin/x3270 cx,
/usr/bin/xterm-console rix,
/usr/bin/xz rix,
- /var/cache/apt/** r,
/usr/lib*/qemu/block-curl.so rix,
/usr/lib*/qemu/block-iscsi.so mr,
/usr/lib*/qemu/block-rbd.so mr,
@@ -177,9 +176,7 @@
/usr/share/seabios/* r,
/usr/share/qemu/keymaps/* r,
/usr/share/{AA,O}VMF/* rk,
- /var/lib/apt/** r,
- /var/lib/dpkg/status r,
- /var/lib/dpkg/arch r,
+ /var/lib/dpkg/** r,
/var/lib/openqa/cache/ r,
/var/lib/openqa/cache/** rwk,
/var/lib/openqa/pool/ r,
@@ -198,6 +195,13 @@
/var/lib/openqa/share/tests/** r,
owner /sys/**/ rw,
+ # things that were needed by apt list (can be dropped once people switch to dpkg-query)
+ /etc/apt/** r,
+ /usr/bin/apt rix,
+ /var/cache/apt/** r,
+ /var/lib/apt/** r,
+ /var/lib/dpkg/status r,
+ /var/lib/dpkg/arch r,
profile /usr/bin/Xvnc {
#include <abstractions/X>
@@ -230,6 +234,7 @@
/proc/** r,
/sys/devices/** r,
/usr/bin/lscpu mr,
+ /sys/kernel/cpu_byteorder r,
}
|