[Buildroot] [git commit] package/containerd: add control for additional build tags

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Nov 4 20:34:45 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=6122ba62f6d9ac4350b9bb2e5d935acfd077e2c9
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Disable the AUFS snapshotter by default. AUFS support has been deprecated
since v1.5 and won't be available with containerd v2.0.

Add configuration option for the ZFS snapshotter and add the proper
runtime dependencies.

Add configuration option for Kubernetes CRI support. Note that CRI
support requires a writeable /etc or an appropriate containerd
configuration.

Signed-off-by: Stefan Agner <stefan at agner.ch>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 package/containerd/Config.in     | 33 +++++++++++++++++++++++++++++++++
 package/containerd/containerd.mk | 13 +++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/package/containerd/Config.in b/package/containerd/Config.in
index e69dd6768a..12a53bc111 100644
--- a/package/containerd/Config.in
+++ b/package/containerd/Config.in
@@ -26,6 +26,39 @@ config BR2_PACKAGE_CONTAINERD_DRIVER_BTRFS
 	help
 	  Build the btrfs snapshot driver for containerd.
 
+config BR2_PACKAGE_CONTAINERD_DRIVER_DEVMAPPER
+	bool "devmapper snapshot driver"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2
+	depends on BR2_USE_MMU # lvm2
+	depends on !BR2_STATIC_LIBS # lvm2
+	select BR2_PACKAGE_LVM2
+	help
+	  Build the devmapper snapshot driver for containerd.
+
+comment "devmapper snapshot driver needs a toolchain w/ threads, dynamic library"
+	depends on BR2_USE_MMU
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_CONTAINERD_DRIVER_ZFS
+	bool "zfs snapshot driver"
+	depends on BR2_LINUX_KERNEL # zfs
+	depends on BR2_PACKAGE_HAS_UDEV # zfs
+	depends on BR2_USE_MMU  # zfs
+	depends on BR2_TOOLCHAIN_HAS_THREADS  # zfs
+	select BR2_PACKAGE_ZFS
+	help
+	  Build the zfs snapshot driver for containerd.
+
+comment "zfs snapshot driver needs a Linux kernel, udev, toolchain w/ threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_LINUX_KERNEL || !BR2_PACKAGE_HAS_UDEV || \
+		!BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_CONTAINERD_CRI
+	bool "Kubernetes CRI support"
+	help
+	  Build containerd with Kubernetes CRI support.
+
 endif
 
 comment "containerd needs a glibc or musl toolchain w/ threads"
diff --git a/package/containerd/containerd.mk b/package/containerd/containerd.mk
index d29a796a72..7c130770c0 100644
--- a/package/containerd/containerd.mk
+++ b/package/containerd/containerd.mk
@@ -24,6 +24,7 @@ CONTAINERD_BUILD_TARGETS = \
 	cmd/ctr
 
 CONTAINERD_INSTALL_BINS = $(notdir $(CONTAINERD_BUILD_TARGETS))
+CONTAINERD_TAGS = no_aufs
 
 ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
 CONTAINERD_DEPENDENCIES += libapparmor
@@ -41,6 +42,18 @@ else
 CONTAINERD_TAGS += no_btrfs
 endif
 
+ifneq ($(BR2_PACKAGE_CONTAINERD_DRIVER_DEVMAPPER),y)
+CONTAINERD_TAGS += no_devmapper
+endif
+
+ifneq ($(BR2_PACKAGE_CONTAINERD_DRIVER_ZFS),y)
+CONTAINERD_TAGS += no_zfs
+endif
+
+ifneq ($(BR2_PACKAGE_CONTAINERD_CRI),y)
+CONTAINERD_TAGS += no_cri
+endif
+
 define CONTAINERD_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 0644 $(@D)/containerd.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/containerd.service



More information about the buildroot mailing list