Commit Graph

289 Commits

Author SHA1 Message Date
Jan Kiszka
8b91666943 travis: Add python 3.7 test
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>
2019-10-04 21:10:49 +02:00
Jan Kiszka
a67476a9ac travis: Enforce latest pytest
This fixes breakages due to outdated/inconsistent version in travis.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-10-04 20:20:51 +02:00
Henning Schild
63f8a28321 Docker: move on to buster
buster is the new stable, use it

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-10-01 16:57:20 +02:00
Jan Kiszka
e9ca55a239 Release 1.1 2019-10-01 16:21:40 +02:00
Jan Kiszka
a8dfbda062 scripts/release: Remove pypitest
There is no value in pushing to that registry.

Also drop the broken link at this chance.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-10-01 16:07:23 +02:00
Jan Kiszka
3ef3ac855e Avoid "RuntimeError: Event loop is closed"
Triggered by pytest now.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-09-25 11:00:45 +02:00
Henning Schild
e29035407f tests: test patching of symbolic refspecs i.e branches
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>
2019-09-25 10:14:22 +02:00
Jan Kiszka
26a1a0b03b Create from local branch before applying patches with git
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>
2019-09-23 13:08:51 +02:00
Henning Schild
acc60f4f3a tests: make sure patches can create executables
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>
2019-09-21 12:49:53 +02:00
Henning Schild
81c5beedaa repos: apply patches with version control system and not patch
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>
2019-09-21 12:49:47 +02:00
Henning Schild
363eca077c Revert "Dockerfile: Patch oe-git-proxy to truly disable proxying by default"
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>
2019-09-18 22:13:03 +02:00
Jan Kiszka
02fcc52007 Dockerfile: Add tmux and libncurses-dev
Needed for devshell and menuconfig targets.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-09-12 15:12:17 +02:00
Jan Kiszka
61f31c75fd Update maintainer name
I took over the maintainership from Daniel.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-09-11 13:43:15 +02:00
Jan Kiszka
8e36b4f72e release: Adjust to new maintainer's preferences
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-09-11 12:52:01 +02:00
Jan Kiszka
0137a92f33 release: Pick up old version from git
The reasonable expectation is that the last tag is also the last
release.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-09-11 12:52:01 +02:00
Jan Kiszka
0a1072ec79 Encode image version into kas-docker on release
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>
2019-09-11 12:52:01 +02:00
Jan Kiszka
dbde2a75fc Revert "Docker: move on to buster"
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>
2019-09-11 12:51:39 +02:00
Jan Kiszka
419e196cbb build: Fix name of argument variable
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>
2019-09-03 10:42:19 +02:00
Jan Kiszka
8558b566d9 build: Add -c and --cmd as aliases for --task
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>
2019-08-31 12:30:53 +02:00
Jan Kiszka
08a1326825 kas-docker: Reformat help output
Make sure to fit into 80 columns.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-08-30 13:41:16 +02:00
Jan Kiszka
b2af1bcfe7 config: Remove dead code
Not used anywhere, dates back to dynamic configs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-08-30 09:41:46 +02:00
Matteo Facchinetti
1dfb4ebb06 Dockerfile.isar: preserve /var/tmp directory from an unwanted removal
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>
2019-08-29 18:55:37 +02:00
Jan Kiszka
f3f004f4ea kas-docker: Allow to define docker image revision
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>
2019-08-23 15:24:36 +02:00
Henning Schild
fafc017392 tests: add a testcase for applying patches
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>
2019-08-20 17:54:15 +02:00
Henning Schild
8a2a21d799 repos: change the way we apply patches
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>
2019-08-20 12:53:54 +02:00
Henning Schild
df8d7b929d repos: Fix up the basic mercurial support
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>
2019-08-14 12:10:08 +02:00
Pascal Bach
66bd078e7f repos: make sure the remote url is matching the kas file
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>
2019-08-13 20:38:03 +02:00
Jan Kiszka
e9659cd19b Docker: Add quilt to kas-isar
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>
2019-08-13 18:41:08 +02:00
Jan Kiszka
1988cdd26b kas-docker: Propagate only supported SHELL settings
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>
2019-08-08 14:48:52 +02:00
Henning Schild
97942197bc Docker: move on to buster
buster is the new stable, use it

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-08-08 14:39:40 +02:00
Vijai Kumar K
6ed21ad62c Dockerfile: Add gnupg package
- 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>
2019-08-08 14:39:21 +02:00
Daniel Wagner
907816a5c4 Release 1.0 2019-03-21 13:07:32 +01:00
Jan Kiszka
2fc711a459 Dockerfile.isar: Adjust binfmt setup for qemu-user-static
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>
2019-03-20 09:49:34 +01:00
Henning Schild
6fdbe299a4 docker: Take qemu-user-static from buster for Isar image
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>
2019-02-26 10:24:38 +01:00
Daniel Wagner
5b5694daf7 Release 0.20.1 2019-02-18 15:03:10 +01:00
Jan Kiszka
3eab427cc0 kas-docker: Restore KAS_PREMIRRORS support
Got broken by the merge in 0cb5d17e33.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-18 14:54:46 +01:00
Daniel Wagner
3ce0a1f941 Release 0.20.0 2019-02-18 11:15:00 +01:00
Hosgor, Tolga (CT RDA DS EU TR MTS)
0cb5d17e33 kas-docker: add --no-proxy-from-env option
Allow kas-docker to use proxy configuration of docker client instead of
inheriting proxy configuration from the current environment.

