commit:     892f26c0049cb8a4c8e5724f70f728194e745e9a
Author:     Sebastian Hamann <code <AT> ares-macrotechnology <DOT> com>
AuthorDate: Sun Jul 23 10:57:14 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Jul 28 07:18:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=892f26c0

app-emulation/firecracker-bin: add 1.4.0

Signed-off-by: Sebastian Hamann <code <AT> ares-macrotechnology.com>
Closes: https://github.com/gentoo/gentoo/pull/32011
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/firecracker-bin/Manifest             |  2 +
 .../firecracker-bin/firecracker-bin-1.4.0.ebuild   | 83 ++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/app-emulation/firecracker-bin/Manifest 
b/app-emulation/firecracker-bin/Manifest
index 58d3cf5faec9..1ec394d7d9fa 100644
--- a/app-emulation/firecracker-bin/Manifest
+++ b/app-emulation/firecracker-bin/Manifest
@@ -6,3 +6,5 @@ DIST firecracker-v1.3.2-aarch64.tgz 4192631 BLAKE2B 
b1a44c7fb0458f8e9298eddebc04
 DIST firecracker-v1.3.2-x86_64.tgz 4152061 BLAKE2B 
f9025e827b53b482bd0f44918533ad0834eaa2ca4e4d13bedda5899ba3790e9bd0bf31793d2d6e53b7791b988a2fe0b5c69b5c08eba94d865660ee4e6c2ce282
 SHA512 
ff5c8ed9c7a200c87436ea5f952ecf584476030a2153eaa6d753624a324fa980687249a2a3351cb120f984b86c13395c611dbb44029072f2a961d79c54dbe731
 DIST firecracker-v1.3.3-aarch64.tgz 4203758 BLAKE2B 
0ce55d98420fe23281c54ad43b83a5c6040e6cb14fc0cfcfc75b9945a20af26c58f67f9b173ae6259b069aebc5b99af9ef47534a749763a24cdc1088df9baf49
 SHA512 
ba543ba1dbae2a4e0321c1d8dbf1fc9cc3da11dec773815175773a6c07f135f9bc3103cfdb3a083743478fd3084c4b2e8988ebf62beff0d4473d644bd21bd9f8
 DIST firecracker-v1.3.3-x86_64.tgz 4170049 BLAKE2B 
691135ef0d269667cde73bded237b2b6b59c6d74bd92dc0938b6b6b31babc6c28de841eef3ecb6769a6c5f4fe7d85e1ebf25f133608746676a02af4ae0e5028e
 SHA512 
12697db9ce0cd2724dbb7a56643fc660c1b0faf7910090fbd227300099f54bf4f69678fa328f84827c18031db3827104262a7365db53fffdede7759e7562f1bc
+DIST firecracker-v1.4.0-aarch64.tgz 8415004 BLAKE2B 
8311a8ec4a98be63ca6398559bab173e083eeecbd359dfcee972d84f978b465d80d35c36e557b56b3aaa9a3c4bfaec3f8562077101c215bf2835bd941b5ee31e
 SHA512 
c22074c50b9d4ca94f10dcdbe81bffa03f9a9bd5fe43a1e7a545469feee51234217664a422c70e8c111690c69ff93e72003eaa4df84a484db4d45215b6fe40ce
+DIST firecracker-v1.4.0-x86_64.tgz 8818170 BLAKE2B 
0f5ed139ad6426f45e31b1c29238199a67af2140a8c8992779472563cd4dc75d0311161f0bf95dd708a9660b2f3d55e5f89f4c0e8e5767958f98cf57a4b2157f
 SHA512 
e72aafcc667a78ac691000e81d67aaf0cc69adbbefaed19e647d294988a084612b0c3b6f73738200e8b5769cc128b07e0bf8bc1a079402f11317c70e17147594

diff --git a/app-emulation/firecracker-bin/firecracker-bin-1.4.0.ebuild 
b/app-emulation/firecracker-bin/firecracker-bin-1.4.0.ebuild
new file mode 100644
index 000000000000..42c1d8f40fe2
--- /dev/null
+++ b/app-emulation/firecracker-bin/firecracker-bin-1.4.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info
+
+DESCRIPTION="Secure and fast microVMs for serverless computing (static build)"
+HOMEPAGE="https://firecracker-microvm.github.io 
https://github.com/firecracker-microvm/firecracker";
+SRC_URI="
+       amd64? (
+               
https://github.com/firecracker-microvm/firecracker/releases/download/v${PV}/firecracker-v${PV}-x86_64.tgz
+       )
+       arm64? (
+               
https://github.com/firecracker-microvm/firecracker/releases/download/v${PV}/firecracker-v${PV}-aarch64.tgz
+       )"
+
+LICENSE="|| ( Apache-2.0 MIT Apache-2.0-with-LLVM-exceptions ) MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+RESTRICT="test strip"
+
+RDEPEND="acct-group/kvm"
+
+QA_PREBUILT="usr/bin/firecracker
+       usr/bin/jailer
+       usr/bin/rebase-snap
+       usr/bin/seccompiler-bin"
+
+S="${WORKDIR}"
+
+pkg_pretend() {
+       if use kernel_linux && kernel_is lt 4 14; then
+               eerror "Firecracker requires a host kernel of 4.14 or higher."
+       elif use kernel_linux; then
+               if ! linux_config_exists; then
+                       eerror "Unable to check your kernel for KVM support"
+               else
+                       CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
+                       ERROR_KVM="You must enable KVM in your kernel to 
continue"
+                       ERROR_KVM_AMD="If you have an AMD CPU, you must enable 
KVM_AMD in"
+                       ERROR_KVM_AMD+=" your kernel configuration."
+                       ERROR_KVM_INTEL="If you have an Intel CPU, you must 
enable"
+                       ERROR_KVM_INTEL+=" KVM_INTEL in your kernel 
configuration."
+                       ERROR_TUN="You will need the Universal TUN/TAP driver 
compiled"
+                       ERROR_TUN+=" into your kernel or loaded as a module to 
use"
+                       ERROR_TUN+=" virtual network devices."
+                       ERROR_BRIDGE="You will also need support for 802.1d"
+                       ERROR_BRIDGE+=" Ethernet Bridging for some network 
configurations."
+
+                       if use amd64 || use amd64-linux; then
+                               if grep -q AuthenticAMD /proc/cpuinfo; then
+                                       CONFIG_CHECK+=" ~KVM_AMD"
+                               elif grep -q GenuineIntel /proc/cpuinfo; then
+                                       CONFIG_CHECK+=" ~KVM_INTEL"
+                               fi
+                       fi
+
+                       # Now do the actual checks setup above
+                       check_extra_config
+               fi
+       fi
+}
+
+src_compile() { :; }
+
+src_install() {
+       local my_arch
+       if use amd64; then
+               my_arch=x86_64
+       elif use arm64; then
+               my_arch=aarch64
+       fi
+
+       dodoc "release-v${PV}-${my_arch}/firecracker_spec-v${PV}.yaml"
+       dodoc "release-v${PV}-${my_arch}/seccomp-filter-v${PV}-${my_arch}.json"
+
+       newbin "release-v${PV}-${my_arch}/firecracker-v${PV}-${my_arch}" 
firecracker
+       newbin "release-v${PV}-${my_arch}/jailer-v${PV}-${my_arch}" jailer
+       newbin "release-v${PV}-${my_arch}/rebase-snap-v${PV}-${my_arch}" 
rebase-snap
+       newbin "release-v${PV}-${my_arch}/seccompiler-bin-v${PV}-${my_arch}" 
seccompiler-bin
+}

Reply via email to