Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/rkt/
Date: Fri, 20 Oct 2017 23:38:11
Message-Id: 1508542681.e215a151c50d4f7aa2d5c4c7420bd7ac9a01a162.zmedico@gentoo
1 commit: e215a151c50d4f7aa2d5c4c7420bd7ac9a01a162
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 20 22:34:37 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 20 23:38:01 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e215a151
7
8 app-emulation/rkt: version bump to 1.29.0
9
10 Package-Manager: Portage-2.3.12, Repoman-2.3.3
11
12 app-emulation/rkt/Manifest | 3 +
13 app-emulation/rkt/rkt-1.29.0.ebuild | 266 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 269 insertions(+)
15
16 diff --git a/app-emulation/rkt/Manifest b/app-emulation/rkt/Manifest
17 index d31af73e4e2..970ac2ca3c7 100644
18 --- a/app-emulation/rkt/Manifest
19 +++ b/app-emulation/rkt/Manifest
20 @@ -3,5 +3,8 @@ DIST kvmtool-include-sysmacros-c0a985531f49c06fd05069024f4664740e6a0baf.patch 12
21 DIST linux-4.9.2.tar.xz 93189108 SHA256 8dda9aedd17ae0bf1e06ebb4b79082f83fb3ade45cbcc3ca4c30bf3faf085738 SHA512 85adf3715cba4a457efea8359ebed34413ac63ee58fe920c5713501dec1e727e167416e9d67a9e2d9430aa9f3a53ad0ac26a4f749984bc5a3f3c37ac504f75de WHIRLPOOL 74df775ab092a6be6684243d4c0d557c0ce27907c7e8ed97be54a45901e8f507deab1d5e72c35092884836f3fe446f838342ec0b53a3aa1c884489caadaf6a62
22 DIST qemu-2.8.0.tar.bz2 28368517 SHA256 dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62 SHA512 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2 WHIRLPOOL 0ce4e0539657eb832e4039819e7360c792b6aa41c718f0e0d762f4933217f0d370af94b1d6d9776853575b4a6811d8c85db069bf09d21bd15399ac8b50440ff5
23 DIST rkt-1.28.1.tar.gz 3425099 SHA256 2610749f412ca697c57a797c8dd0024c4c215d7dd824599d8ed6f4297abd5e07 SHA512 02d47f4e95e5ff9dc82cd645f1c69bb1fe5ab856c32b3b29bcd74c0e96ae0b5831a610cbde04614d216e4f7387af54f904ebd31ddc3acc1d2cfa0178805fd811 WHIRLPOOL a7e1489b1295795fe3908e51f81be6db3ffd6b0ad17aa4828e7fb07551ea4a6b215fda9f6e4658aa5e7b4e36bcf3472aec8726e2751943c6b0a1aeb910ebe9cf
24 +DIST rkt-1.29.0.tar.gz 3434520 SHA256 d2d89db86b4b3a586a8288ba7becdb87370d4fbe7e12aa37e9b1e30a9f9c9b20 SHA512 a128abddb29a246b0afea8f7dc81d77aae1e8efaf4dae8fe92aa0f2855c4e4f9dcf7a6f01efa77500ed8a6723db83933c8d1973b284dc62f8e9e0e06b6a20f6d WHIRLPOOL 2fbfc7c7e5e4087d3413d76b8bc0a72b4e34a3ae5c89914c2d4cd1e76128917fd6efb329dca32fc994cb2339369f990e715fd0e66e4d5bdff7196ed98cfe1151
25 DIST rkt-pxe-1235.0.0.img 243713684 SHA256 988e4ad8e044dd8bff54cb5e0a34a1ed25cf7bc8cc241f1a90e3fe7f1412f315 SHA512 b19821c63b7b53a1aad3b6e279189f9ceed1f5db1a691d12a70eb7340cceb4c3fd4f7f61a913d9482aec5ce28740b9ee777f86a1ce54f597f50341d701372542 WHIRLPOOL f3905ce3a2a55a027197a2d11ca541323fdfd560d186b4a2c39a8f45e19811067d5de4fbd3656935b12787e1dec79d118d7a01d52a8ef7abd0dad4f38a222b1c
26 +DIST rkt-pxe-1478.0.0.img 264382497 SHA256 9897f9e78e207da42a75d03f7ff74c4400dce15843b752adcb3182ebe66c9868 SHA512 5f462b6223a141d72a38857fff26f4f70c0a36f21d1cc69623d946ba42f8b15fa994f222b1934cd16cc5b4e306cf5a8850295492dfb637f2a8fee8b774d7c1e4 WHIRLPOOL 6eed288afed99f26c892af4fdfea23bde5cb617918d34ba7132765bf11bdfc478f364b123d4c505d474740b5381b7f149dba856288ea59dbb5171782975d821b
27 DIST systemd-231.tar.gz 4381464 SHA256 899733ad6c157cedbb89aec4efe3bc824dcfd65a1d6f6bebc7b043f7924e39b4 SHA512 199fa33a0494d1d15f7fe3c796fe14913ad386766571d4d3fbb1cb1c446e04f6d06a965213be4c594a7183e810fc2fd4804fe14f64f21b0a1278b717889811c6 WHIRLPOOL 7779291e9fb9873cb1773b8583cf6d4b7dec837363ea89c4a73c1e397a76752b66f8b57d8fc4d9cef768cc1855b5e325ad88a8a69eb5380aa924e0a6dead41b1
28 +DIST systemd-233.tar.gz 4660737 SHA256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e WHIRLPOOL ce19f6a546b8f899cfa952e49d47f063fd29186be4a53391bc30ea2c487eb2c140a74ad843a1dc499bb61bba3e9ca055613852291e38b85af5d79c59409dc176
29
30 diff --git a/app-emulation/rkt/rkt-1.29.0.ebuild b/app-emulation/rkt/rkt-1.29.0.ebuild
31 new file mode 100644
32 index 00000000000..2d951cd3460
33 --- /dev/null
34 +++ b/app-emulation/rkt/rkt-1.29.0.ebuild
35 @@ -0,0 +1,266 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +
41 +inherit bash-completion-r1 autotools flag-o-matic systemd toolchain-funcs user
42 +
43 +KEYWORDS="~amd64"
44 +
45 +PXE_VERSION="1478.0.0"
46 +PXE_SYSTEMD_VERSION="v233"
47 +KVM_LINUX_VERSION="4.9.2"
48 +KVMTOOL_VERSION="cfae4d64482ed745214e3c62dd84b79c2ae0f325"
49 +QEMU_VERSION="v2.8.0"
50 +PXE_URI="http://alpha.release.core-os.net/amd64-usr/${PXE_VERSION}/coreos_production_pxe_image.cpio.gz"
51 +PXE_FILE="${PN}-pxe-${PXE_VERSION}.img"
52 +
53 +SRC_URI_KVM="mirror://kernel/linux/kernel/v4.x/linux-${KVM_LINUX_VERSION}.tar.xz
54 + ${PXE_URI} -> ${PXE_FILE}
55 +"
56 +
57 +SRC_URI="https://github.com/coreos/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
58 +rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE )
59 +rkt_stage1_kvm_lkvm? (
60 + https://kernel.googlesource.com/pub/scm/linux/kernel/git/will/kvmtool/+archive/${KVMTOOL_VERSION}.tar.gz -> kvmtool-${KVMTOOL_VERSION}.tar.gz
61 + https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/patch/?id=c0a985531f49c06fd05069024f4664740e6a0baf -> kvmtool-include-sysmacros-c0a985531f49c06fd05069024f4664740e6a0baf.patch
62 + ${SRC_URI_KVM}
63 +)
64 +rkt_stage1_kvm_qemu? (
65 + http://wiki.qemu-project.org/download/qemu-${QEMU_VERSION#v}.tar.bz2
66 + ${SRC_URI_KVM}
67 +)
68 +rkt_stage1_src? ( https://github.com/systemd/systemd/archive/${PXE_SYSTEMD_VERSION}.tar.gz -> systemd-${PXE_SYSTEMD_VERSION#v}.tar.gz )"
69 +
70 +DESCRIPTION="rkt is an App Container runtime for Linux"
71 +HOMEPAGE="https://github.com/coreos/rkt"
72 +
73 +LICENSE="Apache-2.0"
74 +SLOT="0"
75 +# The rkt_stage1_kvm flag has been replaced by the rkt_stage1_kvm_lkvm and rkt_stage1_kvm_qemu flags
76 +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"
77 +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"
78 +
79 +# Some tests fail.
80 +# rkt_stage1_src needs to copy /bin/mount, which requires root privileges during src_compile
81 +RESTRICT="test rkt_stage1_src? ( userpriv )"
82 +
83 +DEPEND=">=dev-lang/go-1.5
84 + app-arch/cpio
85 + app-crypt/trousers
86 + sys-fs/squashfs-tools
87 + dev-perl/Capture-Tiny
88 + rkt_stage1_src? ( >=sys-apps/util-linux-2.27 )
89 + rkt_stage1_kvm_qemu? (
90 + sys-apps/attr[static-libs(+)]
91 + sys-libs/libcap[static-libs(+)]
92 + sys-libs/zlib[static-libs(+)]
93 + >=x11-libs/pixman-0.28.0[static-libs(+)]
94 + )"
95 +
96 +RDEPEND="!app-emulation/rocket
97 + rkt_stage1_host? ( systemd? (
98 + >=sys-apps/systemd-222
99 + app-shells/bash:0
100 + ) )"
101 +
102 +BUILDDIR="build-${P}"
103 +STAGE1_DEFAULT_LOCATION="/usr/share/rkt/stage1.aci"
104 +
105 +pkg_setup() {
106 + enewgroup rkt-admin
107 + enewgroup rkt
108 +}
109 +
110 +src_unpack() {
111 + local dest x
112 + for x in ${A}; do
113 + case ${x} in
114 + *.img|linux-*) continue ;;
115 + kvmtool-include-sysmacros-*) #627564
116 + dest=${S}/stage1/usr_from_kvm/lkvm/patches
117 + mkdir -p "${dest}" || die
118 + cp "${DISTDIR}/${x}" "${dest}" || die
119 + ;;
120 + kvmtool-*)
121 + mkdir kvmtool || die
122 + pushd kvmtool >/dev/null || die
123 + unpack ${x}
124 + popd >/dev/null || die
125 + ;;
126 + *)
127 + unpack ${x}
128 + esac
129 + done
130 +}
131 +
132 +src_prepare() {
133 + eapply_user
134 +
135 + # This patch breaks linux kernel cc-option checks when the
136 + # compiler doesn't recognize the -no-pie option.
137 + rm stage1/usr_from_kvm/kernel/patches/0002-for-debian-gcc.patch || die
138 +
139 + # avoid sdjournal include for bug 595874
140 + if ! use systemd; then
141 + sed -e "s/^\\(LOCAL_DIST_SRC_FILTER := .*\\)'$/\\1|api_service'/" \
142 + -i rkt/rkt.mk || die
143 + fi
144 +
145 + sed -e 's|^RKT_REQ_PROG(\[GIT\],.*|#\0|' -i configure.ac || die
146 +
147 + # disable git fetch of systemd
148 + sed -e 's~^include makelib/git.mk$~'\
149 +'ifneq ($(wildcard $(RKT_STAGE1_SYSTEMD_SRC)),)\n\n'\
150 +'get_systemd_sources: | $(UFS_SYSTEMDDIR)\n'\
151 +'\tmv "$(RKT_STAGE1_SYSTEMD_SRC)" "$(UFS_SYSTEMD_SRCDIR)"\n\n'\
152 +'$(UFS_SYSTEMD_CONFIGURE): get_systemd_sources\n\n'\
153 +'else ifneq ($(wildcard $(UFS_SYSTEMD_SRCDIR)),)\n\n'\
154 +'else\n'\
155 +'\t\0\n'\
156 +'endif~' -i stage1/usr_from_src/usr_from_src.mk || die
157 +
158 + # disable git fetch of kvmtool
159 + sed -e 's~^include makelib/git.mk$~'\
160 +'ifneq ($(wildcard $(shell echo "$${WORKDIR}/kvmtool")),)\n\n'\
161 +'$(call forward-vars, get_lkvm_sources, LKVM_SRCDIR)\n'\
162 +'get_lkvm_sources: | $(LKVM_TMPDIR)\n'\
163 +'\tmv "$${WORKDIR}/kvmtool" "$(LKVM_SRCDIR)"\n\n'\
164 +'$(LKVM_PATCH_STAMP): get_lkvm_sources\n\n'\
165 +'else ifneq ($(wildcard $(LKVM_SRCDIR)),)\n\n'\
166 +'else\n'\
167 +'\t\0\n'\
168 +'endif~' -i stage1/usr_from_kvm/lkvm.mk || die
169 +
170 + # disable git fetch of qemu
171 + sed -e 's~^include makelib/git.mk$~'\
172 +'ifneq ($(wildcard $(shell echo "$${WORKDIR}/qemu-'${QEMU_VERSION#v}'")),)\n\n'\
173 +'$(call forward-vars, get_qemu_sources, QEMU_SRCDIR)\n'\
174 +'get_qemu_sources: | $(QEMU_TMPDIR)\n'\
175 +'\tmv "$${WORKDIR}/qemu-'${QEMU_VERSION#v}'" "$(QEMU_SRCDIR)"\n\n'\
176 +'$(QEMU_CONF_STAMP): get_qemu_sources\n\n'\
177 +'else ifneq ($(wildcard $(QEMU_SRCDIR)),)\n\n'\
178 +'else\n'\
179 +'\t\0\n'\
180 +'endif~' \
181 + -e 's|QEMU_CONFIGURATION_OPTS :=|\0 --disable-bzip2 --disable-libssh2 --disable-opengl|' \
182 + -i stage1/usr_from_kvm/qemu.mk || die
183 +
184 + # disable fetch of kernel sources
185 + sed -e 's|wget .*|ln -s "$${DISTDIR}/linux-'${KVM_LINUX_VERSION}'.tar.xz" "$@"|' \
186 + -i stage1/usr_from_kvm/kernel.mk || die
187 +
188 + if use rkt_stage1_host; then
189 + # Make systemdUnitsPath consistent with host
190 + sed -e 's|\(systemdUnitsPath := \).*|\1"'$(systemd_get_systemunitdir)'"|' \
191 + -i stage1/init/init.go || die
192 + fi
193 +
194 + if use rkt_stage1_kvm_qemu; then
195 + sed '1i#include <sys/sysmacros.h>' -i "${WORKDIR}/qemu-${QEMU_VERSION#v}/hw/9pfs/9p.c" || die
196 + fi
197 +
198 + eautoreconf
199 +}
200 +
201 +src_configure() {
202 + local flavors hypervisors myeconfargs=(
203 + --with-stage1-default-images-directory="/usr/share/rkt"
204 + --with-stage1-default-location="${STAGE1_DEFAULT_LOCATION}"
205 + )
206 +
207 + use systemd || myeconfargs+=( --enable-sdjournal=no )
208 +
209 + # enable flavors (first is default)
210 + use rkt_stage1_host && flavors+=",host"
211 + use rkt_stage1_src && flavors+=",src"
212 + use rkt_stage1_coreos && flavors+=",coreos"
213 + use rkt_stage1_fly && flavors+=",fly"
214 + { use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; } && flavors+=",kvm"
215 + myeconfargs+=( --with-stage1-flavors="${flavors#,}" )
216 +
217 + if use rkt_stage1_src; then
218 + myeconfargs+=(
219 + --with-stage1-systemd-version=${PXE_SYSTEMD_VERSION}
220 + --with-stage1-systemd-src="${WORKDIR}/systemd-${PXE_SYSTEMD_VERSION#v}"
221 + )
222 + fi
223 +
224 + if use rkt_stage1_coreos || use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; then
225 + myeconfargs+=(
226 + --with-coreos-local-pxe-image-path="${DISTDIR}/${PXE_FILE}"
227 + --with-coreos-local-pxe-image-systemd-version="${PXE_SYSTEMD_VERSION}"
228 + )
229 + fi
230 +
231 + if use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; then
232 + use rkt_stage1_kvm_lkvm && hypervisors+=",lkvm"
233 + use rkt_stage1_kvm_qemu && hypervisors+=",qemu"
234 + myeconfargs+=( --with-stage1-kvm-hypervisors="${hypervisors#,}" )
235 + fi
236 +
237 + # Go's 6l linker does not support PIE, disable so cgo binaries
238 + # which use 6l+gcc for linking can be built correctly.
239 + if gcc-specs-pie; then
240 + append-ldflags -nopie
241 + fi
242 +
243 + export CC=$(tc-getCC)
244 + export CGO_ENABLED=1
245 + export CGO_CFLAGS="${CFLAGS}"
246 + export CGO_CPPFLAGS="${CPPFLAGS}"
247 + export CGO_CXXFLAGS="${CXXFLAGS}"
248 + export CGO_LDFLAGS="${LDFLAGS}"
249 + export BUILDDIR
250 +
251 + econf "${myeconfargs[@]}"
252 +}
253 +
254 +src_compile() {
255 + local arch=${ARCH}
256 + case ${arch} in
257 + amd64) arch=x86_64;;
258 + esac
259 + ARCH=${arch} emake V=3
260 + ARCH=${arch} emake V=3 bash-completion
261 +}
262 +
263 +src_install() {
264 + dodoc README.md
265 + use doc && dodoc -r Documentation
266 + use examples && dodoc -r examples
267 + use actool && dobin "${S}/${BUILDDIR}/tools/actool"
268 +
269 + dobin "${S}/${BUILDDIR}/target/bin/rkt"
270 +
271 + insinto /usr/share/rkt
272 + doins "${S}/${BUILDDIR}/target/bin/"*.aci
273 +
274 + # create symlink for default stage1 image path
275 + if use rkt_stage1_host; then
276 + dosym stage1-host.aci "${STAGE1_DEFAULT_LOCATION}"
277 + elif use rkt_stage1_src; then
278 + dosym stage1-src.aci "${STAGE1_DEFAULT_LOCATION}"
279 + elif use rkt_stage1_coreos; then
280 + dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}"
281 + elif use rkt_stage1_fly; then
282 + dosym stage1-fly.aci "${STAGE1_DEFAULT_LOCATION}"
283 + elif use rkt_stage1_kvm_lkvm; then
284 + dosym stage1-kvm-lkvm.aci "${STAGE1_DEFAULT_LOCATION}"
285 + elif use rkt_stage1_kvm_qemu; then
286 + dosym stage1-kvm-qemu.aci "${STAGE1_DEFAULT_LOCATION}"
287 + fi
288 +
289 + systemd_dounit "${S}"/dist/init/systemd/*.service \
290 + "${S}"/dist/init/systemd/*.timer \
291 + "${S}"/dist/init/systemd/*.socket
292 +
293 + insinto /usr/lib/tmpfiles.d
294 + doins "${S}"/dist/init/systemd/tmpfiles.d/*
295 +
296 + newbashcomp "${S}"/dist/bash_completion/rkt.bash rkt
297 +
298 + keepdir /etc/${PN}
299 + fowners :rkt-admin /etc/${PN}
300 + fperms 2775 /etc/${PN}
301 +}