summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Byrne <salah.coronya@gmail.com>2019-12-18 21:32:02 -0600
committerJason Zaman <perfinion@gentoo.org>2020-02-16 21:34:22 +0800
commitb9f76a244f44802ad1d193ad1f3072a10908b02b (patch)
tree1e846e42a9949e78f48845366fc95cdc10e99289 /sys-boot/tboot/tboot-1.9.11.ebuild
parentnet-misc/rclone: stable amd64 x86 (diff)
downloadgentoo-b9f76a244f44802ad1d193ad1f3072a10908b02b.tar.gz
gentoo-b9f76a244f44802ad1d193ad1f3072a10908b02b.tar.bz2
gentoo-b9f76a244f44802ad1d193ad1f3072a10908b02b.zip
sys-boot/tboot: Bump to 1.9.11 and add libressl support
Closes: https://bugs.gentoo.org/590262 Closes: https://bugs.gentoo.org/677952 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Salah Coronya <salah.coronya@gmail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sys-boot/tboot/tboot-1.9.11.ebuild')
-rw-r--r--sys-boot/tboot/tboot-1.9.11.ebuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/sys-boot/tboot/tboot-1.9.11.ebuild b/sys-boot/tboot/tboot-1.9.11.ebuild
new file mode 100644
index 000000000000..4778e6215bb4
--- /dev/null
+++ b/sys-boot/tboot/tboot-1.9.11.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic mount-boot
+
+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 libressl selinux"
+
+# requires patching the kernel src
+RESTRICT="test"
+
+DEPEND="app-crypt/trousers
+app-crypt/tpm-tools
+!libressl? ( dev-libs/openssl:0=[-bindist] )
+libressl? ( dev-libs/libressl:0= )"
+
+RDEPEND="${DEPEND}
+sys-boot/grub:2
+selinux? ( sec-policy/selinux-tboot )"
+
+DOCS=( README COPYING CHANGELOG )
+PATCHES=( "${FILESDIR}/${PN}-1.9.11-genkernel-path.patch" )
+
+src_prepare() {
+ sed -i 's/ -Werror//g' Config.mk || die
+ sed -i 's/^INSTALL_STRIP = -s$//' Config.mk || die # QA Errors
+
+ 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 lcptools/*.pdf || die "docs failed"
+
+ cd "${D}"
+ 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/"
+}