In case SHELL is `/usr/bin/bash`, `/usr/bin/zsh` or something else that
is not available in the kas docker container, fall back to `/bin/bash`.
Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This allows the `kas build` command to be used when you need to pass
extra arguments to bitbake.
A `--` separator is needed when passing arguments which begin with a
dash so that argparse doesn't try to parse them as kas further
arguments.
For example, to pass `--skip-setscene` to bitbake:
kas build config.yml -- --skip-setscene
Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The return value of kas() is used as the argument to sys.exit() so it
should be 0 to report successful completion.
Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This used to be required in older Isar versions (prio to commit
8b8a339cfaa4) for one configuration. It may still be required by
downstream layers, though it can be avoided. To overcome this
potential need to enter the host's root password without breaking those
cases, keep the feature but make it explicit (--with-loop-dev option).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
While this works from kas perspective, some build recipes will no like
to be run with ID 0 and may either fail loudly or subtly. Better warn
when a user applies sudo on kas-docker or otherwise runs it from a root
shell.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The `--aws-dir` parameter for the kas-docker script allows to specify a
AWScli config directory which will then be mounted to `/etc/skel/.aws`
and copied by kas into the internal home directory using the `AWS_*`
environment variables.
Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Bitbake provides a S3 fetcher (`lib/bb/fetch2/s3.py`), however the
`AWS_CONFIG_FILE` and `AWS_SHARED_CREDENTIALS_FILE` variables are not
transfered to the environment of the fetcher command (`aws` in this
case) in the `runfetchcmd` function (`lib/bb/fetch2/__init__.py`).
That means the location of these files need to be the default one, so
copying it in KAS to the new HOME directory is necessary.
This patch implements the copying of those files if the
`AWS_CONFIG_FILE` and `AWS_SHARED_CREDENTIALS_FILE` are set.
Per default there variables are not available in the bitbake
environment. To have them available there a `env` entry in the kas
configuration will be necessary.
Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
bitbake provides a fetcher for Amazon S3 storage using the awscli
command. This patch adds the awscli package to the container.
Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
We were always printing the ID of the last patch of a repo because the
application loop only iterated over a set of patch paths, not the patch
entries. Fix that be assembling a tuple of path and ID in my_patches.
Reported-by: Mustafa Yuecel <mustafa.yuecel@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Resolves "SC2145: Argument mixes string and array". Harmless here, but
the result looks nicer anyway.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This requires consistent quoting of related variables. Furthermore, the
eval in trace() has to be removed, and along with it the additional
single-tick quotes of some parameters.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This will allow passing of all docker arguments in a properly quoted
way. More of them will need that in order to support paths with spaces.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The SHELL variable we pass can neither contain spaces nor newlines - we
check for supported values. Simplify the related assignment.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
'qemu' is not a valid machine. So, let's use the default one defined in
poky -> 'qemux86-64' [1]
Fixes:
ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
MACHINE=qemu is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.
[1] - https://git.yoctoproject.org/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample#n37
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
PyYAML started to require at least 3.5. There is possibly a way to pick
an older version of it to fulfill its needs, but it's also not worth to
invest effort in this old version anymore.
Use that chance to include 3.8 in the support scope.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
In at least some versions of the 'ssh-add' command, adding a SSH key
requires that SSH key is newline terminated. If it is not, ssh-add
doesn't add the key and, instead, unhelpfully prompts for a
passphrase for the key ('Enter passphrase for (stdin):').
This change makes sure the key is terminated with a newline character to
hopefully avoid this issue occurring as often.
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
HOSTTOOLS requires ps when running testimage.
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Move those needs to top at this chance and refactor the rest. The net
additions are:
- python3-pexpect
- debianutils
- iputils-ping
- python3-git
- python3-jinja2
- libegl1-mesa
- libsdl1.2-dev
- pylint3
- xterm
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Recent bitbake requires to declare multiconfig targets via "mc:".
Use that chance to refactor the function and match on the colon as well.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
We just need to lift the dist for that target to xenial - but not to
bionic because 3.4 is then no longer supported.
In xenial, mercurial is part of travis image. Additionally installing it
is not needed and actually breaks things. But things are more
complicated because hg is under /usr/local/bin, and kas used a built-in
PATH for tools that does not include this.
At this chance, remove "sudo: required" - no longer needed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
That once caused issues when rolling back (checkout) since our local
branch we patched and commited on had the desired name.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
If refspec is pointing to an upstream branch name, the checkout for a
second run will not reset a repo back to the upstream commit. That is
because we applied the repo patches to a local branch that carries the
name of the upstream one.
Fix that by switching to local branch prior to applying any patches.
Reported-by: Belisko Marek <marek.belisko@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Create a 755 file in a git and an hg repo, using a patch. Later make
sure the permissions are as expected.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
patch can not handle file mode headers and can therefore not be used to
create executable files. fixes 8a2a21d799
In addition commit every single patch and treat git patches as
potentially just diffs and not mails.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This reverts commit 7bd738a43c.
The bug has been fixed upstream, ne need to patch the script anymore.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This interlocks kas-docker with the corresponding kas images. The goal
is to avoid surprises because of API changes between kas-docker and the
images as well as to allow users to freeze the builder image by using a
specific kas-docker version.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This reverts commit 97942197bc.
This is only temporarily in order to release another 1.x version that is
based on stretch. Older Yocto versions, maybe up to 2.4 or 2.5, require
stretch due to incompatibilities with host tools such as git.
After that release, this commit will be restored, and we will roll out a
2.x series that shall use buster in its images.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Adding --cmd to the task argument changed the name of the destination
variable, and that broke the whole subcommand because 'cmd' is already
used by the top-level parser. Fix this by setting dest explicitly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>