1 |
commit: 6831cad0d840161769d2621073ffa5ec335fdb6c |
2 |
Author: Salah Coronya <salah.coronya <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Oct 8 03:41:22 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 12 09:05:56 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6831cad0 |
7 |
|
8 |
app-crypt/swtpm: Bump to 0.5.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/744442 |
11 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
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/swtpm/Manifest | 1 + |
16 |
.../swtpm-0.5.0-build-sys-Remove-WError.patch | 13 +++ |
17 |
.../swtpm-0.5.0-disable-test-dependencies.patch | 26 ++++++ |
18 |
.../swtpm/files/swtpm-0.5.0-fix-localca-path.patch | 31 +++++++ |
19 |
app-crypt/swtpm/swtpm-0.5.0.ebuild | 95 ++++++++++++++++++++++ |
20 |
5 files changed, 166 insertions(+) |
21 |
|
22 |
diff --git a/app-crypt/swtpm/Manifest b/app-crypt/swtpm/Manifest |
23 |
index 8866875bdcf..d8b82e32ecb 100644 |
24 |
--- a/app-crypt/swtpm/Manifest |
25 |
+++ b/app-crypt/swtpm/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST swtpm-0.3.2.tar.gz 308843 BLAKE2B 501c600e36a437fc99f662f1c217169cab15b0d4ec4a4551a29dd83541c9718e182c7eb13a43e541da453fc28c48232354b617525e32d9721e697744eaa5a17a SHA512 5da668cd8091f0db70bec52cd8d26bacf7b18e4c27c83c1cba25e59c69bb2ba7a1d011d9bf4bafa44e1a49065538445eb56683806be6f1875cba383f8edb6a4f |
28 |
+DIST swtpm-0.5.0.tar.gz 309011 BLAKE2B 3977acef1e68adca82ed5b51adb5f8787f6eb874ee16768b5b4bbbb13b043f8a39f534b2aa99ef92fb1608f0c4c805b51bb8fbc83297b71afcec2d99faff03d9 SHA512 ba7dafc9a9ddd28252615028a45fe3e68efd12df948c1e8ec938caabb840406a7a1935e1e4a6e1b6b8848bee08450673138dc5a0d63f0447f5e0e07350e4aed7 |
29 |
|
30 |
diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch b/app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..4afd5408d9c |
33 |
--- /dev/null |
34 |
+++ b/app-crypt/swtpm/files/swtpm-0.5.0-build-sys-Remove-WError.patch |
35 |
@@ -0,0 +1,13 @@ |
36 |
+diff --git a/configure.ac b/configure.ac |
37 |
+index d035653..1db5c5c 100644 |
38 |
+--- a/configure.ac |
39 |
++++ b/configure.ac |
40 |
+@@ -461,7 +461,7 @@ AC_SUBST([TSS_USER]) |
41 |
+ AC_SUBST([TSS_GROUP]) |
42 |
+ |
43 |
+ CFLAGS="$CFLAGS -Wreturn-type -Wsign-compare -Wswitch-enum" |
44 |
+-CFLAGS="$CFLAGS -Wmissing-prototypes -Wall -Werror" |
45 |
++CFLAGS="$CFLAGS -Wmissing-prototypes -Wall" |
46 |
+ CFLAGS="$CFLAGS -Wformat -Wformat-security" |
47 |
+ CFLAGS="$CFLAGS $GNUTLS_CFLAGS $COVERAGE_CFLAGS" |
48 |
+ |
49 |
|
50 |
diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch b/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch |
51 |
new file mode 100644 |
52 |
index 00000000000..3880385256e |
53 |
--- /dev/null |
54 |
+++ b/app-crypt/swtpm/files/swtpm-0.5.0-disable-test-dependencies.patch |
55 |
@@ -0,0 +1,26 @@ |
56 |
+diff --git a/configure.ac b/configure.ac |
57 |
+index d035653..0728a2e 100644 |
58 |
+--- a/configure.ac |
59 |
++++ b/configure.ac |
60 |
+@@ -325,21 +325,11 @@ fi |
61 |
+ AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = "xyes"]) |
62 |
+ AC_SUBST([GNUTLS_LIBS]) |
63 |
+ |
64 |
+-AC_PATH_PROG([EXPECT], expect) |
65 |
+-if test "x$EXPECT" = "x"; then |
66 |
+- AC_MSG_ERROR([expect is required: expect package]) |
67 |
+-fi |
68 |
+- |
69 |
+ AC_PATH_PROG([GAWK], gawk) |
70 |
+ if test "x$GAWK" = "x"; then |
71 |
+ AC_MSG_ERROR([gawk is required: gawk package]) |
72 |
+ fi |
73 |
+ |
74 |
+-AC_PATH_PROG([SOCAT], socat) |
75 |
+-if test "x$SOCAT" = "x"; then |
76 |
+- AC_MSG_ERROR([socat is required: socat package]) |
77 |
+-fi |
78 |
+- |
79 |
+ AC_PATH_PROG([BASE64], base64) |
80 |
+ if test "x$BASE64" = "x"; then |
81 |
+ AC_MSG_ERROR([base64 is required: base64 package]) |
82 |
|
83 |
diff --git a/app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch b/app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch |
84 |
new file mode 100644 |
85 |
index 00000000000..27d29fc55ae |
86 |
--- /dev/null |
87 |
+++ b/app-crypt/swtpm/files/swtpm-0.5.0-fix-localca-path.patch |
88 |
@@ -0,0 +1,31 @@ |
89 |
+diff --git a/samples/Makefile.am b/samples/Makefile.am |
90 |
+index 7d69bf8..9fb8338 100644 |
91 |
+--- a/samples/Makefile.am |
92 |
++++ b/samples/Makefile.am |
93 |
+@@ -56,10 +56,10 @@ endif |
94 |
+ |
95 |
+ |
96 |
+ install-data-local: |
97 |
+- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/swtpm-localca |
98 |
++ $(MKDIR_P) $(DESTDIR)$(localstatedir)/swtpm-localca |
99 |
+ if test -z $(DESTDIR); then \ |
100 |
+- chown -R @TSS_USER@:root $(DESTDIR)$(localstatedir)/lib/swtpm-localca || true; \ |
101 |
+- chmod 0750 $(DESTDIR)$(localstatedir)/lib/swtpm-localca || true; \ |
102 |
++ chown -R @TSS_USER@:root $(DESTDIR)$(localstatedir)/swtpm-localca || true; \ |
103 |
++ chmod 0750 $(DESTDIR)$(localstatedir)/swtpm-localca || true; \ |
104 |
+ fi |
105 |
+ |
106 |
+ # for out-of-tree builds we need to clean up |
107 |
+diff --git a/samples/swtpm-localca.conf.in b/samples/swtpm-localca.conf.in |
108 |
+index 1f0b48d..63f1fed 100644 |
109 |
+--- a/samples/swtpm-localca.conf.in |
110 |
++++ b/samples/swtpm-localca.conf.in |
111 |
+@@ -1,4 +1,4 @@ |
112 |
+-statedir = @LOCALSTATEDIR@/lib/swtpm-localca |
113 |
+-signingkey = @LOCALSTATEDIR@/lib/swtpm-localca/signkey.pem |
114 |
+-issuercert = @LOCALSTATEDIR@/lib/swtpm-localca/issuercert.pem |
115 |
+-certserial = @LOCALSTATEDIR@/lib/swtpm-localca/certserial |
116 |
++statedir = @LOCALSTATEDIR@/swtpm-localca |
117 |
++signingkey = @LOCALSTATEDIR@/swtpm-localca/signkey.pem |
118 |
++issuercert = @LOCALSTATEDIR@/swtpm-localca/issuercert.pem |
119 |
++certserial = @LOCALSTATEDIR@/swtpm-localca/certserial |
120 |
|
121 |
diff --git a/app-crypt/swtpm/swtpm-0.5.0.ebuild b/app-crypt/swtpm/swtpm-0.5.0.ebuild |
122 |
new file mode 100644 |
123 |
index 00000000000..c3d81294665 |
124 |
--- /dev/null |
125 |
+++ b/app-crypt/swtpm/swtpm-0.5.0.ebuild |
126 |
@@ -0,0 +1,95 @@ |
127 |
+# Copyright 1999-2020 Gentoo Authors |
128 |
+# Distributed under the terms of the GNU General Public License v2 |
129 |
+ |
130 |
+EAPI=7 |
131 |
+ |
132 |
+PYTHON_COMPAT=( python3_{7,8} ) |
133 |
+DISTUTILS_USE_SETUPTOOLS=bdepend |
134 |
+ |
135 |
+inherit autotools distutils-r1 |
136 |
+ |
137 |
+DESCRIPTION="Libtpms-based TPM emulator" |
138 |
+HOMEPAGE="https://github.com/stefanberger/swtpm" |
139 |
+SRC_URI="https://github.com/stefanberger/swtpm/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
140 |
+ |
141 |
+LICENSE="BSD" |
142 |
+SLOT="0" |
143 |
+KEYWORDS="~amd64" |
144 |
+IUSE="fuse gnutls libressl seccomp test" |
145 |
+ |
146 |
+RESTRICT="!test? ( test )" |
147 |
+ |
148 |
+COMMON_DEPEND=" |
149 |
+ fuse? ( |
150 |
+ dev-libs/glib:2 |
151 |
+ sys-fs/fuse:0 |
152 |
+ ) |
153 |
+ gnutls? ( |
154 |
+ dev-libs/libtasn1:= |
155 |
+ >=net-libs/gnutls-3.1.0[tools] |
156 |
+ ) |
157 |
+ !libressl? ( |
158 |
+ dev-libs/openssl:0= |
159 |
+ dev-libs/libtpms[-libressl] |
160 |
+ ) |
161 |
+ libressl? ( |
162 |
+ dev-libs/libressl:0= |
163 |
+ dev-libs/libtpms[libressl] |
164 |
+ ) |
165 |
+ seccomp? ( sys-libs/libseccomp ) |
166 |
+" |
167 |
+ |
168 |
+DEPEND="${COMMON_DEPEND} |
169 |
+ test? ( |
170 |
+ net-misc/socat |
171 |
+ dev-tcltk/expect |
172 |
+ ${PYTHON_DEPS} |
173 |
+ ) |
174 |
+" |
175 |
+ |
176 |
+RDEPEND="${COMMON_DEPEND} |
177 |
+ acct-group/tss |
178 |
+ acct-user/tss |
179 |
+ dev-python/cryptography[${PYTHON_USEDEP}] |
180 |
+" |
181 |
+ |
182 |
+PATCHES=( |
183 |
+ "${FILESDIR}/${PN}-0.5.0-fix-localca-path.patch" |
184 |
+ "${FILESDIR}/${PN}-0.5.0-build-sys-Remove-WError.patch" |
185 |
+ ) |
186 |
+ |
187 |
+src_prepare() { |
188 |
+ use test || eapply "${FILESDIR}/${PN}-0.5.0-disable-test-dependencies.patch" |
189 |
+ default |
190 |
+ eautoreconf |
191 |
+ eautomake |
192 |
+} |
193 |
+ |
194 |
+src_configure() { |
195 |
+ econf \ |
196 |
+ --disable-static \ |
197 |
+ --with-openssl \ |
198 |
+ --without-selinux \ |
199 |
+ $(use_with fuse cuse) \ |
200 |
+ $(use_with gnutls) \ |
201 |
+ $(use_with seccomp) |
202 |
+} |
203 |
+ |
204 |
+src_compile() { |
205 |
+# We want the default src_compile, not the version distutils-r1 exports |
206 |
+ default |
207 |
+} |
208 |
+ |
209 |
+src_install() { |
210 |
+ default |
211 |
+ python_foreach_impl python_optimize |
212 |
+ fowners -R tss:root /var/lib/swtpm-localca |
213 |
+ fperms 750 /var/lib/swtpm-localca |
214 |
+ keepdir /var/lib/swtpm-localca |
215 |
+ find "${D}" -name '*.la' -delete || die |
216 |
+} |
217 |
+ |
218 |
+src_test() { |
219 |
+# We want the default src_test, not the version distutils-r1 exports |
220 |
+ default |
221 |
+} |