diff options
author | Christopher Byrne <salah.coronya@gmail.com> | 2022-03-09 10:39:18 -0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-03-21 23:52:10 +0000 |
commit | ee8a0086987e0e5c279290f8e95020930cb89b40 (patch) | |
tree | 06bcfbda8c20c0e01b94675c28140d017427b915 /sys-boot/tboot | |
parent | mate-base/mate-desktop: fix RDEPEND (diff) | |
download | gentoo-ee8a0086987e0e5c279290f8e95020930cb89b40.tar.gz gentoo-ee8a0086987e0e5c279290f8e95020930cb89b40.tar.bz2 gentoo-ee8a0086987e0e5c279290f8e95020930cb89b40.zip |
sys-boot/tboot: Bump to 1.10.5
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Christopher Byrne <salah.coronya@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-boot/tboot')
-rw-r--r-- | sys-boot/tboot/Manifest | 1 | ||||
-rw-r--r-- | sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch | 21 | ||||
-rw-r--r-- | sys-boot/tboot/tboot-1.10.5.ebuild | 77 |
3 files changed, 99 insertions, 0 deletions
diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest index 249d776b4c9c..2c3e426d33d3 100644 --- a/sys-boot/tboot/Manifest +++ b/sys-boot/tboot/Manifest @@ -1 +1,2 @@ DIST tboot-1.10.4.tar.gz 908050 BLAKE2B 8c793e2ec29cc3c3aa8199ac5058e9b3521eb0a72609c8b5ae21e0843571ae765be74bb48184178e2641ff8eec05680f81e45b12b80fd7d2727c82f9c8702411 SHA512 6fe93cabd5fc10cba7797048cad2cce4c490e0112c5c877f3367d78873cb55ba3d84eb703f2fcdba807eb21f1bef6a838d315b32d6418fb88b2589ff66e99491 +DIST tboot-1.10.5.tar.gz 907657 BLAKE2B f9e33c512fac304eba6cbf87b497c48ff52c5efdb47103f247e04c95f8e44230671c58811d7d58753cd9c49c53d9ad77a0c5c7fb7fcce5c94d48f8fcaa9ad1f7 SHA512 01a039e5612b6cca6f7558e93673ba50edfcfbf3f65e390ac64f4aa6ae0859a314676b20d722dcd41a7a3c940473fe7982e823c800a75bd26a5e8f956528f223 diff --git a/sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch b/sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch new file mode 100644 index 000000000000..a3b5138c5de0 --- /dev/null +++ b/sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch @@ -0,0 +1,21 @@ +# HG changeset patch +# User Christopher Byrne <salah.coronya@gmail.com> +# Date 1645847383 21600 +# Fri Feb 25 21:49:43 2022 -0600 +# Node ID bbf8373779e4653be2e2cfbaf14e1abb1ae42af4 +# Parent 5941842afb661f0e78085cb1317781d362583a38 +lcptools-v2/pconf_legacy.c: Add missing BE size_of_pcrs to hash buffer + +Signed-of-by: Christopher Byrne <salah.coronya@gmail.com> + +diff --git a/lcptools-v2/pconf_legacy.c b/lcptools-v2/pconf_legacy.c +--- a/lcptools-v2/pconf_legacy.c ++++ b/lcptools-v2/pconf_legacy.c +@@ -241,6 +241,7 @@ + ERROR("Error: failed to allocate buffer for composite digest.\n"); + return false; + } ++ buff->size_of_pcrs = htonl(no_of_pcrs * SHA1_DIGEST_SIZE); + memcpy_s( + &buff->pcr_selection, + sizeof buff->pcr_selection, 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/" +} |