aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Retornaz <gentoo@retornaz.com>2021-01-17 18:18:24 +0100
committerQuentin Retornaz <gentoo@retornaz.com>2021-01-26 01:21:40 +0100
commit345f944c060ecf4239e31f0d603744904910d430 (patch)
tree8aa454418ff0eaf009862283a4b041f02b210370 /app-crypt
parentapp-crypt/mit-krb5: new package (diff)
downloadlibressl-345f944c060ecf4239e31f0d603744904910d430.tar.gz
libressl-345f944c060ecf4239e31f0d603744904910d430.tar.bz2
libressl-345f944c060ecf4239e31f0d603744904910d430.zip
app-crypt/tpm2-tools: new package
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/tpm2-tools/Manifest2
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch26
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-Remove-WError.patch12
-rw-r--r--app-crypt/tpm2-tools/metadata.xml18
-rw-r--r--app-crypt/tpm2-tools/tpm2-tools-4.3.0.ebuild42
-rw-r--r--app-crypt/tpm2-tools/tpm2-tools-5.0.ebuild42
6 files changed, 142 insertions, 0 deletions
diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest
new file mode 100644
index 0000000..23b297e
--- /dev/null
+++ b/app-crypt/tpm2-tools/Manifest
@@ -0,0 +1,2 @@
+DIST tpm2-tools-4.3.0.tar.gz 881544 BLAKE2B 0415f30845658e84e97a964abebc3082e45fb880c10bec405cd89c7bfa373ace10b669c4af78e7e47f2d2bb62fc7cc34b2e54e392a95c8f9b8956b8c92af6aee SHA512 4e622bbc8642ba7fd93a7343900560fe3779cba03e363d16f391fc8929724a11913d238e3986de06982cbced27c3c2ca8c7e73d75796407b8646c101ccf393a8
+DIST tpm2-tools-5.0.tar.gz 990855 BLAKE2B 5d39bbef0bc6f0d84f37c64c697260343a9f9e134bce015a6b529176195adb907672f35b85382b0a4785e40e368030ac347083086c3799bdfe86dced1ac69848 SHA512 ea57a28a61e28b78cae7067ff58facd8754fafab7a2689fd93f8b3374073b6ac30301a75f8ff5c654800ab469ee6604d0b8a86c310631b9545b816ecaa05968e
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch
new file mode 100644
index 0000000..2f39db3
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch
@@ -0,0 +1,26 @@
+From a1ac2ee0c6592e6f730458c03a2abd1532c66046 Mon Sep 17 00:00:00 2001
+From: Salah Coronya <salah.coronya@gmail.com>
+Date: Sun, 12 Jan 2020 19:17:48 -0600
+Subject: [PATCH] lib/tpm2_openssl.c: Fix build for libressl
+
+Signed-off-by: Salah Coronya <salah.coronya@gmail.com>
+---
+ lib/tpm2_openssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
+index 505dd7a0..fd3861d9 100644
+--- a/lib/tpm2_openssl.c
++++ b/lib/tpm2_openssl.c
+@@ -14,7 +14,7 @@
+ #include "tpm2_openssl.h"
+
+ /* compatibility function for OpenSSL versions < 1.1.0 */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
+ int r;
+ int topad;
+--
+2.24.1
+
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-Remove-WError.patch b/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-Remove-WError.patch
new file mode 100644
index 0000000..caa3fac
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-4.3.0-Remove-WError.patch
@@ -0,0 +1,12 @@
+diff --git a/configure.ac b/configure.ac
+index 7b5c2196..d07d5433 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -210,7 +210,6 @@ AS_IF([test x"$enable_hardening" != x"no"], [
+
+ add_hardened_c_flag([-Wall])
+ add_hardened_c_flag([-Wextra])
+- add_hardened_c_flag([-Werror])
+
+ add_hardened_c_flag([-Wformat])
+ add_hardened_c_flag([-Wformat-security])
diff --git a/app-crypt/tpm2-tools/metadata.xml b/app-crypt/tpm2-tools/metadata.xml
new file mode 100644
index 0000000..26b4dcb
--- /dev/null
+++ b/app-crypt/tpm2-tools/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>salah.coronya@gmail.com</email>
+ <name>Salah Coronya</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="fapi">Enable feature API tools</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">tpm2-software/tpm2-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-crypt/tpm2-tools/tpm2-tools-4.3.0.ebuild b/app-crypt/tpm2-tools/tpm2-tools-4.3.0.ebuild
new file mode 100644
index 0000000..dab1145
--- /dev/null
+++ b/app-crypt/tpm2-tools/tpm2-tools-4.3.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Tools for the TPM 2.0 TSS"
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+fapi libressl"
+
+# Integration test are now run as part of the testing suite, which will fail
+# because none of the supported TPM emulators are in Portage. In a future
+# version of tpm2-tools, swtpm will be supported and the tests can be run.
+RESTRICT="test"
+
+RDEPEND="net-misc/curl:=
+ >=app-crypt/tpm2-tss-2.4.0:=[fapi?]
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/${PN}-4.2.1-libressl.patch"
+ "${FILESDIR}/${PN}-4.3.0-Remove-WError.patch"
+)
+
+src_prepare() {
+ eautoreconf
+ default
+}
+
+src_configure() {
+ econf \
+ $(use_enable fapi) \
+ $(use_enable !libressl hardening)
+}
diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.0.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.0.ebuild
new file mode 100644
index 0000000..7cd1898
--- /dev/null
+++ b/app-crypt/tpm2-tools/tpm2-tools-5.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Tools for the TPM 2.0 TSS"
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+fapi libressl"
+
+# Integration test are now run as part of the testing suite, which will fail
+# because none of the supported TPM emulators are in Portage. In a future
+# version of tpm2-tools, swtpm will be supported and the tests can be run.
+RESTRICT="test"
+
+RDEPEND="net-misc/curl:=
+ >=app-crypt/tpm2-tss-3.0.1:=[fapi?]
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/${PN}-4.2.1-libressl.patch"
+ "${FILESDIR}/${PN}-4.3.0-Remove-WError.patch"
+)
+
+src_prepare() {
+ eautoreconf
+ default
+}
+
+src_configure() {
+ econf \
+ $(use_enable fapi) \
+ $(use_enable !libressl hardening)
+}