Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tools/, app-crypt/tpm2-tools/files/
Date: Wed, 13 May 2020 13:17:38
Message-Id: 1589375808.f1b23e789dfc6359d1967a199f48eb44ca2f33ef.juippis@gentoo
1 commit: f1b23e789dfc6359d1967a199f48eb44ca2f33ef
2 Author: Salah Coronya <salah.coronya <AT> gmail <DOT> com>
3 AuthorDate: Sat Apr 11 00:43:55 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed May 13 13:16:48 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1b23e78
7
8 app-crypt/tpm2-tools: Bump to 4.2
9
10 Closes: https://bugs.gentoo.org/722018
11 Package-Manager: Portage-2.3.89, Repoman-2.3.20
12 Signed-off-by: Salah Coronya <salah.coronya <AT> gmail.com>
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 app-crypt/tpm2-tools/Manifest | 1 +
16 .../tpm2-tools/files/tpm2-tools-4.2-libressl.patch | 26 +++++++++++++++++
17 app-crypt/tpm2-tools/metadata.xml | 3 ++
18 app-crypt/tpm2-tools/tpm2-tools-4.2.ebuild | 34 ++++++++++++++++++++++
19 4 files changed, 64 insertions(+)
20
21 diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest
22 index 5c398b78b3c..27bb8e1ebee 100644
23 --- a/app-crypt/tpm2-tools/Manifest
24 +++ b/app-crypt/tpm2-tools/Manifest
25 @@ -1,2 +1,3 @@
26 DIST tpm2-tools-3.1.4.tar.gz 589388 BLAKE2B aaaa9a0158d0658dc2db4734b18ea1d49bd6c0aef84c4f1236f3134245165dccdb0bada69d92f0e5a59ecb1f2973e5cd25924d2b9c4cad2891d9e4f9fb94a84b SHA512 c5e1be4ffab305ee42a8b4a9c9aa4373158259a58844e273465f97a74f913fb12098b9fd81127148be95ecba7378f6a45b96af256dde3101a237e5e33e8e8ccb
27 DIST tpm2-tools-4.1.1.tar.gz 779914 BLAKE2B 5b347b00508183cbde407e01454df0a7eb3a8080cb5b8f73d153c4972b38b98ac7c066664b54aeedef03b9bfd97b3cff482dbc44d5f11215af9c3c7754380d75 SHA512 25952cf947f0acd16b1a8dbd3ac8573bce85ff970a7e24c290c4f9cd29418e77a3e48ac82c932fbd250887a9303ab301ff92db594c2fffaba47b873382444d26
28 +DIST tpm2-tools-4.2.tar.gz 889062 BLAKE2B 434b88e90f953785e57a9e9f18d717c8b6632206dabfc7478ae866e245eadf032ec4f26bb9597d04ea887bc23a8096d7e6fc2748b0e96806cb2989fd7edf9071 SHA512 7aaf549dd77307e5ad93d4b34737d684c8a7384996143124f10b188f5e99860940902cee83538e6957997859420dd430d6d27979b223beae515aab94ac8fb235
29
30 diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.2-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-4.2-libressl.patch
31 new file mode 100644
32 index 00000000000..2f39db3283c
33 --- /dev/null
34 +++ b/app-crypt/tpm2-tools/files/tpm2-tools-4.2-libressl.patch
35 @@ -0,0 +1,26 @@
36 +From a1ac2ee0c6592e6f730458c03a2abd1532c66046 Mon Sep 17 00:00:00 2001
37 +From: Salah Coronya <salah.coronya@×××××.com>
38 +Date: Sun, 12 Jan 2020 19:17:48 -0600
39 +Subject: [PATCH] lib/tpm2_openssl.c: Fix build for libressl
40 +
41 +Signed-off-by: Salah Coronya <salah.coronya@×××××.com>
42 +---
43 + lib/tpm2_openssl.c | 2 +-
44 + 1 file changed, 1 insertion(+), 1 deletion(-)
45 +
46 +diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
47 +index 505dd7a0..fd3861d9 100644
48 +--- a/lib/tpm2_openssl.c
49 ++++ b/lib/tpm2_openssl.c
50 +@@ -14,7 +14,7 @@
51 + #include "tpm2_openssl.h"
52 +
53 + /* compatibility function for OpenSSL versions < 1.1.0 */
54 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
55 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
56 + static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
57 + int r;
58 + int topad;
59 +--
60 +2.24.1
61 +
62
63 diff --git a/app-crypt/tpm2-tools/metadata.xml b/app-crypt/tpm2-tools/metadata.xml
64 index b28056e8794..26b4dcbaf51 100644
65 --- a/app-crypt/tpm2-tools/metadata.xml
66 +++ b/app-crypt/tpm2-tools/metadata.xml
67 @@ -9,6 +9,9 @@
68 <email>proxy-maint@g.o</email>
69 <name>Proxy Maintainers</name>
70 </maintainer>
71 + <use>
72 + <flag name="fapi">Enable feature API tools</flag>
73 + </use>
74 <upstream>
75 <remote-id type="github">tpm2-software/tpm2-tools</remote-id>
76 </upstream>
77
78 diff --git a/app-crypt/tpm2-tools/tpm2-tools-4.2.ebuild b/app-crypt/tpm2-tools/tpm2-tools-4.2.ebuild
79 new file mode 100644
80 index 00000000000..f791854a95a
81 --- /dev/null
82 +++ b/app-crypt/tpm2-tools/tpm2-tools-4.2.ebuild
83 @@ -0,0 +1,34 @@
84 +# Copyright 1999-2020 Gentoo Authors
85 +# Distributed under the terms of the GNU General Public License v2
86 +
87 +EAPI=7
88 +
89 +DESCRIPTION="Tools for the TPM 2.0 TSS"
90 +HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
91 +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
92 +
93 +LICENSE="BSD"
94 +SLOT="0"
95 +KEYWORDS="~amd64"
96 +IUSE="+fapi libressl"
97 +
98 +# Integration test are now run as part of the testing suite, which will fail
99 +# because none of the supported TPM emulators are in Portage. In a future
100 +# version of tpm2-tools, swtpm will be supported and the tests can be run.
101 +RESTRICT="test"
102 +
103 +RDEPEND="net-misc/curl:=
104 + fapi? ( >=app-crypt/tpm2-tss-2.4.0:=[fapi?] )
105 + !libressl? ( dev-libs/openssl:0= )
106 + libressl? ( dev-libs/libressl:0= )"
107 +DEPEND="${RDEPEND}"
108 +BDEPEND="virtual/pkgconfig"
109 +PATCHES=(
110 + "${FILESDIR}/${P}-libressl.patch"
111 +)
112 +
113 +src_configure() {
114 + econf \
115 + $(use_enable fapi) \
116 + $(use_enable !libressl hardening)
117 +}