From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-emulation/rkt/Manifest | 10 ++ app-emulation/rkt/metadata.xml | 32 +++++ app-emulation/rkt/rkt-1.29.0.ebuild | 267 ++++++++++++++++++++++++++++++++++++ 3 files changed, 309 insertions(+) create mode 100644 app-emulation/rkt/Manifest create mode 100644 app-emulation/rkt/metadata.xml create mode 100644 app-emulation/rkt/rkt-1.29.0.ebuild (limited to 'app-emulation/rkt') diff --git a/app-emulation/rkt/Manifest b/app-emulation/rkt/Manifest new file mode 100644 index 000000000000..1b96ef7bfe40 --- /dev/null +++ b/app-emulation/rkt/Manifest @@ -0,0 +1,10 @@ +DIST kvmtool-cfae4d64482ed745214e3c62dd84b79c2ae0f325.tar.gz 245010 BLAKE2B 335f05906d4c623e7d1213e1e335af742c1072e4b7505c7f25d703c468db8b410d66809239d40b98c0aa4347985d2d861ef4d8519eae19ca6cdae776dc2a7b1b SHA512 7cca005136f3628dfef359f83732d6f8cc062c5e4a8d77f57c6dd5e007ed06c85f0c275c8844228b404755dbf3f4d45f6a149fc64235f4f1abe0058214e24730 +DIST kvmtool-include-asm-msr-index-1cc05b24bfe0211bb408f3264af8e0c42dcdde9c.patch 2168 BLAKE2B 8f33f1034dda7b7c749b5540f83b0241025eb1366631e2067ff470a5e2626b41fe41d4efde1e9f8104896b126ea4a0ac06334f2b88d4730bde16ce65283b4133 SHA512 483acd3758cf66587a173da8e24ef127c04955742d292de663226ebd3a1f3ee41b24a966e771f066cd735d0bda77a15d09ca00a27d3de7130456c0eb3cf7cf5e +DIST kvmtool-include-sysmacros-c0a985531f49c06fd05069024f4664740e6a0baf.patch 1243 BLAKE2B d5591addbcdb22952b5b6e462283215bd2366edabbb0db54ffa49b101cf4dcf599a788f4c07fd02729bbf67a3490613f4c4c89f27ad4d84600351d6156dfa4bc SHA512 d8e9d6e656b51d8e4b3bf6939e927a4c11874dfb34b4d649adcbcaf44ec1f95af2bf73e138f94c53aa07cbd79db63a6ebf75f96861f8b13743c942523a3ff106 +DIST linux-4.9.2.tar.xz 93189108 BLAKE2B d9eb7bd6f168aba5955da92f54c70468a5eaa6fabceb8399d8c2398672d4401012dc23ce92dfd63e80c87b57eba56f77b62dbf8ec7a8b12e6e0af2d66ea29e3f SHA512 85adf3715cba4a457efea8359ebed34413ac63ee58fe920c5713501dec1e727e167416e9d67a9e2d9430aa9f3a53ad0ac26a4f749984bc5a3f3c37ac504f75de +DIST qemu-2.8.0.tar.bz2 28368517 BLAKE2B 15177018f1f828f35e745593746228738f9bd540b3658b5ca285141867a9fc4a7a4aa9be7b174d32f5d7fc2567fb379a4ce40135b405047282cfbdcd8ab90181 SHA512 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2 +DIST rkt-1.29.0.tar.gz 3434520 BLAKE2B b3e1b4e93335023e86439a5202cdb2d8c8f62a24392fd37a11fe381f76cad71ad01d0e4a6b6acdd29edaa77932530f1cdfe5a2aed403841c079f7cb40591972c SHA512 a128abddb29a246b0afea8f7dc81d77aae1e8efaf4dae8fe92aa0f2855c4e4f9dcf7a6f01efa77500ed8a6723db83933c8d1973b284dc62f8e9e0e06b6a20f6d +DIST rkt-pxe-1478.0.0.img 264382497 BLAKE2B 087fc5e27fe2fe41a82d4dad727625a573eda027b3ca67e063ec6d38bb6382353e30804e21f55cda5494ad7ff3cf1db9d593ccc63a639e16a98295d976e92325 SHA512 5f462b6223a141d72a38857fff26f4f70c0a36f21d1cc69623d946ba42f8b15fa994f222b1934cd16cc5b4e306cf5a8850295492dfb637f2a8fee8b774d7c1e4 +DIST systemd-233.tar.gz 4660737 BLAKE2B 38cdd74543447b3c02391b328428fed169fe2cf2df6e9341dcaf2f7d3d977612ec102301e144c1cada90d61e9e9bda3b2faaef708c8ff4bd0b52b143760a83b2 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e +EBUILD rkt-1.29.0.ebuild 8629 BLAKE2B c4da76ece23345dafdb615befa4074477a499b2964996bcaa899bb617e29bfabb53031867d974cb495891d360e4530e5d65cd6a17f3a57c50c9aedf01d84e9e3 SHA512 34128807bf214649c176c2e80017d6a6485ee9c1e0d41f9a7bb7d32834900da46ad78ae7d30172ed8c6e1ceedb6e10edacd98638de31545c8ff68cf40ee274f9 +MISC metadata.xml 1468 BLAKE2B 5df0af80bfb8b1097b68936552afad8b18a372902fd4e36bf1dd03b4a8121c10859fda9a018ff0bb85436d33c4c9e789fd527c583f7cfaf15863ecfdc4190941 SHA512 e0548fddd59d422eb04b0b18b98b273d0f3d39465c91539fdfce71583388a6651e878725cf196b0c74efa42b489c44b12e4671e28b3f16d76a16fb8184c3da1a diff --git a/app-emulation/rkt/metadata.xml b/app-emulation/rkt/metadata.xml new file mode 100644 index 000000000000..d9f76835717a --- /dev/null +++ b/app-emulation/rkt/metadata.xml @@ -0,0 +1,32 @@ + + + + + zmedico@gentoo.org + Zac Medico + + + rkt is the next-generation container manager for Linux clusters. + Designed for security, simplicity, and composability within modern + cluster architectures, rkt discovers, verifies, fetches, and executes + application containers with pluggable isolation. rkt can run the same + container with varying degrees of protection, from lightweight, + OS-level namespace and capabilities isolation to heavier, VM-level + hardware virtualization. + + + Install the actool for ACI manipulation + Download and use a prebuilt stage1.aci from CoreOS + Build stage1-fly.aci + + This flag has been replaced by the rkt_stage1_kvm_* flags + + Build stage1-kvm-lkvm.aci + Build stage1-kvm-qemu.aci + Build the stage1.aci from source + Assemble stage1.aci from host binaries + + + coreos/rkt + + diff --git a/app-emulation/rkt/rkt-1.29.0.ebuild b/app-emulation/rkt/rkt-1.29.0.ebuild new file mode 100644 index 000000000000..314f265ac191 --- /dev/null +++ b/app-emulation/rkt/rkt-1.29.0.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit bash-completion-r1 autotools flag-o-matic systemd toolchain-funcs user + +KEYWORDS="~amd64" + +PXE_VERSION="1478.0.0" +PXE_SYSTEMD_VERSION="v233" +KVM_LINUX_VERSION="4.9.2" +KVMTOOL_VERSION="cfae4d64482ed745214e3c62dd84b79c2ae0f325" +QEMU_VERSION="v2.8.0" +PXE_URI="http://alpha.release.core-os.net/amd64-usr/${PXE_VERSION}/coreos_production_pxe_image.cpio.gz" +PXE_FILE="${PN}-pxe-${PXE_VERSION}.img" + +SRC_URI_KVM="mirror://kernel/linux/kernel/v4.x/linux-${KVM_LINUX_VERSION}.tar.xz + ${PXE_URI} -> ${PXE_FILE} +" + +SRC_URI="https://github.com/coreos/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz +rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE ) +rkt_stage1_kvm_lkvm? ( + https://kernel.googlesource.com/pub/scm/linux/kernel/git/will/kvmtool/+archive/${KVMTOOL_VERSION}.tar.gz -> kvmtool-${KVMTOOL_VERSION}.tar.gz + https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/patch/?id=c0a985531f49c06fd05069024f4664740e6a0baf -> kvmtool-include-sysmacros-c0a985531f49c06fd05069024f4664740e6a0baf.patch + https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/patch/?id=1cc05b24bfe0211bb408f3264af8e0c42dcdde9c -> kvmtool-include-asm-msr-index-1cc05b24bfe0211bb408f3264af8e0c42dcdde9c.patch + ${SRC_URI_KVM} +) +rkt_stage1_kvm_qemu? ( + http://wiki.qemu-project.org/download/qemu-${QEMU_VERSION#v}.tar.bz2 + ${SRC_URI_KVM} +) +rkt_stage1_src? ( https://github.com/systemd/systemd/archive/${PXE_SYSTEMD_VERSION}.tar.gz -> systemd-${PXE_SYSTEMD_VERSION#v}.tar.gz )" + +DESCRIPTION="rkt is an App Container runtime for Linux" +HOMEPAGE="https://github.com/coreos/rkt" + +LICENSE="Apache-2.0" +SLOT="0" +# The rkt_stage1_kvm flag has been replaced by the rkt_stage1_kvm_lkvm and rkt_stage1_kvm_qemu flags +IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_kvm_lkvm rkt_stage1_kvm_qemu rkt_stage1_src +actool systemd" +REQUIRED_USE="!systemd? ( !rkt_stage1_host ) || ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm_lkvm rkt_stage1_kvm_qemu rkt_stage1_src ) !rkt_stage1_kvm" + +# Some tests fail. +# rkt_stage1_src needs to copy /bin/mount, which requires root privileges during src_compile +RESTRICT="test rkt_stage1_src? ( userpriv )" + +DEPEND=">=dev-lang/go-1.5 + app-arch/cpio + app-crypt/trousers + sys-fs/squashfs-tools + dev-perl/Capture-Tiny + rkt_stage1_src? ( >=sys-apps/util-linux-2.27 ) + rkt_stage1_kvm_qemu? ( + sys-apps/attr[static-libs(+)] + sys-libs/libcap[static-libs(+)] + sys-libs/zlib[static-libs(+)] + >=x11-libs/pixman-0.28.0[static-libs(+)] + )" + +RDEPEND="!app-emulation/rocket + rkt_stage1_host? ( systemd? ( + >=sys-apps/systemd-222 + app-shells/bash:0 + ) )" + +BUILDDIR="build-${P}" +STAGE1_DEFAULT_LOCATION="/usr/share/rkt/stage1.aci" + +pkg_setup() { + enewgroup rkt-admin + enewgroup rkt +} + +src_unpack() { + local dest x + for x in ${A}; do + case ${x} in + *.img|linux-*) continue ;; + kvmtool-include-*) #627564 #635274 + dest=${S}/stage1/usr_from_kvm/lkvm/patches + mkdir -p "${dest}" || die + cp "${DISTDIR}/${x}" "${dest}" || die + ;; + kvmtool-*) + mkdir kvmtool || die + pushd kvmtool >/dev/null || die + unpack ${x} + popd >/dev/null || die + ;; + *) + unpack ${x} + esac + done +} + +src_prepare() { + eapply_user + + # This patch breaks linux kernel cc-option checks when the + # compiler doesn't recognize the -no-pie option. + rm stage1/usr_from_kvm/kernel/patches/0002-for-debian-gcc.patch || die + + # avoid sdjournal include for bug 595874 + if ! use systemd; then + sed -e "s/^\\(LOCAL_DIST_SRC_FILTER := .*\\)'$/\\1|api_service'/" \ + -i rkt/rkt.mk || die + fi + + sed -e 's|^RKT_REQ_PROG(\[GIT\],.*|#\0|' -i configure.ac || die + + # disable git fetch of systemd + sed -e 's~^include makelib/git.mk$~'\ +'ifneq ($(wildcard $(RKT_STAGE1_SYSTEMD_SRC)),)\n\n'\ +'get_systemd_sources: | $(UFS_SYSTEMDDIR)\n'\ +'\tmv "$(RKT_STAGE1_SYSTEMD_SRC)" "$(UFS_SYSTEMD_SRCDIR)"\n\n'\ +'$(UFS_SYSTEMD_CONFIGURE): get_systemd_sources\n\n'\ +'else ifneq ($(wildcard $(UFS_SYSTEMD_SRCDIR)),)\n\n'\ +'else\n'\ +'\t\0\n'\ +'endif~' -i stage1/usr_from_src/usr_from_src.mk || die + + # disable git fetch of kvmtool + sed -e 's~^include makelib/git.mk$~'\ +'ifneq ($(wildcard $(shell echo "$${WORKDIR}/kvmtool")),)\n\n'\ +'$(call forward-vars, get_lkvm_sources, LKVM_SRCDIR)\n'\ +'get_lkvm_sources: | $(LKVM_TMPDIR)\n'\ +'\tmv "$${WORKDIR}/kvmtool" "$(LKVM_SRCDIR)"\n\n'\ +'$(LKVM_PATCH_STAMP): get_lkvm_sources\n\n'\ +'else ifneq ($(wildcard $(LKVM_SRCDIR)),)\n\n'\ +'else\n'\ +'\t\0\n'\ +'endif~' -i stage1/usr_from_kvm/lkvm.mk || die + + # disable git fetch of qemu + sed -e 's~^include makelib/git.mk$~'\ +'ifneq ($(wildcard $(shell echo "$${WORKDIR}/qemu-'${QEMU_VERSION#v}'")),)\n\n'\ +'$(call forward-vars, get_qemu_sources, QEMU_SRCDIR)\n'\ +'get_qemu_sources: | $(QEMU_TMPDIR)\n'\ +'\tmv "$${WORKDIR}/qemu-'${QEMU_VERSION#v}'" "$(QEMU_SRCDIR)"\n\n'\ +'$(QEMU_CONF_STAMP): get_qemu_sources\n\n'\ +'else ifneq ($(wildcard $(QEMU_SRCDIR)),)\n\n'\ +'else\n'\ +'\t\0\n'\ +'endif~' \ + -e 's|QEMU_CONFIGURATION_OPTS :=|\0 --disable-bzip2 --disable-libssh2 --disable-opengl|' \ + -i stage1/usr_from_kvm/qemu.mk || die + + # disable fetch of kernel sources + sed -e 's|wget .*|ln -s "$${DISTDIR}/linux-'${KVM_LINUX_VERSION}'.tar.xz" "$@"|' \ + -i stage1/usr_from_kvm/kernel.mk || die + + if use rkt_stage1_host; then + # Make systemdUnitsPath consistent with host + sed -e 's|\(systemdUnitsPath := \).*|\1"'$(systemd_get_systemunitdir)'"|' \ + -i stage1/init/init.go || die + fi + + if use rkt_stage1_kvm_qemu; then + sed '1i#include ' -i "${WORKDIR}/qemu-${QEMU_VERSION#v}/hw/9pfs/9p.c" || die + fi + + eautoreconf +} + +src_configure() { + local flavors hypervisors myeconfargs=( + --with-stage1-default-images-directory="/usr/share/rkt" + --with-stage1-default-location="${STAGE1_DEFAULT_LOCATION}" + ) + + use systemd || myeconfargs+=( --enable-sdjournal=no ) + + # enable flavors (first is default) + use rkt_stage1_host && flavors+=",host" + use rkt_stage1_src && flavors+=",src" + use rkt_stage1_coreos && flavors+=",coreos" + use rkt_stage1_fly && flavors+=",fly" + { use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; } && flavors+=",kvm" + myeconfargs+=( --with-stage1-flavors="${flavors#,}" ) + + if use rkt_stage1_src; then + myeconfargs+=( + --with-stage1-systemd-version=${PXE_SYSTEMD_VERSION} + --with-stage1-systemd-src="${WORKDIR}/systemd-${PXE_SYSTEMD_VERSION#v}" + ) + fi + + if use rkt_stage1_coreos || use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; then + myeconfargs+=( + --with-coreos-local-pxe-image-path="${DISTDIR}/${PXE_FILE}" + --with-coreos-local-pxe-image-systemd-version="${PXE_SYSTEMD_VERSION}" + ) + fi + + if use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; then + use rkt_stage1_kvm_lkvm && hypervisors+=",lkvm" + use rkt_stage1_kvm_qemu && hypervisors+=",qemu" + myeconfargs+=( --with-stage1-kvm-hypervisors="${hypervisors#,}" ) + fi + + # Go's 6l linker does not support PIE, disable so cgo binaries + # which use 6l+gcc for linking can be built correctly. + if gcc-specs-pie; then + append-ldflags -nopie + fi + + export CC=$(tc-getCC) + export CGO_ENABLED=1 + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export BUILDDIR + + econf "${myeconfargs[@]}" +} + +src_compile() { + local arch=${ARCH} + case ${arch} in + amd64) arch=x86_64;; + esac + ARCH=${arch} emake V=3 + ARCH=${arch} emake V=3 bash-completion +} + +src_install() { + dodoc README.md + use doc && dodoc -r Documentation + use examples && dodoc -r examples + use actool && dobin "${S}/${BUILDDIR}/tools/actool" + + dobin "${S}/${BUILDDIR}/target/bin/rkt" + + insinto /usr/share/rkt + doins "${S}/${BUILDDIR}/target/bin/"*.aci + + # create symlink for default stage1 image path + if use rkt_stage1_host; then + dosym stage1-host.aci "${STAGE1_DEFAULT_LOCATION}" + elif use rkt_stage1_src; then + dosym stage1-src.aci "${STAGE1_DEFAULT_LOCATION}" + elif use rkt_stage1_coreos; then + dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}" + elif use rkt_stage1_fly; then + dosym stage1-fly.aci "${STAGE1_DEFAULT_LOCATION}" + elif use rkt_stage1_kvm_lkvm; then + dosym stage1-kvm-lkvm.aci "${STAGE1_DEFAULT_LOCATION}" + elif use rkt_stage1_kvm_qemu; then + dosym stage1-kvm-qemu.aci "${STAGE1_DEFAULT_LOCATION}" + fi + + systemd_dounit "${S}"/dist/init/systemd/*.service \ + "${S}"/dist/init/systemd/*.timer \ + "${S}"/dist/init/systemd/*.socket + + insinto /usr/lib/tmpfiles.d + doins "${S}"/dist/init/systemd/tmpfiles.d/* + + newbashcomp "${S}"/dist/bash_completion/rkt.bash rkt + + keepdir /etc/${PN} + fowners :rkt-admin /etc/${PN} + fperms 2775 /etc/${PN} +} -- cgit v1.2.3