diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-10-29 14:48:49 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-11-15 19:50:00 +0000 |
commit | 5dfe66298a6ba94bd879d4f173dda8d74f5e989d (patch) | |
tree | f85abe167c98faf3383669cdaf9aa89a5899c2ad | |
parent | e2c3d012f98574e7097ea35335ae4a3719c6ddac (diff) | |
download | meta-virtualization-5dfe66298a6ba94bd879d4f173dda8d74f5e989d.tar.gz |
crun: conditionally offer runc binary via symlink
When integrating into some container stacks (such as containerd),
the detailed configuration toml changes to change the container
runtime from runc to crun is not always trivial.
To avoid (for now) carrying configuration snippets as part of
the recipes, we can symlink runc to crun as crun is fully
compatible with runc.
Note: this means you can't have runc and crun installed on the
same image if the symlinking is done. Hence why this symlinking
is conditional.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/crun/crun_git.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/recipes-containers/crun/crun_git.bb b/recipes-containers/crun/crun_git.bb index 5e25bd74..e9f8f58d 100644 --- a/recipes-containers/crun/crun_git.bb +++ b/recipes-containers/crun/crun_git.bb | |||
@@ -22,6 +22,10 @@ S = "${WORKDIR}/git" | |||
22 | 22 | ||
23 | inherit autotools-brokensep pkgconfig | 23 | inherit autotools-brokensep pkgconfig |
24 | 24 | ||
25 | # if this is true, we'll symlink crun to runc for easier integration | ||
26 | # with container stacks | ||
27 | CRUN_AS_RUNC ?= "true" | ||
28 | |||
25 | PACKAGECONFIG ??= " \ | 29 | PACKAGECONFIG ??= " \ |
26 | caps external-yajl man \ | 30 | caps external-yajl man \ |
27 | ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \ | 31 | ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \ |
@@ -47,4 +51,7 @@ do_configure:prepend () { | |||
47 | 51 | ||
48 | do_install() { | 52 | do_install() { |
49 | oe_runmake 'DESTDIR=${D}' install | 53 | oe_runmake 'DESTDIR=${D}' install |
54 | if [ -n "${CRUN_AS_RUNC}" ]; then | ||
55 | ln -sr "${D}/${bindir}/crun" "${D}${bindir}/runc" | ||
56 | fi | ||
50 | } | 57 | } |