From 680f28af58364f4152f3d9b582b312538fa0e500 Mon Sep 17 00:00:00 2001 From: TIAN Yuanhao Date: Thu, 6 Oct 2022 07:07:54 -0700 Subject: [PATCH] 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 Reviewed-by: Christian Stewart [yann.morin.1998@free.fr: split into its own patch] Signed-off-by: Yann E. MORIN --- package/crun/crun.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/crun/crun.mk b/package/crun/crun.mk index fd8bfb0981..ddb96a0b33 100644 --- a/package/crun/crun.mk +++ b/package/crun/crun.mk @@ -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))