Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kas-container: add support for Ubuntu 24.04 hosts
On Ubuntu 24.04 the default apparmor profile restricts unprivileged user namespaces. This breaks the bitbake execution, as bitbake uses this mechanism for network and uid isolation, resulting in the following error message: File "/work/isar/bitbake/bin/bitbake-worker", line 268, in child bb.utils.disable_network(uid, gid) File "/work/isar/bitbake/lib/bb/utils.py", line 1653, in disable_network with open("/proc/self/uid_map", "w") as f: PermissionError: [Errno 1] Operation not permitted To fix this for docker, we start the container under the "rootlesskit" profile, which allows (unprivileged) modifications of the userns namespace. On podman, no fix is needed as podman is already executed with a suitable profile. We detect this situation based on apparmor sysfs entries and by that avoid a tight coupling with distro versions. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
- Loading branch information