Files
lutris/debian/control
Marco Zanin 718415b930 Ubuntu: packaging: add AppArmor profile for bwrap
Starting with Ubuntu 23.10 Canonical begin to restrict unprivileged
user namespaces.[1] After this change AppArmor completely block bwrap
if user namespace restrictions are enforced, breaking Umu, which stops
with the following error:

pressure-vessel-wrap[290705]: E: Child process exited with code 1:
bwrap: setting up uid map: Permission denied

The solution is to add the missing AppArmor profile for bwrap. Ubuntu
already has it on apparmor-profiles package but it has not been enabled
yet.[2] This commit adds the profile to Lutris package and add the rules
during the deb installation.[3] Since it's an experimental profile it
can cause some issues on some corner cases (bwrap with root privileges
for example will be blocked by AppArmor), but it's still much more better
than leave bwrap completely unconfined or Umu broken for all Ubuntu
users on 23.10+.

Note: The profile will break AppArmor with ABI version < 4, for this
reason this patch include a postinst script[4] that will remove bwrap
profile in case Lutris is installed on an old Ubuntu version or Debian
(ABI 3). The script also check if there are Ubuntu/Umu/Custom rules (if
the file name has the same nomenclature used by Ubuntu) installed and if
found ours will be removed.

Note for packaging: dh-apparmor now is a required build dependency.

Test:
1 Kubuntu 24.10 (Real HW) ABI 4: AppArmor OK (rules applied), Umu works
2 Ubuntu 23.04 (VM) ABI 3: AppArmor OK (rules removed), Umu works
3 Debian 12 (VM) ABI 3: AppArmor OK (rules removed), Umu works

[1] https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces
[2] 77f03f143a
[3] https://wiki.debian.org/AppArmor/Contribute/FirstTimeProfileImport
[4] https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#summary-of-ways-maintainer-scripts-are-called

Signed-off-by: Marco Zanin <mrczn.bb@gmail.com>
2024-11-21 07:20:38 +01:00

57 lines
1.6 KiB
Plaintext

Source: lutris
Section: games
Priority: optional
Maintainer: Mathieu Comandon <mathieucomandon@gmail.com>
Build-Depends: debhelper-compat (= 12),
appstream,
dh-apparmor,
dh-sequence-python3,
meson,
Rules-Requires-Root: no
Standards-Version: 4.5.0
Homepage: https://lutris.net
Vcs-Browser: https://github.com/lutris/lutris
Vcs-Git: https://github.com/lutris/lutris.git
Package: lutris
Architecture: all
Depends: ${misc:Depends},
${python3:Depends},
python3-yaml,
python3-lxml,
python3-requests,
python3-pil,
python3-gi,
python3-gi-cairo,
python3-setproctitle,
python3-magic,
python3-distro,
python3-dbus,
gir1.2-gtk-3.0,
gir1.2-webkit2-4.0 | gir1.2-webkit2-4.1,
gir1.2-notify-0.7,
psmisc,
cabextract,
unzip,
p7zip,
curl,
fluid-soundfont-gs,
x11-xserver-utils,
mesa-utils,
vulkan-tools,
Recommends: python3-evdev,
python3-protobuf,
gvfs-backends,
libwine-development | libwine,
winetricks,
fluidsynth,
gamescope,
gamemode,
xdg-desktop-portal,
xdg-desktop-portal-gtk | xdg-desktop-portal-kde,
Description: video game preservation platform
Lutris helps you install and play video games from all eras and from most
gaming systems. By leveraging and combining existing emulators, engine
re-implementations and compatibility layers, it gives you a central interface
to launch all your games.