From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-832992-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id CD08C1384C3
	for <garchives@archives.gentoo.org>; Sun,  6 Sep 2015 20:27:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DF8D8142C0;
	Sun,  6 Sep 2015 20:27:14 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 46557142C0
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Sep 2015 20:27:14 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 16802340AC9
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Sep 2015 20:27:12 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BC5CC17F
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Sep 2015 20:27:10 +0000 (UTC)
From: "Alex Brandt" <alunduil@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Alex Brandt" <alunduil@gentoo.org>
Message-ID: <1441571205.b952b4776ef9b2253cb91e43c77b51e624992827.alunduil@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/rkt/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-emulation/rkt/Manifest app-emulation/rkt/metadata.xml app-emulation/rkt/rkt-0.8.0.ebuild app-emulation/rkt/rkt-9999.ebuild
X-VCS-Directories: app-emulation/rkt/
X-VCS-Committer: alunduil
X-VCS-Committer-Name: Alex Brandt
X-VCS-Revision: b952b4776ef9b2253cb91e43c77b51e624992827
X-VCS-Branch: master
Date: Sun,  6 Sep 2015 20:27:10 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 63192ae9-105e-4110-91d7-ea8fd0fcbcca
X-Archives-Hash: 6219f5e57db02db661b38ebc4e1c0778

commit:     b952b4776ef9b2253cb91e43c77b51e624992827
Author:     Alex Brandt <alunduil <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  6 20:20:37 2015 +0000
Commit:     Alex Brandt <alunduil <AT> gentoo <DOT> org>
CommitDate: Sun Sep  6 20:26:45 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b952b477

app-emulation/rkt: add version 0.8.0 and 9999

Provided by Stefan Junker (listed as maintainer)

This commit does add a USE flag, rkt_stage1_src, to the selinux
package.use.mask.  This is required due to the systemd integration with selinux
and rkt's dependence on systemd with this USE flag enabled.

Package-Manager: portage-2.2.20.1

 app-emulation/rkt/Manifest         |  2 +
 app-emulation/rkt/metadata.xml     | 24 ++++++++++
 app-emulation/rkt/rkt-0.8.0.ebuild | 87 ++++++++++++++++++++++++++++++++++
 app-emulation/rkt/rkt-9999.ebuild  | 96 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 209 insertions(+)

diff --git a/app-emulation/rkt/Manifest b/app-emulation/rkt/Manifest
new file mode 100644
index 0000000..d74b026
--- /dev/null
+++ b/app-emulation/rkt/Manifest
@@ -0,0 +1,2 @@
+DIST rkt-0.8.0.tar.gz 1749853 SHA256 c9eb0126b8ff2f059d7cedaab17ca73dce256f342092c9bf4a7ae20661f2a5aa SHA512 4e2c27fb40cd3d27de062631105db3ea04ed902f48abb647a8e4de249478dd8a145ac0b77fd5b261cc680df1bcaa4067accb8a597def9b3963108e2c1f3d9d5a WHIRLPOOL f65ddd8908ec30cfefa06e60cd4d8cdb2099ab279b6350790eb3e436b88c792efe28cea53569f48d42f6eec682635a4212f16fea9d184e6baa97877a643e1106
+DIST rkt-pxe-738.1.0.img 151780780 SHA256 805a4c491281553c8927f3dd1a7bec50cca29209d0a7264870e7155d794ecbe6 SHA512 7774cc64dfa874f08f48cba0c15103e9eca86ffd87dcb24f765a9b56074e72f6862a663a4007a0a7dd296740ae91bf4edf7290fa35659b0b1572fe2f5dad3256 WHIRLPOOL 5973a6036d650c576bb0bd365c8c9ea35776501c1fd2baf1d7c00d06496fab35e9c796096ef89b095e7a922e2062dce6c0d1c85cd3101022e0aca84277d18cb9

diff --git a/app-emulation/rkt/metadata.xml b/app-emulation/rkt/metadata.xml
new file mode 100644
index 0000000..d01e2b4
--- /dev/null
+++ b/app-emulation/rkt/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer>
+		<email>mail@stefanjunker.de</email>
+		<name>Stefan Junker</name>
+	</maintainer>	
+	<maintainer>
+		<email>alunduil@gentoo.org</email>
+		<name>Alex Brandt</name>
+	</maintainer>
+	<longdescription lang="en">
+		rkt is a new container runtime, designed for composability, security,
+		and speed. Today we are releasing a prototype version on GitHub to begin
+		gathering feedback from our community and explain why we are building
+		rkt. 
+	</longdescription>
+	<use>
+		<flag name="actool">Install the actool for ACI manipulation</flag>
+		<flag name="rkt_stage1_coreos">Download and use a prebuilt stage1.aci from CoreOS</flag>
+		<flag name="rkt_stage1_src">Build the stage1.aci from source</flag>
+		<flag name="rkt_stage1_host">Assemble stage1.aci from host binaries</flag>
+	</use>
+</pkgmetadata>

