1 |
commit: f9eef3fb840f1be97deb9b50a3fcd6363aa517ac |
2 |
Author: Stefan Strogin <steils <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 3 13:35:17 2019 +0000 |
4 |
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 3 13:36:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9eef3fb |
7 |
|
8 |
app-benchmarks/httperf: add patch for LibreSSL support |
9 |
|
10 |
Closes: https://bugs.gentoo.org/684804 |
11 |
Package-Manager: Portage-2.3.67, Repoman-2.3.13 |
12 |
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org> |
13 |
|
14 |
.../files/httperf-0.9.1_p20181111-libressl.patch | 49 ++++++++++++++++++++++ |
15 |
.../httperf/httperf-0.9.1_p20181111-r1.ebuild | 42 +++++++++++++++++++ |
16 |
2 files changed, 91 insertions(+) |
17 |
|
18 |
diff --git a/app-benchmarks/httperf/files/httperf-0.9.1_p20181111-libressl.patch b/app-benchmarks/httperf/files/httperf-0.9.1_p20181111-libressl.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..e1c0c90fac0 |
21 |
--- /dev/null |
22 |
+++ b/app-benchmarks/httperf/files/httperf-0.9.1_p20181111-libressl.patch |
23 |
@@ -0,0 +1,49 @@ |
24 |
+From 1c4277eb9288c719b009aacb4bd71ca543f51cbd Mon Sep 17 00:00:00 2001 |
25 |
+From: Stefan Strogin <steils@g.o> |
26 |
+Date: Mon, 3 Jun 2019 16:18:21 +0300 |
27 |
+Subject: [PATCH] Use correct ifdefs for checking TLS 1.3 |
28 |
+ |
29 |
+TLS 1.3 is not ready yet in LibreSSL. Also there is a theoretical |
30 |
+possibility of OpenSSL >=1.1.1 built without TLS 1.3 support |
31 |
+ |
32 |
+Upstream-Status: Submitted |
33 |
+[https://github.com/httperf/httperf/pull/66] |
34 |
+Signed-off-by: Stefan Strogin <steils@g.o> |
35 |
+--- |
36 |
+ src/httperf.c | 6 +++--- |
37 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
38 |
+ |
39 |
+diff --git a/src/httperf.c b/src/httperf.c |
40 |
+index af6f568..5dbba07 100755 |
41 |
+--- a/src/httperf.c |
42 |
++++ b/src/httperf.c |
43 |
+@@ -687,7 +687,7 @@ main(int argc, char **argv) |
44 |
+ param.ssl_protocol = 5; |
45 |
+ else if (strcasecmp (optarg, "TLSv1.2") == 0 || strcasecmp (optarg, "TLSv1_2") == 0) |
46 |
+ param.ssl_protocol = 6; |
47 |
+-#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) |
48 |
++#ifdef TLS1_3_VERSION |
49 |
+ else if (strcasecmp (optarg, "TLSv1.3") == 0 || strcasecmp (optarg, "TLSv1_3") == 0) |
50 |
+ param.ssl_protocol = 7; |
51 |
+ #endif |
52 |
+@@ -1104,7 +1104,7 @@ main(int argc, char **argv) |
53 |
+ SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1); break; |
54 |
+ #endif |
55 |
+ |
56 |
+-#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) |
57 |
++#ifdef TLS1_3_VERSION |
58 |
+ /* 7/TLSv1.3 */ |
59 |
+ case 7: |
60 |
+ ssl_ctx = SSL_CTX_new (TLS_client_method ()); |
61 |
+@@ -1329,7 +1329,7 @@ main(int argc, char **argv) |
62 |
+ case 4: printf (" --ssl-protocol=TLSv1.0"); break; |
63 |
+ case 5: printf (" --ssl-protocol=TLSv1.1"); break; |
64 |
+ case 6: printf (" --ssl-protocol=TLSv1.2"); break; |
65 |
+-#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) |
66 |
++#ifdef TLS1_3_VERSION |
67 |
+ case 7: printf (" --ssl-protocol=TLSv1.3"); break; |
68 |
+ #endif |
69 |
+ } |
70 |
+-- |
71 |
+2.21.0 |
72 |
+ |
73 |
|
74 |
diff --git a/app-benchmarks/httperf/httperf-0.9.1_p20181111-r1.ebuild b/app-benchmarks/httperf/httperf-0.9.1_p20181111-r1.ebuild |
75 |
new file mode 100644 |
76 |
index 00000000000..d340a5ce823 |
77 |
--- /dev/null |
78 |
+++ b/app-benchmarks/httperf/httperf-0.9.1_p20181111-r1.ebuild |
79 |
@@ -0,0 +1,42 @@ |
80 |
+# Copyright 1999-2019 Gentoo Authors |
81 |
+# Distributed under the terms of the GNU General Public License v2 |
82 |
+ |
83 |
+EAPI=7 |
84 |
+ |
85 |
+COMMIT="00bf5dab6fd284aa559f125964f5fe6dc0f23595" |
86 |
+inherit autotools |
87 |
+ |
88 |
+DESCRIPTION="A tool from HP for measuring web server performance" |
89 |
+HOMEPAGE="https://github.com/httperf/httperf" |
90 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" |
91 |
+ |
92 |
+LICENSE="GPL-2+-with-openssl-exception" |
93 |
+SLOT="0" |
94 |
+KEYWORDS="~amd64 ~mips ~x86 ~amd64-linux ~x64-macos" |
95 |
+IUSE="debug idleconn libressl" |
96 |
+ |
97 |
+DEPEND=" |
98 |
+ idleconn? ( dev-libs/libevent:0= ) |
99 |
+ !libressl? ( dev-libs/openssl:0= ) |
100 |
+ libressl? ( dev-libs/libressl:0= ) |
101 |
+" |
102 |
+RDEPEND="${DEPEND}" |
103 |
+ |
104 |
+S="${WORKDIR}/${PN}-${COMMIT}" |
105 |
+ |
106 |
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch ) |
107 |
+ |
108 |
+src_prepare() { |
109 |
+ default |
110 |
+ eautoreconf |
111 |
+} |
112 |
+ |
113 |
+src_configure() { |
114 |
+ local myeconfargs=( |
115 |
+ --bindir="${EPREFIX}"/usr/bin |
116 |
+ $(use_enable debug) |
117 |
+ $(use_enable idleconn) |
118 |
+ ) |
119 |
+ |
120 |
+ econf "${myeconfargs[@]}" |
121 |
+} |