package/crun: impersonate runc

crun is a drop-in replacement for runc, so we can use the former to
impersonate the latter when it is not enabled.

To do so, we create a runc symlink pointing to crun, when runc is not
enabled.

See: https://github.com/containerd/containerd/discussions/6162

Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Reviewed-by: Christian Stewart <christian@paral.in>
[yann.morin.1998@free.fr: split into its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
TIAN Yuanhao 2022-10-06 07:07:54 -07:00 committed by Yann E. MORIN
parent 4d5fd84496
commit 680f28af58

View File

@ -44,4 +44,11 @@ else
CRUN_CONF_OPTS += --disable-systemd
endif
ifeq ($(BR2_PACKAGE_RUNC),)
define CRUN_CREATE_SYMLINK
ln -sf crun $(TARGET_DIR)/usr/bin/runc
endef
CRUN_POST_INSTALL_TARGET_HOOKS += CRUN_CREATE_SYMLINK
endif
$(eval $(autotools-package))