Command Line Usage
kas - setup tool for bitbake based project
usage: kas [-h] [--version] [-l {debug,info,warning,error,critical}]
{build,checkout,clean,cleansstate,cleanall,purge,diff,dump,for-all-repos,lock,menu,shell}
...
Positional Arguments
- cmd
Possible choices: build, checkout, clean, cleansstate, cleanall, purge, diff, dump, for-all-repos, lock, menu, shell
sub command help
Named Arguments
- --version
show program’s version number and exit
- -l, --log-level
Possible choices: debug, info, warning, error, critical
Set log level (default: info)
Default:
'info'
Environment Variables
kas uses a number of environment variables to configure its behavior. The Variables Glossary provides an overview, wherein the tuple (C,K,E) denotes the scope of the variable.
By default, kas does not inherit the full host shell environment into the build environment. Instead, kas constructs a controlled environment to improve reproducibility and reduce host contamination.
How additional environment variables are handled depends on their scope and
on the selected sub-command. Where supported, variables can be defined in the
kas configuration or preserved explicitly from the host environment, for
example with -E/--preserve-env.
When using kas-container, this is more limited, especially for variables
that contain file or directory paths, because the container may use a
different directory layout.
All directories that are passed to kas by setting the corresponding
environment variables (e.g. KAS_WORK_DIR, KAS_BUILD_DIR, …) must
not overlap with each other, except for overlapping with KAS_WORK_DIR
(i.e. the build|sstate|downloads|repo-ref dirs can be below the work dir).
Environment variables that reference a file or directory must have a valid
path that is accessible and readable.
Variable Scope
kas-container (C)
The variable is processed or forwarded by the kas-container script.
For some variables, the variable is re-written to the container’s
directory layout.
Note
The env section of the project configuration can be used to make
arbitrary environment variables available to the build environment. When
invoking the build via kas-container, make sure to also forward the
corresponding environment variables into the container.
kas (K)
The variable is processed by kas itself. Some variables (e.g. the credentials for the awscli) are re-written to configuration files to also support older versions of the tooling.
build environment (E)
The variable is exported into the build environment. In this environment, the
bitbake command is executed.
config-file (c)
The variable can be set in the env section of the
Project Configuration. Note, that a value provided by the calling
environment takes precedence over the value in the configuration file.
Variables Glossary
These environment variables are processed before the configuration file is
read (except if stated otherwise). By that, they cannot be defined or
overwritten using the env section of the config file.
Environment variables |
Description |
|---|---|
|
The path of the kas work directory, current work directory is the default. This directory must exist if set. |
|
The path of the build directory,
|
|
The path to the repository reference directory.
Repositories in this directory are used as
references when cloning. In order for kas to
find those repositories, they have to be named
in a specific way. The repo URLs are translated
like this:
|
|
This overwrites the respective setting in the configuration file. |
|
Specifies alternatives for repo URLs. Just like
bitbake |
|
Specifies alternatives for apt URLs. Just like
|
|
Perform shallow git clone/fetch using –depth=N specified by this variable. This is useful in case CI always starts with empty work directory and this directory is always discarded after the CI run. |
|
Variable containing the private key that should be added to an internal ssh-agent. This key cannot be password protected. This setting is useful for CI build servers. On desktop machines, an ssh-agent running outside the kas environment is more useful. |
|
Path to the private key file that should be added to an internal ssh-agent. This key cannot be password protected. This setting is useful for CI build servers. On desktop machines, an ssh-agent running outside the kas environment is more useful. |
|
SSH authentication socket. Used for cloning over
SSH (alternative to |
|
Environment variables that are transferred to
the bitbake environment. The |
|
Directory for temporary files. |
|
These variables define the proxy configuration bitbake should use. |
|
Set proxy for native git fetches. |
|
The shell to start when using the |
|
The terminal options used in the |
|
Timezone settings. |
|
Path to the awscli configuration and credentials files that are copied to the kas home dir. |
|
Allows one to set and configure the git credential helper in the .gitconfig of the kas user. |
|
Path to a .gitconfig file which will be copied to the kas home dir as .gitconfig. |
|
Path to a .netrc file which will be copied to the kas home dir as .netrc. |
|
Path to a .npmrc file which will be copied to the kas home dir as .npmrc. |
|
Path to a container registry authentication file. |
|
Environment variables from GitLab CI, if set
.netrc is configured to allow fetching from
the GitLab instance. An entry will be appended
in case |
|
Environment variables from GitHub actions or
GitLab CI. If set to true, .gitconfig is
automatically imported.
For details, see |
|
Environment variables related to VSCode Remote Containers. If running in this environment, .gitconfig is automatically imported. |
|
Environment variables to control the concurrency. |
|
Select the version of the (official) kas container (e.g. 4.5). |
|
Select the base distro and its release of the
container image (e.g. |
|
Select the container image (full OCI path including tag). |
|
Explicitly set the container engine (either
|
|
Explicitly set the sudo command (either |
|
Explicitly set the path where kas will download
and install buildtools. If not set, kas will use
|
For details about the access of remote resources, see Credential Handling.