test: Hack who AppArmor locales policy on Ubuntu 26.04

See https://launchpad.net/bugs/2151857. This breaks most tests due to
the unexpected message (so too frequent for naughty), and is easy enough
to avoid.
This commit is contained in:
Martin Pitt 2026-05-08 11:19:51 +02:00 committed by Martin Pitt
parent e3a47d70f9
commit 902d97af43

View file

@ -51,6 +51,11 @@ if [ "$ID" = "opensuse-tumbleweed" ]; then
echo "127.0.1.1 codecs.opensuse.org" >> /etc/hosts
fi
if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "26.04" ]; then
# HACK: https://launchpad.net/bugs/2151857
echo '/usr/share/coreutils/locales/** r,' > /etc/apparmor.d/local/who
fi
PLATFORM_ID="${PLATFORM_ID:-}"
if [ "${PLATFORM_ID#platform:el}" != "$PLATFORM_ID" ]; then
# allow /usr/local/bin/ in sudo shells, to use our installed tools like the Python bridge