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>
This aligns us with bitbake. Moreover, -c/--cmd is easier to tell apart
from --target. Keep --task for backward compatibility.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Fix a bug in the Docker image build process
that delete /var/tmp directory.
Desired is only delete its content.
Signed-off-by: Matteo Facchinetti <matteo.facchinetti@sirius-es.it>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
By default, we pull latest when running kas-docker. That may not be
desired in all cases, e.g. testing different image revisions or nailing
down those used in a build. Allow to override the default via the
environment variable KAS_IMAGE_VERSION.
For now, we stick with the default "latest", but we may also hard-code
the last release here at some later point.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This adds a test where we clone a git and a hg repo and apply a single
patch and later a quilt series on each of them.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Switch to applying all patches with "patch" and later do a "<vcs> add;
<vcs> commit". Also iterate over quilt series files ourselfs and apply
the patches one by one.
This means we can apply patches on mercurial as well as on git.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The interface cmd prototypes got out of sync so mercurial stopped
working. Align with git again to fix that.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Currently the the remote URL is only set during the initial clone.
This might lead to confusion with the user as changing the URL in the kas.yml
does not get reflected and thus errors about references not found show up.
This change makes sure the URL is always set to the value specified in the
kas.yml file.
For mercurial this currently prints a warning as there is no command to change
the default path.
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
[Jan: fix up style, adjust comment on hg's set_remote_url_cmd]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Will become a hard dependency when switching the (currently broken)
patch class of Isar to one derived from OE. Prepare for that.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Other values will cause the container to fail because the shell binary
is missing. This avoids non-obvious failures when the host SHELL is
configured differently.
Reported-by: Phillipp von Rotenhan <phillipp.von_rotenhan.ext@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
- gnupg is currently installed into kas-docker due to reprepro's
requirement. Hence, available only in isar version of kas-docker.
- Add gnupg explicitly in Dockerfile. It is needed for both isar and
yocto builds.
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
It turned out [1] that our current way of setting up binfmt_misc during
container start does not reliably work, namely does not overwrite
incompatible host settings. Running dpkg-reconfigure solves this.
To avoid confusing warnings of the kind
update-binfmts: warning: qemu-aarch64 already enabled in kernel.
we filter them out. That will continue to flood the console with
warnings in case the container is started without privileges.
[1] https://groups.google.com/forum/#!msg/isar-users/2G-Diz0BR1Y/Y0X6eHggCgAJ
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
Doing that will allow building arm64 buster images with Isar. The new
qemu works just fine for all older suites like stretch.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>