From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- sys-boot/tboot/tboot-1.10.5.ebuild | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sys-boot/tboot/tboot-1.10.5.ebuild (limited to 'sys-boot/tboot/tboot-1.10.5.ebuild') diff --git a/sys-boot/tboot/tboot-1.10.5.ebuild b/sys-boot/tboot/tboot-1.10.5.ebuild new file mode 100644 index 000000000000..c36283eeb34a --- /dev/null +++ b/sys-boot/tboot/tboot-1.10.5.ebuild @@ -0,0 +1,77 @@ +# 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" + "${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/" +} -- cgit v1.2.3