1 |
commit: c4883e0840dc985d6ffe05a65c2f943b26cea95b |
2 |
Author: Robin Hallabro <robin <AT> hallabro <DOT> nu> |
3 |
AuthorDate: Sat Nov 17 08:18:22 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 17 15:27:39 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4883e08 |
7 |
|
8 |
app-emulation/rkt: Bump version to 1.30.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/671046 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/10436 |
12 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
13 |
Signed-off-by: Robin Hallabro <robin <AT> hallabro.nu> |
14 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
15 |
|
16 |
app-emulation/rkt/Manifest | 1 + |
17 |
app-emulation/rkt/rkt-1.30.0.ebuild | 254 ++++++++++++++++++++++++++++++++++++ |
18 |
2 files changed, 255 insertions(+) |
19 |
|
20 |
diff --git a/app-emulation/rkt/Manifest b/app-emulation/rkt/Manifest |
21 |
index 3732460f219..6702216c146 100644 |
22 |
--- a/app-emulation/rkt/Manifest |
23 |
+++ b/app-emulation/rkt/Manifest |
24 |
@@ -4,5 +4,6 @@ DIST kvmtool-include-sysmacros-c0a985531f49c06fd05069024f4664740e6a0baf.patch 12 |
25 |
DIST linux-4.9.2.tar.xz 93189108 BLAKE2B d9eb7bd6f168aba5955da92f54c70468a5eaa6fabceb8399d8c2398672d4401012dc23ce92dfd63e80c87b57eba56f77b62dbf8ec7a8b12e6e0af2d66ea29e3f SHA512 85adf3715cba4a457efea8359ebed34413ac63ee58fe920c5713501dec1e727e167416e9d67a9e2d9430aa9f3a53ad0ac26a4f749984bc5a3f3c37ac504f75de |
26 |
DIST qemu-2.8.0.tar.bz2 28368517 BLAKE2B 15177018f1f828f35e745593746228738f9bd540b3658b5ca285141867a9fc4a7a4aa9be7b174d32f5d7fc2567fb379a4ce40135b405047282cfbdcd8ab90181 SHA512 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2 |
27 |
DIST rkt-1.29.0.tar.gz 3434520 BLAKE2B b3e1b4e93335023e86439a5202cdb2d8c8f62a24392fd37a11fe381f76cad71ad01d0e4a6b6acdd29edaa77932530f1cdfe5a2aed403841c079f7cb40591972c SHA512 a128abddb29a246b0afea8f7dc81d77aae1e8efaf4dae8fe92aa0f2855c4e4f9dcf7a6f01efa77500ed8a6723db83933c8d1973b284dc62f8e9e0e06b6a20f6d |
28 |
+DIST rkt-1.30.0.tar.gz 3655661 BLAKE2B f7ac84cdf40d64a04cb1b95cc59a33585f38ab7aac2768833a369725fccfa80c4d85d213161f0d3e265e1b84730e9224a63103dcb6085595474fafa35f8b9d5b SHA512 47b409a61960fec1352535beb2fcdc396ec1cf6feb7d66b320aed0acd908c8ae86d058b4f9b76367606f4e78db6f333bc85dac66f7d646b3b1ada9bfd1f15e44 |
29 |
DIST rkt-pxe-1478.0.0.img 264382497 BLAKE2B 087fc5e27fe2fe41a82d4dad727625a573eda027b3ca67e063ec6d38bb6382353e30804e21f55cda5494ad7ff3cf1db9d593ccc63a639e16a98295d976e92325 SHA512 5f462b6223a141d72a38857fff26f4f70c0a36f21d1cc69623d946ba42f8b15fa994f222b1934cd16cc5b4e306cf5a8850295492dfb637f2a8fee8b774d7c1e4 |
30 |
DIST systemd-233.tar.gz 4660737 BLAKE2B 38cdd74543447b3c02391b328428fed169fe2cf2df6e9341dcaf2f7d3d977612ec102301e144c1cada90d61e9e9bda3b2faaef708c8ff4bd0b52b143760a83b2 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e |
31 |
|
32 |
diff --git a/app-emulation/rkt/rkt-1.30.0.ebuild b/app-emulation/rkt/rkt-1.30.0.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..b5ad9568d12 |
35 |
--- /dev/null |
36 |
+++ b/app-emulation/rkt/rkt-1.30.0.ebuild |
37 |
@@ -0,0 +1,254 @@ |
38 |
+# Copyright 1999-2018 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+inherit bash-completion-r1 autotools flag-o-matic systemd toolchain-funcs user |
44 |
+ |
45 |
+KEYWORDS="~amd64" |
46 |
+ |
47 |
+PXE_VERSION="1478.0.0" |
48 |
+PXE_SYSTEMD_VERSION="v233" |
49 |
+KVM_LINUX_VERSION="4.9.2" |
50 |
+KVMTOOL_VERSION="cfae4d64482ed745214e3c62dd84b79c2ae0f325" |
51 |
+QEMU_VERSION="v2.8.0" |
52 |
+PXE_URI="http://alpha.release.core-os.net/amd64-usr/${PXE_VERSION}/coreos_production_pxe_image.cpio.gz" |
53 |
+PXE_FILE="${PN}-pxe-${PXE_VERSION}.img" |
54 |
+ |
55 |
+SRC_URI_KVM="mirror://kernel/linux/kernel/v4.x/linux-${KVM_LINUX_VERSION}.tar.xz |
56 |
+ ${PXE_URI} -> ${PXE_FILE} |
57 |
+" |
58 |
+ |
59 |
+SRC_URI="https://github.com/coreos/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz |
60 |
+rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE ) |
61 |
+rkt_stage1_kvm_lkvm? ( |
62 |
+ https://kernel.googlesource.com/pub/scm/linux/kernel/git/will/kvmtool/+archive/${KVMTOOL_VERSION}.tar.gz -> kvmtool-${KVMTOOL_VERSION}.tar.gz |
63 |
+ https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/patch/?id=c0a985531f49c06fd05069024f4664740e6a0baf -> kvmtool-include-sysmacros-c0a985531f49c06fd05069024f4664740e6a0baf.patch |
64 |
+ https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/patch/?id=1cc05b24bfe0211bb408f3264af8e0c42dcdde9c -> kvmtool-include-asm-msr-index-1cc05b24bfe0211bb408f3264af8e0c42dcdde9c.patch |
65 |
+ ${SRC_URI_KVM} |
66 |
+) |
67 |
+rkt_stage1_kvm_qemu? ( |
68 |
+ http://wiki.qemu-project.org/download/qemu-${QEMU_VERSION#v}.tar.bz2 |
69 |
+ ${SRC_URI_KVM} |
70 |
+)" |
71 |
+ |
72 |
+DESCRIPTION="rkt is an App Container runtime for Linux" |
73 |
+HOMEPAGE="https://github.com/coreos/rkt" |
74 |
+ |
75 |
+LICENSE="Apache-2.0" |
76 |
+SLOT="0" |
77 |
+# The rkt_stage1_kvm flag has been replaced by the rkt_stage1_kvm_lkvm and rkt_stage1_kvm_qemu flags |
78 |
+IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_kvm_lkvm rkt_stage1_kvm_qemu +actool systemd" |
79 |
+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_kvm" |
80 |
+ |
81 |
+# Some tests fail. |
82 |
+RESTRICT="test" |
83 |
+ |
84 |
+DEPEND=">=dev-lang/go-1.5 |
85 |
+ app-arch/cpio |
86 |
+ app-crypt/trousers |
87 |
+ sys-fs/squashfs-tools |
88 |
+ dev-perl/Capture-Tiny |
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-*) #627564 #635274 |
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_coreos && flavors+=",coreos" |
212 |
+ use rkt_stage1_fly && flavors+=",fly" |
213 |
+ { use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; } && flavors+=",kvm" |
214 |
+ myeconfargs+=( --with-stage1-flavors="${flavors#,}" ) |
215 |
+ |
216 |
+ if use rkt_stage1_coreos || use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; then |
217 |
+ myeconfargs+=( |
218 |
+ --with-coreos-local-pxe-image-path="${DISTDIR}/${PXE_FILE}" |
219 |
+ --with-coreos-local-pxe-image-systemd-version="${PXE_SYSTEMD_VERSION}" |
220 |
+ ) |
221 |
+ fi |
222 |
+ |
223 |
+ if use rkt_stage1_kvm_lkvm || use rkt_stage1_kvm_qemu; then |
224 |
+ use rkt_stage1_kvm_lkvm && hypervisors+=",lkvm" |
225 |
+ use rkt_stage1_kvm_qemu && hypervisors+=",qemu" |
226 |
+ myeconfargs+=( --with-stage1-kvm-hypervisors="${hypervisors#,}" ) |
227 |
+ fi |
228 |
+ |
229 |
+ # Go's 6l linker does not support PIE, disable so cgo binaries |
230 |
+ # which use 6l+gcc for linking can be built correctly. |
231 |
+ if gcc-specs-pie; then |
232 |
+ append-ldflags -nopie |
233 |
+ fi |
234 |
+ |
235 |
+ export CC=$(tc-getCC) |
236 |
+ export CGO_ENABLED=1 |
237 |
+ export CGO_CFLAGS="${CFLAGS}" |
238 |
+ export CGO_CPPFLAGS="${CPPFLAGS}" |
239 |
+ export CGO_CXXFLAGS="${CXXFLAGS}" |
240 |
+ export CGO_LDFLAGS="${LDFLAGS}" |
241 |
+ export BUILDDIR |
242 |
+ |
243 |
+ econf "${myeconfargs[@]}" |
244 |
+} |
245 |
+ |
246 |
+src_compile() { |
247 |
+ local arch=${ARCH} |
248 |
+ case ${arch} in |
249 |
+ amd64) arch=x86_64;; |
250 |
+ esac |
251 |
+ ARCH=${arch} emake V=3 |
252 |
+ ARCH=${arch} emake V=3 bash-completion |
253 |
+} |
254 |
+ |
255 |
+src_install() { |
256 |
+ dodoc README.md |
257 |
+ use doc && dodoc -r Documentation |
258 |
+ use examples && dodoc -r examples |
259 |
+ use actool && dobin "${S}/${BUILDDIR}/tools/actool" |
260 |
+ |
261 |
+ dobin "${S}/${BUILDDIR}/target/bin/rkt" |
262 |
+ |
263 |
+ insinto /usr/share/rkt |
264 |
+ doins "${S}/${BUILDDIR}/target/bin/"*.aci |
265 |
+ |
266 |
+ # create symlink for default stage1 image path |
267 |
+ if use rkt_stage1_host; then |
268 |
+ dosym stage1-host.aci "${STAGE1_DEFAULT_LOCATION}" |
269 |
+ elif use rkt_stage1_coreos; then |
270 |
+ dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}" |
271 |
+ elif use rkt_stage1_fly; then |
272 |
+ dosym stage1-fly.aci "${STAGE1_DEFAULT_LOCATION}" |
273 |
+ elif use rkt_stage1_kvm_lkvm; then |
274 |
+ dosym stage1-kvm-lkvm.aci "${STAGE1_DEFAULT_LOCATION}" |
275 |
+ elif use rkt_stage1_kvm_qemu; then |
276 |
+ dosym stage1-kvm-qemu.aci "${STAGE1_DEFAULT_LOCATION}" |
277 |
+ fi |
278 |
+ |
279 |
+ systemd_dounit "${S}"/dist/init/systemd/*.service \ |
280 |
+ "${S}"/dist/init/systemd/*.timer \ |
281 |
+ "${S}"/dist/init/systemd/*.socket |
282 |
+ |
283 |
+ insinto /usr/lib/tmpfiles.d |
284 |
+ doins "${S}"/dist/init/systemd/tmpfiles.d/* |
285 |
+ |
286 |
+ newbashcomp "${S}"/dist/bash_completion/rkt.bash rkt |
287 |
+ |
288 |
+ keepdir /etc/${PN} |
289 |
+ fowners :rkt-admin /etc/${PN} |
290 |
+ fperms 2775 /etc/${PN} |
291 |
+} |