1 |
commit: 65092da067a661727d15db17bccd679d84baf10f |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 14 19:48:29 2019 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 14 19:50:49 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65092da0 |
7 |
|
8 |
net-analyzer/flow-tools: Revbump to fix compile and mysql dependency |
9 |
|
10 |
Non-maintainer commit. |
11 |
|
12 |
Original ebuild and patch by Robin Johnson <robbat2 <AT> gentoo.org> |
13 |
Additional change for mysql dep by me |
14 |
|
15 |
Bug: https://bugs.gentoo.org/674032 |
16 |
Bug: https://bugs.gentoo.org/665940 |
17 |
Package-Manager: Portage-2.3.60, Repoman-2.3.12 |
18 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
19 |
|
20 |
.../files/flow-tools-0.68.5.1-openssl11.patch | 47 +++++++++++++ |
21 |
.../flow-tools/flow-tools-0.68.5.1-r10.ebuild | 78 ++++++++++++++++++++++ |
22 |
2 files changed, 125 insertions(+) |
23 |
|
24 |
diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch |
25 |
new file mode 100644 |
26 |
index 00000000000..c6b17743ce9 |
27 |
--- /dev/null |
28 |
+++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch |
29 |
@@ -0,0 +1,47 @@ |
30 |
+diff -Nuar --exclude '*~' flow-tools-0.68.5.1.orig/lib/ftxlate.c flow-tools-0.68.5.1/lib/ftxlate.c |
31 |
+--- flow-tools-0.68.5.1.orig/lib/ftxlate.c 2008-01-27 12:48:49.000000000 -0800 |
32 |
++++ flow-tools-0.68.5.1/lib/ftxlate.c 2018-12-29 15:18:33.739062317 -0800 |
33 |
+@@ -34,6 +34,14 @@ |
34 |
+ #include <openssl/ssl.h> |
35 |
+ #include <openssl/evp.h> |
36 |
+ #undef free_func |
37 |
++ |
38 |
++/* fixup LibreSSL OpenSSL version numbering */ |
39 |
++#include <openssl/opensslv.h> |
40 |
++#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) |
41 |
++#undef OPENSSL_VERSION_NUMBER |
42 |
++#define OPENSSL_VERSION_NUMBER 0x1000107fL |
43 |
++#endif |
44 |
++ |
45 |
+ #endif /* HAVE_OPENSSL */ |
46 |
+ |
47 |
+ #include <sys/time.h> |
48 |
+@@ -2040,11 +2048,13 @@ |
49 |
+ |
50 |
+ |
51 |
+ /* init crypto */ |
52 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L |
53 |
+ if (!(cp->cipher_ctx = (EVP_CIPHER_CTX*) malloc(sizeof(EVP_CIPHER_CTX)))) { |
54 |
+ return -1; |
55 |
+ } |
56 |
+ |
57 |
+ EVP_CIPHER_CTX_init(cp->cipher_ctx); |
58 |
++#endif |
59 |
+ |
60 |
+ /* disable padding */ |
61 |
+ if (!(EVP_CIPHER_CTX_set_padding(cp->cipher_ctx, 0))) { |
62 |
+@@ -2083,10 +2093,14 @@ |
63 |
+ { |
64 |
+ |
65 |
+ #ifdef HAVE_OPENSSL |
66 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L |
67 |
+ EVP_CIPHER_CTX_cleanup(cp->cipher_ctx); |
68 |
+ |
69 |
+ if (cp->cipher_ctx) |
70 |
+ free (cp->cipher_ctx); |
71 |
++#else |
72 |
++ EVP_CIPHER_CTX_free(cp->cipher_ctx); |
73 |
++#endif |
74 |
+ #endif /* HAVE_OPENSSL */ |
75 |
+ |
76 |
+ return 0; |
77 |
|
78 |
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r10.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r10.ebuild |
79 |
new file mode 100644 |
80 |
index 00000000000..9d62c33981a |
81 |
--- /dev/null |
82 |
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r10.ebuild |
83 |
@@ -0,0 +1,78 @@ |
84 |
+# Copyright 1999-2019 Gentoo Authors |
85 |
+# Distributed under the terms of the GNU General Public License v2 |
86 |
+ |
87 |
+EAPI=7 |
88 |
+inherit user |
89 |
+ |
90 |
+DESCRIPTION="library and programs to process reports from NetFlow data" |
91 |
+HOMEPAGE="https://code.google.com/p/flow-tools/" |
92 |
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2" |
93 |
+ |
94 |
+LICENSE="BSD GPL-2" |
95 |
+SLOT="0" |
96 |
+KEYWORDS="~amd64 ~ppc ~x86" |
97 |
+IUSE="debug libressl mysql postgres ssl static-libs" |
98 |
+ |
99 |
+RDEPEND="sys-apps/tcp-wrappers |
100 |
+ sys-libs/zlib |
101 |
+ mysql? ( dev-db/mysql-connector-c:0= ) |
102 |
+ postgres? ( dev-db/postgresql:* ) |
103 |
+ ssl? ( |
104 |
+ !libressl? ( dev-libs/openssl:0= ) |
105 |
+ libressl? ( dev-libs/libressl:0= ) |
106 |
+ )" |
107 |
+ |
108 |
+DEPEND="${RDEPEND} |
109 |
+ sys-devel/flex |
110 |
+ sys-devel/bison" |
111 |
+ |
112 |
+DOCS=( ChangeLog README SECURITY TODO ) |
113 |
+ |
114 |
+PATCHES=( |
115 |
+ "${FILESDIR}"/${P}-run.patch |
116 |
+ "${FILESDIR}"/${P}-syslog.patch |
117 |
+ "${FILESDIR}"/${P}-openssl11.patch |
118 |
+) |
119 |
+ |
120 |
+pkg_setup() { |
121 |
+ pkg_douser |
122 |
+} |
123 |
+ |
124 |
+src_configure() { |
125 |
+ econf \ |
126 |
+ $(use_enable static-libs static) \ |
127 |
+ $(usex mysql --with-mysql '') \ |
128 |
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \ |
129 |
+ $(usex ssl --with-openssl '') \ |
130 |
+ --sysconfdir=/etc/flow-tools |
131 |
+} |
132 |
+ |
133 |
+src_install() { |
134 |
+ default |
135 |
+ |
136 |
+ find "${D}" -name '*.la' -delete || die |
137 |
+ |
138 |
+ exeinto /var/lib/flows/bin |
139 |
+ doexe "${FILESDIR}"/linkme |
140 |
+ |
141 |
+ keepdir /var/lib/flows/ft |
142 |
+ |
143 |
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture |
144 |
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture |
145 |
+ |
146 |
+ fowners flows:flows /var/lib/flows |
147 |
+ fowners flows:flows /var/lib/flows/bin |
148 |
+ fowners flows:flows /var/lib/flows/ft |
149 |
+ |
150 |
+ fperms 0755 /var/lib/flows |
151 |
+ fperms 0755 /var/lib/flows/bin |
152 |
+} |
153 |
+ |
154 |
+pkg_preinst() { |
155 |
+ pkg_douser |
156 |
+} |
157 |
+ |
158 |
+pkg_douser() { |
159 |
+ enewgroup flows |
160 |
+ enewuser flows -1 -1 /var/lib/flows flows |
161 |
+} |