Raoul Hidalgo Charman pushed to branch raoul/775-execution-environment-reqs at BuildStream / buildstream
Commits:
-
09f72335
by Raoul Hidalgo Charman at 2018-11-26T18:11:59Z
-
e192a8a1
by Raoul Hidalgo Charman at 2018-11-26T18:24:10Z
2 changed files:
Changes:
... | ... | @@ -294,8 +294,10 @@ can be viewed in detail in the :ref:`builtin public data <public_builtin>` secti |
294 | 294 |
Sandbox
|
295 | 295 |
~~~~~~~
|
296 | 296 |
Configuration for the build sandbox (other than :ref:`environment variables <format_environment>`)
|
297 |
-can be placed in the ``sandbox`` configuration. At present, only the
|
|
298 |
-UID and GID used by the user in the group can be specified.
|
|
297 |
+can be placed in the ``sandbox`` configuration. The UID and GID used by the user
|
|
298 |
+in the group can be specified, as well as the desired OS and machine
|
|
299 |
+architecture. Possible machine architecture follow the same list as specified in
|
|
300 |
+the :ref:`architecture option <project_options_arch>`.
|
|
299 | 301 |
|
300 | 302 |
.. code:: yaml
|
301 | 303 |
|
... | ... | @@ -311,6 +313,23 @@ you can supply a different uid or gid for the sandbox. Only |
311 | 313 |
bwrap-style sandboxes support custom user IDs at the moment, and hence
|
312 | 314 |
this will only work on Linux host platforms.
|
313 | 315 |
|
316 |
+.. code:: yaml
|
|
317 |
+ |
|
318 |
+ # Specify build OS and architecuter
|
|
319 |
+ sandbox:
|
|
320 |
+ build-os: AIX
|
|
321 |
+ build-arch: Power-ISA-BE
|
|
322 |
+ |
|
323 |
+When building locally, if these don't match the host machine then generally the
|
|
324 |
+build will fail. The exception is when the OS is Linux and the architecture
|
|
325 |
+specifies an ``x86-32`` build on an ``x86-64`` machine, in which case the
|
|
326 |
+``linux32`` command is prepended to the bubblewrap command.
|
|
327 |
+ |
|
328 |
+When building remotely, the OS and architecture are added to the ``Platform``
|
|
329 |
+field in the ``Command`` uploaded. Whether this actually results in a building
|
|
330 |
+the element for the desired OS and architecture is dependent on the server
|
|
331 |
+having implemented these options the same as buildstream.
|
|
332 |
+ |
|
314 | 333 |
.. note::
|
315 | 334 |
|
316 | 335 |
The ``sandbox`` configuration is available since :ref:`format version 6 <project_format_version>`
|
... | ... | @@ -542,6 +542,22 @@ The ``arch`` option type is special enumeration option which |
542 | 542 |
defaults to the result of `uname -m`, and does not support
|
543 | 543 |
assigning any default in the project configuration.
|
544 | 544 |
|
545 |
+The ``arch`` option type is a special enumeration option which defaults via
|
|
546 |
+`uname -m` results to the following list.
|
|
547 |
+ |
|
548 |
+* AArch32
|
|
549 |
+* AArch64
|
|
550 |
+* AArch64-BE
|
|
551 |
+* Power-ISA-BE
|
|
552 |
+* Power-ISA-LE
|
|
553 |
+* Sparc-V9
|
|
554 |
+* x86-32
|
|
555 |
+* x86-64
|
|
556 |
+ |
|
557 |
+The reason for this, opposed to using just `uname -m`, is that we want an
|
|
558 |
+OS-independent list, as well as several results mapping to the same architecture
|
|
559 |
+(e.g. i386, i486 etc. are all x86-32).
|
|
560 |
+ |
|
545 | 561 |
.. code:: yaml
|
546 | 562 |
|
547 | 563 |
options:
|
... | ... | @@ -549,9 +565,9 @@ assigning any default in the project configuration. |
549 | 565 |
type: arch
|
550 | 566 |
description: The machine architecture
|
551 | 567 |
values:
|
552 |
- - arm
|
|
553 |
- - aarch64
|
|
554 |
- - i386
|
|
568 |
+ - AArch32
|
|
569 |
+ - AArch64
|
|
570 |
+ - x86-32
|
|
555 | 571 |
- x86_64
|
556 | 572 |
|
557 | 573 |
|