summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-10-29 14:48:49 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-11-15 19:50:00 +0000
commit5dfe66298a6ba94bd879d4f173dda8d74f5e989d (patch)
treef85abe167c98faf3383669cdaf9aa89a5899c2ad
parente2c3d012f98574e7097ea35335ae4a3719c6ddac (diff)
downloadmeta-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.bb7
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
23inherit autotools-brokensep pkgconfig 23inherit autotools-brokensep pkgconfig
24 24
25# if this is true, we'll symlink crun to runc for easier integration
26# with container stacks
27CRUN_AS_RUNC ?= "true"
28
25PACKAGECONFIG ??= " \ 29PACKAGECONFIG ??= " \
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
48do_install() { 52do_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}