diff --git a/DEVELOPERS b/DEVELOPERS index 5939361ba8..64af4deb53 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -534,6 +534,7 @@ F: package/python-pylibftdi/ N: Christian Stewart F: package/batman-adv/ F: package/catatonit/ +F: package/cni-plugins/ F: package/containerd/ F: package/crun/ F: package/delve/ diff --git a/package/Config.in b/package/Config.in index cbdaed2279..450a73d4ca 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1821,6 +1821,7 @@ menu "Networking" source "package/bluez5_utils-headers/Config.in" source "package/c-ares/Config.in" source "package/cgic/Config.in" + source "package/cni-plugins/Config.in" source "package/cppzmq/Config.in" source "package/curlpp/Config.in" source "package/czmq/Config.in" diff --git a/package/cni-plugins/Config.in b/package/cni-plugins/Config.in new file mode 100644 index 0000000000..e01cadc026 --- /dev/null +++ b/package/cni-plugins/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_CNI_PLUGINS + bool "cni-plugins" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve + depends on BR2_USE_MMU + help + Container Networking Interface plugins. + + https://github.com/containernetworking/plugins + +comment "cni-plugins needs a glibc or musl toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS && \ + BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC diff --git a/package/cni-plugins/cni-plugins.hash b/package/cni-plugins/cni-plugins.hash new file mode 100644 index 0000000000..fc3b5a7ead --- /dev/null +++ b/package/cni-plugins/cni-plugins.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 c86c44877c47f69cd23611e22029ab26b613f620195b76b3ec20f589367a7962 cni-plugins-1.1.1.tar.gz +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE diff --git a/package/cni-plugins/cni-plugins.mk b/package/cni-plugins/cni-plugins.mk new file mode 100644 index 0000000000..b30937095a --- /dev/null +++ b/package/cni-plugins/cni-plugins.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# cni-plugins +# +################################################################################ + +CNI_PLUGINS_VERSION = 1.1.1 +CNI_PLUGINS_SITE = $(call github,containernetworking,plugins,v$(CNI_PLUGINS_VERSION)) +CNI_PLUGINS_LICENSE = Apache-2.0 +CNI_PLUGINS_LICENSE_FILES = LICENSE + +CNI_PLUGINS_BUILD_TARGETS = \ + plugins/ipam/dhcp \ + plugins/main/bridge \ + plugins/main/host-device \ + plugins/main/ipvlan \ + plugins/main/loopback \ + plugins/main/macvlan \ + plugins/main/ptp \ + plugins/main/vlan \ + plugins/meta/bandwidth \ + plugins/meta/firewall \ + plugins/meta/portmap \ + plugins/meta/tuning \ + plugins/meta/vrf +CNI_PLUGINS_INSTALL_BINS = $(CNI_PLUGINS_BUILD_TARGETS) + +ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y) +CNI_PLUGINS_DEPENDENCIES += libapparmor +CNI_PLUGINS_TAGS += apparmor +endif + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +CNI_PLUGINS_TAGS += seccomp +CNI_PLUGINS_DEPENDENCIES += libseccomp host-pkgconf +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +CNI_PLUGINS_TAGS += selinux +CNI_PLUGINS_DEPENDENCIES += libselinux +endif + +define CNI_PLUGINS_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/opt/cni/bin + $(foreach d,$(CNI_PLUGINS_INSTALL_BINS),\ + $(INSTALL) -D -m 0755 $(@D)/bin/$$(basename $(d)) \ + $(TARGET_DIR)/opt/cni/bin + ) +endef + +$(eval $(golang-package))