diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
commit | 752d6256e5204b958b0ef7905675a940b5e9172f (patch) | |
tree | 330d16e6362a49cbed8875a777fe641a43376cd3 /sys-cluster/k3s | |
parent | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff) |
gentoo resync : 12.05.2022
Diffstat (limited to 'sys-cluster/k3s')
-rw-r--r-- | sys-cluster/k3s/Manifest | 4 | ||||
-rw-r--r-- | sys-cluster/k3s/k3s-1.23.6_p1.ebuild | 102 |
2 files changed, 106 insertions, 0 deletions
diff --git a/sys-cluster/k3s/Manifest b/sys-cluster/k3s/Manifest index a2b36f13b5e6..a6cff80e1021 100644 --- a/sys-cluster/k3s/Manifest +++ b/sys-cluster/k3s/Manifest @@ -4,12 +4,16 @@ AUX k3s.logrotated 37 BLAKE2B 8e106b2ae826d1724adb3cf6970cb46b53247ce77a8206ce9f AUX k3s.service 597 BLAKE2B 067ea095d2ad948a59e6fcc6ecc569d3f8fa4e802e381e5ccc48988c70c5e8e9e4335afc7cf5a2e830d22bd89cabffbc6fb9161da73599be75b305eb28bea14a SHA512 9741575f844da8ed96e230c443ec6662bff22be8602b420eb74fc6a72d09f36a5fddb8426894e63b7a8c2918a36fc717a38dfbcf003b56f47c13c06c4fc96825 DIST k3s-1.23.4_p1-vendor.tar.gz 29494135 BLAKE2B 8e8598f43255b105e14b59ec54e7d3b19c4d8c10f61287a7e138153030b728cf41c7b9ad3d8300f7209a96421b7f934ed3a3ca63baac48babb376af664248536 SHA512 b2f98be943c6c4eedabc29e8703653fd78abf880eff306076d2e64a4756829adc848b1e48a735662a9264de94b2c86abff029c7a284c37c322bfa7537e35064b DIST k3s-1.23.5_p1-vendor.tar.gz 30890421 BLAKE2B eb9b26e40ad07e7ff250c0add216507bf536a561b2295f35f22855d3d93d7034d002526585563428762f801ec44dc32229a65afb2c9e68cb953174b29c98ea29 SHA512 837fd725a5ba9d7714935e83d10187b416f1cd6e7a97728833a3d44c6b5ce1bb2d56a80551474ec0e0b78230e2ff085ec1b643e8c9522d85d5c99f0d750ed6d1 +DIST k3s-1.23.6_p1-vendor.tar.gz 31455285 BLAKE2B c924b3cbbc512757d05127dc284e9d843e6f53bb732f7be51e885e7e130a0b8a9aa1a8b6141e4947c063d7276480321a5d7752a28aa825f35ae73c6bab33e144 SHA512 74dcd8b86ed54dd7bb84c5544846d35ed3ea9c6241c268c7c37c4f9e09e6d0d255b3f6661c3e2af493b50cfae7b7c5fb4623d92b241de9c552b3a97f4ee50090 DIST k3s-cni-plugins-1.0.1.tar.gz 5711129 BLAKE2B d75557a10de1dccd79b1953c167b0054c229a9cade891b87ece0133be4660fde5c442f253cec8938db87886fc6c39d5a68214262c9ec5c3266a1321ebb75bee7 SHA512 dff27fa602e948ab51745151614713262bc25dfe687a0f3e8b7bab4aa63d40e5e5cfa652e34455fea3f1f38558c3f648aa6021f134d78b4b49e7764f8e894d07 DIST k3s-containerd-1.5.10-k3s1.tar.gz 9903838 BLAKE2B b188b29d2e0bea30431b9b2ddc3aa1b3e432f283f3af4b125497ba4d7df7559ecf50e197508fb068c04491adeb6831f3758755d497206572527c2ea3cc2c3cfe SHA512 950b72955cd3aff78a232c217517bc945601a289ab636ca79c6bdaf2768f26e86f46fab7020396b21dbae37acfeec499db801f651eccb581789ca90a991987ab +DIST k3s-containerd-1.5.11-k3s2.tar.gz 9669969 BLAKE2B 11ec3ead4c17773978e21d1ac19a321c3e3e453f12bd79ec67bdfdfa061dac8d09278dabc9bfd0fc8795b70325683b236b43cdc5ebcd9873a40baac124b1b748 SHA512 dfe3a8e6c31684c378c156f4ce3f98c0307df3464d3b3d2cca4a04be8f158d01b279362af5eb447cf24aad7f7ff28d87e92dd64430e480afcee9a9cef0eb2b8a DIST k3s-containerd-1.5.9-k3s1.tar.gz 9800317 BLAKE2B 95129dbf41ff9c88dc44e6aea791b0f8010116d57142bc0a7079fa6bd9f4ac1f83ce35d1a7baa2848bf6d4640362f95ec5ee8198dc3d2feee3e0648313fc2eeb SHA512 f312246f98b27b92ffea962678b9175da2b18ed26cd70d8b7bc90f39ade0a8c21591953662a57a5358527654b4046c95ea9af52fea03edd6becd90ec3a9b6abe DIST k3s-root-amd64-0.11.0.tar 11878400 BLAKE2B 6227ba08e305f062ed814a6b997313415c08e469b05f0501c86f7df25e8a3c9ecb43675613337f6d038faa5153aae98eb44cad9bc170967e0a216ba5ec27559e SHA512 d181117230ad941b40173c3b7dc3d2bb0f3d44a28e9715d85c752193c6058bb6be4a4b8f061df73fed690629a7b2b330185b38bb90ce7fcc9c808096516cb0a3 DIST k3s-runc-v1.0.3-r1.tar.gz 2375241 BLAKE2B 0fb9368ab5442462001c15a67a71821133ad90d16cac5aac760e52b2477db69c0a5dd59df42601119b19ede508889796c994a24624f88ec6a1a29dad19e0bf33 SHA512 64a1894c2b4ed5a68b185e88548fc9fbbd01d8a9495feed59fb196aa06763d64cfb71ca6cbc09d1defa26a0d94ad58626296585741f23df2e290147ba6c4c26e DIST traefik-10.14.1.tgz 24840 BLAKE2B 163d5b0f03677efc068e6478f2c3efca4eac793e8e0185ee6bce6fa76b5c9729c95a0c64f54352066aebb08883ee6e8cc5c2392ab882b64a31809cc203275d72 SHA512 04fa9630d13a413c34c4856a67a884c9bb06be8813cb36ec380183d23b352404204d098ef4a03a1e94c4a2a6c6b99cd5023b0914b42d8daf6cde322815e35ce1 +DIST traefik-10.19.3.tgz 25287 BLAKE2B c43a5e066d78e066bc4449ad1d7a3796c99c5f029244dac5494a452592424a9be057b6a3d8eddd174d8daab2b322c4f54e39eae53fba67e97e1ebdb92ce2fd65 SHA512 6df4b186c4caad09abf47469757c1d26d3b593531704af53eb262208f1efa27b5b09b178c6dd6721e78362877e6ba3b2c8c3bfbc91fe152ce090b53ac283acf9 EBUILD k3s-1.23.4_p1.ebuild 4071 BLAKE2B 4249e3095b389cbe74d72c218a7e3e0d1a5490f93afb5ecc876f49814dc98eb6534f39b38f3e22ea44dbbb9a8e957562d15b6e5a077c6b43f38f5fd21bda5670 SHA512 ee44dc53b4e55d873d93dd566229887432a32b0d056128d5b2bca6bdc57f9b8786610236664e80841574d137a60ceb0cbdf24687fd0b5b6dae1877c1f34afbdc EBUILD k3s-1.23.5_p1.ebuild 4072 BLAKE2B cdf23cfebee217bda383e0fd57403a831bc3abacbf040a0e4fef7d61a9f99c16c0ce7a5bfcbc125cff3834f7aa8b15adf2dc2d8fe2e81dc5c716e10583ae00d3 SHA512 99826ce124a0f8abe8fd8a182d3eef5d325f902db2e9b5897db8688a0e9e795fb4689e9670a9088cab0363c2607cacf2b204f7d7946ba3f7023155f56a5e2ea3 +EBUILD k3s-1.23.6_p1.ebuild 4072 BLAKE2B fbf06dbcb0ee7dbf8bdb41d7eb4cdfdb5d9b8e8fd4d1b48b5f92609b7935c9e5002cc6f2e173e85d6ca35bf8319418d4a422e159c4c77ff71461073300b8fb22 SHA512 fc786765567c37b29bded0d55357addc0647ac611d55d44df5df4f0497965bdac5bb928c910dd995663dabe6d07f194bc31d6e324132a00931712c1a2cfebef2 MISC metadata.xml 515 BLAKE2B dc5e9d23a7b4d84ec392036cd87975b9117133b3a68eb1a69a38637dfca36f4e721be42dbd1ee0dd73585602800ef49d4255ff736be7cdc97e7f2d07b59af99b SHA512 8ee732afdfd59151faa18dbc68075d0c528113b8ea3f9939d0a83fbf7f06deefe2dee27079b7317ee98ea165e81cf4514f1d305564e21b3e1fc4760d2350fd46 diff --git a/sys-cluster/k3s/k3s-1.23.6_p1.ebuild b/sys-cluster/k3s/k3s-1.23.6_p1.ebuild new file mode 100644 index 000000000000..f4cbad57825e --- /dev/null +++ b/sys-cluster/k3s/k3s-1.23.6_p1.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.5.11-k3s2 +K3S_RUNC_VERSION=v1.0.3 +K3S_ROOT_VERSION=0.11.0 +K3S_TRAEFIK_VERSION=10.19.3 +K3S_TRAEFIK_PACKAGE_VERSION=00 +K3S_CNIPLUGINS_VERSION=1.0.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 +} |