This will be used to carry the type of repo we are talking about. At the
moment it defaults to "git".
Signed-off-by: Henning Schild <henning.schild@siemens.com>
The user just calls that factory and gets something that is a Repo, in
fact just a GitRepo for now.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
If we start on a green field (only kas is available) we can't setup
the environment directly. So in this case the order is SetupProxy,
ReposFetch, ReposCheckout and then SetupEnvironment. Only if the
--keep-config-unchanged flag is provided directly go from SetupProxy
to SetupEnvironment.
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
pip warns us with:
"Running pip install with root privileges is generally not a good
idea. Try `pip3 install --user` instead."
So update the documentation to install kas as user.
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Forgotten by 49cb9b7a7b: The default is now set in
get_bitbake_targets.
This fixes spurious overwrites of the target defined in the config file.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
pylint reports
R: 52, 4: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
According the Python documentation we should raise AttributeError
if the key is unknown.
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
the way the env variable got extended broke the last entry in it and the
first entry in the added string because the two strings where not space
separated
i.e.
"... no_proxySSTATE_DIR ..."
now you shoud get
"... no_proxy SSTATE_DIR ..."
Seems that problem was in kas since day one.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
This could happen if you use kas to checkout repos that do not contain
the directory. i.e. repos that are not actually bb layers
Signed-off-by: Henning Schild <henning.schild@siemens.com>
With this its possible to create custom environment variables within the kas
configuration file, that are passed through to the build environment:
env:
VARIABLE_NAME: "default variable value"
Those variables can be overwritten by variables of the environment kas is
started in:
$ VARIABLE_NAME="overwritten variable value" kas shell ...
Those variables are also added to the 'BB_ENV_EXTRAWHITE' variable list to make
them available to bitbake.
This is useful for instance storing sensitive information, that should not be
part of the configuration files or bitbake recipes.
Signed-off-by: Claudius Heine <ch@denx.de>
When the user restarts an already existing kas container, errors are
thrown because of existing folders or users. One example is the usage
of gitlab-ci runners.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
/sbin and /usr/sbin might contain tools Yocto depens on, e.g. 'ip'.
"""
The following required tools (as specified by HOSTTOOLS) appear to be
unavailable in PATH, please install them in order to proceed:
ip
"""
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This patch adds multiconfig support to kas by defining the
"BBMULTICONFIG" variable in the "local.conf" file.
Signed-off-by: Claudius Heine <ch@denx.de>
Its useful to know the missing repos that are required to
create the full configuration as they are detected.
This might help to find problems within the configuration and kas code
in the future.
Signed-off-by: Claudius Heine <ch@denx.de>
Since its easy to forget to update the documentation when changing the
configuration file format version, this patch adds a small note to
remind the developer about it.
Signed-off-by: Claudius Heine <ch@denx.de>
I was observed that in some more evolved configurations the build
stopped because kas wanted to clone a git repository multiple times
concurrently. This failed.
This patch should prevent these issues by removing all possible
duplicates from the missing_repos list prior to returning it to the
configuration.
Signed-off-by: Claudius Heine <ch@denx.de>
This patch updated the 'docs/format-changelog.rst' file to include
information about the configuration file version 3 and 4.
Signed-off-by: Claudius Heine <ch@denx.de>
In environments where proxies are used, there are usually some addresses
that should be reached without proxy. So it makes sense to document
that.
Signed-off-by: Claudius Heine <ch@denx.de>
Some bitbake recipes use FTP to fetch objects. This patch adds support
for the ftp_proxy variable to kas. Is now usable in the same manner as
the 'http_proxy' variable
Signed-off-by: Claudius Heine <ch@denx.de>
Using the jsonschema module makes some checks in the includehandler
redundant and can be removed. This patch does this.
Signed-off-by: Claudius Heine <ch@denx.de>
Currently many of the error messages regarding the configuration file
are not really helpful.
To improve reporting this patch adds validation of the configuration
files using the jsonschema module.
Example:
Forgetting ':' at the end of a layer definition, like this:
repos:
meta-iot2000:
layers:
meta-iot2000-example
^
Exception before:
TypeError: string indices must be integers
Exception after:
Validation Error:
'meta-iot2000-example' is not of type 'object'
Failed validating 'type' in schema['properties']['repos']['additionalProperties']['properties']['layers']:
{'additionalProperties': {'oneOf': [{'type': 'null'},
{'type': 'integer'},
{'type': 'boolean'},
{'type': 'string'}]},
'type': 'object'}
On instance['repos']['meta-iot2000']['layers']:
'meta-iot2000-example'
This patch adds 'jsonschema' as an additional dependency.
Signed-off-by: Claudius Heine <ch@denx.de>
With this patch support for building multiple targets in parallel with
bitbake is now supported.
Changes:
- Its now possible to state a list of targets under the target key in
the configuration file.
Example:
target:
- product-image
- product-update-image
- Its now possible to define multiple targets in the kas command line.
Example:
$ kas build --target product-image --target product-update-image \
kas.yml
- Its now possible to define multiple targets via the environment:
Example:
$ export KAS_TARGET="product-image product-update-image"
$ kas build kas.yml
Signed-off-by: Claudius Heine <ch@denx.de>
It might be useful to see the merged configuration in case of debugging.
This patch adds it to the debug output log level.
Signed-off-by: Claudius Heine <ch@denx.de>
Captain Hindsight: We should have never committed 13a87cb8c7 ("Allow
to define task in config and environment") without forwarding the file
version. Without this, no config file writer can tell kas versions
apart that support task control from those that don't.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>