From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D941515808B for ; Sat, 26 Feb 2022 20:22:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4B76E08FA; Sat, 26 Feb 2022 20:22:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A35E7E08FA for ; Sat, 26 Feb 2022 20:22:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 71034343271 for ; Sat, 26 Feb 2022 20:22:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B16EA26D for ; Sat, 26 Feb 2022 20:22:45 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1645906962.31991dd0b95d77ea03a7f0b1238be2f8cb696caf.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/k3s/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-cluster/k3s/Manifest sys-cluster/k3s/k3s-1.23.4_p1.ebuild X-VCS-Directories: sys-cluster/k3s/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 31991dd0b95d77ea03a7f0b1238be2f8cb696caf X-VCS-Branch: master Date: Sat, 26 Feb 2022 20:22:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: acbcf58c-8ba0-471d-b378-ecc2abf18717 X-Archives-Hash: bc7e7b855a39cb11a39bbe4f9ab593f8 commit: 31991dd0b95d77ea03a7f0b1238be2f8cb696caf Author: Zac Medico gentoo org> AuthorDate: Sat Feb 26 20:21:49 2022 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Feb 26 20:22:42 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31991dd0 sys-cluster/k3s: Bump to version 1.23.4_p1 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Zac Medico gentoo.org> sys-cluster/k3s/Manifest | 4 ++ sys-cluster/k3s/k3s-1.23.4_p1.ebuild | 98 ++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/sys-cluster/k3s/Manifest b/sys-cluster/k3s/Manifest index 38ee92b9a843..959f270961ce 100644 --- a/sys-cluster/k3s/Manifest +++ b/sys-cluster/k3s/Manifest @@ -1,6 +1,10 @@ DIST k3s-1.23.3_p1-vendor.tar.gz 29397207 BLAKE2B dc150b46ba228908bc5fdbb2d05e4621772f3b027a75612187f68a358e01ce4601a11b2c6bdd22d0f10e84ecb48c5610a5b26c5f18f8c0179b8615129467c951 SHA512 0caef8a161f5de253a36a00763c1f0d3b334faec49be4170ff78ea9ed29b1fb257d897d21e603bb71335ce3b33c90d1cc810d5e585527f05258389c7b2de911e +DIST k3s-1.23.4_p1-vendor.tar.gz 29494135 BLAKE2B 8e8598f43255b105e14b59ec54e7d3b19c4d8c10f61287a7e138153030b728cf41c7b9ad3d8300f7209a96421b7f934ed3a3ca63baac48babb376af664248536 SHA512 b2f98be943c6c4eedabc29e8703653fd78abf880eff306076d2e64a4756829adc848b1e48a735662a9264de94b2c86abff029c7a284c37c322bfa7537e35064b DIST k3s-cni-plugins-0.9.1.tar.gz 2748074 BLAKE2B b8fc7cd8f50c305d811b36ffe1dbd47535ed7334fca4f9c399a261ac321107f892d662a07282dba5a10865c9ff01a1be24c2bcaaa23917d264f5b51102a98109 SHA512 6a59c4aaf4ad62ceee27c09659ebbb4cb8996710a2545adbc93a507ec1f74b12c34d29f0c33b7ae45823b4686e3b279027b7c3f7335788c176eedb2b00423a62 +DIST k3s-cni-plugins-1.0.1.tar.gz 5711129 BLAKE2B d75557a10de1dccd79b1953c167b0054c229a9cade891b87ece0133be4660fde5c442f253cec8938db87886fc6c39d5a68214262c9ec5c3266a1321ebb75bee7 SHA512 dff27fa602e948ab51745151614713262bc25dfe687a0f3e8b7bab4aa63d40e5e5cfa652e34455fea3f1f38558c3f648aa6021f134d78b4b49e7764f8e894d07 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-root-amd64-0.9.1.tar 16404480 BLAKE2B 66f279d1eb43338fd0a6b71f7ba5d9e8e3e1a7d3a17d24c9fcd30f3e03d0ea8cd5fa15547f3395a8c4015f8446c0dd75311e6ccf102e71c9e4a89e6b64bbcc57 SHA512 294dc0e4d8cb378b46ab638d7be2be3ec6a1102c6b4e08fa76cc82a123884f6a691869ed2725b45014cec2c175b7c53fc9b306709df930b7e9b18b18e88b48a2 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.9.1.tgz 24420 BLAKE2B ae15d343e90351e89e55304565be7f61f4ff03b7bdc36415934159e9e3dfb6a1836174b7f37c6b5f4185b4cf156db1938805983d92d4f67922f18b1dbd8f28ef SHA512 615b01ab8b2bb71a909c689fdabc43f4d9a5f00704ac208838c750c7546038de0a480d20fae58ce45a27f6e0e73698f88d5638935a9ba67f1c8ed413f59a41dd diff --git a/sys-cluster/k3s/k3s-1.23.4_p1.ebuild b/sys-cluster/k3s/k3s-1.23.4_p1.ebuild new file mode 100644 index 000000000000..9416158cb176 --- /dev/null +++ b/sys-cluster/k3s/k3s-1.23.4_p1.ebuild @@ -0,0 +1,98 @@ +# 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.9-k3s1 +K3S_RUNC_VERSION=v1.0.3 +K3S_ROOT_VERSION=0.11.0 +K3S_TRAEFIK_VERSION=10.14.1 +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 + + 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 +}