Gentoo Archives: gentoo-commits

From: Slawek Lis <slis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ntopng/files/, net-analyzer/ntopng/
Date: Tue, 27 Aug 2019 03:42:41
Message-Id: 1566877340.e4e99e0656d0339ffff8959b89cccdd9d1ec8211.slis@gentoo
1 commit: e4e99e0656d0339ffff8959b89cccdd9d1ec8211
2 Author: Slawomir Lis <slis <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 27 03:42:07 2019 +0000
4 Commit: Slawek Lis <slis <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 27 03:42:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4e99e06
7
8 net-analyzer/ntopng: version bump to 3.8
9
10 Package-Manager: Portage-2.3.72, Repoman-2.3.17
11 Signed-off-by: Slawek Lis <slis <AT> gentoo.org>
12
13 net-analyzer/ntopng/Manifest | 1 +
14 .../ntopng/files/ntopng-3.8-missing-min.patch | 19 ++++++
15 .../ntopng/files/ntopng-3.8-mysqltool.patch | 17 +++++
16 .../ntopng/files/ntopng-3.8-ndpi-call.patch | 12 ++++
17 .../ntopng/files/ntopng-3.8-ndpi-includes.patch | 14 ++++
18 net-analyzer/ntopng/ntopng-3.8.ebuild | 76 ++++++++++++++++++++++
19 6 files changed, 139 insertions(+)
20
21 diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest
22 index 944ce61a695..8d3e6828dfd 100644
23 --- a/net-analyzer/ntopng/Manifest
24 +++ b/net-analyzer/ntopng/Manifest
25 @@ -1,2 +1,3 @@
26 DIST ntopng-2.4.tar.gz 134074662 BLAKE2B dbf654e5cd1f9eddb5ae325bdf0ac2e7ce22c08f55363b10723bde2cb5fd86cf3b0c7fef0f55dc7fcce0341f5fbb9a7132f26e29649bcf66020b640975c0e6da SHA512 515dd7889ae3aaf2482371bb2c55ab7300cf4207fe07f37029b7529bfb710379c19a54f58cf6df87e42454c0c99d15291af334adff676252301d9edd0acf3c7a
27 DIST ntopng-3.0.tar.gz 23017655 BLAKE2B f791690118a5ecfb1be5ad791229f2438354a0c2271350aa1a2f0fee05886c54d181a669e6e1b27657c5bfe4b68db24b06d91adfb89e803a154a7a4bbff146b7 SHA512 d5e310d5dba7fe696d38d9d8251ffa4077182200e41c3f0b6034e68cf6623220ec47ba9d9fd5d2392a7b65a6de770e330821169c7ec06b4952f68c3f5f738eb1
28 +DIST ntopng-3.8.tar.gz 33910329 BLAKE2B a5aaed2244516b92e4b8c7364817ea66eb2f446fe814a96622cbbf5d851d79e8049b75da009d0f80f07c1fae90f8dc294794b76ed14450d8e0e6685a1b1ce8f2 SHA512 2236f9931fc606e4d0a6da379c480a48bacd441cf199a310ea690a03d74d08f369825ea02e3c13828a10f716a5531d4e6774876f253ab348a52bcf8bd8d5107f
29
30 diff --git a/net-analyzer/ntopng/files/ntopng-3.8-missing-min.patch b/net-analyzer/ntopng/files/ntopng-3.8-missing-min.patch
31 new file mode 100644
32 index 00000000000..303826a918d
33 --- /dev/null
34 +++ b/net-analyzer/ntopng/files/ntopng-3.8-missing-min.patch
35 @@ -0,0 +1,19 @@
36 +--- a/third-party/zeromq-4.1.3/src/tcp_connecter.cpp
37 ++++ b/third-party/zeromq-4.1.3/src/tcp_connecter.cpp
38 +@@ -31,6 +31,7 @@
39 +
40 + #include <new>
41 + #include <string>
42 ++#include <algorithm>
43 +
44 + #include "tcp_connecter.hpp"
45 + #include "stream_engine.hpp"
46 +@@ -207,7 +208,7 @@
47 + options.reconnect_ivl_max > options.reconnect_ivl)
48 + // Calculate the next interval
49 + current_reconnect_ivl =
50 +- min (current_reconnect_ivl * 2, options.reconnect_ivl_max);
51 ++ std::min(current_reconnect_ivl * 2, options.reconnect_ivl_max);
52 + return interval;
53 + }
54 +
55
56 diff --git a/net-analyzer/ntopng/files/ntopng-3.8-mysqltool.patch b/net-analyzer/ntopng/files/ntopng-3.8-mysqltool.patch
57 new file mode 100644
58 index 00000000000..62c328a3505
59 --- /dev/null
60 +++ b/net-analyzer/ntopng/files/ntopng-3.8-mysqltool.patch
61 @@ -0,0 +1,17 @@
62 +--- a/configure.seed
63 ++++ b/configure.seed
64 +@@ -355,13 +355,7 @@
65 + if test "x$ac_cv_prog_ac_ct_MARIADB" = "xmariadb_config"; then
66 + MYSQLTOOL="mariadb_config"
67 + else
68 +- PATH=$PATH:/usr/local/mysql/bin
69 +- AC_CHECK_TOOL(MYSQL, mysql_config)
70 +- if test "x$ac_cv_prog_ac_ct_MYSQL" = "xmysql_config"; then
71 +- MYSQLTOOL="mysql_config"
72 +- else
73 +- MYSQLTOOL=""
74 +- fi
75 ++ MYSQLTOOL="mysql_config"
76 + fi
77 +
78 + if test -n "$MYSQLTOOL"; then
79
80 diff --git a/net-analyzer/ntopng/files/ntopng-3.8-ndpi-call.patch b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-call.patch
81 new file mode 100644
82 index 00000000000..1308a5c2c03
83 --- /dev/null
84 +++ b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-call.patch
85 @@ -0,0 +1,12 @@
86 +--- a/src/NetworkInterface.cpp
87 ++++ b/src/NetworkInterface.cpp
88 +@@ -1604,7 +1604,8 @@
89 + ndpi_protocol icmp_proto = flow->get_detected_protocol();
90 +
91 + if(icmp_proto.category == NDPI_PROTOCOL_CATEGORY_UNSPECIFIED) {
92 +- ndpi_fill_ip_protocol_category(ndpi_struct, (struct ndpi_iphdr *)ip, &icmp_proto);
93 ++ ndpi_fill_ip_protocol_category(ndpi_struct, ((struct ndpi_iphdr *)ip)->saddr,
94 ++ ((struct ndpi_iphdr*)ip)->daddr, &icmp_proto);
95 + flow->setDetectedProtocol(icmp_proto, false);
96 + }
97 + }
98
99 diff --git a/net-analyzer/ntopng/files/ntopng-3.8-ndpi-includes.patch b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-includes.patch
100 new file mode 100644
101 index 00000000000..068f1e9fa9b
102 --- /dev/null
103 +++ b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-includes.patch
104 @@ -0,0 +1,14 @@
105 +--- a/configure.seed 2018-10-08 21:33:09.403001834 -0600
106 ++++ b/configure.seed 2018-10-08 21:35:47.404002203 -0600
107 +@@ -129,9 +129,9 @@
108 + fi
109 +
110 + PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
111 +- NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`/libndpi
112 ++ NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
113 + # Use static libndpi library as building against the dynamic library fails
114 +- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
115 ++ NDPI_LIB="$NDPI_LIBS"
116 + NDPI_LIB_DEP=
117 + ], [
118 + AC_MSG_CHECKING(for nDPI source)
119
120 diff --git a/net-analyzer/ntopng/ntopng-3.8.ebuild b/net-analyzer/ntopng/ntopng-3.8.ebuild
121 new file mode 100644
122 index 00000000000..8a3edd12418
123 --- /dev/null
124 +++ b/net-analyzer/ntopng/ntopng-3.8.ebuild
125 @@ -0,0 +1,76 @@
126 +# Copyright 1999-2019 Gentoo Authors
127 +# Distributed under the terms of the GNU General Public License v2
128 +
129 +EAPI=6
130 +inherit autotools user toolchain-funcs
131 +
132 +DESCRIPTION="Network traffic analyzer with web interface"
133 +HOMEPAGE="https://www.ntop.org/"
134 +SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
135 +
136 +LICENSE="GPL-3"
137 +SLOT="0"
138 +KEYWORDS="~amd64 ~x86"
139 +
140 +DEPEND="dev-db/sqlite:3
141 + dev-python/pyzmq
142 + dev-lang/luajit:2
143 + dev-libs/json-c:=
144 + dev-libs/geoip
145 + dev-libs/glib:2
146 + dev-libs/hiredis
147 + dev-libs/libsodium:=
148 + dev-libs/libxml2
149 + dev-libs/libmaxminddb
150 + net-analyzer/rrdtool
151 + net-libs/libpcap
152 + >=net-libs/nDPI-2.4
153 + net-misc/curl
154 + sys-libs/binutils-libs
155 + virtual/libmysqlclient"
156 +RDEPEND="${DEPEND}
157 + dev-db/redis"
158 +PATCHES=(
159 + "${FILESDIR}"/${P}-mysqltool.patch
160 + "${FILESDIR}"/${P}-ndpi-includes.patch
161 + "${FILESDIR}"/${P}-missing-min.patch
162 + "${FILESDIR}"/${P}-ndpi-call.patch
163 +)
164 +
165 +src_prepare() {
166 + default
167 + sed -e "s/@VERSION@/${PV}/g" -e "s/@SHORT_VERSION@/${PV}/g" < "${S}/configure.seed" > "${S}/configure.ac" > configure.ac
168 + eapply_user
169 + eautoreconf
170 +}
171 +
172 +src_install() {
173 + SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
174 + dodir ${SHARE_NTOPNG_DIR}
175 + insinto ${SHARE_NTOPNG_DIR}
176 + doins -r httpdocs
177 + doins -r scripts
178 +
179 + dodir ${SHARE_NTOPNG_DIR}/third-party
180 + insinto ${SHARE_NTOPNG_DIR}/third-party
181 + doins -r third-party/i18n.lua-master
182 + doins -r third-party/lua-resty-template-master
183 +
184 + exeinto /usr/bin
185 + doexe ${PN}
186 + doman ${PN}.8
187 +
188 + newinitd "${FILESDIR}/ntopng.init.d" ntopng
189 + newconfd "${FILESDIR}/ntopng.conf.d" ntopng
190 +
191 + dodir "/var/lib/ntopng"
192 + fowners ntopng "${EPREFIX}/var/lib/ntopng"
193 +}
194 +
195 +pkg_setup() {
196 + enewuser ntopng
197 +}
198 +
199 +pkg_postinst() {
200 + elog "ntopng default credentials are user='admin' password='admin'"
201 +}