Jelajahi Sumber

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>
TIAN Yuanhao 2 tahun lalu
induk
melakukan
680f28af58
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      package/crun/crun.mk

+ 7 - 0
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))