From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1677325-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4F71F15807A
	for <garchives@archives.gentoo.org>; Mon,  7 Oct 2024 03:28:03 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B621AE29B1;
	Mon,  7 Oct 2024 03:28:01 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 9735FE29B0
	for <gentoo-commits@lists.gentoo.org>; Mon,  7 Oct 2024 03:28:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id AE07D34317B
	for <gentoo-commits@lists.gentoo.org>; Mon,  7 Oct 2024 03:28:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 13107227B
	for <gentoo-commits@lists.gentoo.org>; Mon,  7 Oct 2024 03:27:58 +0000 (UTC)
From: "Eli Schwartz" <eschwartz@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, "Eli Schwartz" <eschwartz@gentoo.org>
Message-ID: <1728271438.346f8402659bc899440f12f49c6903094b86f03b.eschwartz@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/firecracker-bin/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-emulation/firecracker-bin/Manifest app-emulation/firecracker-bin/firecracker-bin-1.9.1.ebuild
X-VCS-Directories: app-emulation/firecracker-bin/
X-VCS-Committer: eschwartz
X-VCS-Committer-Name: Eli Schwartz
X-VCS-Revision: 346f8402659bc899440f12f49c6903094b86f03b
X-VCS-Branch: master
Date: Mon,  7 Oct 2024 03:27:58 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 4db4cbb2-8999-4051-94fb-314f2e4e4789
X-Archives-Hash: 06ff5367c54a39016d650f6852657f68

commit:     346f8402659bc899440f12f49c6903094b86f03b
Author:     Sebastian Hamann <code <AT> ares-macrotechnology <DOT> com>
AuthorDate: Fri Oct  4 07:21:11 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Mon Oct  7 03:23:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=346f8402

app-emulation/firecracker-bin: add 1.9.1

Signed-off-by: Sebastian Hamann <code <AT> ares-macrotechnology.com>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 app-emulation/firecracker-bin/Manifest             |  2 +
 .../firecracker-bin/firecracker-bin-1.9.1.ebuild   | 87 ++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/app-emulation/firecracker-bin/Manifest b/app-emulation/firecracker-bin/Manifest
index 1fcbf3cc23cc..049a1f9ae99d 100644
--- a/app-emulation/firecracker-bin/Manifest
+++ b/app-emulation/firecracker-bin/Manifest
@@ -4,3 +4,5 @@ DIST firecracker-v1.8.0-aarch64.tgz 7085662 BLAKE2B 5352912fc10e4e41bcfd34c4416f
 DIST firecracker-v1.8.0-x86_64.tgz 7029237 BLAKE2B 7eac72eaa6a6e87c6503ebafd34c87769034912c52acacc57c2239176418f6830c55682d1c15be2e8f4a3520012685cf54ec4bdf4edca3099cf0e4aa02051c00 SHA512 c78d801cd532aea97a363f9950a13b2b1b713f707a2f54c5d78bdab300654d947131f8f35dc6d21ee71e68632b32c3694a12583ab1a80d277ffc0162316ed2ee
 DIST firecracker-v1.9.0-aarch64.tgz 4309149 BLAKE2B ee222a2a9100d9f9a435a49bf8397324054ba0f007728717877f4c9ed3585c7287722f2d9c2678d2d6bde324bd09f2a6a7d6adcd1a4828a1923343043743928c SHA512 1d334e2fbd0c1cf43b06adbf452d66bbcbf903fdcd43dae5d2002d2ca289bff4af1d91022d92dbbcae5ac3f3d452c86218cca29fa29720bce45cc24f844ab930
 DIST firecracker-v1.9.0-x86_64.tgz 4314303 BLAKE2B 25b02f00c03d4825dbd510ca45fd996357251f92725923c44772ce3763d873b1718c9be7a6b5fabb63e7cad4b4798eb8ad3814bf17bab03c41045a79f204d838 SHA512 708f984e19ad4c6cad6aa5b185b30232510b1d316969e1c375d1b33e3e14fd287bd424b469de9750fa2a19507689351089ba4708eb777ca25a1e822820b113d8
+DIST firecracker-v1.9.1-aarch64.tgz 6708847 BLAKE2B 1f92ef5cc3e86b89f8a3eb6783d2c772a60b4215851b4c3668e6b1194a0f0986280febb58d715cb217e4274d218e03cc9ea7cd2fa70e021071b357f08fc27f90 SHA512 56c4a64a86eeff14b1eccac3ec089d9bad704fd5889571d22bc5877a755a8fff831912f07341f7c29b9c48a0da59b95b0c1572b41d17689839a0fe8ef8e50c82
+DIST firecracker-v1.9.1-x86_64.tgz 6617618 BLAKE2B eb3b38e024ace65ae141f8cd71679b481317e99ef9549f9e903f2ffa046993a313b6e9f78147405711c9ffbe86214cbaae6b8a0ff242b8d8487f88a4bc56c470 SHA512 4e95c86c4d997a9d37900304e5c0e7b0e93f70fb0ccb2d0ff1395b63c9095a9f8ded50f99dff5481939f8b5060043e368abb19f000073137bac2100062a09f41

diff --git a/app-emulation/firecracker-bin/firecracker-bin-1.9.1.ebuild b/app-emulation/firecracker-bin/firecracker-bin-1.9.1.ebuild
new file mode 100644
index 000000000000..37f3ffa69f76
--- /dev/null
+++ b/app-emulation/firecracker-bin/firecracker-bin-1.9.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2021-2024 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
+	)"
+
+S="${WORKDIR}"
+
+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/cpu-template-helper
+	usr/bin/firecracker
+	usr/bin/jailer
+	usr/bin/rebase-snap
+	usr/bin/seccompiler-bin
+	usr/bin/snapshot-editor"
+
+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}/cpu-template-helper-v${PV}-${my_arch}" cpu-template-helper
+	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
+	newbin "release-v${PV}-${my_arch}/snapshot-editor-v${PV}-${my_arch}" snapshot-editor
+}