diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/Manifest b/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/Manifest new file mode 100644 index 0000000000..4616878b78 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/Manifest @@ -0,0 +1 @@ +DIST cri-tools-1.19.0.tar.gz 5199406 BLAKE2B 59102098a29b2454ab21e5fae0440f1ed7a550f48890806b2663c97de936e9a88c44c9c1dee1b65e94e3495d823c03dbaa9fc28319e4eb5cae736559e1692c55 SHA512 40c9df3623258a0b787a903113d522f93cb084f8c5840cebdfdf36ba57b6ae3ac0ee11fda1414f4ed4c977f8bc2d255dee7f1b07832fa82ab65010717952fb64 diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/cri-tools-1.19.0.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/cri-tools-1.19.0.ebuild new file mode 100644 index 0000000000..fd52edd1cb --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/cri-tools-1.19.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit coreos-go + +COREOS_GO_VERSION="go1.15" +COREOS_GO_PACKAGE="github.com/kubernetes-sigs/cri-tools" +COREOS_GO_MOD="vendor" + +MY_PV="v${PV/_beta/-beta.}" + +EGO_PN="${COREOS_GO_PACKAGE}" +DESCRIPTION="CLI and validation tools for Kubelet Container Runtime (CRI)" +HOMEPAGE="https://github.com/kubernetes-sigs/cri-tools" +SRC_URI="https://github.com/kubernetes-sigs/cri-tools/archive/${MY_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" +# Flatcar: keyword arm64 +KEYWORDS="amd64 arm64" + +S=${WORKDIR}/cri-tools-${PV} + +DEPEND="" +RDEPEND="${DEPEND}" + +src_compile() { + # Flatcar: to optimize the binary size of crictl, make use of the existing + # helpers provided by `coreos-go.eclass`. + # Add "-X $(PROJECT)/pkg/version.Version=$(VERSION)" to GO_LDFLAGS, + # as the original cri-tools Makefile does. + # Note, we cannot run the native command like `emake crictl`, because + # the cri-tools Makefile does not allow custom env variables like BUILDTAGS + # or GO_LDFLAGS to be configured. + GO_LDFLAGS="-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs " + GO_LDFLAGS+="-X ${COREOS_GO_PACKAGE}/pkg/version.Version=${PV} " + go_build "${COREOS_GO_PACKAGE}/cmd/crictl" +} + +src_install() { + # Flatcar: install only crictl binary + dobin "${GOBIN}/crictl" +} diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/metadata.xml new file mode 100644 index 0000000000..ded6fbaced --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/cri-tools/metadata.xml @@ -0,0 +1,8 @@ + + + + + + kubernetes-sigs/cri-tools + + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r297.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r298.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r297.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r298.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild index a104c375c9..903d86593d 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild @@ -104,6 +104,7 @@ RDEPEND="${RDEPEND} app-editors/vim app-emulation/rkt app-emulation/actool + app-emulation/cri-tools app-misc/ca-certificates app-misc/jq app-shells/bash