From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1370916-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 5E25615808B
	for <garchives@archives.gentoo.org>; Sat, 26 Feb 2022 02:30:05 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 046C3E0843;
	Sat, 26 Feb 2022 02:30:04 +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) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id DE34BE0843
	for <gentoo-commits@lists.gentoo.org>; Sat, 26 Feb 2022 02:30:03 +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) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id DEC3C335CCD
	for <gentoo-commits@lists.gentoo.org>; Sat, 26 Feb 2022 02:30:01 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 01CC22F9
	for <gentoo-commits@lists.gentoo.org>; Sat, 26 Feb 2022 02:30:00 +0000 (UTC)
From: "Sam James" <sam@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, "Sam James" <sam@gentoo.org>
Message-ID: <1645842369.95817a64efefc37806c543c4efef2f4f7a72cf5e.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/tboot/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-boot/tboot/Manifest sys-boot/tboot/tboot-1.10.4.ebuild
X-VCS-Directories: sys-boot/tboot/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 95817a64efefc37806c543c4efef2f4f7a72cf5e
X-VCS-Branch: master
Date: Sat, 26 Feb 2022 02:30:00 +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: a36830cc-f080-4b8a-92ab-b84f271e5cd5
X-Archives-Hash: 3d7a149d24a0637d9014c446c5f8ac26

commit:     95817a64efefc37806c543c4efef2f4f7a72cf5e
Author:     Christopher Byrne <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Thu Feb 24 20:57:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 26 02:26:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95817a64

sys-boot/tboot: Bump to 1.10.4

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-boot/tboot/Manifest            |  1 +
 sys-boot/tboot/tboot-1.10.4.ebuild | 76 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest
index af909f3a1a02..c4e612c45eaa 100644
--- a/sys-boot/tboot/Manifest
+++ b/sys-boot/tboot/Manifest
@@ -1 +1,2 @@
 DIST tboot-1.10.3.tar.gz 906732 BLAKE2B 4015ba84fbc273d1f1ea3f302dd11e62d1866049a31674b8967a9c1be645f88f2fdbc8614e1f7d824010e8280484885392b34aedb2d9f32654a3065e75e0bd42 SHA512 998501cfb23511adf63c0e2a70f203b3a92328cba39948a6be2e0dc6600aaaf9fcc18dc1ffcdd00c43a5d2c688c34c912c7525fd54a5c673a764c34141be4b77
+DIST tboot-1.10.4.tar.gz 908050 BLAKE2B 8c793e2ec29cc3c3aa8199ac5058e9b3521eb0a72609c8b5ae21e0843571ae765be74bb48184178e2641ff8eec05680f81e45b12b80fd7d2727c82f9c8702411 SHA512 6fe93cabd5fc10cba7797048cad2cce4c490e0112c5c877f3367d78873cb55ba3d84eb703f2fcdba807eb21f1bef6a838d315b32d6418fb88b2589ff66e99491

diff --git a/sys-boot/tboot/tboot-1.10.4.ebuild b/sys-boot/tboot/tboot-1.10.4.ebuild
new file mode 100644
index 000000000000..4cedba3fabfc
--- /dev/null
+++ b/sys-boot/tboot/tboot-1.10.4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit mount-boot toolchain-funcs
+
+DESCRIPTION="Performs a measured and verified boot using Intel Trusted Execution Technology"
+HOMEPAGE="https://sourceforge.net/projects/tboot/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="custom-cflags selinux"
+
+# requires patching the kernel src
+RESTRICT="test"
+
+DEPEND="dev-libs/openssl:0=[-bindist(-)]"
+
+RDEPEND="${DEPEND}
+	sys-boot/grub:2
+	selinux? ( sec-policy/selinux-tboot )"
+
+DOCS=( README.md COPYING CHANGELOG )
+PATCHES=( "${FILESDIR}/${PN}-1.10.3-disable-Werror.patch"
+	  "${FILESDIR}/${PN}-1.10.3-disable-strip.patch"
+	  "${FILESDIR}/${PN}-1.10.3-dont-call-toolchain-directly.patch" )
+
+pkg_setup() {
+	if tc-is-clang; then
+		eerror "tboot is a freestanding application that uses gcc"
+		eerror "extensions in fundemental ways, include VLAIS"
+		eerror "(Variable Length Arrays in Structs) and will not"
+		eerror "compile with clang witout upstream action"
+		die "Cannot compile with clang. See bug #832020"
+	fi
+}
+
+src_configure() {
+	tc-export AS LD CC CPP AR RANLIB NM OBJCOPY OBJDUMP STRIP
+
+	default
+}
+
+src_compile() {
+	use custom-cflags && export TBOOT_CFLAGS=${CFLAGS} || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
+
+	if use amd64; then
+		export MAKEARGS="TARGET_ARCH=x86_64"
+	else
+		export MAKEARGS="TARGET_ARCH=i686"
+	fi
+
+	default
+}
+
+src_install() {
+	emake DISTDIR="${D}" install
+
+	dodoc "${DOCS[@]}"
+	dodoc docs/*.{txt,md}
+
+	cd "${ED}" || die
+	mkdir -p usr/lib/tboot/ || die
+	mv boot usr/lib/tboot/ || die
+}
+
+pkg_postinst() {
+	cp "${ROOT}/usr/lib/tboot/boot/"* "${ROOT}/boot/" || die
+
+	ewarn "Please remember to download the SINIT AC Module relevant"
+	ewarn "for your platform from:"
+	ewarn "http://software.intel.com/en-us/articles/intel-trusted-execution-technology/"
+}