diff --git a/app-emulation/rkt/rkt-0.8.0.ebuild b/app-emulation/rkt/rkt-0.8.0.ebuild
new file mode 100644
index 0000000..e1354ed
--- /dev/null
+++ b/app-emulation/rkt/rkt-0.8.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+AUTOTOOLS_IN_SOURCE_BUILD=yes
+
+inherit autotools-utils flag-o-matic systemd toolchain-funcs
+
+KEYWORDS="~amd64"
+
+PXE_VERSION="738.1.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="https://github.com/coreos/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE )"
+
+DESCRIPTION="A CLI for running app containers, and an implementation of the App
+Container Spec."
+HOMEPAGE="https://github.com/coreos/rkt"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc examples +rkt_stage1_coreos rkt_stage1_src +actool systemd"
+REQUIRED_USE="^^ ( rkt_stage1_coreos rkt_stage1_src )"
+
+DEPEND=">=dev-lang/go-1.4.1
+	app-arch/cpio
+	sys-fs/squashfs-tools
+	dev-perl/Capture-Tiny
+	rkt_stage1_src? (
+		>=sys-apps/systemd-222
+		app-shells/bash:0
+	)"
+RDEPEND="!app-emulation/rocket"
+
+BUILDDIR="build-${P}"
+
+src_configure() {
+	local myeconfargs=(
+		--with-stage1-image-path="/usr/share/rkt/stage1.aci"
+	)
+
+	if use rkt_stage1_src; then
+		myeconfargs+=( --with-stage1="src" )
+	elif use rkt_stage1_coreos; then
+		myeconfargs+=( --with-stage1="coreos" )
+		mkdir -p "${BUILDDIR}/tmp/usr_from_coreos/" || die
+		cp "${DISTDIR}/${PXE_FILE}" "${BUILDDIR}/tmp/usr_from_coreos/pxe.img" || die
+	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
+
+	autotools-utils_src_configure
+}
+
+src_install() {
+	dodoc README.md
+	use doc && dodoc -r Documentation
+	use examples && dodoc -r examples
+	use actool && dobin "${S}/${BUILDDIR}/bin/actool"
+
+	dobin "${S}/${BUILDDIR}/bin/rkt"
+
+	insinto /usr/share/rkt/
+	doins "${S}/${BUILDDIR}/bin/stage1.aci"
+
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.service
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.timer
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.service
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.socket
+}

diff --git a/app-emulation/rkt/rkt-9999.ebuild b/app-emulation/rkt/rkt-9999.ebuild
new file mode 100644
index 0000000..fcb665c
--- /dev/null
+++ b/app-emulation/rkt/rkt-9999.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+AUTOTOOLS_IN_SOURCE_BUILD=yes
+
+inherit autotools-utils flag-o-matic systemd toolchain-funcs
+inherit git-r3
+
+EGIT_REPO_URI="https://github.com/coreos/rkt.git"
+
+KEYWORDS=""
+PXE_VERSION="738.1.0"
+EGIT_BRANCH="master"
+
+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="rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE )"
+
+DESCRIPTION="A CLI for running app containers, and an implementation of the App
+Container Spec."
+HOMEPAGE="https://github.com/coreos/rkt"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc examples +rkt_stage1_coreos rkt_stage1_host rkt_stage1_src +actool systemd"
+REQUIRED_USE="^^ ( rkt_stage1_coreos rkt_stage1_host rkt_stage1_src )"
+
+DEPEND=">=dev-lang/go-1.4.1
+	app-arch/cpio
+	sys-fs/squashfs-tools
+	dev-perl/Capture-Tiny
+	rkt_stage1_src? (
+		>=sys-apps/systemd-222
+		app-shells/bash:0
+	)"
+RDEPEND="!app-emulation/rocket
+	rkt_stage1_host? (
+		>=sys-apps/systemd-222
+		app-shells/bash:0
+	)"
+
+BUILDDIR="build-${P}"
+
+src_configure() {
+	local myeconfargs=(
+		--with-stage1-image-path="/usr/share/rkt/stage1.aci"
+	)
+
+	if use rkt_stage1_host; then
+		myeconfargs+=( --with-stage1="host" )
+	elif use rkt_stage1_src; then
+		myeconfargs+=( --with-stage1="src" )
+	elif use rkt_stage1_coreos; then
+		myeconfargs+=( --with-stage1="coreos" )
+		mkdir -p "${BUILDDIR}/tmp/usr_from_coreos/" || die
+		cp "${DISTDIR}/${PXE_FILE}" "${BUILDDIR}/tmp/usr_from_coreos/pxe.img" || die
+	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
+
+	autotools-utils_src_configure
+}
+
+src_install() {
+	dodoc README.md
+	use doc && dodoc -r Documentation
+	use examples && dodoc -r examples
+	use actool && dobin "${S}/${BUILDDIR}/bin/actool"
+
+	dobin "${S}/${BUILDDIR}/bin/rkt"
+
+	insinto /usr/share/rkt/
+	doins "${S}/${BUILDDIR}/bin/stage1.aci"
+
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.service
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.timer
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.service
+	systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.socket
+}