Commit Graph

14 Commits

Author SHA1 Message Date
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
Stephan Lachnit
2530b35d1f debian: compress with gzip
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-02-28 20:31:40 -08:00
muzena
11e254b3e9 Revert debian build changes 2020-07-20 11:32:20 -07:00
muzena
bfdbd6e55e Fix ppa building 2020-07-15 11:59:10 -07:00
Stephan Lachnit
6dd56d3734 Default to Meson for Debian package
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-06-19 18:23:08 -07:00
Stephan Lachnit
26f2d606eb debian: use dh-sequence-python3
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-03-29 11:20:10 -07:00
Wouter Wijsman
af070229db Fixed lintian error when building deb
This fixes the package-section-games-but-has-usr-bin error which was
shown when running debuild.

With this change, there will no longer be any binaries in the /usr/bin
directory in the deb package.
2019-12-26 11:23:41 -08:00
Stephan Lachnit
6c7bce931a make package Debian compliant
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2019-12-10 17:20:00 +01:00
Mathieu Comandon
7a653c3e71 Update python version in debian/rules 2016-10-14 20:53:07 -07:00
ProdessorKaos64
3677042a0c update debian/ to use cleaner pybuild system 2016-02-23 18:37:17 -05:00
Mathieu Comandon
8e38878dcb Migrate to dh-python for deb packaging 2015-12-29 19:43:07 -08:00
Mathieu Comandon
248e8f84dc Update Debian packaging stuff 2012-11-10 13:08:16 +01:00
Mathieu Comandon
a5a01f85db refactored some stuff 2010-08-31 02:44:09 +02:00
Mathieu Comandon
d8bd7d00bf 'Creating ubuntu package' 2010-01-22 19:38:43 +01:00