From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ntopng/files/, net-analyzer/ntopng/
Date: Tue, 8 Feb 2022 06:31:53 +0000 (UTC) [thread overview]
Message-ID: <1644301905.f885f314661f613af15d46b79217b602fed28472.sam@gentoo> (raw)
commit: f885f314661f613af15d46b79217b602fed28472
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 8 06:31:37 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 8 06:31:45 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f885f314
net-analyzer/ntopng: add 5.2.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-analyzer/ntopng/Manifest | 1 +
.../ntopng/files/ntopng-5.2.1-build-system.patch | 89 ++++++++++++++++++++
.../ntopng/files/ntopng-5.2.1-mysqltool.patch | 17 ++++
.../ntopng/files/ntopng-5.2.1-ndpi-linking.patch | 13 +++
net-analyzer/ntopng/ntopng-5.2.1.ebuild | 97 ++++++++++++++++++++++
5 files changed, 217 insertions(+)
diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest
index 9a94093e2365..c97edb42bb7e 100644
--- a/net-analyzer/ntopng/Manifest
+++ b/net-analyzer/ntopng/Manifest
@@ -1,2 +1,3 @@
DIST ntopng-4.2.tar.gz 57554819 BLAKE2B a9eaf7ea670dbd9c830696a4b017330e25a82307852a0a85d95ddbb4e32a3123d43eda1b686c359da1fef77e601cd3791dcdf257141e2e1d3ed7974b92edaac8 SHA512 e89ec3f35644ae8bc570d9802ecfadbf0067145e23a589df2032e8781e9c954f4166d3abb650ddafc65e4fbad656730ee1abf9c5273d3e09f8173d423436b8ff
DIST ntopng-5.0.tar.gz 57935381 BLAKE2B 420bda10ecc264d6baea0714367e8c475e72480ab1a114251c6712535ad1415288154623aa3ef780a5bab55bec684ddd7c0582997654f8fbb96ec08e17cb099f SHA512 e157430d9c98871d0136d2f51af6c7fed3a95fa21f8d3a9447ee69ac2aaee3752b6eddfd584715e3ee36234fd0fdcf865b761b0ec1a08727f6d988bc115d21e6
+DIST ntopng-5.2.1.tar.gz 60280025 BLAKE2B e7885a1ec9e5d37ee06def83a83c62f41acf87d939d18c33c8d114fe0bed0c973a6146f26fd92343aa7c7e7484970c3e95c33fe76468fe382809daddeed6541b SHA512 01cdf21deac61a3b11e7d0e6b662c911123241332e812bb676cb8c5c003fe1d50a4c61231f9c327d467e89dd1345fc1bdbab5d2599fe04b04a8fe12654c01bdd
diff --git a/net-analyzer/ntopng/files/ntopng-5.2.1-build-system.patch b/net-analyzer/ntopng/files/ntopng-5.2.1-build-system.patch
new file mode 100644
index 000000000000..ff05d103f22a
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-5.2.1-build-system.patch
@@ -0,0 +1,89 @@
+https://github.com/ntop/ntopng/pull/6288
+
+From 93b62eb0b48f9914fed5511dc2a4289a83a1ed34 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 8 Feb 2022 06:07:21 +0000
+Subject: [PATCH 1/3] build: fail configure if ZMQ can't be found
+
+We already "fail" (makefile won't be generated) when ZMQ can't be found but
+the exit code doesn't represent this until now.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.ac.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac.in b/configure.ac.in
+index b032d7faa34..0b30e9480c7 100644
+--- a/configure.ac.in
++++ b/configure.ac.in
+@@ -132,7 +132,7 @@ if test "x$ac_cv_lib_zmq_zmq_socket_monitor" = xyes; then :
+ AC_DEFINE_UNQUOTED(HAVE_ZMQ, 1, [ZMQ is present])
+ else
+ echo "ZMQ not present or too old (< v. 3.x)"
+- exit
++ exit 1
+ fi
+
+ AC_CHECK_LIB([sodium], [sodium_init], LIBS="${LIBS} -lsodium")
+
+From 75206e5a3fdc289a2229770595fbf588de79402b Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 8 Feb 2022 06:08:02 +0000
+Subject: [PATCH 2/3] build: avoid bashism in configure
+
+[[ ]] and == are both Bashisms and /bin/sh may be a POSIX compliant
+shell (Debian notably uses dash for /bin/sh which wouldn't be
+happy with this).
+
+This will continue to work on Bash.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.ac.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac.in b/configure.ac.in
+index 0b30e9480c7..3dc6ef4a539 100644
+--- a/configure.ac.in
++++ b/configure.ac.in
+@@ -187,7 +187,7 @@ fi
+
+ if [ test -f /usr/bin/lsb_release ]; then
+ CODENAME=`/usr/bin/lsb_release -c|cut -f 2`
+- if [[ $CODENAME == "wheezy" ]]; then :
++ if test $CODENAME = "wheezy" ; then
+ CPPFLAGS="${CPPFLAGS} -DOLD_NETFILTER_INTERFACE=1"
+ fi
+ fi
+
+From 6e355cb98078dbfc379ba178ec99b7e351afdfe9 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 8 Feb 2022 06:09:44 +0000
+Subject: [PATCH 3/3] build: use $(MAKE)
+
+This allows parallel builds to work properly as we'll be calling 'make ...'
+with any additional arguments it internally passes down rather than literally
+just make.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.ac.in | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/configure.ac.in b/configure.ac.in
+index 3dc6ef4a539..3ff06c4efd4 100644
+--- a/configure.ac.in
++++ b/configure.ac.in
+@@ -720,10 +720,7 @@ fi
+
+ AC_DEFINE_UNQUOTED(_CRT_SECURE_NO_WARNINGS, 1, [Disable warning on windows])
+
+-GMAKE=`which gmake`
+-if test x$GMAKE = x; then
+- GMAKE="make"
+-fi
++GMAKE='$(MAKE)'
+
+ GIT=`which git`
+ if test x$GIT = x; then
diff --git a/net-analyzer/ntopng/files/ntopng-5.2.1-mysqltool.patch b/net-analyzer/ntopng/files/ntopng-5.2.1-mysqltool.patch
new file mode 100644
index 000000000000..48551589f022
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-5.2.1-mysqltool.patch
@@ -0,0 +1,17 @@
+--- a/configure.ac.in
++++ b/configure.ac.in
+@@ -596,13 +596,7 @@ if test "${with_nedge+set}" != set; then
+ if test "x$ac_cv_prog_ac_ct_MARIADB" = "xmariadb_config"; then
+ MYSQLTOOL="mariadb_config"
+ else
+- PATH=$PATH:/usr/local/mysql/bin
+- AC_CHECK_TOOL(MYSQL, mysql_config)
+- if test "x$ac_cv_prog_ac_ct_MYSQL" = "xmysql_config"; then
+- MYSQLTOOL="mysql_config"
+- else
+- MYSQLTOOL=""
+- fi
++ MYSQLTOOL="mysql_config"
+ fi
+
+ if test -n "$MYSQLTOOL"; then
diff --git a/net-analyzer/ntopng/files/ntopng-5.2.1-ndpi-linking.patch b/net-analyzer/ntopng/files/ntopng-5.2.1-ndpi-linking.patch
new file mode 100644
index 000000000000..4940cb44b733
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-5.2.1-ndpi-linking.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac.in
++++ b/configure.ac.in
+@@ -236,8 +236,8 @@ fi
+ PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
+ NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
+ # Use static libndpi library as building against the dynamic library fails
+- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
+- #NDPI_LIB="$NDPI_LIBS"
++ #NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
++ NDPI_LIB="$NDPI_LIBS"
+ NDPI_LIB_DEP=
+ ], [
+ AC_MSG_CHECKING(for nDPI source)
diff --git a/net-analyzer/ntopng/ntopng-5.2.1.ebuild b/net-analyzer/ntopng/ntopng-5.2.1.ebuild
new file mode 100644
index 000000000000..b1e0ebb11864
--- /dev/null
+++ b/net-analyzer/ntopng/ntopng-5.2.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="https://www.ntop.org/"
+SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-db/mysql-connector-c:=
+ dev-db/sqlite:3
+ dev-libs/hiredis:=
+ dev-libs/json-c:=
+ dev-libs/libmaxminddb
+ dev-libs/libsodium:=
+ dev-libs/openssl:=
+ net-analyzer/rrdtool
+ net-libs/libpcap
+ >=net-libs/nDPI-4.2:=
+ >=net-libs/zeromq-3:=
+ net-misc/curl
+ sys-libs/libcap
+ sys-libs/zlib"
+RDEPEND="${DEPEND}
+ acct-user/ntopng
+ acct-group/ntopng
+ dev-db/redis"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.2.1-mysqltool.patch
+ "${FILESDIR}"/${PN}-5.2.1-ndpi-linking.patch
+ "${FILESDIR}"/${PN}-5.2.1-build-system.patch
+)
+
+src_prepare() {
+ default
+
+ # Follows upstream's autogen.sh
+ sed \
+ -e "s/@VERSION@/${PV}.$(date +%y%m%d)/g" \
+ -e "s/@SHORT_VERSION@/${PV}/g" \
+ -e "s/@GIT_DATE@/$(date)/g" \
+ -e "s/@GIT_RELEASE@/${PV}.$(date +%y%m%d)/g" \
+ -e "s/@GIT_BRANCH@//g" < "${S}/configure.ac.in" \
+ > "${S}/configure.ac" || die
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export PKG_CONFIG
+
+ # configure.ac.in at least has some bashisms(?) which get lost(?)
+ # in conversion to configure.ac (like [ -> nothing?) so just force
+ # bash for now. It's still not quite right but at least upstream will be
+ # testing with it. TODO: fix this!
+ CONFIG_SHELL="${BROOT}/bin/bash" econf
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ MYCFLAGS="${CFLAGS}" \
+ MYLDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
+ insinto "${SHARE_NTOPNG_DIR}"
+ doins -r httpdocs
+ doins -r scripts
+
+ insinto "${SHARE_NTOPNG_DIR}/third-party"
+ doins -r third-party/i18n.lua-master
+ doins -r third-party/lua-resty-template-master
+
+ exeinto /usr/bin
+ doexe "${PN}"
+ doman "${PN}.8"
+
+ newinitd "${FILESDIR}"/ntopng.init.d ntopng
+ newconfd "${FILESDIR}"/ntopng.conf.d ntopng
+
+ keepdir /var/lib/ntopng
+ fowners ntopng /var/lib/ntopng
+}
+
+pkg_postinst() {
+ elog "ntopng default credentials are user='admin' password='admin'"
+}
next reply other threads:[~2022-02-08 6:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 6:31 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-02-03 16:53 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ntopng/files/, net-analyzer/ntopng/ Sam James
2022-08-18 0:30 Sam James
2021-04-07 15:32 John Helmert III
2020-12-27 0:25 Marek Szuba
2020-05-16 11:49 Jeroen Roovers
2020-01-19 13:39 Jeroen Roovers
2019-12-28 12:08 Jeroen Roovers
2019-12-28 10:14 Jeroen Roovers
2019-08-27 3:42 Slawek Lis
2017-06-19 11:59 Slawek Lis
2016-11-20 18:54 Slawek Lis
2016-11-19 18:25 Slawek Lis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1644301905.f885f314661f613af15d46b79217b602fed28472.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox