Raoul Hidalgo Charman pushed to branch raoul/775-execution-environment-reqs at BuildStream / buildstream
Commits:
-
491ed91c
by Raoul Hidalgo Charman at 2018-11-27T10:09:47Z
-
b6a16e49
by Raoul Hidalgo Charman at 2018-11-27T10:09:54Z
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>`
|
| ... | ... | @@ -538,9 +538,22 @@ exported as a comma separated list of selected value strings. |
| 538 | 538 |
|
| 539 | 539 |
Architecture
|
| 540 | 540 |
~~~~~~~~~~~~
|
| 541 |
-The ``arch`` option type is special enumeration option which
|
|
| 542 |
-defaults to the result of `uname -m`, and does not support
|
|
| 543 |
-assigning any default in the project configuration.
|
|
| 541 |
+The ``arch`` option type is a special enumeration option which defaults via
|
|
| 542 |
+`uname -m` results to the following list.
|
|
| 543 |
+ |
|
| 544 |
+* AArch32
|
|
| 545 |
+* AArch64
|
|
| 546 |
+* AArch64-BE
|
|
| 547 |
+* Power-ISA-BE
|
|
| 548 |
+* Power-ISA-LE
|
|
| 549 |
+* Sparc-V9
|
|
| 550 |
+* x86-32
|
|
| 551 |
+* x86-64
|
|
| 552 |
+ |
|
| 553 |
+The reason for this, opposed to using just `uname -m`, is that we want an
|
|
| 554 |
+OS-independent list, as well as several results mapping to the same architecture
|
|
| 555 |
+(e.g. i386, i486 etc. are all x86-32). It does not support assigning any default
|
|
| 556 |
+in the project configuration.
|
|
| 544 | 557 |
|
| 545 | 558 |
.. code:: yaml
|
| 546 | 559 |
|
| ... | ... | @@ -549,10 +562,10 @@ assigning any default in the project configuration. |
| 549 | 562 |
type: arch
|
| 550 | 563 |
description: The machine architecture
|
| 551 | 564 |
values:
|
| 552 |
- - arm
|
|
| 553 |
- - aarch64
|
|
| 554 |
- - i386
|
|
| 555 |
- - x86_64
|
|
| 565 |
+ - AArch32
|
|
| 566 |
+ - AArch64
|
|
| 567 |
+ - x86-32
|
|
| 568 |
+ - x86-64
|
|
| 556 | 569 |
|
| 557 | 570 |
|
| 558 | 571 |
Architecture options can be tested with the same expressions
|
