OEcore/bitbake are moving to use the clearer ":" as an overrides
separator.
This is pass one of updating the meta-virt recipes to use that
syntax.
This has only been minimally build/runtime tested, more changes
will be required for missed overrides, or incorrect conversions
Note: A recent bitbake is required:
commit 75fad23fc06c008a03414a1fc288a8614c6af9ca
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Sun Jul 18 12:59:15 2021 +0100
bitbake: data_smart/parse: Allow ':' characters in variable/function names
It is becomming increasingly clear we need to find a way to show what
is/is not an override in our syntax. We need to do this in a way which
is clear to users, readable and in a way we can transition to.
The most effective way I've found to this is to use the ":" charater
to directly replace "_" where an override is being specified. This
includes "append", "prepend" and "remove" which are effectively special
override directives.
This patch simply adds the character to the parser so bitbake accepts
the value but maps it back to "_" internally so there is no behaviour
change.
This change is simple enough it could potentially be backported to older
version of bitbake meaning layers using the new syntax/markup could
work with older releases. Even if other no other changes are accepted
at this time and we don't backport, it does set us on a path where at
some point in future we could
require a more explict syntax.
I've tested this patch by converting oe-core/meta-yocto to the new
syntax for overrides (9000+ changes) and then seeing that builds
continue to work with this patch.
(Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Fix for rare legacy systems which still use simultaneously both
sysvinit and systemd in DISTRO_FEATURES. This fix avoids issues
during do_rootfs with postinstall scriptlets of ['docker-ce'].
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
By the docker-packaging repository and https://docs.docker.com/engine/install/centos/#installation-methods
docker is packaged by most distros with a split between the engine and the CLI.
We do the same here, by introducing the -cli package
But to keep existing use cases working, we also create a RDEPENDS between the main
docker package (the engine) and the cli, so existing "docker" package installs will
continue to work the same way. To have separate and non-redepending packages created
set the DOCKER_UNIFIED_PACKAGE variable to False
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Now that docker-ce is being built from the same repos as docker-moby,
the only unique things in the recipes are the SRCREVs.
We move the common packaging, compile/install routines and configuration
to the .inc files.
We also move the patches to the generic 'files' directory, so they
can be shared.
If we there are SRCREV bumps in the future that diverge moby and
docker, we'll hold patches in their named directorys and tweak
the compile/install routines as necessary.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
The kernel RRECOMMENDS, wasn't complete and in some minimal systems
we are missing modules to start dockerd.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
The docker daemon supports systemd socket activation. If we enable
docker.socket (and not docker.service) then the daemon will be started
when it is first used.
Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Trying to use docker info and hello world container without this module
causes a daemon error.
docker info error log:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the
docker daemon running?
dockerd error log:
PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m
addrtype --dst-type LOCAL -j DOCKER: iptables v1.8.3 (legacy): Couldn't
load match `addrtype':No such file or directory
Signed-off-by: Norbert Kaminski <norbert.kaminski@3mdeb.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Since commit:
[
Author: Tom Rini <trini@konsulko.com>
Date: Fri Feb 8 13:22:35 2019 -0500
docker: Move /etc/docker to a symlink to volatiles
The only thing which docker uses /etc/docker for is a TLS key for
connecting with other TLS-enabled services. Make /etc/docker a symlink
to the existing docker volatiles directory so that we can use docker on
a read-only rootfs.
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]
We've had a transient / volatile docker configuration since we point
our /etc configuration to /run. This is not always a good thing if
a static configuration for keys, etc, is desired.
We maintain this functionality under the 'transient-config'
PACKAGECONFIG, and also allow the existing static/permanent config
to be used.
Signed-off-by: Matt Spencer <matthew@thespencers.me.uk>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
The recipe which was providing the default "docker" package was aligned
with the moby repositories. In order to make that alignment clear, we
rename that recipe docker-moby.
To allow easier switching between the docker providing recipes, we
introduce a virtual/docker PROVIDES to the common .inc file (and
hence each recipe). This allows users to chose what they want via
the standard PREFERRED_PROVIDER mechanism.
Also to allow existing package lists and image installs to
continue to work without changes, we make sure that the implementation
specific docker-<foo> packages RPROVIDE docker. If any packages are
missed, we'll add them to this list in future updates.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
When the go-lang container recipes were first created there were issues
with strip and the resulting binaries. As such, strip was inhibited for
the various packages.
This variable is now set in the default classes, and tests show that
strip works on the binaries (saving up to 2M on disk for some binaries)
with no runtime issues found.
So we drop our explicit set of the inhibit and let the build proceed
by the defaults.
If issues are found, we can re-enable the setting or bbappends can
turn it back on for builds showing issues.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
If docker run --init is used docker expects docker-init to be
present, if not Docker fails to start the container with the
following error:
docker: Error response from daemon: exec: "docker-init": executable file not found in $PATH.
However, docker-init does not get deployed by default since commit
d19fda3743 ("docker: consolidate common depends/options"). Readd
docker-init through a PACKAGECONFIG RDEPENDS to make sure it gets
deployed by default again.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
The split between docker-ce and docker (moby) was initially
quite different, and docker-ce was more of a reference versus
a supported / working package.
Upstream has evolved such that both are valid options, and
may be chosen due to different requirements.
Rather than duplicating all the settings, we can move the
dependencies, init, rdepends, users, etc, into a .inc file and
share them.
For now, we keep the build separate, since depending on the
uprev status, they still can require different build options
and packaging.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>