From f37129f4c6cc9e60f547fdfe0a28a984ddd8de73 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 16 Nov 2022 22:16:21 +0300 Subject: Add support for package-config task manifest value --- doc/manual.cli | 300 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 183 insertions(+), 117 deletions(-) (limited to 'doc') diff --git a/doc/manual.cli b/doc/manual.cli index 3b3bd4b..59b20c7 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -90,12 +90,12 @@ build logs hosted by the controller. \h#arch-machine-config|Configurations| -The \c{bbot} architecture distinguishes between a \i{machine configuration} -and a \i{build configuration}. The machine configuration captures the -operating system, installed compiler toolchain, and so on. The same build -machine may be used to \"generate\" multiple \i{build configurations}. For -example, the same machine can normally be used to produce 32/64-bit and -debug/optimized builds. +The \c{bbot} architecture distinguishes between a \i{machine configuration}, +\i{build target configuration}, and a \i{build package configuration}. The +machine configuration captures the operating system, installed compiler +toolchain, and so on. The same build machine may be used to \"generate\" +multiple \i{build target configurations}. For example, the same machine can +normally be used to produce 32/64-bit and debug/optimized builds. The machine configuration is \i{approximately} encoded in its \i{machine name}. The machine name is a list of components separated with \c{-}. @@ -156,22 +156,31 @@ linux_ubuntu_16.04-gcc_6.3 aarch64_linux_debian_11-gcc_12.2 \ -Similarly, the build configuration is encoded in a \i{configuration name} -using the same overall format. As described in \l{#arch-controller Controller -Logic}, build configurations are generated from machine configurations. As a -result, it usually makes sense to have the first component identify the -operating systems and the second component \- the toolchain with the rest -identifying a particular build configuration variant, for example, optimized, -sanitized, etc. For example: +Similarly, the build target configuration is encoded in a \i{configuration +name} using the same overall format. As described in \l{#arch-controller +Controller Logic}, target configurations are generated from machine +configurations. As a result, it usually makes sense to have the first +component identify the operating systems and the second component \- the +toolchain with the rest identifying a particular target configuration variant, +for example, optimized, sanitized, etc. For example: \ windows-vc_14-O2 linux-gcc_6-O3_asan \ -While we can also specify the \c{} component in a build configuration, -this information is best conveyed as part of \c{} as described in -\l{#arch-controller Controller Logic}. +While we can also specify the \c{} component in a build target +configuration, this information is best conveyed as part of \c{} as +described in \l{#arch-controller Controller Logic}. + +A package can be built in multiple package configurations per target +configuration. A build package configuration normally specifies the package +configuration variables that need to be used for the build. It may also +include the information regarding the dependency packages which need to +additionally be configured. The build package configurations originate from +the package manifest \c{*-build-config}, \c{*-builds}, \c{*-build-include}, +and \c{*-build-exclude} values. See \l{bpkg#manifest-package Package Manifest} +for more information on these values. \h#arch-machine-header|Machine Header Manifest| @@ -348,7 +357,8 @@ repository-url: machine: target: [environment]: -[config]: +[target-config]: +[package-config]: [host]: true|false [warning-regex]: [interactive]: @@ -469,24 +479,50 @@ The name of the build environment to use. See \l{#arch-worker Worker Logic} for details. -\h2#arch-task-config|\c{config}| +\h2#arch-task-target-config|\c{target-config}| \ -[config]: +[target-config]: \ -The additional configuration options and variables. A single level of quotes +The additional target configuration options and variables. A single level of +quotes (either single or double) is removed in each value before being passed +to \c{bpkg}. For example, the following value: + +\ +target-config: config.cc.coptions=\"-O3 -stdlib='libc++'\" +\ + +Will be passed to \c{bpkg} as the following (single) argument: + +\ +config.cc.coptions=-O3 -stdlib='libc++' +\ + +Values can be separated with spaces or newlines. See \l{#arch-controller +Controller Logic} for details. + + +\h2#arch-task-package-config|\c{package-config}| + +\ +[package-config]: +\ + +The primary package manifest \c{*-build-config} value for the build +configuration the build task is issued for. See \l{bpkg#manifest-package +Package Manifest} for more information on this value. A single level of quotes (either single or double) is removed in each value before being passed to \c{bpkg}. For example, the following value: \ -config: config.cc.coptions=\"-O3 -stdlib='libc++'\" +package-config: \"?libcurl ~7.76.0\" \ Will be passed to \c{bpkg} as the following (single) argument: \ -config.cc.coptions=-O3 -stdlib='libc++' +?libcurl ~7.76.0 \ Values can be separated with spaces or newlines. See \l{#arch-controller @@ -499,8 +535,9 @@ Controller Logic} for details. [host]: true|false \ -If \c{true}, then the build configuration is self-hosted. If not specified, -\c{false} is assumed. See \l{#arch-controller Controller Logic} for details. +If \c{true}, then the build target configuration is self-hosted. If not +specified, \c{false} is assumed. See \l{#arch-controller Controller Logic} for +details. \h2#arch-task-warning-regex|\c{warning-regex}| @@ -924,20 +961,24 @@ modules (\c{}) and the list of configuration options and variables The re-executed \c{bbot} worker then proceeds to test the package from the repository by executing the following commands, collectively called a \i{worker script}. Each command has a unique \i{step id} that can be used as a -breakpoint and normally as a prefix in the \c{}, +breakpoint and normally as a prefix in the \c{}, \c{}, and \c{} values as discussed in \l{#arch-controller Controller Logic}. The \c{<>}-values are from the task manifest and the environment though some are assigned by the worker during the -script execution (configuration directories, UUIDs, etc). +script execution (configuration directories, UUIDs, etc). In particular, the +\c{}, \c{}, +\c{}, and \c{} values result +from parsing the \l{#arch-task-package-config \c{package-config}} task +manifest value. Some prefix step ids have fallback step ids which are used in the absence of the primary step id values. If the prefix step id differs from the breakpoint step id and/or has the fallback step ids, then they are listed in parenthesis: the prefix id before the colon and the fallback ids after it. -Some commands have no configuration or environment options or variables. Such -commands have only breakpoint step ids associated, which are listed in square -brackets. +Some commands have no target configuration or environment options or +variables. Such commands have only breakpoint step ids associated, which are +listed in square brackets. Note that the worker script varies for different primary package types. The \c{bbot} worker classifies the primary package based on the configuration type @@ -952,19 +993,21 @@ by always using the \c{bpkg.global.configure.build} prefix step id for global (as opposed to package-specific) \l{bpkg-pkg-build(1)} options. The \c{bpkg.global.configure.build} prefix id has no fallback ids. -Note finally that the worker adds the \c{config..develop=false} -configuration variables for the main and external test packages at the -\c{bpkg.configure.build} step to trigger their package skeleton creation and -loading. This makes sure that these packages can be used as dependencies of -dependents with configuration clauses. To keep the below listings concise, -these variables are not shown. +Note finally that if no configuration variables are specified in the main +package configuration, then the worker adds the +\c{config..develop=false} configuration variable for the main package at +the \c{bpkg.configure.build} step to trigger its package skeleton creation and +loading. It also adds this variable for external test packages at this step +and for the same purpose. This makes sure that these packages can be used as +dependencies of dependents with configuration clauses. To keep the below +listings concise, these variables are not shown. Worker script for \c{target} packages: \ # bpkg.create (bpkg.target.create : b.create, bpkg.create) # -bpkg -V create +bpkg -V create # bpkg.configure.add # @@ -978,9 +1021,11 @@ bpkg -v fetch --trust # bpkg.global.configure.build, # (bpkg.target.configure.build : b.configure, bpkg.configure.build)) # -bpkg -v build --configure-only \\ - / \\ - [[ ]...] +bpkg -v build --configure-only \\ + [{ }+] / \\ + [[ ]...] \\ + [([{ }+] \\ + ?[sys:][ ])...] # bpkg.update # @@ -1020,14 +1065,14 @@ bpkg -v update { # b.test-installed.create ( : b.create) # - b -V create + b -V create # For each test subproject: # { # b.test-installed.configure ( : b.configure) # - b -v configure + b -v configure [] } # b.test-installed.test @@ -1043,7 +1088,7 @@ bpkg -v update # bpkg.test-separate-installed.create_for_target : # bpkg.test-separate-installed.create) # - bpkg -V create + bpkg -V create # bpkg.test-separate-installed.configure.add ( # : bpkg.configure.add) @@ -1060,7 +1105,7 @@ bpkg -v update # (bpkg.test-separate-installed.configure.build_for_target : # bpkg.test-separate-installed.configure.build)) # - bpkg -v build --configure-only \\ + bpkg -v build --configure-only \\ [ ]... \\ ?sys: @@ -1097,7 +1142,7 @@ Worker script for \c{host} packages: # bpkg.create (bpkg.host.create : b.create, bpkg.create) # bpkg -V create --type host -d \\ - + } # # Otherwise: @@ -1123,7 +1168,7 @@ bpkg -v fetch -d --trust # bpkg.create (bpkg.target.create : b.create, bpkg.create) # bpkg -V create -d \\ - + # [bpkg.link] # @@ -1145,7 +1190,7 @@ bpkg -v fetch -d --trust # bpkg.create (bpkg.target.create : b.create, bpkg.create) # bpkg -V create -d \\ - + # [bpkg.create] # @@ -1192,19 +1237,25 @@ bpkg -v fetch -d --trust # - All parts have the same fallback step ids: b.configure and # bpkg.configure.build. # -bpkg -v build --configure-only \\ +bpkg -v build --configure-only \\ \\ -{ --config-uuid }+ \\ +{ --config-uuid \\ + [] }+ \\ / \\ \\ -{ --config-uuid }+ \\ +{ --config-uuid \\ + [] }+ \\ / \\ \\ -{ --config-uuid }+ \\ +{ --config-uuid }+ \\ { [ test-version-constraint>]... } \\ \\ -{ --config-uuid }+ \\ -{ [ test-version-constraint>]... } +{ --config-uuid }+ \\ +{ [ test-version-constraint>]... } \\ +\\ +({ --config-uuid [--config-uuid ] \\ + [] }+ \\ + ?[sys:][ ])... # bpkg.update # @@ -1257,14 +1308,14 @@ bpkg -v update -d { # b.test-installed.create ( : b.create) # - b -V create + b -V create # For each test subproject: # { # b.test-installed.configure ( : b.configure) # - b -v configure + b -v configure [] } # b.test-installed.test @@ -1281,7 +1332,7 @@ bpkg -v update -d # bpkg.test-separate-installed.create) # bpkg -V create --type host -d \\ - + # If task manifest refers to any runtime tests, examples, or # benchmarks packages: @@ -1307,7 +1358,7 @@ bpkg -v update -d # bpkg.test-separate-installed.create) # bpkg -V create -d \\ - + # [bpkg.test-separate-installed.create] # @@ -1339,7 +1390,7 @@ bpkg -v update -d # Note that any of the runtime or build-time tests related parts # (but not both) may be omitted. # - bpkg -v build --configure-only \\ + bpkg -v build --configure-only \\ \\ { --config-name }+ \\ { [ ]... } \\ @@ -1382,7 +1433,7 @@ Worker script for \c{module} packages: # bpkg.create (bpkg.module.create) # b -V create(, ) config.config.load=~build2 \\ - + bpkg -v create --existing --type build2 -d } # @@ -1409,7 +1460,7 @@ bpkg -v fetch -d --trust # bpkg.create (bpkg.module.create) # b -V create(, ) \\ - config.config.load=~build2 + config.config.load=~build2 bpkg -v create --existing --type build2 -d # bpkg.configure.add @@ -1428,7 +1479,7 @@ bpkg -v fetch -d --trust # bpkg.create (bpkg.target.create : b.create, bpkg.create) # bpkg -V create -d \\ - + # [bpkg.create] # @@ -1466,16 +1517,22 @@ bpkg -v fetch -d --trust # - All parts have the same fallback step ids: b.configure and # bpkg.configure.build. # -bpkg -v build --configure-only \\ +bpkg -v build --configure-only \\ \\ -{ --config-uuid }+ \\ +{ --config-uuid \\ + [] }+ \\ / \\ \\ -{ --config-uuid }+ \\ +{ --config-uuid \\ + [] }+ \\ / \\ \\ -{ --config-uuid }+ \\ -{ [ test-version-constraint>]... } +{ --config-uuid }+ \\ +{ [ test-version-constraint>]... } \\ +\\ +({ --config-uuid [--config-uuid ] \\ + [] }+ \\ + ?[sys:][ ])... # bpkg.update # @@ -1523,14 +1580,14 @@ bpkg -v update -d # bpkg.test-separate-installed.create) # bpkg -V create -d \\ - + # bpkg.test-separate-installed.create ( # bpkg.test-separate-installed.create_for_module : # bpkg.test-separate-installed.create) # bpkg -V create --type host -d \\ - + # [bpkg.test-separate-installed.link] # @@ -1553,7 +1610,7 @@ bpkg -v update -d # (bpkg.test-separate-installed.configure.build_for_module : # bpkg.test-separate-installed.configure.build)) # - bpkg -v build --configure-only \\ + bpkg -v build --configure-only \\ \\ { --config-name }+ \\ [ ]... \\ @@ -1635,49 +1692,50 @@ exec \"$@\" cc config.c=\"gcc-9 $mode\" config.cxx=\"g++-9 $mode\" \h#arch-controller|Controller Logic| A \c{bbot} controller that issues own build tasks maps available build -machines (as reported by agents) to \i{build configurations} according to the -\c{buildtab} configuration file. Blank lines and lines that start with \c{#} -are ignored. All other lines in this file have the following format: +machines (as reported by agents) to \i{build target configurations} according +to the \c{buildtab} configuration file. Blank lines and lines that start with +\c{#} are ignored. All other lines in this file have the following format: \ - [/] []* []* + [/] []* []* - = [:](|