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/Manifest | 5 +- .../files/tboot-1.10.5-fix-pconf-element.patch | 21 ++++++ sys-boot/tboot/tboot-1.10.4.ebuild | 76 --------------------- sys-boot/tboot/tboot-1.10.5.ebuild | 77 ++++++++++++++++++++++ 4 files changed, 101 insertions(+), 78 deletions(-) create mode 100644 sys-boot/tboot/files/tboot-1.10.5-fix-pconf-element.patch delete mode 100644 sys-boot/tboot/tboot-1.10.4.ebuild create mode 100644 sys-boot/tboot/tboot-1.10.5.ebuild (limited to 'sys-boot/tboot') diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest index 48a96ef77363..12c3424d86a3 100644 --- a/sys-boot/tboot/Manifest +++ b/sys-boot/tboot/Manifest @@ -1,6 +1,7 @@ AUX tboot-1.10.3-disable-Werror.patch 522 BLAKE2B e25832b544ffc81d83d963061c35432f454590b02f3c9d10ceff60f977b9b022e39193a41ded7f96c71681f7219204809dd4156bcf7ad37ea8738155b6c0469e SHA512 a219e4f1dd637fb93cd05e827ab7d1a9bbcc99b87a3f6e9e8b902d0ab08f150ad87d8804f0d506c5ac721be4d1a85a14466e036c09643601a705be0fb07e4ed4 AUX tboot-1.10.3-disable-strip.patch 343 BLAKE2B 65d5e7f4e97504ace2d42123701de8f6e27e3ffc196b69a0afc8057ed8fe75c8274c427d858cb316d5712505381a5a109ddc5301eedc0f93c34d3ed0551deaff SHA512 f86f595d8883d433327eb906ee5fbe0c277180c7a993ae47e26c23ea8b406e59cbad28509ca399286ba306949b0d5de5dc9420242706c7affcba12d86e3f183b AUX tboot-1.10.3-dont-call-toolchain-directly.patch 1884 BLAKE2B 80a029eb34f3088ccb772b5e9b092b60f35516659c74d149c0ff6bc6afb7578d35e3063beadaf0dd61407f84f78f20d782c3b64c33ab566751a2317fee14aeb9 SHA512 02dd09eb4b4a65802206c066f32959ab8150933dbc37458e888dcec4cf40b25681e3f0463cd8df62149f7764956d04259c05be36aeed8d9a243d758d3a2225a2 -DIST tboot-1.10.4.tar.gz 908050 BLAKE2B 8c793e2ec29cc3c3aa8199ac5058e9b3521eb0a72609c8b5ae21e0843571ae765be74bb48184178e2641ff8eec05680f81e45b12b80fd7d2727c82f9c8702411 SHA512 6fe93cabd5fc10cba7797048cad2cce4c490e0112c5c877f3367d78873cb55ba3d84eb703f2fcdba807eb21f1bef6a838d315b32d6418fb88b2589ff66e99491 -EBUILD tboot-1.10.4.ebuild 1892 BLAKE2B 5de7709ef3ff7f21ecfd75cf45fc2e971493e0b2e49f3684cf451afcef5ec1e7fc317bd124e72dfc894f12f862c2ae69b689018b5e58d438c745be1d7dfc72cb SHA512 dd0024300995105f901b7132176bb23125dbf78c6ac3f03464a5abcc69677096f3fe5bcf9eb5794d89a0dfa8f0f2de3a3ddb1e14ab9246132da4e009bf954289 +AUX tboot-1.10.5-fix-pconf-element.patch 775 BLAKE2B adba01bd5a9b6ff315ab50b3b42c2862ce09a19207a37ddf0c93ba5b8819f14fa0e3f1a3d8a65029bdb4d70bf1ea9b546b9038c158922cbcc3ea166e1f7b5213 SHA512 3a11bd1603a9487659c7059ada60e91aed9fb38f382298f2473c88aff66abcf2cced90980487be988ca150be1b2b87c40ef0190b7ec5862dc00af6077c652f52 +DIST tboot-1.10.5.tar.gz 907657 BLAKE2B f9e33c512fac304eba6cbf87b497c48ff52c5efdb47103f247e04c95f8e44230671c58811d7d58753cd9c49c53d9ad77a0c5c7fb7fcce5c94d48f8fcaa9ad1f7 SHA512 01a039e5612b6cca6f7558e93673ba50edfcfbf3f65e390ac64f4aa6ae0859a314676b20d722dcd41a7a3c940473fe7982e823c800a75bd26a5e8f956528f223 +EBUILD tboot-1.10.5.ebuild 1946 BLAKE2B df14244fcc092b5eaed7bd0d73454510ea80415f70fb9c693c66f0fb76e4d2672f97ceb6b484b45740cba20aea2fe6e876bc9ce064693871b08c36c1d5f0d91b SHA512 6922599ab48e14138e18ad492512e34a1cef3233b1e509f9ade7f7df2472cb3774dd64d0ae31e0f5aee8ff4336cdde2846d8d2c21c78f00ba3e2c5321a3fece0 MISC metadata.xml 508 BLAKE2B c28a3b0e46c57c91011bbee5ff6769ace24ab4e7b3355536b8e8c3bdb33b0be4ee1fedd60f00e2bfe8957570f763e8e85f3a1786f7a470bc5b4c855e57f7b8a2 SHA512 e45960df2560d82cb914db1f661d739b5d6747b7fb433152fef849d36d6bb4cc812def3cbafa4b362056c4d96e37980e65f8bc163b2021d5827ffd6ee9afca4d 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 +# 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 + +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.4.ebuild b/sys-boot/tboot/tboot-1.10.4.ebuild deleted file mode 100644 index 4cedba3fabfc..000000000000 --- a/sys-boot/tboot/tboot-1.10.4.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# 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/" -} 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