diff options
author | Zac Medico <zmedico@gentoo.org> | 2022-07-10 10:34:33 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2022-07-10 10:35:27 -0700 |
commit | e61b9672987d7a881f41436da2d289eb78aa1df8 (patch) | |
tree | 5b5feaffabbc41c7db5895dd8bb211f65f613e10 /sys-cluster | |
parent | dev-python/numpydoc: Stabilize 1.4.0 ALLARCHES, #857366 (diff) | |
download | gentoo-e61b9672987d7a881f41436da2d289eb78aa1df8.tar.gz gentoo-e61b9672987d7a881f41436da2d289eb78aa1df8.tar.bz2 gentoo-e61b9672987d7a881f41436da2d289eb78aa1df8.zip |
sys-cluster/k3s: add 1.24.2_p2
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/k3s/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/k3s/k3s-1.24.2_p2.ebuild | 102 |
2 files changed, 103 insertions, 0 deletions
diff --git a/sys-cluster/k3s/Manifest b/sys-cluster/k3s/Manifest index a03384e46b2c..eff1c8480007 100644 --- a/sys-cluster/k3s/Manifest +++ b/sys-cluster/k3s/Manifest @@ -2,6 +2,7 @@ DIST k3s-1.23.6_p1-vendor.tar.gz 31455285 BLAKE2B c924b3cbbc512757d05127dc284e9d DIST k3s-1.23.7_p1-vendor.tar.gz 31644944 BLAKE2B 29a61547f7765c6b21b7e259e1bff5fed4da68c319dbd3df8f66afcbe09e3e4582b56c2e4a6a41f688dbc651e98bdd714f06ac72a70f50fc241c2f52a057a47e SHA512 6216b7bfcad81dd9dad40bf9d35d54f295461c50ffc46795122f1656c1d731de9752f8a50acab23dfec9479e95de6079d27c0588abb1a3f5c48d7b0a52c2e5fb DIST k3s-1.24.1_p1-vendor.tar.gz 31390781 BLAKE2B 5e93044570ae7a0511b14e797765ba6b4db0e28a0752b35e181bee32be50284adac958baf29d3bb4d6913ef43dcfb8cc6e3f6e312d2dcc447c716e2195707573 SHA512 b42aa8f6443a881da13cb731f4486150c69911a395a757467a7a5b9bba1e450be8be4714984f65ad5b41ffef812a8d4c736f12a4a1cba12eaa9e1b52c7acda23 DIST k3s-1.24.2_p1-vendor.tar.gz 31410828 BLAKE2B 410dc4de95201fb8654571c343458e458e17c52b2b1e2bcf2777df04a50ae54bb119fa88086ee61b7f569d905b0e58df12446c5bd145b46027930a57f5aa033a SHA512 ace54126bc47bc25bf2d2dc13c7ad085d2815d6303ab851ec8738aff5765b9e6f77e6a23fd41375999e03dd215d6b3d54d122d820559dd36dabd87e41ba95093 +DIST k3s-1.24.2_p2-vendor.tar.gz 31418274 BLAKE2B d0fb00c1419cf894eebb83b4f7d29f260628dd06a3a6376cf60257bcc0b571e743954013877e6e85de6b22eb643799a09bf79d898419383951270944ea0e6fe4 SHA512 d0dd6e9804e1e5f7abc9b9429bf0e208baa9da0ee405f7fc3b241e03f39a40284ad098cf1832ac3292f7ee12de66711f9cfc6b01a99ad97fb6653e6236badbb8 DIST k3s-cni-plugins-1.0.1.tar.gz 5711129 BLAKE2B d75557a10de1dccd79b1953c167b0054c229a9cade891b87ece0133be4660fde5c442f253cec8938db87886fc6c39d5a68214262c9ec5c3266a1321ebb75bee7 SHA512 dff27fa602e948ab51745151614713262bc25dfe687a0f3e8b7bab4aa63d40e5e5cfa652e34455fea3f1f38558c3f648aa6021f134d78b4b49e7764f8e894d07 DIST k3s-cni-plugins-1.1.1.tar.gz 3122345 BLAKE2B 270283ffb746ca97ad147b368143c56bd9641b7ebcb1b2b61f80ffea3336b240b28c9b9496bd2f6eb6d7e5382da4979c26e37eca30ac19fd362ed822ba94f300 SHA512 53dcd363231325553a5c9e804fc9005471fe5c05c87aae0340214c146eba66a3761d73976ba0145d86a663a2b0a1941e6cc5823b6d05e002a9ef18e41e10ac3c DIST k3s-containerd-1.5.11-k3s2.tar.gz 9669969 BLAKE2B 11ec3ead4c17773978e21d1ac19a321c3e3e453f12bd79ec67bdfdfa061dac8d09278dabc9bfd0fc8795b70325683b236b43cdc5ebcd9873a40baac124b1b748 SHA512 dfe3a8e6c31684c378c156f4ce3f98c0307df3464d3b3d2cca4a04be8f158d01b279362af5eb447cf24aad7f7ff28d87e92dd64430e480afcee9a9cef0eb2b8a diff --git a/sys-cluster/k3s/k3s-1.24.2_p2.ebuild b/sys-cluster/k3s/k3s-1.24.2_p2.ebuild new file mode 100644 index 000000000000..e01a71ae45a5 --- /dev/null +++ b/sys-cluster/k3s/k3s-1.24.2_p2.ebuild @@ -0,0 +1,102 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module linux-info systemd + +DESCRIPTION="Lightweight Kubernetes" +HOMEPAGE="https://k3s.io" +K3S_CONTAINERD_VERSION=1.6.6-k3s1 +K3S_RUNC_VERSION=v1.1.2 +K3S_ROOT_VERSION=0.11.0 +K3S_TRAEFIK_VERSION=10.19.3 +K3S_TRAEFIK_PACKAGE_VERSION=00 +K3S_CNIPLUGINS_VERSION=1.1.1 +CONFIG_CHECK="~BRIDGE_NETFILTER ~CFS_BANDWIDTH ~CGROUP_DEVICE ~CGROUP_PERF ~CGROUP_PIDS ~IP_VS ~MEMCG ~NETFILTER_XT_MATCH_COMMENT ~OVERLAY_FS ~VLAN_8021Q ~VXLAN" + +MY_PV=${PV%_p*}+k3s${PV#*_p} +SRC_URI="https://github.com/zmedico/k3s/archive/refs/tags/v${MY_PV}-vendor.tar.gz -> ${P}-vendor.tar.gz + ${EGO_SUM_SRC_URI} + https://github.com/k3s-io/containerd/archive/refs/tags/v${K3S_CONTAINERD_VERSION}.tar.gz -> k3s-containerd-${K3S_CONTAINERD_VERSION}.tar.gz + https://github.com/opencontainers/runc/archive/refs/tags/${K3S_RUNC_VERSION}.tar.gz -> k3s-runc-${K3S_RUNC_VERSION}-r1.tar.gz + https://helm.traefik.io/traefik/traefik-${K3S_TRAEFIK_VERSION}.tgz + https://github.com/rancher/plugins/archive/refs/tags/v${K3S_CNIPLUGINS_VERSION}-k3s1.tar.gz -> k3s-cni-plugins-${K3S_CNIPLUGINS_VERSION}.tar.gz + amd64? ( https://github.com/rancher/k3s-root/releases/download/v${K3S_ROOT_VERSION}/k3s-root-amd64.tar -> k3s-root-amd64-${K3S_ROOT_VERSION}.tar )" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+kubectl-symlink rootless" +REQUIRED_USE="|| ( amd64 )" +DEPEND=" + app-misc/yq + net-firewall/conntrack-tools + sys-fs/btrfs-progs + rootless? ( app-containers/slirp4netns ) +" +RDEPEND="kubectl-symlink? ( !sys-cluster/kubectl )" +RESTRICT+=" test" + +S=${WORKDIR}/${PN}-${MY_PV/+/-}-vendor + +src_unpack() { + unpack ${P}-vendor.tar.gz + cd "${S}" || die + mkdir -p bin/aux build/static/charts cache etc || die + cp "${DISTDIR}/traefik-${K3S_TRAEFIK_VERSION}.tgz" build/static/charts/traefik-${K3S_TRAEFIK_VERSION}${K3S_TRAEFIK_PACKAGE_VERSION}.tgz || die + cp "${DISTDIR}/k3s-cni-plugins-${K3S_CNIPLUGINS_VERSION}.tar.gz" cache/ || die +} + +src_prepare() { + local filename pattern replacement + default + + local CONTAINERD_DIR=build/src/github.com/containerd/containerd + mkdir -p "${CONTAINERD_DIR}" || die + tar -x --strip-components=1 -f "${DISTDIR}/k3s-containerd-${K3S_CONTAINERD_VERSION}.tar.gz" -C "${CONTAINERD_DIR}" || die + if has_version -b ">=dev-lang/go-1.18"; then + # https://bugs.gentoo.org/835601 + sed -i -e "/github.com\/containerd\/containerd => .\/.empty-mod/d" "${CONTAINERD_DIR}"/{go.mod,vendor/modules.txt} || die + fi + + local RUNC_DIR=build/src/github.com/opencontainers/runc + mkdir -p "${RUNC_DIR}" || die + tar -x --strip-components=1 -f "${DISTDIR}/k3s-runc-${K3S_RUNC_VERSION}-r1.tar.gz" -C "${RUNC_DIR}" || die + + # Disable download for files fetched via SRC_URI. + sed -e 's:^[[:space:]]*curl:#\0:' \ + -e 's:^[[:space:]]*git:#\0:' \ + -e 's:^rm -rf \${CHARTS_DIR}:#\0:' \ + -e 's:^rm -rf \${RUNC_DIR}:#\0:' \ + -e 's:^rm -rf \${CONTAINERD_DIR}:#\0:' \ + -e 's:yq e :yq -r :' \ + -e "s:^setup_tmp\$:TMP_DIR=${S}/build/static/charts:" \ + -i scripts/download || die + sed -e '/scripts\/build-upload/d' -i scripts/package-cli || die + pattern='git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR' + filename=scripts/build + grep -qF "${pattern}" "${filename}" || \ + die "failed to locate plugins clone command" + sed -e "s|${pattern}|mkdir -p \"\$WORKDIR\" \\&\\& tar -xzf \"${S}/cache/k3s-cni-plugins-${K3S_CNIPLUGINS_VERSION}.tar.gz\" --strip-components=1 -C \"\$WORKDIR\"|" \ + -e 's|rm -rf $TMPDIR||' \ + -i "${filename}" || die + sed -e 's:/usr/local/bin:/usr/bin:g' -i k3s.service || die +} + +src_compile() { + mkdir -p build/data || die + "${BASH}" -ex ./scripts/download || die + ./scripts/build || die + ./scripts/package-cli || die +} + +src_install() { + dobin "dist/artifacts/${PN}" + use kubectl-symlink && dosym k3s /usr/bin/kubectl + systemd_dounit "${FILESDIR}/${PN}.service" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + dodoc README.md +} |