Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/socat/, net-misc/socat/files/
Date: Fri, 30 Apr 2021 23:27:58
Message-Id: 1619825241.211374be86cb10ee6a1d583abd113ca9f6622b46.sam@gentoo
1 commit: 211374be86cb10ee6a1d583abd113ca9f6622b46
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 30 23:13:21 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 30 23:27:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=211374be
7
8 net-misc/socat: remove LibreSSL support
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../socat/files/socat-2.0.0_beta9-libressl.patch | 267 ---------------------
13 net-misc/socat/socat-1.7.3.4.ebuild | 11 +-
14 net-misc/socat/socat-1.7.4.1.ebuild | 10 +-
15 net-misc/socat/socat-2.0.0_beta9.ebuild | 12 +-
16 net-misc/socat/socat-9999.ebuild | 10 +-
17 5 files changed, 17 insertions(+), 293 deletions(-)
18
19 diff --git a/net-misc/socat/files/socat-2.0.0_beta9-libressl.patch b/net-misc/socat/files/socat-2.0.0_beta9-libressl.patch
20 deleted file mode 100644
21 index 535297c04b0..00000000000
22 --- a/net-misc/socat/files/socat-2.0.0_beta9-libressl.patch
23 +++ /dev/null
24 @@ -1,267 +0,0 @@
25 -From fbb0cc3b65a2ead522019fb461ae520371cc3ede Mon Sep 17 00:00:00 2001
26 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@×××××××××.sk>
27 -Date: Mon, 6 Jun 2016 18:41:30 +0200
28 -Subject: [PATCH] Support compiling with LibreSSL 2.4.0
29 -
30 -This patch checks for macros OPENSSL_NO_COMP, OPENSSL_NO_EGD, and
31 -if disables those features if they are.
32 -
33 -Also add ifdef for HAVE_SSLv3_{client/server}_method in sslcls.c,
34 -since these were removed from LibreSSL 2.4.0.
35 ----
36 - sslcls.c | 8 +++++++-
37 - sslcls.h | 4 +++-
38 - xio-openssl.c | 24 ++++++++++++++++++------
39 - xio-openssl.h | 4 +++-
40 - xioopts.c | 8 ++++++--
41 - xioopts.h | 4 +++-
42 - 6 files changed, 40 insertions(+), 12 deletions(-)
43 -
44 -diff --git a/sslcls.c b/sslcls.c
45 -index ea4c303..5011ef2 100644
46 ---- a/sslcls.c
47 -+++ b/sslcls.c
48 -@@ -55,6 +55,7 @@ const SSL_METHOD *sycSSLv2_server_method(void) {
49 - }
50 - #endif
51 -
52 -+#if HAVE_SSLv3_client_method
53 - const SSL_METHOD *sycSSLv3_client_method(void) {
54 - const SSL_METHOD *result;
55 - Debug("SSLv3_client_method()");
56 -@@ -62,7 +63,9 @@ const SSL_METHOD *sycSSLv3_client_method(void) {
57 - Debug1("SSLv3_client_method() -> %p", result);
58 - return result;
59 - }
60 -+#endif
61 -
62 -+#if HAVE_SSLv3_server_method
63 - const SSL_METHOD *sycSSLv3_server_method(void) {
64 - const SSL_METHOD *result;
65 - Debug("SSLv3_server_method()");
66 -@@ -70,6 +73,7 @@ const SSL_METHOD *sycSSLv3_server_method(void) {
67 - Debug1("SSLv3_server_method() -> %p", result);
68 - return result;
69 - }
70 -+#endif
71 -
72 - const SSL_METHOD *sycSSLv23_client_method(void) {
73 - const SSL_METHOD *result;
74 -@@ -347,6 +351,7 @@ void sycSSL_free(SSL *ssl) {
75 - return;
76 - }
77 -
78 -+#ifndef OPENSSL_NO_EGD
79 - int sycRAND_egd(const char *path) {
80 - int result;
81 - Debug1("RAND_egd(\"%s\")", path);
82 -@@ -354,6 +359,7 @@ int sycRAND_egd(const char *path) {
83 - Debug1("RAND_egd() -> %d", result);
84 - return result;
85 - }
86 -+#endif
87 -
88 - DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) {
89 - DH *result;
90 -@@ -391,7 +397,7 @@ int sycFIPS_mode_set(int onoff) {
91 - }
92 - #endif /* WITH_FIPS */
93 -
94 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
95 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
96 - const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) {
97 - const COMP_METHOD *result;
98 - Debug1("SSL_get_current_compression(%p)", ssl);
99 -diff --git a/sslcls.h b/sslcls.h
100 -index 152fe5b..9fd8ef2 100644
101 ---- a/sslcls.h
102 -+++ b/sslcls.h
103 -@@ -49,7 +49,9 @@ X509 *sycSSL_get_peer_certificate(SSL *ssl);
104 - int sycSSL_shutdown(SSL *ssl);
105 - void sycSSL_CTX_free(SSL_CTX *ctx);
106 - void sycSSL_free(SSL *ssl);
107 -+#ifndef OPENSSL_NO_EGD
108 - int sycRAND_egd(const char *path);
109 -+#endif
110 -
111 - DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
112 -
113 -@@ -57,7 +59,7 @@ BIO *sycBIO_new_file(const char *filename, const char *mode);
114 -
115 - int sycFIPS_mode_set(int onoff);
116 -
117 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
118 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
119 - const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl);
120 - const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl);
121 - const char *sycSSL_COMP_get_name(const COMP_METHOD *comp);
122 -diff --git a/xio-openssl.c b/xio-openssl.c
123 -index c7f283c..38dc20d 100644
124 ---- a/xio-openssl.c
125 -+++ b/xio-openssl.c
126 -@@ -181,9 +181,11 @@ const struct optdesc opt_openssl_key = { "openssl-key", "key",
127 - const struct optdesc opt_openssl_dhparam = { "openssl-dhparam", "dh", OPT_OPENSSL_DHPARAM, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
128 - const struct optdesc opt_openssl_cafile = { "openssl-cafile", "cafile", OPT_OPENSSL_CAFILE, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
129 - const struct optdesc opt_openssl_capath = { "openssl-capath", "capath", OPT_OPENSSL_CAPATH, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
130 -+#ifndef OPENSSL_NO_EGD
131 - const struct optdesc opt_openssl_egd = { "openssl-egd", "egd", OPT_OPENSSL_EGD, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
132 -+#endif
133 - const struct optdesc opt_openssl_pseudo = { "openssl-pseudo", "pseudo", OPT_OPENSSL_PSEUDO, GROUP_OPENSSL, PH_SPEC, TYPE_BOOL, OFUNC_SPEC };
134 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
135 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
136 - const struct optdesc opt_openssl_compress = { "openssl-compress", "compress", OPT_OPENSSL_COMPRESS, GROUP_OPENSSL, PH_SPEC, TYPE_STRING, OFUNC_SPEC };
137 - #endif
138 - #if WITH_FIPS
139 -@@ -220,7 +222,7 @@ int xio_reset_fips_mode(void) {
140 - static void openssl_conn_loginfo(SSL *ssl) {
141 - Notice1("SSL connection using %s", SSL_get_cipher(ssl));
142 -
143 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
144 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
145 - {
146 - const COMP_METHOD *comp, *expansion;
147 -
148 -@@ -786,7 +788,7 @@ int _xioopen_openssl_listen(struct single *xfd,
149 - #endif /* WITH_LISTEN */
150 -
151 -
152 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
153 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
154 - /* In OpenSSL 0.9.7 compression methods could be added using
155 - * SSL_COMP_add_compression_method(3), but the implemntation is not compatible
156 - * with the standard (RFC3749).
157 -@@ -857,8 +859,10 @@ int
158 - char *opt_dhparam = NULL; /* file name of DH params */
159 - char *opt_cafile = NULL; /* certificate authority file */
160 - char *opt_capath = NULL; /* certificate authority directory */
161 -+#ifndef OPENSSL_NO_EGD
162 - char *opt_egd = NULL; /* entropy gathering daemon socket path */
163 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
164 -+#endif
165 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
166 - char *opt_compress = NULL; /* compression method */
167 - #endif
168 - bool opt_pseudo = false; /* use pseudo entropy if nothing else */
169 -@@ -875,9 +879,11 @@ int
170 - retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
171 - retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
172 - retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
173 -+#ifndef OPENSSL_NO_EGD
174 - retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
175 -+#endif
176 - retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
177 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
178 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
179 - retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
180 - #endif
181 - #if WITH_FIPS
182 -@@ -1010,9 +1016,11 @@ int
183 - }
184 - }
185 -
186 -+#ifndef OPENSSL_NO_EGD
187 - if (opt_egd) {
188 - sycRAND_egd(opt_egd);
189 - }
190 -+#endif
191 -
192 - if (opt_pseudo) {
193 - long int randdata;
194 -@@ -1124,7 +1132,7 @@ int
195 - }
196 - #endif /* !defined(EC_KEY) */
197 -
198 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
199 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
200 - if (opt_compress) {
201 - int result;
202 - result = openssl_setup_compression(*ctx, opt_compress);
203 -@@ -1238,7 +1246,11 @@ static int openssl_SSL_ERROR_SSL(int level, const char *funcname) {
204 - if (e == ((ERR_LIB_RAND<<24)|
205 - (RAND_F_SSLEAY_RAND_BYTES<<12)|
206 - (RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
207 -+#ifdef OPENSSL_NO_EGD
208 -+ Error("too few entropy; use option \"pseudo\"");
209 -+#else
210 - Error("too few entropy; use options \"egd\" or \"pseudo\"");
211 -+#endif
212 - stat = STAT_NORETRY;
213 - } else {
214 - Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf));
215 -diff --git a/xio-openssl.h b/xio-openssl.h
216 -index 62586fc..f10ee0c 100644
217 ---- a/xio-openssl.h
218 -+++ b/xio-openssl.h
219 -@@ -21,9 +21,11 @@ extern const struct optdesc opt_openssl_key;
220 - extern const struct optdesc opt_openssl_dhparam;
221 - extern const struct optdesc opt_openssl_cafile;
222 - extern const struct optdesc opt_openssl_capath;
223 -+#ifndef OPENSSL_NO_EGD
224 - extern const struct optdesc opt_openssl_egd;
225 -+#endif
226 - extern const struct optdesc opt_openssl_pseudo;
227 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
228 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
229 - extern const struct optdesc opt_openssl_compress;
230 - #endif
231 - #if WITH_FIPS
232 -diff --git a/xioopts.c b/xioopts.c
233 -index 6c231f4..9a56298 100644
234 ---- a/xioopts.c
235 -+++ b/xioopts.c
236 -@@ -303,7 +303,7 @@ const struct optname optionnames[] = {
237 - #if WITH_EXT2 && defined(EXT2_COMPR_FL)
238 - IF_ANY ("compr", &opt_ext2_compr)
239 - #endif
240 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
241 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
242 - IF_OPENSSL("compress", &opt_openssl_compress)
243 - #endif
244 - #ifdef TCP_CONN_ABORT_THRESHOLD /* HP_UX */
245 -@@ -419,7 +419,9 @@ const struct optname optionnames[] = {
246 - #ifdef ECHOPRT
247 - IF_TERMIOS("echoprt", &opt_echoprt)
248 - #endif
249 -+#ifndef OPENSSL_NO_EGD
250 - IF_OPENSSL("egd", &opt_openssl_egd)
251 -+#endif
252 - IF_ANY ("end-close", &opt_end_close)
253 - IF_TERMIOS("eof", &opt_veof)
254 - IF_TERMIOS("eol", &opt_veol)
255 -@@ -1062,11 +1064,13 @@ const struct optname optionnames[] = {
256 - IF_OPENSSL("openssl-certificate", &opt_openssl_certificate)
257 - IF_OPENSSL("openssl-cipherlist", &opt_openssl_cipherlist)
258 - IF_OPENSSL("openssl-commonname", &opt_openssl_commonname)
259 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
260 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
261 - IF_OPENSSL("openssl-compress", &opt_openssl_compress)
262 - #endif
263 - IF_OPENSSL("openssl-dhparam", &opt_openssl_dhparam)
264 -+#ifndef OPENSSL_NO_EGD
265 - IF_OPENSSL("openssl-egd", &opt_openssl_egd)
266 -+#endif
267 - #if WITH_FIPS
268 - IF_OPENSSL("openssl-fips", &opt_openssl_fips)
269 - #endif
270 -diff --git a/xioopts.h b/xioopts.h
271 -index 2a165f5..37d6883 100644
272 ---- a/xioopts.h
273 -+++ b/xioopts.h
274 -@@ -478,11 +478,13 @@ enum e_optcode {
275 - OPT_OPENSSL_CERTIFICATE,
276 - OPT_OPENSSL_CIPHERLIST,
277 - OPT_OPENSSL_COMMONNAME,
278 --#if OPENSSL_VERSION_NUMBER >= 0x00908000L
279 -+#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
280 - OPT_OPENSSL_COMPRESS,
281 - #endif
282 - OPT_OPENSSL_DHPARAM,
283 -+#ifndef OPENSSL_NO_EGD
284 - OPT_OPENSSL_EGD,
285 -+#endif
286 - OPT_OPENSSL_FIPS,
287 - OPT_OPENSSL_KEY,
288 - OPT_OPENSSL_METHOD,
289 ---
290 -2.7.3
291 -
292
293 diff --git a/net-misc/socat/socat-1.7.3.4.ebuild b/net-misc/socat/socat-1.7.3.4.ebuild
294 index 6a196150378..be9f48e777e 100644
295 --- a/net-misc/socat/socat-1.7.3.4.ebuild
296 +++ b/net-misc/socat/socat-1.7.3.4.ebuild
297 @@ -14,13 +14,10 @@ S="${WORKDIR}/${MY_P}"
298 LICENSE="GPL-2"
299 SLOT="0"
300 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
301 -IUSE="bindist libressl ipv6 readline ssl tcpd"
302 +IUSE="bindist ipv6 readline ssl tcpd"
303
304 DEPEND="
305 - ssl? (
306 - !libressl? ( dev-libs/openssl:0= )
307 - libressl? ( dev-libs/libressl:= )
308 - )
309 + ssl? ( dev-libs/openssl:0= )
310 readline? ( sys-libs/readline:= )
311 tcpd? ( sys-apps/tcp-wrappers )
312 "
313 @@ -49,7 +46,9 @@ pkg_setup() {
314 }
315
316 src_configure() {
317 - filter-flags '-Wno-error*' #293324
318 + # bug #293324
319 + filter-flags '-Wno-error*'
320 +
321 tc-export AR
322
323 econf \
324
325 diff --git a/net-misc/socat/socat-1.7.4.1.ebuild b/net-misc/socat/socat-1.7.4.1.ebuild
326 index d7ded0482c7..44cfb7dba85 100644
327 --- a/net-misc/socat/socat-1.7.4.1.ebuild
328 +++ b/net-misc/socat/socat-1.7.4.1.ebuild
329 @@ -14,13 +14,10 @@ S="${WORKDIR}/${MY_P}"
330 LICENSE="GPL-2"
331 SLOT="0"
332 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
333 -IUSE="bindist libressl ipv6 readline ssl tcpd"
334 +IUSE="bindist ipv6 readline ssl tcpd"
335
336 DEPEND="
337 - ssl? (
338 - !libressl? ( dev-libs/openssl:0= )
339 - libressl? ( dev-libs/libressl:= )
340 - )
341 + ssl? ( dev-libs/openssl:0= )
342 readline? ( sys-libs/readline:= )
343 tcpd? ( sys-apps/tcp-wrappers )
344 "
345 @@ -45,7 +42,8 @@ pkg_setup() {
346 }
347
348 src_configure() {
349 - filter-flags '-Wno-error*' #293324
350 + # bug #293324
351 + filter-flags '-Wno-error*'
352 tc-export AR
353
354 econf \
355
356 diff --git a/net-misc/socat/socat-2.0.0_beta9.ebuild b/net-misc/socat/socat-2.0.0_beta9.ebuild
357 index 9532a828421..441acceaeed 100644
358 --- a/net-misc/socat/socat-2.0.0_beta9.ebuild
359 +++ b/net-misc/socat/socat-2.0.0_beta9.ebuild
360 @@ -13,14 +13,10 @@ S="${WORKDIR}/${MY_P}"
361
362 LICENSE="GPL-2"
363 SLOT="0"
364 -KEYWORDS=""
365 -IUSE="libressl ipv6 readline ssl tcpd"
366 +IUSE="ipv6 readline ssl tcpd"
367
368 DEPEND="
369 - ssl? (
370 - !libressl? ( dev-libs/openssl:0= )
371 - libressl? ( dev-libs/libressl:= )
372 - )
373 + ssl? ( dev-libs/openssl:0= )
374 readline? ( sys-libs/readline:= )
375 tcpd? ( sys-apps/tcp-wrappers )
376 "
377 @@ -39,7 +35,6 @@ PATCHES=(
378 "${FILESDIR}"/${PN}-1.7.3.0-filan-build.patch
379 "${FILESDIR}"/${PN}-1.7.3.1-stddef_h.patch
380 "${FILESDIR}"/${PN}-1.7.3.4-fno-common.patch
381 - "${FILESDIR}"/${PN}-2.0.0_beta9-libressl.patch
382 )
383
384 pkg_setup() {
385 @@ -60,7 +55,8 @@ src_prepare() {
386 }
387
388 src_configure() {
389 - filter-flags -Wall '-Wno-error*' #293324
390 + # bug #293324
391 + filter-flags -Wall '-Wno-error*'
392 tc-export AR
393
394 econf \
395
396 diff --git a/net-misc/socat/socat-9999.ebuild b/net-misc/socat/socat-9999.ebuild
397 index b0f72ca9e8e..e0872e55666 100644
398 --- a/net-misc/socat/socat-9999.ebuild
399 +++ b/net-misc/socat/socat-9999.ebuild
400 @@ -11,14 +11,11 @@ EGIT_REPO_URI="https://repo.or.cz/${PN}.git"
401
402 LICENSE="GPL-2"
403 SLOT="0"
404 -IUSE="bindist libressl ipv6 readline ssl tcpd"
405 +IUSE="bindist ipv6 readline ssl tcpd"
406
407 BDEPEND="app-text/yodl"
408 DEPEND="
409 - ssl? (
410 - !libressl? ( dev-libs/openssl:0= )
411 - libressl? ( dev-libs/libressl:= )
412 - )
413 + ssl? ( dev-libs/openssl:0= )
414 readline? ( sys-libs/readline:= )
415 tcpd? ( sys-apps/tcp-wrappers )
416 "
417 @@ -48,7 +45,8 @@ src_prepare() {
418 }
419
420 src_configure() {
421 - filter-flags '-Wno-error*' #293324
422 + # bug #293324
423 + filter-flags '-Wno-error*'
424 tc-export AR
425
426 econf \