summaryrefslogtreecommitdiff
path: root/sys-boot/tboot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-boot/tboot
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-boot/tboot')
-rw-r--r--sys-boot/tboot/Manifest8
-rw-r--r--sys-boot/tboot/files/tboot-1.9.5-genkernel-path.patch60
-rw-r--r--sys-boot/tboot/metadata.xml14
-rw-r--r--sys-boot/tboot/tboot-1.9.5-r1.ebuild71
-rw-r--r--sys-boot/tboot/tboot-1.9.6.ebuild71
5 files changed, 224 insertions, 0 deletions
diff --git a/sys-boot/tboot/Manifest b/sys-boot/tboot/Manifest
new file mode 100644
index 000000000000..87a8060cd582
--- /dev/null
+++ b/sys-boot/tboot/Manifest
@@ -0,0 +1,8 @@
+AUX tboot-1.9.5-genkernel-path.patch 2366 SHA256 3a351b6ab2bf2ae76f348bf125936968e8d580dd4e1dda5940c70135b1a61a2f SHA512 1b2e5d3a3c1af62e7f88143b1b7e7c1bfc8e222889f4ac63e648da348b030c757173700ba419f53c31c57bc0ba91d47afa0c2998f982a376bf33b0f8cd968f98 WHIRLPOOL 4d61e64821e7bdd6a9c3a2957060d7b1a3df8bf103f87b6ed837c2cce20e56bbe813c53fbdae47423d2d69920aeabb56be5e8a4e6fd6837173c5890220c9cb98
+DIST tboot-1.9.5.tar.gz 685460 SHA256 c7032e367ac0129493c9bb1fcd1437f400ff5533c970119ddce281ff4d58a13f SHA512 d806b692d3d57d0aaf4095ef514a2859b2b054ec695cb5589b3a6133eec7f7a9a0e76544e4b557df02add5ed67c3c15fb3ee5f17d6438252b659d6e5c7d17fe9 WHIRLPOOL 04843854b1a646d6126079a3b46bacf0c8191d5b5c322f8bc04ea39c0d5470bba2f7f2499761d42aa258552c1dfbeb626275e7473628b21719a6fe59bc05029c
+DIST tboot-1.9.6.tar.gz 693564 SHA256 1b55eed6ca8196b2a003936594248a242888ac34ff970eda651e7660c4772a39 SHA512 f53f5535f7ab031439514b43811cd2ec93efcb7614cb7bc7d1f3051d808d942e8a4942fd1d0ab6fe0c245740c2a10ba7adbcd44f2c42b2a577d9a20c0c5df90e WHIRLPOOL 889af09491c599d73976a0a4b456e9d01f44c47bffd047cb0f84ca786953b02c952a2d8c1fe873ac0390f6faffe7f41c0871e07f8c9466c9bc719f683dfc4a36
+EBUILD tboot-1.9.5-r1.ebuild 1606 SHA256 d2b1d41c3aae5a67354c776b5ae758e2a4a98dbd55d1163af7ff686fac2e6fb5 SHA512 abae3028d4cf2fda7cbbc8ce6b9a14af845e4fd5885278526debb8afd7db14b5aee5570b02c96935d5764a3ad98b68b53ff7e4ba9afedc78b48fdfde5a74f21d WHIRLPOOL 67c8f69e46e9079b68aad3ef7d6b00205d8960b944150bdf23198541010dad6e6526b62994f29ac78e87638fd728fa3453900cca379f5f0189717a7bb28081e2
+EBUILD tboot-1.9.6.ebuild 1606 SHA256 d2b1d41c3aae5a67354c776b5ae758e2a4a98dbd55d1163af7ff686fac2e6fb5 SHA512 abae3028d4cf2fda7cbbc8ce6b9a14af845e4fd5885278526debb8afd7db14b5aee5570b02c96935d5764a3ad98b68b53ff7e4ba9afedc78b48fdfde5a74f21d WHIRLPOOL 67c8f69e46e9079b68aad3ef7d6b00205d8960b944150bdf23198541010dad6e6526b62994f29ac78e87638fd728fa3453900cca379f5f0189717a7bb28081e2
+MISC ChangeLog 3369 SHA256 9851ed023a617cf2e7e0a6060e8b8d21f294cd6bca6d512b77dd63da4ac1993d SHA512 cb046d05f9c08029e63fcd01a198ab58859aebcbee13d858410efbd1f6c30be88df8e74fa35a6b14d0e1485a4304d078a2acead6fda4aa366d8009736d368d10 WHIRLPOOL e694be17912f560c5fab0d7dbcd717780d3ca4c628e0980aa8f19e27f92f29b977b9e1fa4a67646c79e644c008673ed12b37811b57540590c7a1ffe80de29a1c
+MISC ChangeLog-2015 472 SHA256 89cb089f9ab0625e7faf0b85fd9391125146e9b8a870288e6c20410edbcd2d5a SHA512 5d3882c8a3f4a682b70ea6d8373e6c8c91bd5471bec0b4bdbe074628951c76780726a3d8e73c1d30f1a0a66e961c436016db375e8619e88a67e1c0492e17fbad WHIRLPOOL 9d147ee23ec5b6255ea67ee666fad26afe630d07b4774e0e02e2d9dee007a474aacd34c28daa0362b91ff340b0a9b30cd7d3089207c9ca45a9b9e4b20c6ec8a5
+MISC metadata.xml 507 SHA256 6fb6773f5ae99f9a1f5454b09b46d5dddaedd563945bc0f0e81bdada049f81a9 SHA512 d32632b8a672121164071b95f681213874f9ff0b47fabddc96eb3a60cfa4491c01dd5334af55dd1964c72cd437eb146ee7a0c4a3c0e99fb96c556db5de4d9e36 WHIRLPOOL d5283f6d70cf5b564f9108216a97b66af82a02e19b6e1fb2f7405699cf67bb6e24dd4216415db83421bef79cae579d374bd653294c5ae2c0cef0c3f7b522abcb
diff --git a/sys-boot/tboot/files/tboot-1.9.5-genkernel-path.patch b/sys-boot/tboot/files/tboot-1.9.5-genkernel-path.patch
new file mode 100644
index 000000000000..4914be6e4e7d
--- /dev/null
+++ b/sys-boot/tboot/files/tboot-1.9.5-genkernel-path.patch
@@ -0,0 +1,60 @@
+diff -ur tboot-1.9.5.orig/tboot/20_linux_tboot tboot-1.9.5/tboot/20_linux_tboot
+--- tboot-1.9.5.orig/tboot/20_linux_tboot 2016-12-21 06:29:15.000000000 +0800
++++ tboot-1.9.5/tboot/20_linux_tboot 2017-08-02 23:33:52.732748172 +0800
+@@ -171,6 +171,15 @@
+ EOF
+ }
+
++machine=`uname -m`
++case "$machine" in
++ i?86) GENKERNEL_ARCH="x86" ;;
++ mips|mips64) GENKERNEL_ARCH="mips" ;;
++ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
++ arm*) GENKERNEL_ARCH="arm" ;;
++ *) GENKERNEL_ARCH="$machine" ;;
++esac
++
+ linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
+ basename=$(basename $i)
+ version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
+@@ -217,7 +226,9 @@
+ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
+ "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-genkernel-${version}" \
+- "initramfs-genkernel-${alt_version}"; do
++ "initramfs-genkernel-${alt_version}" \
++ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
++ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
+ if test -e "${dirname}/${i}" ; then
+ initrd="$i"
+ break
+diff -ur tboot-1.9.5.orig/tboot/20_linux_xen_tboot tboot-1.9.5/tboot/20_linux_xen_tboot
+--- tboot-1.9.5.orig/tboot/20_linux_xen_tboot 2016-12-21 06:29:54.000000000 +0800
++++ tboot-1.9.5/tboot/20_linux_xen_tboot 2017-08-02 23:34:01.347685520 +0800
+@@ -165,6 +165,15 @@
+ EOF
+ }
+
++machine=`uname -m`
++case "$machine" in
++ i?86) GENKERNEL_ARCH="x86" ;;
++ mips|mips64) GENKERNEL_ARCH="mips" ;;
++ mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
++ arm*) GENKERNEL_ARCH="arm" ;;
++ *) GENKERNEL_ARCH="$machine" ;;
++esac
++
+ linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
+ if grub_file_is_not_garbage "$i"; then
+ basename=$(basename $i)
+@@ -232,7 +241,9 @@
+ "initrd-${version}" "initrd.img-${alt_version}" \
+ "initrd-${alt_version}.img" "initrd-${alt_version}" \
+ "initramfs-genkernel-${version}" \
+- "initramfs-genkernel-${alt_version}" ; do
++ "initramfs-genkernel-${alt_version}" \
++ "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
++ "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
+ if test -e "${dirname}/${i}" ; then
+ initrd="$i"
+ break
diff --git a/sys-boot/tboot/metadata.xml b/sys-boot/tboot/metadata.xml
new file mode 100644
index 000000000000..a607f9b9a029
--- /dev/null
+++ b/sys-boot/tboot/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>perfinion@gentoo.org</email>
+ <name>Jason Zaman</name>
+ </maintainer>
+ <longdescription lang="en">
+ A pre-kernel/VMM module that uses Intel(R) Trusted Execution Technology to perform a measured and verified launch of an OS kernel/VMM.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tboot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-boot/tboot/tboot-1.9.5-r1.ebuild b/sys-boot/tboot/tboot-1.9.5-r1.ebuild
new file mode 100644
index 000000000000..9e6d141c268e
--- /dev/null
+++ b/sys-boot/tboot/tboot-1.9.5-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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 selinux"
+
+# requires patching the kernel src
+RESTRICT="test"
+
+DEPEND="app-crypt/trousers
+app-crypt/tpm-tools
+dev-libs/openssl:0=[-bindist]"
+
+RDEPEND="${DEPEND}
+sys-boot/grub:2
+selinux? ( sec-policy/selinux-tboot )"
+
+DOCS=(README COPYING CHANGELOG)
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-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/*.{txt,pdf} || die "docs failed"
+
+ cd "${D}"
+ mkdir -p usr/lib/tboot/ || die
+ mv boot usr/lib/tboot/ || die
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ cp ${ROOT%/}/usr/lib/tboot/boot/* ${ROOT%/}/boot/
+
+ mount-boot_pkg_postinst
+
+ 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.9.6.ebuild b/sys-boot/tboot/tboot-1.9.6.ebuild
new file mode 100644
index 000000000000..9e6d141c268e
--- /dev/null
+++ b/sys-boot/tboot/tboot-1.9.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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 selinux"
+
+# requires patching the kernel src
+RESTRICT="test"
+
+DEPEND="app-crypt/trousers
+app-crypt/tpm-tools
+dev-libs/openssl:0=[-bindist]"
+
+RDEPEND="${DEPEND}
+sys-boot/grub:2
+selinux? ( sec-policy/selinux-tboot )"
+
+DOCS=(README COPYING CHANGELOG)
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-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/*.{txt,pdf} || die "docs failed"
+
+ cd "${D}"
+ mkdir -p usr/lib/tboot/ || die
+ mv boot usr/lib/tboot/ || die
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ cp ${ROOT%/}/usr/lib/tboot/boot/* ${ROOT%/}/boot/
+
+ mount-boot_pkg_postinst
+
+ 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/"
+}