aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-containers/cni-plugins')
-rw-r--r--app-containers/cni-plugins/Manifest4
-rw-r--r--app-containers/cni-plugins/cni-plugins-1.5.0.ebuild37
-rw-r--r--app-containers/cni-plugins/files/cni-dhcp.initd20
-rw-r--r--app-containers/cni-plugins/metadata.xml11
4 files changed, 72 insertions, 0 deletions
diff --git a/app-containers/cni-plugins/Manifest b/app-containers/cni-plugins/Manifest
new file mode 100644
index 0000000..dc2a74f
--- /dev/null
+++ b/app-containers/cni-plugins/Manifest
@@ -0,0 +1,4 @@
+AUX cni-dhcp.initd 376 BLAKE2B 5fe40f28773ffbb12416b40e3813578d28787e9ee26ec4a62b2d3e834920f43fedd0bc985bb412c9576c438367429c835b6099f78f017932b6cdff9341e3f356 SHA512 3475f7c6966b9afac6be52c705286b235a59847748aad5c602162589d4ee1193acffc5965c9130c311e318d06f62a3930d5eb1a70b118a63270f4241f8c4fce8
+DIST cni-plugins-1.5.0.tar.gz 3805080 BLAKE2B b1a25f1563426163f54caa13b55dc480a1f6f8de3cf40c566e7e0a212482d2f2bd46d6e180879ec9a54ba0f6e0d3167437cdb06d3491b784b7cb22107f8471b3 SHA512 cbe5ed422c9992261299d9b012d42402f0e824e39a867a88cf02df5b24de4339325b4c9ae152ae047712a71e08e1ae6b85491e3d4594a647fd8f46c1816ec9e7
+EBUILD cni-plugins-1.5.0.ebuild 1119 BLAKE2B 7ad07da26f08d90af8d424a1f41bd95578f8a83436ea26728b7c0061e8846524d8c1fdd7684b07ba949d4318233ceefd41ba868c667be5d385a439530bcd748b SHA512 ae8f72f9c447d393209676d2ee21743b3602fa933a73f3dca0de5d6dfefa6c956563bb385f051fc9be335b46d0297ab908e58b485916c95d9814bb4add7958e2
+MISC metadata.xml 351 BLAKE2B 3565fe13764f828aed1288724a2939be57e523e0d0a9ccf3c091715e6f1e102155a7fa28191a3c87d669d51a0fa087a89587d83fe6c4747d5d9b31da11c1578c SHA512 6cfe3058d20387245c2f4823c7629d464115783e3c9ed1e45769d6e13f2f35f94656c66c0b1572f8eb229e6bf43510dbc35d117d6a3379e15b5b6ababc077856
diff --git a/app-containers/cni-plugins/cni-plugins-1.5.0.ebuild b/app-containers/cni-plugins/cni-plugins-1.5.0.ebuild
new file mode 100644
index 0000000..719d96e
--- /dev/null
+++ b/app-containers/cni-plugins/cni-plugins-1.5.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module linux-info systemd
+
+DESCRIPTION="Standard networking plugins for container networking"
+HOMEPAGE="https://github.com/containernetworking/plugins"
+SRC_URI="https://github.com/containernetworking/plugins/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+IUSE="hardened"
+
+RDEPEND="net-firewall/iptables"
+
+CONFIG_CHECK="~BRIDGE_VLAN_FILTERING ~NETFILTER_XT_MATCH_COMMENT
+ ~NETFILTER_XT_MATCH_MULTIPORT"
+
+S="${WORKDIR}/plugins-${PV}"
+
+src_compile() {
+ CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')" ./build_linux.sh || die
+}
+
+src_install() {
+ exeinto /opt/cni/bin
+ doexe bin/*
+ dodoc README.md
+ local i
+ for i in plugins/{meta/{bandwidth,firewall,flannel,portmap,sbr,tuning},main/{bridge,host-device,ipvlan,loopback,macvlan,ptp,vlan},ipam/{dhcp,host-local,static},sample}; do
+ newdoc README.md ${i##*/}.README.md
+ done
+ systemd_dounit plugins/ipam/dhcp/systemd/cni-dhcp.{service,socket}
+ newinitd "${FILESDIR}"/cni-dhcp.initd cni-dhcp
+}
diff --git a/app-containers/cni-plugins/files/cni-dhcp.initd b/app-containers/cni-plugins/files/cni-dhcp.initd
new file mode 100644
index 0000000..26b838c
--- /dev/null
+++ b/app-containers/cni-plugins/files/cni-dhcp.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+
+name="CNI-DHCP"
+description="virtual dhcp server for containers"
+command="/opt/cni/bin/dhcp"
+command_args="daemon"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
+
+stop_post() {
+ if [ -e /run/cni/dhcp.sock ]; then
+ ebegin "Cleaning socket for ${name}"
+ rm -f /run/cni/dhcp.sock
+ eend $? "Failed to cleanup socket"
+ fi
+}
diff --git a/app-containers/cni-plugins/metadata.xml b/app-containers/cni-plugins/metadata.xml
new file mode 100644
index 0000000..8359d93
--- /dev/null
+++ b/app-containers/cni-plugins/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">containernetworking/plugins</remote-id>
+ </upstream>
+</pkgmetadata>