lxc
lxc copied to clipboard
Improve build flow and AppArmor rules
This pull request introduces several improvements and fixes across the build system and AppArmor profile handling for containers. The most significant changes enhance the flexibility and reliability of the build process, update security profile rules, and refine the logic for determining privileged containers.
Build system improvements:
- Refactored the
Makefileto use variable-based build directories (BUILDDIR,DISTDIR), addedcleanandrebuildtargets, and improved robustness of Meson setup and dist commands. This makes the build process more maintainable and easier to use. - Fixed a syntax error in
meson.buildrelated to missing types detection, ensuring proper configuration checks forstruct mount_attr.
AppArmor and container privilege logic:
- Refined the logic for determining whether a container is privileged: now, a container is only considered privileged if it has no user namespace mapping and is running as root (uid 0), making the privilege check more accurate.
@stgraber When you can, can you review it?
@mihalicyn
Could you take a look at it?
I've pinged @mihalicyn again, let's see if he can give this a review