Improve sandbox configuration handling
-
Make
build-uidandbuild-gidconfiguration optionalThis allows use of sandbox implementations that don't support configuring sandbox UID/GID such as buildbox-run-userchroot.
-
Drop concept of partially supported sandbox configuration
Allowing builds without affecting the cache key but disallowing push, when the sandbox configuration is not fully compatible, results in an inconsistent user experience and may lead to unexpected build issues. Especially as push is allowed or disallowed based on the sandbox available at the time of push, not at the time of build.
The previous commit making build-uid and build-gid configuration optional allows each project to decide whether the sandbox is required to support UID/GID configuration or not.
-
element.py: Move sandbox configuration check to__sandbox()This allows
bst showand other commands that don't require a sandbox to work with elements that are not supported by the current sandbox. -
_sandboxbuildboxrun.py: Detect platforms supported by buildbox-runThis allows builds where the host OS or architecture doesn't match the build OS or architecture, if the buildbox-run implementation supports it. E.g., this allows x86-32 builds on x86-64 systems.
This can make use of the extended --capability bits of BuildGrid/buildbox/buildbox-run-bubblewrap!10 (merged).