Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/tboot/
Date: Sat, 26 Feb 2022 02:30:05
Message-Id: 1645842369.95817a64efefc37806c543c4efef2f4f7a72cf5e.sam@gentoo
1 commit: 95817a64efefc37806c543c4efef2f4f7a72cf5e
2 Author: Christopher Byrne <salah.coronya <AT> gmail <DOT> com>
3 AuthorDate: Thu Feb 24 20:57:39 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 26 02:26:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95817a64
7
8 sys-boot/tboot: Bump to 1.10.4
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com>
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 sys-boot/tboot/Manifest | 1 +
15 sys-boot/tboot/tboot-1.10.4.ebuild | 76 ++++++++++++++++++++++++++++++++++++++
16 2 files changed, 77 insertions(+)
17
18 diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest
19 index af909f3a1a02..c4e612c45eaa 100644
20 --- a/sys-boot/tboot/Manifest
21 +++ b/sys-boot/tboot/Manifest
22 @@ -1 +1,2 @@
23 DIST tboot-1.10.3.tar.gz 906732 BLAKE2B 4015ba84fbc273d1f1ea3f302dd11e62d1866049a31674b8967a9c1be645f88f2fdbc8614e1f7d824010e8280484885392b34aedb2d9f32654a3065e75e0bd42 SHA512 998501cfb23511adf63c0e2a70f203b3a92328cba39948a6be2e0dc6600aaaf9fcc18dc1ffcdd00c43a5d2c688c34c912c7525fd54a5c673a764c34141be4b77
24 +DIST tboot-1.10.4.tar.gz 908050 BLAKE2B 8c793e2ec29cc3c3aa8199ac5058e9b3521eb0a72609c8b5ae21e0843571ae765be74bb48184178e2641ff8eec05680f81e45b12b80fd7d2727c82f9c8702411 SHA512 6fe93cabd5fc10cba7797048cad2cce4c490e0112c5c877f3367d78873cb55ba3d84eb703f2fcdba807eb21f1bef6a838d315b32d6418fb88b2589ff66e99491
25
26 diff --git a/sys-boot/tboot/tboot-1.10.4.ebuild b/sys-boot/tboot/tboot-1.10.4.ebuild
27 new file mode 100644
28 index 000000000000..4cedba3fabfc
29 --- /dev/null
30 +++ b/sys-boot/tboot/tboot-1.10.4.ebuild
31 @@ -0,0 +1,76 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +inherit mount-boot toolchain-funcs
38 +
39 +DESCRIPTION="Performs a measured and verified boot using Intel Trusted Execution Technology"
40 +HOMEPAGE="https://sourceforge.net/projects/tboot/"
41 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
42 +
43 +LICENSE="BSD"
44 +SLOT="0"
45 +KEYWORDS="-* ~amd64 ~x86"
46 +IUSE="custom-cflags selinux"
47 +
48 +# requires patching the kernel src
49 +RESTRICT="test"
50 +
51 +DEPEND="dev-libs/openssl:0=[-bindist(-)]"
52 +
53 +RDEPEND="${DEPEND}
54 + sys-boot/grub:2
55 + selinux? ( sec-policy/selinux-tboot )"
56 +
57 +DOCS=( README.md COPYING CHANGELOG )
58 +PATCHES=( "${FILESDIR}/${PN}-1.10.3-disable-Werror.patch"
59 + "${FILESDIR}/${PN}-1.10.3-disable-strip.patch"
60 + "${FILESDIR}/${PN}-1.10.3-dont-call-toolchain-directly.patch" )
61 +
62 +pkg_setup() {
63 + if tc-is-clang; then
64 + eerror "tboot is a freestanding application that uses gcc"
65 + eerror "extensions in fundemental ways, include VLAIS"
66 + eerror "(Variable Length Arrays in Structs) and will not"
67 + eerror "compile with clang witout upstream action"
68 + die "Cannot compile with clang. See bug #832020"
69 + fi
70 +}
71 +
72 +src_configure() {
73 + tc-export AS LD CC CPP AR RANLIB NM OBJCOPY OBJDUMP STRIP
74 +
75 + default
76 +}
77 +
78 +src_compile() {
79 + use custom-cflags && export TBOOT_CFLAGS=${CFLAGS} || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
80 +
81 + if use amd64; then
82 + export MAKEARGS="TARGET_ARCH=x86_64"
83 + else
84 + export MAKEARGS="TARGET_ARCH=i686"
85 + fi
86 +
87 + default
88 +}
89 +
90 +src_install() {
91 + emake DISTDIR="${D}" install
92 +
93 + dodoc "${DOCS[@]}"
94 + dodoc docs/*.{txt,md}
95 +
96 + cd "${ED}" || die
97 + mkdir -p usr/lib/tboot/ || die
98 + mv boot usr/lib/tboot/ || die
99 +}
100 +
101 +pkg_postinst() {
102 + cp "${ROOT}/usr/lib/tboot/boot/"* "${ROOT}/boot/" || die
103 +
104 + ewarn "Please remember to download the SINIT AC Module relevant"
105 + ewarn "for your platform from:"
106 + ewarn "http://software.intel.com/en-us/articles/intel-trusted-execution-technology/"
107 +}