All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package
@ 2022-06-16  8:43 Raphael Pavlidis via buildroot
  2022-06-16 16:33 ` [Buildroot] [PATCH v2 " Raphael Pavlidis via buildroot
  0 siblings, 1 reply; 9+ messages in thread
From: Raphael Pavlidis via buildroot @ 2022-06-16  8:43 UTC (permalink / raw)
  To: buildroot; +Cc: Anisse Astier, Raphael Pavlidis

cni-plugins contains some reference networking plugins, maintained by
the CNI team.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
---
 package/Config.in                    |  1 +
 package/cni-plugins/Config.in        | 93 ++++++++++++++++++++++++++++
 package/cni-plugins/cni-plugins.hash |  3 +
 package/cni-plugins/cni-plugins.mk   | 77 +++++++++++++++++++++++
 4 files changed, 174 insertions(+)
 create mode 100644 package/cni-plugins/Config.in
 create mode 100644 package/cni-plugins/cni-plugins.hash
 create mode 100644 package/cni-plugins/cni-plugins.mk

diff --git a/package/Config.in b/package/Config.in
index 3b089166da..2100a08ca8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1781,6 +1781,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..351dfb9376
--- /dev/null
+++ b/package/cni-plugins/Config.in
@@ -0,0 +1,93 @@
+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
+	help
+	  Some reference and example networking plugins, maintained by the CNI team.
+
+	  https://github.com/containernetworking/plugins
+
+if BR2_PACKAGE_CNI_PLUGINS
+
+config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
+	bool "bridge"
+	help
+	  Creates a bridge, adds the host and the container to it.
+
+config BR2_PACKAGE_CNI_PLUGINS_IPVLAN
+	bool "ipvlan"
+	help
+	  Adds an ipvlan interface in the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_LOOPBACK
+	bool "loopback"
+	help
+	  Set the state of loopback interface to up.
+
+config BR2_PACKAGE_CNI_PLUGINS_MACVLAN
+	bool "macvlan"
+	help
+	  Creates a new MAC address, forwards all traffic to that to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_PTP
+	bool "ptp"
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_VLAN
+	bool "vlan"
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE
+	bool "host-device"
+	help
+	  Move an already-existing device into a container.
+
+config BR2_PACKAGE_CNI_PLUGINS_DHCP
+	bool "dhcp"
+	help
+	  Runs a daemon on the host to make DHCP requests on behalf of the
+	  container.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL
+	bool "host-local"
+	help
+	  Maintains a local database of allocated IPs.
+
+config BR2_PACKAGE_CNI_PLUGINS_STATIC
+	bool "static"
+	help
+	  Allocate a single static IPv4/IPv6 address to container. It's useful in
+	  debugging purpose.
+
+config BR2_PACKAGE_CNI_PLUGINS_TUNING
+	bool "tuning"
+	help
+	  Tweaks sysctl parameters of an existing interface.
+
+config BR2_PACKAGE_CNI_PLUGINS_PORTMAP
+	bool "portmap"
+	help
+	  An iptables-based portmapping plugin. Maps ports from the host's address
+	  space to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH
+	bool "bandwidth"
+	help
+	  Allows bandwidth-limiting through use of traffic control tbf
+	  (ingress/egress).
+
+config BR2_PACKAGE_CNI_PLUGINS_SBR
+	bool "sbr"
+	help
+	  A plugin that configures source based routing for an interface (from which
+	  it is chained).
+
+config BR2_PACKAGE_CNI_PLUGINS_FIREWALL
+	bool "firewall"
+	help
+	  A firewall plugin which uses iptables or firewalld to add rules to allow
+	  traffic to/from the container.
+
+endif # BR2_PACKAGE_CNI_PLUGINS
diff --git a/package/cni-plugins/cni-plugins.hash b/package/cni-plugins/cni-plugins.hash
new file mode 100644
index 0000000000..c987e1ff45
--- /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..02abcd283c
--- /dev/null
+++ b/package/cni-plugins/cni-plugins.mk
@@ -0,0 +1,77 @@
+################################################################################
+#
+# 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
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BRIDGE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/bridge
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_IPVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ipvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_LOOPBACK),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/loopback
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_MACVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/macvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PTP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ptp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_VLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/vlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/host-device
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_DHCP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/dhcp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/host-local
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_STATIC),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/static
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_TUNING),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/tuning
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PORTMAP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/portmap
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/bandwidth
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_SBR),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/sbr
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_FIREWALL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/firewall
+endif
+
+define CNI_PLUGINS_INSTALL_TARGET_CMDS
+	$(INSTALL) -d  $(TARGET_DIR)/usr/libexec/cni
+	$(INSTALL) -D -m 0755 $(@D)/bin/* $(TARGET_DIR)/usr/libexec/cni/
+endef
+
+$(eval $(golang-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/cni-plugins: new package
  2022-06-16  8:43 [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package Raphael Pavlidis via buildroot
@ 2022-06-16 16:33 ` Raphael Pavlidis via buildroot
  2022-09-04 12:53   ` [Buildroot] [PATCH v3 " Raphael Pavlidis
  0 siblings, 1 reply; 9+ messages in thread
From: Raphael Pavlidis via buildroot @ 2022-06-16 16:33 UTC (permalink / raw)
  To: buildroot; +Cc: Anisse Astier, Raphael Pavlidis

cni-plugins contains some reference networking plugins, maintained by
the CNI team.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
---
Changes v1 -> v2:
  - change BR2_PACKAGE_CNI_PLUGINS from config to menuconfig
  - turn on all plugins by default 

 package/Config.in                    |   1 +
 package/cni-plugins/Config.in        | 108 +++++++++++++++++++++++++++
 package/cni-plugins/cni-plugins.hash |   3 +
 package/cni-plugins/cni-plugins.mk   |  77 +++++++++++++++++++
 4 files changed, 189 insertions(+)
 create mode 100644 package/cni-plugins/Config.in
 create mode 100644 package/cni-plugins/cni-plugins.hash
 create mode 100644 package/cni-plugins/cni-plugins.mk

diff --git a/package/Config.in b/package/Config.in
index 3b089166da..2100a08ca8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1781,6 +1781,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..9ce13f4bbe
--- /dev/null
+++ b/package/cni-plugins/Config.in
@@ -0,0 +1,108 @@
+menuconfig 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
+	help
+	  Some reference and example networking plugins, maintained by the CNI team.
+
+	  https://github.com/containernetworking/plugins
+
+if BR2_PACKAGE_CNI_PLUGINS
+
+config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
+	bool "bridge"
+	default y
+	help
+	  Creates a bridge, adds the host and the container to it.
+
+config BR2_PACKAGE_CNI_PLUGINS_IPVLAN
+	bool "ipvlan"
+	default y
+	help
+	  Adds an ipvlan interface in the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_LOOPBACK
+	bool "loopback"
+	default y
+	help
+	  Set the state of loopback interface to up.
+
+config BR2_PACKAGE_CNI_PLUGINS_MACVLAN
+	bool "macvlan"
+	default y
+	help
+	  Creates a new MAC address, forwards all traffic to that to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_PTP
+	bool "ptp"
+	default y
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_VLAN
+	bool "vlan"
+	default y
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE
+	bool "host-device"
+	default y
+	help
+	  Move an already-existing device into a container.
+
+config BR2_PACKAGE_CNI_PLUGINS_DHCP
+	bool "dhcp"
+	default y
+	help
+	  Runs a daemon on the host to make DHCP requests on behalf of the
+	  container.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL
+	bool "host-local"
+	default y
+	help
+	  Maintains a local database of allocated IPs.
+
+config BR2_PACKAGE_CNI_PLUGINS_STATIC
+	bool "static"
+	default y
+	help
+	  Allocate a single static IPv4/IPv6 address to container. It's useful in
+	  debugging purpose.
+
+config BR2_PACKAGE_CNI_PLUGINS_TUNING
+	bool "tuning"
+	default y
+	help
+	  Tweaks sysctl parameters of an existing interface.
+
+config BR2_PACKAGE_CNI_PLUGINS_PORTMAP
+	bool "portmap"
+	default y
+	help
+	  An iptables-based portmapping plugin. Maps ports from the host's address
+	  space to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH
+	bool "bandwidth"
+	default y
+	help
+	  Allows bandwidth-limiting through use of traffic control tbf
+	  (ingress/egress).
+
+config BR2_PACKAGE_CNI_PLUGINS_SBR
+	bool "sbr"
+	default y
+	help
+	  A plugin that configures source based routing for an interface (from which
+	  it is chained).
+
+config BR2_PACKAGE_CNI_PLUGINS_FIREWALL
+	bool "firewall"
+	default y
+	help
+	  A firewall plugin which uses iptables or firewalld to add rules to allow
+	  traffic to/from the container.
+
+endif # BR2_PACKAGE_CNI_PLUGINS
diff --git a/package/cni-plugins/cni-plugins.hash b/package/cni-plugins/cni-plugins.hash
new file mode 100644
index 0000000000..c987e1ff45
--- /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..02abcd283c
--- /dev/null
+++ b/package/cni-plugins/cni-plugins.mk
@@ -0,0 +1,77 @@
+################################################################################
+#
+# 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
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BRIDGE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/bridge
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_IPVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ipvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_LOOPBACK),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/loopback
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_MACVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/macvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PTP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ptp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_VLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/vlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/host-device
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_DHCP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/dhcp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/host-local
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_STATIC),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/static
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_TUNING),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/tuning
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PORTMAP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/portmap
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/bandwidth
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_SBR),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/sbr
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_FIREWALL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/firewall
+endif
+
+define CNI_PLUGINS_INSTALL_TARGET_CMDS
+	$(INSTALL) -d  $(TARGET_DIR)/usr/libexec/cni
+	$(INSTALL) -D -m 0755 $(@D)/bin/* $(TARGET_DIR)/usr/libexec/cni/
+endef
+
+$(eval $(golang-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v3 1/1] package/cni-plugins: new package
  2022-06-16 16:33 ` [Buildroot] [PATCH v2 " Raphael Pavlidis via buildroot
@ 2022-09-04 12:53   ` Raphael Pavlidis
  2022-09-04 19:06     ` Christian Stewart via buildroot
  2023-02-07  9:03     ` Yann E. MORIN
  0 siblings, 2 replies; 9+ messages in thread
From: Raphael Pavlidis @ 2022-09-04 12:53 UTC (permalink / raw)
  To: buildroot; +Cc: Anisse Astier, Raphael Pavlidis

cni-plugins contains some reference networking plugins, maintained by
the CNI team.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
---
Changes v2 -> v3:
  - DEVELOPERS: add Raphael Pavlids for cni-plugins

Changes v1 -> v2:
  - change BR2_PACKAGE_CNI_PLUGINS from config to menuconfig
  - turn on all plugins by default

 DEVELOPERS                           |   3 +
 package/Config.in                    |   1 +
 package/cni-plugins/Config.in        | 108 +++++++++++++++++++++++++++
 package/cni-plugins/cni-plugins.hash |   3 +
 package/cni-plugins/cni-plugins.mk   |  77 +++++++++++++++++++
 5 files changed, 192 insertions(+)
 create mode 100644 package/cni-plugins/Config.in
 create mode 100644 package/cni-plugins/cni-plugins.hash
 create mode 100644 package/cni-plugins/cni-plugins.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index d2bd0d809a..208330881c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2506,6 +2506,9 @@ F:	support/testing/tests/package/test_python_jmespath.py
 F:	support/testing/tests/package/test_python_rsa.py
 F:	support/testing/tests/package/test_python_s3transfer.py
 
+N:	Raphael Pavlidis <raphael.pavlidis@gmail.com>
+F:	package/cni-plugins/
+
 N:	Refik Tuzakli <tuzakli.refik@gmail.com>
 F:	package/freescale-imx/
 F:	package/paho-mqtt-cpp/
diff --git a/package/Config.in b/package/Config.in
index d1c098c48f..00e9a5a99f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1812,6 +1812,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..9ce13f4bbe
--- /dev/null
+++ b/package/cni-plugins/Config.in
@@ -0,0 +1,108 @@
+menuconfig 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
+	help
+	  Some reference and example networking plugins, maintained by the CNI team.
+
+	  https://github.com/containernetworking/plugins
+
+if BR2_PACKAGE_CNI_PLUGINS
+
+config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
+	bool "bridge"
+	default y
+	help
+	  Creates a bridge, adds the host and the container to it.
+
+config BR2_PACKAGE_CNI_PLUGINS_IPVLAN
+	bool "ipvlan"
+	default y
+	help
+	  Adds an ipvlan interface in the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_LOOPBACK
+	bool "loopback"
+	default y
+	help
+	  Set the state of loopback interface to up.
+
+config BR2_PACKAGE_CNI_PLUGINS_MACVLAN
+	bool "macvlan"
+	default y
+	help
+	  Creates a new MAC address, forwards all traffic to that to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_PTP
+	bool "ptp"
+	default y
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_VLAN
+	bool "vlan"
+	default y
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE
+	bool "host-device"
+	default y
+	help
+	  Move an already-existing device into a container.
+
+config BR2_PACKAGE_CNI_PLUGINS_DHCP
+	bool "dhcp"
+	default y
+	help
+	  Runs a daemon on the host to make DHCP requests on behalf of the
+	  container.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL
+	bool "host-local"
+	default y
+	help
+	  Maintains a local database of allocated IPs.
+
+config BR2_PACKAGE_CNI_PLUGINS_STATIC
+	bool "static"
+	default y
+	help
+	  Allocate a single static IPv4/IPv6 address to container. It's useful in
+	  debugging purpose.
+
+config BR2_PACKAGE_CNI_PLUGINS_TUNING
+	bool "tuning"
+	default y
+	help
+	  Tweaks sysctl parameters of an existing interface.
+
+config BR2_PACKAGE_CNI_PLUGINS_PORTMAP
+	bool "portmap"
+	default y
+	help
+	  An iptables-based portmapping plugin. Maps ports from the host's address
+	  space to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH
+	bool "bandwidth"
+	default y
+	help
+	  Allows bandwidth-limiting through use of traffic control tbf
+	  (ingress/egress).
+
+config BR2_PACKAGE_CNI_PLUGINS_SBR
+	bool "sbr"
+	default y
+	help
+	  A plugin that configures source based routing for an interface (from which
+	  it is chained).
+
+config BR2_PACKAGE_CNI_PLUGINS_FIREWALL
+	bool "firewall"
+	default y
+	help
+	  A firewall plugin which uses iptables or firewalld to add rules to allow
+	  traffic to/from the container.
+
+endif # BR2_PACKAGE_CNI_PLUGINS
diff --git a/package/cni-plugins/cni-plugins.hash b/package/cni-plugins/cni-plugins.hash
new file mode 100644
index 0000000000..c987e1ff45
--- /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..02abcd283c
--- /dev/null
+++ b/package/cni-plugins/cni-plugins.mk
@@ -0,0 +1,77 @@
+################################################################################
+#
+# 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
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BRIDGE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/bridge
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_IPVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ipvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_LOOPBACK),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/loopback
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_MACVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/macvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PTP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ptp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_VLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/vlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/host-device
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_DHCP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/dhcp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/host-local
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_STATIC),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/static
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_TUNING),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/tuning
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PORTMAP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/portmap
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/bandwidth
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_SBR),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/sbr
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_FIREWALL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/firewall
+endif
+
+define CNI_PLUGINS_INSTALL_TARGET_CMDS
+	$(INSTALL) -d  $(TARGET_DIR)/usr/libexec/cni
+	$(INSTALL) -D -m 0755 $(@D)/bin/* $(TARGET_DIR)/usr/libexec/cni/
+endef
+
+$(eval $(golang-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v3 1/1] package/cni-plugins: new package
  2022-09-04 12:53   ` [Buildroot] [PATCH v3 " Raphael Pavlidis
@ 2022-09-04 19:06     ` Christian Stewart via buildroot
  2022-09-10 18:33       ` Raphael Pavlidis
  2023-02-07  9:03     ` Yann E. MORIN
  1 sibling, 1 reply; 9+ messages in thread
From: Christian Stewart via buildroot @ 2022-09-04 19:06 UTC (permalink / raw)
  To: Raphael Pavlidis; +Cc: Christian Stewart, Anisse Astier, Buildroot Mailing List

Hi Raphael,

On Sun, Sep 4, 2022 at 5:54 AM Raphael Pavlidis
<raphael.pavlidis@gmail.com> wrote:
>
> cni-plugins contains some reference networking plugins, maintained by
> the CNI team.
>
> Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>

I guess this is a follow-up to my cni-plugins submission?

https://patchwork.ozlabs.org/project/buildroot/patch/20220821053547.667311-1-christian@paral.in/

You're missing a few things:

+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

> ---
> Changes v2 -> v3:
>   - DEVELOPERS: add Raphael Pavlids for cni-plugins
>
> Changes v1 -> v2:
>   - change BR2_PACKAGE_CNI_PLUGINS from config to menuconfig
>   - turn on all plugins by default

Was v2 submitted before?

I like adding the options for the plugins, but you're missing some -
here is the list from the other submission:

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


> +
> +if BR2_PACKAGE_CNI_PLUGINS
> +
> +config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
> +       bool "bridge"
> +       default y
> +       help
> +         Creates a bridge, adds the host and the container to it.
> +
> [snip]

Thanks,
Christian Stewart
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v3 1/1] package/cni-plugins: new package
  2022-09-04 19:06     ` Christian Stewart via buildroot
@ 2022-09-10 18:33       ` Raphael Pavlidis
  0 siblings, 0 replies; 9+ messages in thread
From: Raphael Pavlidis @ 2022-09-10 18:33 UTC (permalink / raw)
  To: Christian Stewart; +Cc: Anisse Astier, Buildroot Mailing List

Hi Christian

On 04.09.22 21:06, Christian Stewart wrote:
> Hi Raphael,
> 
> On Sun, Sep 4, 2022 at 5:54 AM Raphael Pavlidis
> <raphael.pavlidis@gmail.com> wrote:
>>
>> cni-plugins contains some reference networking plugins, maintained by
>> the CNI team.
>>
>> Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
> 
> I guess this is a follow-up to my cni-plugins submission?
> 
> https://patchwork.ozlabs.org/project/buildroot/patch/20220821053547.667311-1-christian@paral.in/

No, I already started with this patch series since June.

https://lists.buildroot.org/pipermail/buildroot/2022-June/644972.html

> 
> You're missing a few things:
> 
> +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
> 

Yes, you are right, thanks.

>> ---
>> Changes v2 -> v3:
>>    - DEVELOPERS: add Raphael Pavlids for cni-plugins
>>
>> Changes v1 -> v2:
>>    - change BR2_PACKAGE_CNI_PLUGINS from config to menuconfig
>>    - turn on all plugins by default
> 
> Was v2 submitted before?

Yes, see:

https://lists.buildroot.org/pipermail/buildroot/2022-June/644974.html

> 
> I like adding the options for the plugins, but you're missing some -
> here is the list from the other submission:
> 
> +
> +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
> 
> 

Oh, I see I forgot the vrf plugin.

>> +
>> +if BR2_PACKAGE_CNI_PLUGINS
>> +
>> +config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
>> +       bool "bridge"
>> +       default y
>> +       help
>> +         Creates a bridge, adds the host and the container to it.
>> +
>> [snip]
> 
> Thanks,
> Christian Stewart

Quite funny, I also need this package for podman. :)

Thanks,
Raphael Pavlidis
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v3 1/1] package/cni-plugins: new package
  2022-09-04 12:53   ` [Buildroot] [PATCH v3 " Raphael Pavlidis
  2022-09-04 19:06     ` Christian Stewart via buildroot
@ 2023-02-07  9:03     ` Yann E. MORIN
  1 sibling, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2023-02-07  9:03 UTC (permalink / raw)
  To: Raphael Pavlidis; +Cc: Anisse Astier, buildroot

Raphael, All,

On 2022-09-04 14:53 +0200, Raphael Pavlidis spake thusly:
> cni-plugins contains some reference networking plugins, maintained by
> the CNI team.
> 
> Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>

We had cni-plugins added by Christian, and we're now at version 1.2.0.

I'm not sure whether it makes sense to have a selection for each and
individual plugins, but if you think that does, then feel free to respin
an update.

Thanks!

Regards,
Yann E. MORIN.

> ---
> Changes v2 -> v3:
>   - DEVELOPERS: add Raphael Pavlids for cni-plugins
> 
> Changes v1 -> v2:
>   - change BR2_PACKAGE_CNI_PLUGINS from config to menuconfig
>   - turn on all plugins by default
> 
>  DEVELOPERS                           |   3 +
>  package/Config.in                    |   1 +
>  package/cni-plugins/Config.in        | 108 +++++++++++++++++++++++++++
>  package/cni-plugins/cni-plugins.hash |   3 +
>  package/cni-plugins/cni-plugins.mk   |  77 +++++++++++++++++++
>  5 files changed, 192 insertions(+)
>  create mode 100644 package/cni-plugins/Config.in
>  create mode 100644 package/cni-plugins/cni-plugins.hash
>  create mode 100644 package/cni-plugins/cni-plugins.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index d2bd0d809a..208330881c 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2506,6 +2506,9 @@ F:	support/testing/tests/package/test_python_jmespath.py
>  F:	support/testing/tests/package/test_python_rsa.py
>  F:	support/testing/tests/package/test_python_s3transfer.py
>  
> +N:	Raphael Pavlidis <raphael.pavlidis@gmail.com>
> +F:	package/cni-plugins/
> +
>  N:	Refik Tuzakli <tuzakli.refik@gmail.com>
>  F:	package/freescale-imx/
>  F:	package/paho-mqtt-cpp/
> diff --git a/package/Config.in b/package/Config.in
> index d1c098c48f..00e9a5a99f 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1812,6 +1812,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..9ce13f4bbe
> --- /dev/null
> +++ b/package/cni-plugins/Config.in
> @@ -0,0 +1,108 @@
> +menuconfig 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
> +	help
> +	  Some reference and example networking plugins, maintained by the CNI team.
> +
> +	  https://github.com/containernetworking/plugins
> +
> +if BR2_PACKAGE_CNI_PLUGINS
> +
> +config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
> +	bool "bridge"
> +	default y
> +	help
> +	  Creates a bridge, adds the host and the container to it.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_IPVLAN
> +	bool "ipvlan"
> +	default y
> +	help
> +	  Adds an ipvlan interface in the container.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_LOOPBACK
> +	bool "loopback"
> +	default y
> +	help
> +	  Set the state of loopback interface to up.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_MACVLAN
> +	bool "macvlan"
> +	default y
> +	help
> +	  Creates a new MAC address, forwards all traffic to that to the container.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_PTP
> +	bool "ptp"
> +	default y
> +	help
> +	  Creates a veth pair.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_VLAN
> +	bool "vlan"
> +	default y
> +	help
> +	  Creates a veth pair.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE
> +	bool "host-device"
> +	default y
> +	help
> +	  Move an already-existing device into a container.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_DHCP
> +	bool "dhcp"
> +	default y
> +	help
> +	  Runs a daemon on the host to make DHCP requests on behalf of the
> +	  container.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL
> +	bool "host-local"
> +	default y
> +	help
> +	  Maintains a local database of allocated IPs.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_STATIC
> +	bool "static"
> +	default y
> +	help
> +	  Allocate a single static IPv4/IPv6 address to container. It's useful in
> +	  debugging purpose.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_TUNING
> +	bool "tuning"
> +	default y
> +	help
> +	  Tweaks sysctl parameters of an existing interface.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_PORTMAP
> +	bool "portmap"
> +	default y
> +	help
> +	  An iptables-based portmapping plugin. Maps ports from the host's address
> +	  space to the container.
> +
> +config BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH
> +	bool "bandwidth"
> +	default y
> +	help
> +	  Allows bandwidth-limiting through use of traffic control tbf
> +	  (ingress/egress).
> +
> +config BR2_PACKAGE_CNI_PLUGINS_SBR
> +	bool "sbr"
> +	default y
> +	help
> +	  A plugin that configures source based routing for an interface (from which
> +	  it is chained).
> +
> +config BR2_PACKAGE_CNI_PLUGINS_FIREWALL
> +	bool "firewall"
> +	default y
> +	help
> +	  A firewall plugin which uses iptables or firewalld to add rules to allow
> +	  traffic to/from the container.
> +
> +endif # BR2_PACKAGE_CNI_PLUGINS
> diff --git a/package/cni-plugins/cni-plugins.hash b/package/cni-plugins/cni-plugins.hash
> new file mode 100644
> index 0000000000..c987e1ff45
> --- /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..02abcd283c
> --- /dev/null
> +++ b/package/cni-plugins/cni-plugins.mk
> @@ -0,0 +1,77 @@
> +################################################################################
> +#
> +# 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
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BRIDGE),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/bridge
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_IPVLAN),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/ipvlan
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_LOOPBACK),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/loopback
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_MACVLAN),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/macvlan
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PTP),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/ptp
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_VLAN),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/vlan
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/main/host-device
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_DHCP),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/dhcp
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/host-local
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_STATIC),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/static
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_TUNING),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/meta/tuning
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PORTMAP),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/meta/portmap
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/meta/bandwidth
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_SBR),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/meta/sbr
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CNI_PLUGINS_FIREWALL),y)
> +CNI_PLUGINS_BUILD_TARGETS += plugins/meta/firewall
> +endif
> +
> +define CNI_PLUGINS_INSTALL_TARGET_CMDS
> +	$(INSTALL) -d  $(TARGET_DIR)/usr/libexec/cni
> +	$(INSTALL) -D -m 0755 $(@D)/bin/* $(TARGET_DIR)/usr/libexec/cni/
> +endef
> +
> +$(eval $(golang-package))
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package
  2022-10-31 10:44 ` Thomas Petazzoni via buildroot
@ 2022-10-31 18:55   ` Christian Stewart via buildroot
  0 siblings, 0 replies; 9+ messages in thread
From: Christian Stewart via buildroot @ 2022-10-31 18:55 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Christian Stewart, Yann E . MORIN, Christian Stewart via buildroot


[-- Attachment #1.1: Type: text/plain, Size: 761 bytes --]

Hi Thomas,

On Mon, Oct 31, 2022, 3:44 AM Thomas Petazzoni <thomas.petazzoni@bootlin.com>
wrote:

> > +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
>
> I kept it like this, but it's fairly unusual to install stuff in /opt.
> Is this the normal location for these plugins? Shouldn't they go in
> /usr/libexec/cni/, or something like that?
>

https://github.com/containerd/containerd/blob/main/script/setup/install-cni#L25

Every doc and script I've seen installs to /opt - which is why I followed
that pattern.

Best,
Christian Stewart

[-- Attachment #1.2: Type: text/html, Size: 1375 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package
  2022-08-21  5:35 [Buildroot] [PATCH v1 " Christian Stewart via buildroot
@ 2022-10-31 10:44 ` Thomas Petazzoni via buildroot
  2022-10-31 18:55   ` Christian Stewart via buildroot
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-31 10:44 UTC (permalink / raw)
  To: Christian Stewart via buildroot; +Cc: Yann E . MORIN

Hello Christian,

On Sat, 20 Aug 2022 22:35:47 -0700
Christian Stewart via buildroot <buildroot@buildroot.org> wrote:

> diff --git a/DEVELOPERS b/DEVELOPERS
> index d2bd0d809a..bc02190365 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -530,6 +530,7 @@ F:	package/python-pylibftdi/
>  N:	Christian Stewart <christian@paral.in>
>  F:	package/batman-adv/
>  F:	package/containerd/
> +F:	package/cni-plugins/

By alphabetic ordering I believe it falls before containerd, so I fixed
that up.

> 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.

But they are plugins for what? They don't have any dependency on
anything specific.

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

You forgot BR2_USE_MMU here. I forgot it as well initially, so I fixed
it up as part of a follow-up commit.

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

I kept it like this, but it's fairly unusual to install stuff in /opt.
Is this the normal location for these plugins? Shouldn't they go in
/usr/libexec/cni/, or something like that?

So overall, I applied, but there are some questions :)

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package
@ 2022-08-21  5:35 Christian Stewart via buildroot
  2022-10-31 10:44 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 9+ messages in thread
From: Christian Stewart via buildroot @ 2022-08-21  5:35 UTC (permalink / raw)
  To: buildroot; +Cc: Christian Stewart, Yann E . MORIN, Thomas Petazzoni

Container Networking Interface plugins.

https://github.com/containernetworking/plugins

Dependency of podman.

Signed-off-by: Christian Stewart <christian@paral.in>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/cni-plugins/Config.in        | 16 +++++++++
 package/cni-plugins/cni-plugins.hash |  3 ++
 package/cni-plugins/cni-plugins.mk   | 51 ++++++++++++++++++++++++++++
 5 files changed, 72 insertions(+)
 create mode 100644 package/cni-plugins/Config.in
 create mode 100644 package/cni-plugins/cni-plugins.hash
 create mode 100644 package/cni-plugins/cni-plugins.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index d2bd0d809a..bc02190365 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -530,6 +530,7 @@ F:	package/python-pylibftdi/
 N:	Christian Stewart <christian@paral.in>
 F:	package/batman-adv/
 F:	package/containerd/
+F:	package/cni-plugins/
 F:	package/delve/
 F:	package/docker-cli/
 F:	package/docker-engine/
diff --git a/package/Config.in b/package/Config.in
index d1c098c48f..00e9a5a99f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1812,6 +1812,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))
-- 
2.37.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-07  9:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16  8:43 [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package Raphael Pavlidis via buildroot
2022-06-16 16:33 ` [Buildroot] [PATCH v2 " Raphael Pavlidis via buildroot
2022-09-04 12:53   ` [Buildroot] [PATCH v3 " Raphael Pavlidis
2022-09-04 19:06     ` Christian Stewart via buildroot
2022-09-10 18:33       ` Raphael Pavlidis
2023-02-07  9:03     ` Yann E. MORIN
2022-08-21  5:35 [Buildroot] [PATCH v1 " Christian Stewart via buildroot
2022-10-31 10:44 ` Thomas Petazzoni via buildroot
2022-10-31 18:55   ` Christian Stewart via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.