summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-containers/cri-o')
-rw-r--r--app-containers/cri-o/Manifest2
-rw-r--r--app-containers/cri-o/cri-o-1.29.0.ebuild102
-rw-r--r--app-containers/cri-o/cri-o-1.29.2.ebuild102
-rw-r--r--app-containers/cri-o/files/cri-o.logrotated7
-rw-r--r--app-containers/cri-o/files/crio.initd35
-rw-r--r--app-containers/cri-o/metadata.xml28
6 files changed, 276 insertions, 0 deletions
diff --git a/app-containers/cri-o/Manifest b/app-containers/cri-o/Manifest
new file mode 100644
index 000000000000..11f94eddc2da
--- /dev/null
+++ b/app-containers/cri-o/Manifest
@@ -0,0 +1,2 @@
+DIST cri-o-1.29.0.tar.gz 21371695 BLAKE2B f670605f07446a78ce04f497207e0205aee23138be448bdc2d2fb172691e5bb309234daa1c5c0adbb37dcb24e9177f24f62e01e183ac6443f48054b9e65b6dfe SHA512 bb83c906964e61ae68219e1374a3e0810fc982fd0389549e6fe3128156af8d5c6effce4217de4d33d3e29e986db630525694093ca3a99b6065385e1e37927fef
+DIST cri-o-1.29.2.tar.gz 21203342 BLAKE2B deec88f8a505bdc1f184a3512da7f6d4b78499c4a66cacf0651a9fe56b62d33d62eaaf2ce68e5d8e856e13988b26e076ab69c24b30a62b42d88656441d948fcb SHA512 dd4105e0097a098b9009b00b59a8e8aeaad85b07177305e2e4b2c68a583a0c342e7a615f47a8cbcb7f179035f2c279573069f15aa1e91e491fe770eec1df326c
diff --git a/app-containers/cri-o/cri-o-1.29.0.ebuild b/app-containers/cri-o/cri-o-1.29.0.ebuild
new file mode 100644
index 000000000000..9d8b95307d64
--- /dev/null
+++ b/app-containers/cri-o/cri-o-1.29.0.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+EGIT_COMMIT=d59bbdc252837107c9f5d235b8fb2650ff2b9d93=
+
+inherit go-module
+
+DESCRIPTION="OCI-based implementation of Kubernetes Container Runtime Interface"
+HOMEPAGE="https://cri-o.io/"
+SRC_URI="https://github.com/cri-o/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="btrfs +device-mapper selinux systemd"
+
+COMMON_DEPEND="
+ app-crypt/gpgme:=
+ app-containers/conmon
+ app-containers/runc
+ dev-libs/glib:=
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ net-firewall/conntrack-tools
+ net-firewall/iptables
+ app-containers/cni-plugins
+ net-misc/socat
+ sys-apps/iproute2
+ sys-libs/libseccomp:=
+ btrfs? ( sys-fs/btrfs-progs )
+ device-mapper? ( sys-fs/lvm2:= )
+ selinux? ( sys-libs/libselinux:= )
+ systemd? ( sys-apps/systemd:= )"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-go/go-md2man"
+RDEPEND="${COMMON_DEPEND}
+ !<app-containers/podman-1.3.2-r1
+ selinux? ( sec-policy/selinux-crio )"
+
+src_prepare() {
+ default
+
+ sed -e '/^export GOPROXY=/d' \
+ -e '/^GIT_.*/d' \
+ -e '/ git diff --exit-code/d' \
+ -e 's/$(GO) build -i/$(GO) build -v -work -x/' \
+ -e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
+ -e "s|^GIT_COMMIT := .*|GIT_COMMIT := ${EGIT_COMMIT}|" \
+ -e "s|^COMMIT_NO := .*|COMMIT_NO := ${EGIT_COMMIT}|" \
+ -i Makefile || die
+
+ echo ".NOTPARALLEL: binaries docs" >> Makefile || die
+
+ sed -e 's:/usr/local/bin:/usr/bin:' \
+ -i contrib/systemd/* || die
+}
+
+src_compile() {
+ [[ -f hack/btrfs_installed_tag.sh ]] || die
+ use btrfs || { echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
+ hack/btrfs_installed_tag.sh || die; }
+
+ [[ -f hack/libdm_installed.sh ]] || die
+ use device-mapper || { echo -e "#!/bin/sh\necho exclude_graphdriver_devicemapper" > \
+ hack/libdm_installed.sh || die; }
+
+ [[ -f hack/selinux_tag.sh ]] || die
+ use selinux || { echo -e "#!/bin/sh\ntrue" > \
+ hack/selinux_tag.sh || die; }
+
+ mkdir -p bin || die
+ emake all \
+ GOBIN="${S}/bin" \
+ GO_BUILD="go build ${GOFLAGS}" \
+ GO_MD2MAN="$(which go-md2man)"
+}
+
+src_install() {
+ emake install install.config install.systemd \
+ DESTDIR="${D}" \
+ GO_MD2MAN="$(which go-md2man)" \
+ PREFIX="${D}${EPREFIX}/usr"
+ keepdir /etc/crio
+ mv "${ED}/etc/crio/crio.conf"{,.example} || die
+
+ newinitd "${FILESDIR}/crio.initd" crio
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+
+ # Suppress crio log error messages triggered if these don't exist.
+ keepdir /etc/containers/oci/hooks.d
+ keepdir /usr/share/containers/oci/hooks.d
+
+ # Suppress crio "Missing CNI default network" log message.
+ keepdir /etc/cni/net.d
+ insinto /etc/cni/net.d
+ doins contrib/cni/99-loopback.conflist
+}
diff --git a/app-containers/cri-o/cri-o-1.29.2.ebuild b/app-containers/cri-o/cri-o-1.29.2.ebuild
new file mode 100644
index 000000000000..31584eebabb9
--- /dev/null
+++ b/app-containers/cri-o/cri-o-1.29.2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+EGIT_COMMIT=d317b5dc918bbfbc78481072a0d93e572aa8d0e8
+
+inherit go-module
+
+DESCRIPTION="OCI-based implementation of Kubernetes Container Runtime Interface"
+HOMEPAGE="https://cri-o.io/"
+SRC_URI="https://github.com/cri-o/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="btrfs +device-mapper selinux systemd"
+
+COMMON_DEPEND="
+ app-crypt/gpgme:=
+ app-containers/conmon
+ app-containers/runc
+ dev-libs/glib:=
+ dev-libs/libassuan:=
+ dev-libs/libgpg-error:=
+ net-firewall/conntrack-tools
+ net-firewall/iptables
+ app-containers/cni-plugins
+ net-misc/socat
+ sys-apps/iproute2
+ sys-libs/libseccomp:=
+ btrfs? ( sys-fs/btrfs-progs )
+ device-mapper? ( sys-fs/lvm2:= )
+ selinux? ( sys-libs/libselinux:= )
+ systemd? ( sys-apps/systemd:= )"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-go/go-md2man"
+RDEPEND="${COMMON_DEPEND}
+ !<app-containers/podman-1.3.2-r1
+ selinux? ( sec-policy/selinux-crio )"
+
+src_prepare() {
+ default
+
+ sed -e '/^export GOPROXY=/d' \
+ -e '/^GIT_.*/d' \
+ -e '/ git diff --exit-code/d' \
+ -e 's/$(GO) build -i/$(GO) build -v -work -x/' \
+ -e 's/\${GIT_COMMIT}/'${EGIT_COMMIT}'/' \
+ -e "s|^GIT_COMMIT := .*|GIT_COMMIT := ${EGIT_COMMIT}|" \
+ -e "s|^COMMIT_NO := .*|COMMIT_NO := ${EGIT_COMMIT}|" \
+ -i Makefile || die
+
+ echo ".NOTPARALLEL: binaries docs" >> Makefile || die
+
+ sed -e 's:/usr/local/bin:/usr/bin:' \
+ -i contrib/systemd/* || die
+}
+
+src_compile() {
+ [[ -f hack/btrfs_installed_tag.sh ]] || die
+ use btrfs || { echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
+ hack/btrfs_installed_tag.sh || die; }
+
+ [[ -f hack/libdm_installed.sh ]] || die
+ use device-mapper || { echo -e "#!/bin/sh\necho exclude_graphdriver_devicemapper" > \
+ hack/libdm_installed.sh || die; }
+
+ [[ -f hack/selinux_tag.sh ]] || die
+ use selinux || { echo -e "#!/bin/sh\ntrue" > \
+ hack/selinux_tag.sh || die; }
+
+ mkdir -p bin || die
+ emake all \
+ GOBIN="${S}/bin" \
+ GO_BUILD="go build ${GOFLAGS}" \
+ GO_MD2MAN="$(which go-md2man)"
+}
+
+src_install() {
+ emake install install.config install.systemd \
+ DESTDIR="${D}" \
+ GO_MD2MAN="$(which go-md2man)" \
+ PREFIX="${D}${EPREFIX}/usr"
+ keepdir /etc/crio
+ mv "${ED}/etc/crio/crio.conf"{,.example} || die
+
+ newinitd "${FILESDIR}/crio.initd" crio
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+
+ # Suppress crio log error messages triggered if these don't exist.
+ keepdir /etc/containers/oci/hooks.d
+ keepdir /usr/share/containers/oci/hooks.d
+
+ # Suppress crio "Missing CNI default network" log message.
+ keepdir /etc/cni/net.d
+ insinto /etc/cni/net.d
+ doins contrib/cni/99-loopback.conflist
+}
diff --git a/app-containers/cri-o/files/cri-o.logrotated b/app-containers/cri-o/files/cri-o.logrotated
new file mode 100644
index 000000000000..fb0b8b14a8a1
--- /dev/null
+++ b/app-containers/cri-o/files/cri-o.logrotated
@@ -0,0 +1,7 @@
+/var/log/crio/crio.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-containers/cri-o/files/crio.initd b/app-containers/cri-o/files/crio.initd
new file mode 100644
index 000000000000..9e6383ac976b
--- /dev/null
+++ b/app-containers/cri-o/files/crio.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 2015-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="OCI Kubernetes Container Runtime daemon"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+extra_started_commands="reload"
+command="/usr/bin/${RC_SVCNAME}"
+command_args="${command_args}"
+command_background="true"
+start_stop_daemon_args=" \
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ checkpath --directory --owner root:root --mode 0775 \
+ /var/log/${RC_SVCNAME}
+ checkpath --file --owner root:root --mode 0644 \
+ /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
+}
+
+start() {
+ checkconfig
+ default_start
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/app-containers/cri-o/metadata.xml b/app-containers/cri-o/metadata.xml
new file mode 100644
index 000000000000..f4976c26dbe2
--- /dev/null
+++ b/app-containers/cri-o/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ <name>Zac Medico</name>
+ </maintainer>
+ <longdescription lang="en">
+ CRI-O is meant to provide an integration path between
+ OCI conformant runtimes and the kubelet. Specifically, it
+ implements the Kubelet Container Runtime Interface (CRI)
+ using OCI conformant runtimes. The scope of CRI-O is tied to
+ the scope of the CRI.
+ </longdescription>
+ <use>
+ <flag name="btrfs">
+ Enables dependencies for the "btrfs" graph driver, including
+ necessary kernel flags.
+ </flag>
+ <flag name="device-mapper">
+ Enables dependencies for the "devicemapper" graph driver, including
+ necessary kernel flags.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">cri-o/cri-o</remote-id>
+ </upstream>
+</pkgmetadata>