From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CDA5215800F for ; Fri, 3 Feb 2023 16:53:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1211BE0794; Fri, 3 Feb 2023 16:53:04 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F00D3E0794 for ; Fri, 3 Feb 2023 16:53:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EF1B533BEC7 for ; Fri, 3 Feb 2023 16:53:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9DEEB89B for ; Fri, 3 Feb 2023 16:53:00 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1675443099.25646dfc75b15c2bcc9c80ab3aba7a6bab5eec68.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ntopng/files/, net-analyzer/ntopng/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/ntopng/Manifest net-analyzer/ntopng/files/ntopng-5.4-ndpi-linking.patch net-analyzer/ntopng/ntopng-5.4.ebuild X-VCS-Directories: net-analyzer/ntopng/ net-analyzer/ntopng/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 25646dfc75b15c2bcc9c80ab3aba7a6bab5eec68 X-VCS-Branch: master Date: Fri, 3 Feb 2023 16:53:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b1924ac3-86e3-4f74-9103-eb601934cbf7 X-Archives-Hash: 29999cbb02db63f7f5dfb503f6409834 commit: 25646dfc75b15c2bcc9c80ab3aba7a6bab5eec68 Author: Sam James gentoo org> AuthorDate: Fri Feb 3 16:49:23 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Feb 3 16:51:39 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25646dfc net-analyzer/ntopng: add 5.4 Signed-off-by: Sam James gentoo.org> net-analyzer/ntopng/Manifest | 1 + .../ntopng/files/ntopng-5.4-ndpi-linking.patch | 49 +++++++++++ net-analyzer/ntopng/ntopng-5.4.ebuild | 97 ++++++++++++++++++++++ 3 files changed, 147 insertions(+) diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest index 7a0c02596f71..7ff71e335ae9 100644 --- a/net-analyzer/ntopng/Manifest +++ b/net-analyzer/ntopng/Manifest @@ -1 +1,2 @@ DIST ntopng-5.2.1.tar.gz 60280025 BLAKE2B e7885a1ec9e5d37ee06def83a83c62f41acf87d939d18c33c8d114fe0bed0c973a6146f26fd92343aa7c7e7484970c3e95c33fe76468fe382809daddeed6541b SHA512 01cdf21deac61a3b11e7d0e6b662c911123241332e812bb676cb8c5c003fe1d50a4c61231f9c327d467e89dd1345fc1bdbab5d2599fe04b04a8fe12654c01bdd +DIST ntopng-5.4.tar.gz 42662921 BLAKE2B 67a44291671821a94ed0a849467e85030e57fff07b49e61c299f3c09efcad1a7dac5b835f4fc51a2554f7e7d7ae60ae0bd135adba7afa71e505a40d4e9243462 SHA512 3a7d84f64127779780c580c198dfc90bc0a4957e9fb68493babb5381d9127451c506a06d134a488d869840e2b10e7d87a09ec590fd3a5d782e426cab640632cb diff --git a/net-analyzer/ntopng/files/ntopng-5.4-ndpi-linking.patch b/net-analyzer/ntopng/files/ntopng-5.4-ndpi-linking.patch new file mode 100644 index 000000000000..8a50b7cb1a10 --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-5.4-ndpi-linking.patch @@ -0,0 +1,49 @@ +--- a/configure.ac.in ++++ b/configure.ac.in +@@ -231,31 +231,8 @@ NDPI_LIB= + NDPI_LIB_DEP= + + AC_MSG_CHECKING(for nDPI source) +- if test -d "./nDPI" ; then : +- NDPI_HOME=./nDPI +- elif test -d "../nDPI" ; then : +- NDPI_HOME=../nDPI +- elif test -d "$HOME/nDPI" ; then : +- NDPI_HOME=$HOME/nDPI +- fi +- +- if test ! -z "$NDPI_HOME" ; then : +- AC_MSG_RESULT(found in $NDPI_HOME) +- NDPI_LIB=$NDPI_HOME/src/lib/libndpi.a +- AC_MSG_CHECKING(for $NDPI_LIB) +- if test -r $NDPI_LIB ; then : +- AC_MSG_RESULT(found $NDPI_LIB) +- else +- AC_MSG_RESULT(not found $NDPI_LIB: compiling) +- cd $NDPI_HOME; ./autogen.sh; ${MAKE}; cd - +- fi +- NDPI_INC="-I$NDPI_HOME/src/include -I$NDPI_HOME/src/lib/third_party/include" +- NDPI_LIB=$NDPI_HOME/src/lib/libndpi.a +- NDPI_LIB_DEP=$NDPI_LIB +- else +- AC_MSG_RESULT(not found) +- fi +- ++ NDPI_LIB="-lndpi" ++ NDPI_LIB_DEP=$NDPI_LIB + + if test ! -z "$NDPI_CUST_INC" ; then : + NDPI_INC=$NDPI_CUST_INC +diff --git a/configure.ac.in b/configure.ac.in +index ed906b1..3e70bec 100644 +--- a/configure.ac.in ++++ b/configure.ac.in +@@ -242,7 +242,7 @@ if test ! -z "$NDPI_CUST_LIB" ; then : + NDPI_LIB=$NDPI_CUST_LIB + fi + +-if test -z "$NDPI_INC" || test -z "$NDPI_LIB" ; then : ++if test -z "$NDPI_LIB" ; then : + echo "Could not find nDPI" + echo "Please do cd ..; git clone https://github.com/ntop/nDPI.git; cd nDPI; ./autogen.sh; ${MAKE}; cd ../ntopng" + echo "and try again" diff --git a/net-analyzer/ntopng/ntopng-5.4.ebuild b/net-analyzer/ntopng/ntopng-5.4.ebuild new file mode 100644 index 000000000000..57a01e79f4ab --- /dev/null +++ b/net-analyzer/ntopng/ntopng-5.4.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2023 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.6:= + =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.4-ndpi-linking.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 --with-ndpi-includes="${ESYSROOT}"/usr/include/ndpi +} + +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'" +}