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-tss-engine/files/, app-crypt/tpm2-tss-engine/
Date: Wed, 26 Feb 2020 16:17:57
Message-Id: 1582733844.a55183cb36173cc4fcd29ba29e4d12ff15e08d47.juippis@gentoo
1 commit: a55183cb36173cc4fcd29ba29e4d12ff15e08d47
2 Author: Salah Coronya <salah.coronya <AT> gmail <DOT> com>
3 AuthorDate: Thu Feb 20 02:06:06 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 26 16:17:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a55183cb
7
8 app-crypt/tpm2-tss-engine: Bump version to 1.0.1
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.16
11 Signed-off-by: Salah Coronya <salah.coronya <AT> gmail.com>
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 app-crypt/tpm2-tss-engine/Manifest | 1 +
15 .../files/tpm2-tss-engine-1.0.1-build.patch | 70 ++++++++++++++++++++++
16 .../files/tpm2-tss-engine-1.0.1-libressl.patch | 35 +++++++++++
17 .../tpm2-tss-engine/tpm2-tss-engine-1.0.1.ebuild | 40 +++++++++++++
18 4 files changed, 146 insertions(+)
19
20 diff --git a/app-crypt/tpm2-tss-engine/Manifest b/app-crypt/tpm2-tss-engine/Manifest
21 index 97d8452f2e5..6e9ede75088 100644
22 --- a/app-crypt/tpm2-tss-engine/Manifest
23 +++ b/app-crypt/tpm2-tss-engine/Manifest
24 @@ -1 +1,2 @@
25 DIST tpm2-tss-engine-1.0.0.tar.gz 382277 BLAKE2B 6580eb83f4e9391a12df2fb9cb86ace385a9e29004a64f6ca9378d9b8f60572a7761f4f486e1010d435487fed28858737d2bb71b08e400e9551a7b83c198bbe7 SHA512 b06722c82c9cefd5184125b26fb46bd7b20d62631c21c51a028348833c4786b41ff64f2c1cb7d53f749a6cf35b8fae02ae02285fc43d1d044e2d2b6e2e7048a3
26 +DIST tpm2-tss-engine-1.0.1.tar.gz 382715 BLAKE2B b33b91bf892509f8ed88bea1ba9611f06c9342726932baebbe918fcd4208f6c4b07710db666261b7676b90feb796746552804553e79ef817c02587504d266f44 SHA512 106fc6aadf0b4b27c3b38be596356aa59b4b76ec1602e8c5564aec6b4be7e2b5d6077006ee13d41e58402255b879aadaa966c758b5b326ae32742007ce2ef238
27
28 diff --git a/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.1-build.patch b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.1-build.patch
29 new file mode 100644
30 index 00000000000..aa2b2e4e4fd
31 --- /dev/null
32 +++ b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.1-build.patch
33 @@ -0,0 +1,70 @@
34 +From 92aee12fbd246461a22925dd054c4d6394c4fdf5 Mon Sep 17 00:00:00 2001
35 +From: Alon Bar-Lev <alon.barlev@×××××.com>
36 +Date: Fri, 31 May 2019 02:30:37 +0300
37 +Subject: [PATCH] build: add --disable-defaultflags
38 +
39 +Align with tpm2-tss to allow downstream to provide flags.
40 +
41 +Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com>
42 +---
43 + configure.ac | 42 +++++++++++++++++++++++++-----------------
44 + 1 file changed, 25 insertions(+), 17 deletions(-)
45 +
46 +https://github.com/tpm2-software/tpm2-tss-engine/pull/117
47 +
48 +diff --git a/configure.ac b/configure.ac
49 +index f3a399c..f59cfaf 100644
50 +--- a/configure.ac
51 ++++ b/configure.ac
52 +@@ -80,23 +80,31 @@ AS_IF([test "x$enable_tctienvvar" = xyes], [AC_DEFINE([ENABLE_TCTIENVVAR], [1])]
53 +
54 + AC_CONFIG_FILES([Makefile])
55 +
56 +-AX_ADD_COMPILER_FLAG([-std=c99])
57 +-AX_ADD_COMPILER_FLAG([-Wall])
58 +-AX_ADD_COMPILER_FLAG([-Wextra])
59 +-AX_ADD_COMPILER_FLAG([-Wformat-security])
60 +-AX_ADD_COMPILER_FLAG([-Werror])
61 +-AX_ADD_COMPILER_FLAG([-fstack-protector-all])
62 +-AX_ADD_COMPILER_FLAG([-fpic])
63 +-AX_ADD_COMPILER_FLAG([-fPIC])
64 +-
65 +-# work around GCC bug #53119
66 +-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
67 +-AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
68 +-
69 +-AX_ADD_LINK_FLAG([-Wl,--no-undefined])
70 +-AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
71 +-AX_ADD_LINK_FLAG([-Wl,-z,now])
72 +-AX_ADD_LINK_FLAG([-Wl,-z,relro])
73 ++AC_ARG_ENABLE([defaultflags],
74 ++ [AS_HELP_STRING([--disable-defaultflags],
75 ++ [Disable default preprocessor, compiler, and linker flags.])],
76 ++ [enable_defaultflags=$enableval],
77 ++ [enable_defaultflags=yes])
78 ++AS_IF([test "x$enable_defaultflags" = "xyes"],
79 ++ [
80 ++ AX_ADD_COMPILER_FLAG([-std=c99])
81 ++ AX_ADD_COMPILER_FLAG([-Wall])
82 ++ AX_ADD_COMPILER_FLAG([-Wextra])
83 ++ AX_ADD_COMPILER_FLAG([-Wformat-security])
84 ++ AX_ADD_COMPILER_FLAG([-Werror])
85 ++ AX_ADD_COMPILER_FLAG([-fstack-protector-all])
86 ++ AX_ADD_COMPILER_FLAG([-fpic])
87 ++ AX_ADD_COMPILER_FLAG([-fPIC])
88 ++
89 ++ # work around GCC bug #53119
90 ++ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
91 ++ AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
92 ++
93 ++ AX_ADD_LINK_FLAG([-Wl,--no-undefined])
94 ++ AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
95 ++ AX_ADD_LINK_FLAG([-Wl,-z,now])
96 ++ AX_ADD_LINK_FLAG([-Wl,-z,relro])
97 ++ ])
98 +
99 + AX_CODE_COVERAGE
100 + m4_ifdef([_AX_CODE_COVERAGE_RULES],
101 +--
102 +2.21.0
103 +
104
105 diff --git a/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.1-libressl.patch b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.1-libressl.patch
106 new file mode 100644
107 index 00000000000..66bb68e7694
108 --- /dev/null
109 +++ b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.1-libressl.patch
110 @@ -0,0 +1,35 @@
111 +From deb2b6697babf99aaf3f64b342ce414b48638ea3 Mon Sep 17 00:00:00 2001
112 +From: Alon Bar-Lev <alon.barlev@×××××.com>
113 +Date: Fri, 31 May 2019 20:36:47 +0300
114 +Subject: [PATCH] build: libressl fix incomplete type
115 +MIME-Version: 1.0
116 +Content-Type: text/plain; charset=UTF-8
117 +Content-Transfer-Encoding: 8bit
118 +
119 +src/tpm2-tss-engine-rand.c:90:1: error: variable ‘rand_methods’ has initializer but incomplete type
120 + 90 | static RAND_METHOD rand_methods = {
121 + | ^~~~~~
122 +src/tpm2-tss-engine-rand.c:91:5: warning: excess elements in struct initializer
123 +
124 +Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com>
125 +---
126 + src/tpm2-tss-engine-rand.c | 1 +
127 + 1 file changed, 1 insertion(+)
128 +
129 +https://github.com/tpm2-software/tpm2-tss-engine/pull/120
130 +
131 +diff --git a/src/tpm2-tss-engine-rand.c b/src/tpm2-tss-engine-rand.c
132 +index 50d5661..86980a5 100644
133 +--- a/src/tpm2-tss-engine-rand.c
134 ++++ b/src/tpm2-tss-engine-rand.c
135 +@@ -32,6 +32,7 @@
136 + #include <string.h>
137 +
138 + #include <openssl/engine.h>
139 ++#include <openssl/rand.h>
140 +
141 + #include <tss2/tss2_mu.h>
142 + #include <tss2/tss2_esys.h>
143 +--
144 +2.21.0
145 +
146
147 diff --git a/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.1.ebuild b/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.1.ebuild
148 new file mode 100644
149 index 00000000000..f1b1b5c2ca0
150 --- /dev/null
151 +++ b/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.1.ebuild
152 @@ -0,0 +1,40 @@
153 +# Copyright 1999-2020 Gentoo Authors
154 +# Distributed under the terms of the GNU General Public License v2
155 +
156 +EAPI=7
157 +
158 +inherit autotools
159 +
160 +DESCRIPTION="OpenSSL Engine for TPM2 devices"
161 +HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
162 +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/v${PV}/${P}.tar.gz"
163 +
164 +LICENSE="BSD"
165 +SLOT="0"
166 +KEYWORDS="~amd64"
167 +IUSE="libressl test"
168 +RESTRICT="!test? ( test )"
169 +
170 +RDEPEND=">=app-crypt/tpm2-tss-2.2.2:=
171 + !libressl? ( dev-libs/openssl:0= )
172 + libressl? ( dev-libs/libressl:0= )"
173 +DEPEND="${RDEPEND}
174 + test? ( dev-util/cmocka )"
175 +BDEPEND="virtual/pkgconfig"
176 +
177 +PATCHES=(
178 + "${FILESDIR}/${P}-build.patch"
179 + "${FILESDIR}/${P}-libressl.patch"
180 +)
181 +
182 +src_prepare() {
183 + default
184 + eautoreconf
185 +}
186 +
187 +src_configure() {
188 + econf \
189 + $(use_enable test unit) \
190 + --disable-defaultflags \
191 + --disable-static
192 +}