Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/firecracker-bin/
Date: Wed, 17 Aug 2022 16:18:06
Message-Id: 1660753073.aa50a50babc43be158c15bbe584fc3e7d5ba15b8.juippis@gentoo
1 commit: aa50a50babc43be158c15bbe584fc3e7d5ba15b8
2 Author: Sebastian Hamann <code <AT> ares-macrotechnology <DOT> com>
3 AuthorDate: Sun Jul 31 11:10:04 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 17 16:17:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa50a50b
7
8 app-emulation/firecracker-bin: add 1.1.1
9
10 Signed-off-by: Sebastian Hamann <code <AT> ares-macrotechnology.com>
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 app-emulation/firecracker-bin/Manifest | 2 +
14 .../firecracker-bin/firecracker-bin-1.1.1.ebuild | 83 ++++++++++++++++++++++
15 2 files changed, 85 insertions(+)
16
17 diff --git a/app-emulation/firecracker-bin/Manifest b/app-emulation/firecracker-bin/Manifest
18 index 71da0968c9cc..cbb02b905dee 100644
19 --- a/app-emulation/firecracker-bin/Manifest
20 +++ b/app-emulation/firecracker-bin/Manifest
21 @@ -10,3 +10,5 @@ DIST firecracker-v1.0.0-aarch64.tgz 1645541 BLAKE2B 4ddc94567209078cd6449f52b77e
22 DIST firecracker-v1.0.0-x86_64.tgz 1670233 BLAKE2B a715514f8497a694d29c33872f3521c11098f7b86e035b7ebe4ba9d912b60be9f1b6ecd03e60fa515223f72b7962613907855bb63d64650a8a62e2c23acd0233 SHA512 ecfae6adde808bbb1829c3fcf47e7ffe5eeeeca6d68c73b8d631015c09463b4912d5d66f46e0a68fef671498875567e14631ae370a5049d70f2976cf7fb93314
23 DIST firecracker-v1.1.0-aarch64.tgz 1872949 BLAKE2B 41d898e3b22a7e53ce3581d1e74b970b393c2677ced7a7f9ceb70f39a3e89214c849728b005b26c38668364f36f8b9c7ec7661d60886f5ea3b7a154625d6ec83 SHA512 b04a4d9a0b1e7606efad5c1a019c346c7ac725d8acb92b393bcf0669f0ae690385e673ea81f44b171854dcc065d3fb59fbddd3e91db6eac78de05713a4d8505e
24 DIST firecracker-v1.1.0-x86_64.tgz 1896567 BLAKE2B 4f3cee9c144e152c15d64d80c708a1969bc57fdc951f8fe54f40a778b83a1ef7141cd0a6abe6014c20aa20958f0e02749712ebfb39896006e0291d94a12d743e SHA512 ca7efe3208560e4e7e50a4b57f875cea0677383f3867bf961747c44aa51ebe66abfc104e5c0e80783d286c95d38b97751c6cda1840942f463c0749c9340fee5a
25 +DIST firecracker-v1.1.1-aarch64.tgz 1872407 BLAKE2B 16dd7c0f4fc46beacb3cd72f5c671dafd4fe738886754df7540b62b4243bbcd6fd9a25d34a0e295082e32ed250f504789a5af9bc0b22187d51f2165af13e3e53 SHA512 8d776daafcf13c5c971008b6e3e60538e17a96a245869526320a7f9a2a341cf9429c6dd2d22bf044c4192da613d7cca5b5814d71ab0d895009f60b9140aff1b9
26 +DIST firecracker-v1.1.1-x86_64.tgz 1894446 BLAKE2B c2af407efb6a494b3e84a480164f0fa7b8537fe659e36531738a96b013f6bad016a7c44490e65cfcea1fc8c709be64f738134b88793889179c5e8e31ac84489f SHA512 ad5e52f690f18c2c9809b586fa9be35e06ac52b5ba672ad62acb872b7f9e8de91d2dfe200629ad392709e1363ea41169f8d816be482fd46dd6c38c1b9a8e28a9
27
28 diff --git a/app-emulation/firecracker-bin/firecracker-bin-1.1.1.ebuild b/app-emulation/firecracker-bin/firecracker-bin-1.1.1.ebuild
29 new file mode 100644
30 index 000000000000..4c8acf462668
31 --- /dev/null
32 +++ b/app-emulation/firecracker-bin/firecracker-bin-1.1.1.ebuild
33 @@ -0,0 +1,83 @@
34 +# Copyright 2021-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +inherit linux-info
40 +
41 +DESCRIPTION="Secure and fast microVMs for serverless computing (static build)"
42 +HOMEPAGE="https://firecracker-microvm.github.io https://github.com/firecracker-microvm/firecracker"
43 +SRC_URI="
44 + amd64? (
45 + https://github.com/firecracker-microvm/firecracker/releases/download/v${PV}/firecracker-v${PV}-x86_64.tgz
46 + )
47 + arm64? (
48 + https://github.com/firecracker-microvm/firecracker/releases/download/v${PV}/firecracker-v${PV}-aarch64.tgz
49 + )"
50 +
51 +LICENSE="|| ( Apache-2.0 MIT Apache-2.0-with-LLVM-exceptions ) MPL-2.0"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm64"
54 +
55 +RESTRICT="test strip"
56 +
57 +RDEPEND="!app-emulation/firecracker
58 + acct-group/kvm"
59 +
60 +QA_PREBUILT="usr/bin/firecracker
61 + usr/bin/jailer
62 + usr/bin/rebase-snap
63 + usr/bin/seccompiler-bin"
64 +
65 +S="${WORKDIR}"
66 +
67 +pkg_pretend() {
68 + if use kernel_linux && kernel_is lt 4 14; then
69 + eerror "Firecracker requires a host kernel of 4.14 or higher."
70 + elif use kernel_linux; then
71 + if ! linux_config_exists; then
72 + eerror "Unable to check your kernel for KVM support"
73 + else
74 + CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
75 + ERROR_KVM="You must enable KVM in your kernel to continue"
76 + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
77 + ERROR_KVM_AMD+=" your kernel configuration."
78 + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
79 + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
80 + ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
81 + ERROR_TUN+=" into your kernel or loaded as a module to use"
82 + ERROR_TUN+=" virtual network devices."
83 + ERROR_BRIDGE="You will also need support for 802.1d"
84 + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
85 +
86 + if use amd64 || use amd64-linux; then
87 + if grep -q AuthenticAMD /proc/cpuinfo; then
88 + CONFIG_CHECK+=" ~KVM_AMD"
89 + elif grep -q GenuineIntel /proc/cpuinfo; then
90 + CONFIG_CHECK+=" ~KVM_INTEL"
91 + fi
92 + fi
93 +
94 + # Now do the actual checks setup above
95 + check_extra_config
96 + fi
97 + fi
98 +}
99 +
100 +src_compile() { :; }
101 +
102 +src_install() {
103 + if use amd64; then
104 + my_arch=x86_64
105 + elif use arm64; then
106 + my_arch=aarch64
107 + fi
108 +
109 + dodoc "release-v${PV}-${my_arch}/firecracker_spec-v${PV}.yaml"
110 + dodoc "release-v${PV}-${my_arch}/seccomp-filter-v${PV}-${my_arch}.json"
111 +
112 + newbin "release-v${PV}-${my_arch}/firecracker-v${PV}-${my_arch}" firecracker
113 + newbin "release-v${PV}-${my_arch}/jailer-v${PV}-${my_arch}" jailer
114 + newbin "release-v${PV}-${my_arch}/rebase-snap-v${PV}-${my_arch}" rebase-snap
115 + newbin "release-v${PV}-${my_arch}/seccompiler-bin-v${PV}-${my_arch}" seccompiler-bin
116 +}