summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Byrne <salah.coronya@gmail.com>2022-12-26 14:19:11 -0600
committerJason Zaman <perfinion@gentoo.org>2024-08-11 16:17:07 -0700
commit0a715a1c31fa93999da3f5841988018d4cbbc1a7 (patch)
tree4e05ca0b2f7f34343612e7d99c473b566f90e073 /sys-boot
parentapp-doc/eclass-manpages: add 20240811 (diff)
downloadgentoo-0a715a1c31fa93999da3f5841988018d4cbbc1a7.tar.gz
gentoo-0a715a1c31fa93999da3f5841988018d4cbbc1a7.tar.bz2
gentoo-0a715a1c31fa93999da3f5841988018d4cbbc1a7.zip
sys-boot/tboot: add 1.11.3
Signed-off-by: Christopher Byrne <salah.coronya@gmail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/tboot/Manifest1
-rw-r--r--sys-boot/tboot/tboot-1.11.3.ebuild77
2 files changed, 78 insertions, 0 deletions
diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest
index 7d038e2463ba..964a585a19d1 100644
--- a/sys-boot/tboot/Manifest
+++ b/sys-boot/tboot/Manifest
@@ -1 +1,2 @@
DIST tboot-1.10.5.tar.gz 907657 BLAKE2B f9e33c512fac304eba6cbf87b497c48ff52c5efdb47103f247e04c95f8e44230671c58811d7d58753cd9c49c53d9ad77a0c5c7fb7fcce5c94d48f8fcaa9ad1f7 SHA512 01a039e5612b6cca6f7558e93673ba50edfcfbf3f65e390ac64f4aa6ae0859a314676b20d722dcd41a7a3c940473fe7982e823c800a75bd26a5e8f956528f223
+DIST tboot-1.11.3.tar.gz 924627 BLAKE2B 5c734121f3c8ef206963fbfb6d1a044f36f3ec4893999357a95a208867101ad14e79289519353f9e634a6c16c824c0af3cdaa7baa436359b6d04e93c5b0054f7 SHA512 777026cdfb31041dd7d9dd4d208c888e6fe8259171d1340ea7936f22053362ac1ec64017319626dbcb6a9a1283c8819c9a8fe1107b9b2f3898380fd0abcc047b
diff --git a/sys-boot/tboot/tboot-1.11.3.ebuild b/sys-boot/tboot/tboot-1.11.3.ebuild
new file mode 100644
index 000000000000..2dd62fe49384
--- /dev/null
+++ b/sys-boot/tboot/tboot-1.11.3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 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="https://downloads.sourceforge.net/${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"
+ "${FILESDIR}/${PN}-1.10.5-fix-pconf-element.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/"
+}