Signed-off-by: Hosgor, Tolga (CT RDA DS EU TR MTS) <tolga.hosgor@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-14 09:31:44 +01:00
Jan Kiszka
2f24bdeac2 repos: Fail on unsuccessful patching
There is no good reason to only warn about an incorrect patch entry or
a missing patch file. This just causes CI systems to succeed with a
build - or fail at unexpected places.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-14 09:22:55 +01:00
Jan Kiszka
2f7650bb05 Add KAS_PREMIRRORS support
Analogously to bitbake's PREMIRRORS, this allows to define alternative
sources for repo URLs specified in kas files.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-14 09:20:35 +01:00
Jan Kiszka
dce5c0029a kas-docker: Enable multi-line variables
We need to double-quote the content of the variables in order to
preserve newlines.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-14 09:20:34 +01:00
Jan Kiszka
7bd738a43c Dockerfile: Patch oe-git-proxy to truly disable proxying by default
Upstream oe-git-proxy has a bug [1] and currently does proxying
unconditionally, just being stopped in the absence of other proxy
settings. Patch in the fix until upstream picks it up.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2019-January/278496.html

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-14 09:20:32 +01:00
Jan Kiszka
1b6e3f2fb9 kas-docker: Pass in NO_PROXY
Required to control oe-git-proxy exceptions.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2019-02-14 09:20:29 +01:00
Maciej Pijanowski
4d09e411ef docs/userguide.rst: fix typos, improve grammar
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2019-01-17 15:17:14 +01:00
Jan Kiszka
dabda7617f kas-docker: Translate all kas files into containter paths
Ensure that all file elements of the kas file parameter are properly
canonicalized and mapped onto the container volume. This is important
when kas-docker is called using relative paths while PWD is not the
repository root.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-01-02 16:56:04 +01:00
Henning Schild
70c568f05f CONTRIBUTING: add subscription links for list to document
Signed-off-by: Henning Schild <henning.schild@siemens.com>
2018-12-17 10:58:33 +01:00
Henning Schild
ffbfedaa2a kas-docker: fix hg argument for working directory
Signed-off-by: Henning Schild <henning.schild@siemens.com>
2018-12-17 10:53:20 +01:00
Jan Kiszka
280a695ab3 kas-docker: Pass build and shell options into container
This allows invocations like "kas-docker build --task clean kas.yml".

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2018-12-17 10:53:20 +01:00
Jan Kiszka
5a68998ba7 kas-docker: Allow passing multi-word variables into the container
This is complex, not just because we are passing the arguments to the
trace function, but already because they need to be protected in their
structure when unrolling them at the top level. The trick seems to be
using the argument list via set and "$@" to preserve the individual
words. Due to the trace indirection, we additionally need the single
quotes around the variable values.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2018-12-17 10:53:20 +01:00
Jan Kiszka
ccc58c7010 kas-docker: Fix SSH_DIR check
We were missing a closing brace, and the line became rather long as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2018-12-17 10:53:20 +01:00