1 |
commit: 53682956e536011485062b36d5baf21da9a70391 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 27 13:04:36 2017 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 27 13:18:38 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53682956 |
7 |
|
8 |
dev-libs/softhsm: fixups |
9 |
|
10 |
take ownership (crypto) |
11 |
move to openssl backend instead of botan |
12 |
fix dependencies. |
13 |
bump eapi. |
14 |
more... |
15 |
|
16 |
Bug: 604742 |
17 |
Bug: 604746 |
18 |
Bug: 605212 |
19 |
Bug: 604748 |
20 |
|
21 |
Package-Manager: portage-2.3.3 |
22 |
|
23 |
dev-libs/softhsm/files/softhsm-2.2.0-build.patch | 251 +++++++++++++++++++++++ |
24 |
dev-libs/softhsm/metadata.xml | 5 +- |
25 |
dev-libs/softhsm/softhsm-2.2.0-r1.ebuild | 51 +++++ |
26 |
3 files changed, 305 insertions(+), 2 deletions(-) |
27 |
|
28 |
diff --git a/dev-libs/softhsm/files/softhsm-2.2.0-build.patch b/dev-libs/softhsm/files/softhsm-2.2.0-build.patch |
29 |
new file mode 100644 |
30 |
index 00000000..83b6548 |
31 |
--- /dev/null |
32 |
+++ b/dev-libs/softhsm/files/softhsm-2.2.0-build.patch |
33 |
@@ -0,0 +1,251 @@ |
34 |
+From ae2fea013237e227ab62b52f9855a8f9dd8dcdbb Mon Sep 17 00:00:00 2001 |
35 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
36 |
+Date: Fri, 27 Jan 2017 14:18:19 +0200 |
37 |
+Subject: [PATCH 1/2] build: add missing log dependency to test |
38 |
+ |
39 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
40 |
+--- |
41 |
+ src/lib/test/Makefile.am | 1 + |
42 |
+ 1 file changed, 1 insertion(+) |
43 |
+ |
44 |
+diff --git a/src/lib/test/Makefile.am b/src/lib/test/Makefile.am |
45 |
+index 339593e..4555ff2 100644 |
46 |
+--- a/src/lib/test/Makefile.am |
47 |
++++ b/src/lib/test/Makefile.am |
48 |
+@@ -25,6 +25,7 @@ p11test_SOURCES = p11test.cpp \ |
49 |
+ AsymWrapUnwrapTests.cpp \ |
50 |
+ TestsBase.cpp \ |
51 |
+ TestsNoPINInitBase.cpp \ |
52 |
++ ../common/log.cpp \ |
53 |
+ ../common/osmutex.cpp |
54 |
+ |
55 |
+ p11test_LDADD = ../libsofthsm2.la |
56 |
+-- |
57 |
+2.10.2 |
58 |
+ |
59 |
+From c90ba51dd944c9e842e4743cf8dd9d5f4ea7bc5d Mon Sep 17 00:00:00 2001 |
60 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
61 |
+Date: Fri, 27 Jan 2017 14:41:11 +0200 |
62 |
+Subject: [PATCH 2/2] build: tests: use pkg-config for cppunit |
63 |
+ |
64 |
+do not execute cppunit-config over and over. |
65 |
+move detection to autoconf. |
66 |
+use standard pkg-config module of pkg-config instead |
67 |
+of cppunit-config. |
68 |
+ |
69 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
70 |
+--- |
71 |
+ configure.ac | 3 +++ |
72 |
+ m4/acx_cppunit.m4 | 4 ++++ |
73 |
+ src/lib/crypto/test/Makefile.am | 7 ++++--- |
74 |
+ src/lib/data_mgr/test/Makefile.am | 7 ++++--- |
75 |
+ src/lib/handle_mgr/test/Makefile.am | 7 ++++--- |
76 |
+ src/lib/object_store/test/Makefile.am | 7 ++++--- |
77 |
+ src/lib/session_mgr/test/Makefile.am | 7 ++++--- |
78 |
+ src/lib/slot_mgr/test/Makefile.am | 7 ++++--- |
79 |
+ src/lib/test/Makefile.am | 7 ++++--- |
80 |
+ 9 files changed, 35 insertions(+), 21 deletions(-) |
81 |
+ create mode 100644 m4/acx_cppunit.m4 |
82 |
+ |
83 |
+diff --git a/configure.ac b/configure.ac |
84 |
+index 4ecabd6..7df0f73 100644 |
85 |
+--- a/configure.ac |
86 |
++++ b/configure.ac |
87 |
+@@ -117,6 +117,9 @@ ACX_VISIBILITY |
88 |
+ # If we should install the p11-kit module |
89 |
+ ACX_P11KIT |
90 |
+ |
91 |
++# cppunit setetings |
92 |
++ACX_CPPUNIT |
93 |
++ |
94 |
+ # Set full directory paths |
95 |
+ full_sysconfdir=`eval eval eval eval eval echo "${sysconfdir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"` |
96 |
+ full_localstatedir=`eval eval eval eval eval echo "${localstatedir}" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"` |
97 |
+diff --git a/m4/acx_cppunit.m4 b/m4/acx_cppunit.m4 |
98 |
+new file mode 100644 |
99 |
+index 0000000..ff5b90e |
100 |
+--- /dev/null |
101 |
++++ b/m4/acx_cppunit.m4 |
102 |
+@@ -0,0 +1,4 @@ |
103 |
++AC_DEFUN([ACX_CPPUNIT],[ |
104 |
++ PKG_PROG_PKG_CONFIG |
105 |
++ PKG_CHECK_MODULES([CPPUNIT], [cppunit], [have_cppunit=yes], [have_cppunit=no]) |
106 |
++]) |
107 |
+diff --git a/src/lib/crypto/test/Makefile.am b/src/lib/crypto/test/Makefile.am |
108 |
+index ca7e421..81c2ce6 100644 |
109 |
+--- a/src/lib/crypto/test/Makefile.am |
110 |
++++ b/src/lib/crypto/test/Makefile.am |
111 |
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ |
112 |
+ -I$(srcdir)/../../object_store \ |
113 |
+ -I$(srcdir)/../../session_mgr \ |
114 |
+ -I$(srcdir)/../../slot_mgr \ |
115 |
+- @CRYPTO_INCLUDES@ \ |
116 |
+- `cppunit-config --cflags` |
117 |
++ @CRYPTO_INCLUDES@ |
118 |
++ |
119 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
120 |
+ |
121 |
+ check_PROGRAMS = cryptotest |
122 |
+ |
123 |
+@@ -32,7 +33,7 @@ cryptotest_SOURCES = cryptotest.cpp \ |
124 |
+ |
125 |
+ cryptotest_LDADD = ../../libsofthsm_convarch.la |
126 |
+ |
127 |
+-cryptotest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` |
128 |
++cryptotest_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install |
129 |
+ |
130 |
+ TESTS = cryptotest |
131 |
+ |
132 |
+diff --git a/src/lib/data_mgr/test/Makefile.am b/src/lib/data_mgr/test/Makefile.am |
133 |
+index 27b4fbd..944224c 100644 |
134 |
+--- a/src/lib/data_mgr/test/Makefile.am |
135 |
++++ b/src/lib/data_mgr/test/Makefile.am |
136 |
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ |
137 |
+ -I$(srcdir)/../../object_store \ |
138 |
+ -I$(srcdir)/../../session_mgr \ |
139 |
+ -I$(srcdir)/../../slot_mgr \ |
140 |
+- @CRYPTO_INCLUDES@ \ |
141 |
+- `cppunit-config --cflags` |
142 |
++ @CRYPTO_INCLUDES@ |
143 |
++ |
144 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
145 |
+ |
146 |
+ check_PROGRAMS = datamgrtest |
147 |
+ |
148 |
+@@ -20,7 +21,7 @@ datamgrtest_SOURCES = datamgrtest.cpp \ |
149 |
+ |
150 |
+ datamgrtest_LDADD = ../../libsofthsm_convarch.la |
151 |
+ |
152 |
+-datamgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` |
153 |
++datamgrtest_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install |
154 |
+ |
155 |
+ TESTS = datamgrtest |
156 |
+ |
157 |
+diff --git a/src/lib/handle_mgr/test/Makefile.am b/src/lib/handle_mgr/test/Makefile.am |
158 |
+index 4cf92e4..f439a56 100644 |
159 |
+--- a/src/lib/handle_mgr/test/Makefile.am |
160 |
++++ b/src/lib/handle_mgr/test/Makefile.am |
161 |
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ |
162 |
+ -I$(srcdir)/../../object_store \ |
163 |
+ -I$(srcdir)/../../session_mgr \ |
164 |
+ -I$(srcdir)/../../slot_mgr \ |
165 |
+- -I$(srcdir)/../../data_mgr \ |
166 |
+- `cppunit-config --cflags` |
167 |
++ -I$(srcdir)/../../data_mgr |
168 |
++ |
169 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
170 |
+ |
171 |
+ check_PROGRAMS = handlemgrtest |
172 |
+ |
173 |
+@@ -18,7 +19,7 @@ handlemgrtest_SOURCES = handlemgrtest.cpp \ |
174 |
+ |
175 |
+ handlemgrtest_LDADD = ../../libsofthsm_convarch.la |
176 |
+ |
177 |
+-handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` |
178 |
++handlemgrtest_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install |
179 |
+ |
180 |
+ TESTS = handlemgrtest |
181 |
+ |
182 |
+diff --git a/src/lib/object_store/test/Makefile.am b/src/lib/object_store/test/Makefile.am |
183 |
+index ab2aa82..eec4a92 100644 |
184 |
+--- a/src/lib/object_store/test/Makefile.am |
185 |
++++ b/src/lib/object_store/test/Makefile.am |
186 |
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ |
187 |
+ -I$(srcdir)/../../data_mgr \ |
188 |
+ -I$(srcdir)/../../session_mgr \ |
189 |
+ -I$(srcdir)/../../slot_mgr \ |
190 |
+- @CRYPTO_INCLUDES@ \ |
191 |
+- `cppunit-config --cflags` |
192 |
++ @CRYPTO_INCLUDES@ |
193 |
++ |
194 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
195 |
+ |
196 |
+ check_PROGRAMS = objstoretest |
197 |
+ |
198 |
+@@ -32,7 +33,7 @@ endif |
199 |
+ |
200 |
+ objstoretest_LDADD = ../../libsofthsm_convarch.la |
201 |
+ |
202 |
+-objstoretest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread |
203 |
++objstoretest_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread |
204 |
+ |
205 |
+ TESTS = objstoretest |
206 |
+ |
207 |
+diff --git a/src/lib/session_mgr/test/Makefile.am b/src/lib/session_mgr/test/Makefile.am |
208 |
+index 5e9a71c..385deec 100644 |
209 |
+--- a/src/lib/session_mgr/test/Makefile.am |
210 |
++++ b/src/lib/session_mgr/test/Makefile.am |
211 |
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ |
212 |
+ -I$(srcdir)/../../data_mgr \ |
213 |
+ -I$(srcdir)/../../session_mgr \ |
214 |
+ -I$(srcdir)/../../slot_mgr \ |
215 |
+- -I$(srcdir)/../../object_store \ |
216 |
+- `cppunit-config --cflags` |
217 |
++ -I$(srcdir)/../../object_store |
218 |
++ |
219 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
220 |
+ |
221 |
+ check_PROGRAMS = sessionmgrtest |
222 |
+ |
223 |
+@@ -18,7 +19,7 @@ sessionmgrtest_SOURCES = sessionmgrtest.cpp \ |
224 |
+ |
225 |
+ sessionmgrtest_LDADD = ../../libsofthsm_convarch.la |
226 |
+ |
227 |
+-sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread |
228 |
++sessionmgrtest_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread |
229 |
+ |
230 |
+ TESTS = sessionmgrtest |
231 |
+ |
232 |
+diff --git a/src/lib/slot_mgr/test/Makefile.am b/src/lib/slot_mgr/test/Makefile.am |
233 |
+index e9b9ce2..ecf36f5 100644 |
234 |
+--- a/src/lib/slot_mgr/test/Makefile.am |
235 |
++++ b/src/lib/slot_mgr/test/Makefile.am |
236 |
+@@ -8,8 +8,9 @@ AM_CPPFLAGS = -I$(srcdir)/.. \ |
237 |
+ -I$(srcdir)/../../object_store \ |
238 |
+ -I$(srcdir)/../../session_mgr \ |
239 |
+ -I$(srcdir)/../../data_mgr \ |
240 |
+- @CRYPTO_INCLUDES@ \ |
241 |
+- `cppunit-config --cflags` |
242 |
++ @CRYPTO_INCLUDES@ |
243 |
++ |
244 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
245 |
+ |
246 |
+ check_PROGRAMS = slotmgrtest |
247 |
+ |
248 |
+@@ -18,7 +19,7 @@ slotmgrtest_SOURCES = slotmgrtest.cpp \ |
249 |
+ |
250 |
+ slotmgrtest_LDADD = ../../libsofthsm_convarch.la |
251 |
+ |
252 |
+-slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread |
253 |
++slotmgrtest_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread |
254 |
+ |
255 |
+ TESTS = slotmgrtest |
256 |
+ |
257 |
+diff --git a/src/lib/test/Makefile.am b/src/lib/test/Makefile.am |
258 |
+index 4555ff2..9d157a5 100644 |
259 |
+--- a/src/lib/test/Makefile.am |
260 |
++++ b/src/lib/test/Makefile.am |
261 |
+@@ -2,8 +2,9 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in |
262 |
+ |
263 |
+ AM_CPPFLAGS = -I$(srcdir)/.. \ |
264 |
+ -I$(srcdir)/../cryptoki_compat \ |
265 |
+- -I$(srcdir)/../common \ |
266 |
+- `cppunit-config --cflags` |
267 |
++ -I$(srcdir)/../common |
268 |
++ |
269 |
++AM_CFLAGS = @CPPUNIT_CFLAGS@ |
270 |
+ |
271 |
+ check_PROGRAMS = p11test |
272 |
+ |
273 |
+@@ -30,7 +31,7 @@ p11test_SOURCES = p11test.cpp \ |
274 |
+ |
275 |
+ p11test_LDADD = ../libsofthsm2.la |
276 |
+ |
277 |
+-p11test_LDFLAGS = @CRYPTO_LIBS@ -no-install `cppunit-config --libs` -pthread -static |
278 |
++p11test_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread -static |
279 |
+ |
280 |
+ TESTS = p11test |
281 |
+ |
282 |
+-- |
283 |
+2.10.2 |
284 |
+ |
285 |
|
286 |
diff --git a/dev-libs/softhsm/metadata.xml b/dev-libs/softhsm/metadata.xml |
287 |
index 9afd1b5..1db90fe 100644 |
288 |
--- a/dev-libs/softhsm/metadata.xml |
289 |
+++ b/dev-libs/softhsm/metadata.xml |
290 |
@@ -1,8 +1,9 @@ |
291 |
<?xml version="1.0" encoding="UTF-8"?> |
292 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
293 |
<pkgmetadata> |
294 |
- <maintainer type="person"> |
295 |
- <email>mschiff@g.o</email> |
296 |
+ <maintainer type="project"> |
297 |
+ <email>crypto@g.o</email> |
298 |
+ <name>Crypto</name> |
299 |
</maintainer> |
300 |
<use> |
301 |
<flag name="migration-tool"> |
302 |
|
303 |
diff --git a/dev-libs/softhsm/softhsm-2.2.0-r1.ebuild b/dev-libs/softhsm/softhsm-2.2.0-r1.ebuild |
304 |
new file mode 100644 |
305 |
index 00000000..0b92129 |
306 |
--- /dev/null |
307 |
+++ b/dev-libs/softhsm/softhsm-2.2.0-r1.ebuild |
308 |
@@ -0,0 +1,51 @@ |
309 |
+# Copyright 1999-2017 Gentoo Foundation |
310 |
+# Distributed under the terms of the GNU General Public License v2 |
311 |
+# $Id$ |
312 |
+ |
313 |
+EAPI=6 |
314 |
+ |
315 |
+inherit autotools eutils |
316 |
+ |
317 |
+DESCRIPTION="A software PKCS#11 implementation" |
318 |
+HOMEPAGE="http://www.opendnssec.org/" |
319 |
+SRC_URI="http://www.opendnssec.org/files/source/${P}.tar.gz" |
320 |
+ |
321 |
+KEYWORDS="~amd64 ~hppa ~x86" |
322 |
+IUSE="libressl +migration-tool test" |
323 |
+SLOT="2" |
324 |
+LICENSE="BSD" |
325 |
+ |
326 |
+RDEPEND=" |
327 |
+ sys-devel/gcc:=[cxx] |
328 |
+ dev-db/sqlite:3 |
329 |
+ !libressl? ( dev-libs/openssl:= ) |
330 |
+ libressl? ( dev-libs/libressl ) |
331 |
+ !=dev-libs/softhsm-2.0.0:0 |
332 |
+" |
333 |
+DEPEND="${RDEPEND} |
334 |
+ virtual/pkgconfig |
335 |
+ test? ( dev-util/cppunit ) |
336 |
+" |
337 |
+ |
338 |
+PATCHES=( |
339 |
+ "${FILESDIR}/${P}-build.patch" |
340 |
+) |
341 |
+DOCS=( NEWS README.md ) |
342 |
+ |
343 |
+src_prepare() { |
344 |
+ default |
345 |
+ eautoreconf |
346 |
+} |
347 |
+ |
348 |
+src_configure() { |
349 |
+ econf \ |
350 |
+ --disable-static \ |
351 |
+ --with-crypto-backend=openssl \ |
352 |
+ --disable-p11-kit \ |
353 |
+ $(use_with migration-tool migrate) |
354 |
+} |
355 |
+ |
356 |
+src_install() { |
357 |
+ default |
358 |
+ prune_libtool_files --modules |
359 |
+} |