Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Nov 2023 08:46:28 GMT
From:      Fernando =?utf-8?Q?Apestegu=C3=ADa?= <fernape@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 0223f14e38ca - main - net-mgmt/nfsen: Update to 1.3.11
Message-ID:  <202311220846.3AM8kSKB067714@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0223f14e38ca8a9477cdc1e0a9b6af29dd642f52

commit 0223f14e38ca8a9477cdc1e0a9b6af29dd642f52
Author:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
AuthorDate: 2023-11-20 08:10:43 +0000
Commit:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
CommitDate: 2023-11-22 08:46:17 +0000

    net-mgmt/nfsen: Update to 1.3.11
    
    While here, don't generate backup files after replacing.
    Otherwise poudriere complains about wrong shebangs in the .bak files.
    
    PR:             274776
    Reported by:    chadf@triularity.org
---
 net-mgmt/nfsen/Makefile                        | 31 ++++++++++++++------------
 net-mgmt/nfsen/distinfo                        |  6 ++---
 net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf | 12 +++++-----
 net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm | 11 ---------
 net-mgmt/nfsen/files/pkg-message.in            | 17 ++++++++++++++
 5 files changed, 43 insertions(+), 34 deletions(-)

diff --git a/net-mgmt/nfsen/Makefile b/net-mgmt/nfsen/Makefile
index de60562711e9..2d39f0881a7d 100644
--- a/net-mgmt/nfsen/Makefile
+++ b/net-mgmt/nfsen/Makefile
@@ -1,13 +1,11 @@
 PORTNAME=	nfsen
-PORTVERSION=	1.3.8
-PORTREVISION=	1
+PORTVERSION=	1.3.11
+DISTVERSIONPREFIX=v.
 CATEGORIES=	net-mgmt
-MASTER_SITES=	SF/${PORTNAME}/stable/${PORTNAME}-${PORTVERSION} \
-		http://nfsen.sourceforge.net/
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Web based frontend to nfdump netflow collector
-WWW=		https://nfsen.sourceforge.net/
+WWW=		https://github.com/phaag/nfsen
 
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/BSD-license.txt
@@ -15,9 +13,13 @@ LICENSE_FILE=	${WRKSRC}/BSD-license.txt
 RUN_DEPENDS=	rrdtool>=0:databases/rrdtool \
 		p5-Mail-Tools>=0:mail/p5-Mail-Tools \
 		p5-Socket6>=0:net/p5-Socket6 \
-		nfdump>=0:net-mgmt/nfdump
+		nfdump>=1.7:net-mgmt/nfdump
 
 USES=		cpe iconv shebangfix perl5 php
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	phaag
+
 CPE_VENDOR=	nfsen
 CPE_PRODUCT=	nfsen
 USE_PHP=	session sockets
@@ -28,10 +30,7 @@ PLIST_SUB+=	PORTNAME=${PORTNAME}
 PLIST_SUB+=	NFSENOWN=${NFSENOWN}
 USE_RC_SUBR=	nfsen
 perl_OLD_CMD=	%%PERL%%
-SHEBANG_FILES=	bin/testPlugin bin/RebuildHierarchy.pl bin/nfsen bin/nfsend libexec/NfSenRRD.pm \
-		libexec/NfAlert.pm libexec/NfProfile.pm libexec/Notification.pm libexec/NfSen.pm \
-		libexec/NfConf.pm libexec/Lookup.pm libexec/AbuseWhois.pm libexec/NfSenRC.pm \
-		libexec/Nfsources.pm
+SHEBANG_FILES=	bin/testPlugin bin/RebuildHierarchy.pl bin/nfsen bin/nfsend
 REINPLACE_ARGS=	-i ''
 REINPLACE_LIST=	bin/testPlugin bin/RebuildHierarchy.pl bin/nfsen bin/nfsend etc/nfsen-dist.conf libexec/NfConf.pm
 SUB_LIST+=	"CONFDIR=${PREFIX}/etc"
@@ -42,16 +41,20 @@ SUB_LIST+=	"WWWDIR=${WWWDIR}"
 SUB_LIST+=	"PORTNAME=${PORTNAME}"
 SUB_LIST+=	"NFSENOWN=${NFSENOWN}"
 
+SUB_FILES=	pkg-message
+
+PKGMESSAGE=	${WRKDIR}/pkg-message
+
 post-patch:
 .for nfsenfile in ${REINPLACE_LIST}
-	@${REINPLACE_CMD} ${_SUB_LIST_TEMP} ${WRKSRC}/${nfsenfile}
+	@${REINPLACE_CMD} -i '' ${_SUB_LIST_TEMP} ${WRKSRC}/${nfsenfile}
 .endfor
 .for perlfile in ${SHEBANG_FILES}
-	@${REINPLACE_CMD} "s|perl -w$$|perl|" ${WRKSRC}/${perlfile}
+	@${REINPLACE_CMD} -i '' "s|perl -w$$|perl|" ${WRKSRC}/${perlfile}
 .endfor
 	${CP} ${FILESDIR}/conf.php ${WRKSRC}
-	@${REINPLACE_CMD} ${_SUB_LIST_TEMP} ${WRKSRC}/conf.php
-	@${REINPLACE_CMD} "s|/usr/bin/perl|${perl_CMD}|" ${WRKSRC}/libexec/Nfcomm.pm
+	@${REINPLACE_CMD} -i '' ${_SUB_LIST_TEMP} ${WRKSRC}/conf.php
+	@${REINPLACE_CMD} -i '' "s|/usr/bin/perl|${perl_CMD}|" ${WRKSRC}/libexec/Nfcomm.pm
 
 FIND_EXPR=	! -name \._* -prune
 
diff --git a/net-mgmt/nfsen/distinfo b/net-mgmt/nfsen/distinfo
index 404259d27f01..8c32637ba7c4 100644
--- a/net-mgmt/nfsen/distinfo
+++ b/net-mgmt/nfsen/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1485556082
-SHA256 (nfsen-1.3.8.tar.gz) = a7612e430357e683af81dbc07335b770b4ada115a6a88591e086ff5b6ed593a9
-SIZE (nfsen-1.3.8.tar.gz) = 221769
+TIMESTAMP = 1697496763
+SHA256 (phaag-nfsen-v.1.3.11_GH0.tar.gz) = a842531f4023913870d0fccf2d375bc335d7ecac9b2eeb7c2aff689a5c1ae962
+SIZE (phaag-nfsen-v.1.3.11_GH0.tar.gz) = 217135
diff --git a/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf b/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf
index 6163b7da97bd..4749bca1e984 100644
--- a/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf
+++ b/net-mgmt/nfsen/files/patch-etc_nfsen-dist.conf
@@ -1,5 +1,5 @@
---- etc/nfsen-dist.conf.ori	2008-05-29 13:33:01.000000000 -0700
-+++ etc/nfsen-dist.conf	2008-05-29 13:56:53.000000000 -0700
+--- etc/nfsen-dist.conf.orig	2023-10-06 08:13:20.000000000 -0700
++++ etc/nfsen-dist.conf	2023-10-16 15:55:15.937534000 -0700
 @@ -18,7 +18,7 @@
  
  #
@@ -34,9 +34,9 @@
 -$VARDIR="${BASEDIR}/var";
 +$VARDIR="${BASEDIR}/var/%%PORTNAME%%";
  
- #
  # directory for all pid files
-@@ -53,15 +53,15 @@
+ # $PIDDIR="$VARDIR/run";
+@@ -60,15 +60,15 @@
  #
  # The Profiles stat directory, where all profile information
  # RRD DBs and png pictures of the profile are stored
@@ -55,7 +55,7 @@
  
  #
  # Where go all the frontend plugins
-@@ -69,7 +69,7 @@
+@@ -76,7 +76,7 @@
  
  #
  # nfdump tools path
@@ -64,7 +64,7 @@
  
  #
  # nfsend communication socket
-@@ -81,7 +81,7 @@
+@@ -88,7 +88,7 @@
  # This may be a different or the same uid than your web server.
  # Note: This user must be in group $WWWGROUP, otherwise nfcapd
  #       is not able to write data files!
diff --git a/net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm b/net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm
deleted file mode 100644
index b3f9ae85dd89..000000000000
--- a/net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm
+++ /dev/null
@@ -1,11 +0,0 @@
---- libexec/NfSenRRD.pm.orig	2017-01-27 22:36:32 UTC
-+++ libexec/NfSenRRD.pm
-@@ -73,7 +73,7 @@ sub GetRRDoffset {
- 	if ( $rrd_version < 1.1 ) { # it's RRD 1.0.x
- 		$RRDoffset = 77;
- 	}
--	if ( $rrd_version >= 1.2 && $rrd_version < 1.6 ) {
-+	if ( $rrd_version >= 1.2 ) {
- 		$RRDoffset = 67;
- 	}
- 
diff --git a/net-mgmt/nfsen/files/pkg-message.in b/net-mgmt/nfsen/files/pkg-message.in
new file mode 100644
index 000000000000..babfceb0cabf
--- /dev/null
+++ b/net-mgmt/nfsen/files/pkg-message.in
@@ -0,0 +1,17 @@
+[
+{ type: install
+  message: <<EOM
+**** From nfdump/README.md ****
+
+Compatibility
+
+nfdump-1.7.x is compatible to nfdump-1.6.18, which means it can read files created with nfdump-1.6.18 or newer. Flow files created with earlier nfdump versions may not contain all flow elements. If you have older files, it is recommended to use nfdump-1.6.17 to update the records.
+
+Nfdump 1.7.x provides the same set of programs as 1.6.x and can be used almost as a drop-in replacement. This may change in future and older legacy programs may be removed. You can convert any old files from nfdump-1.6 to nfdump-1.7 format by reading/writing files: ./nfdump -r old-flowfile -y -w new-flowfile
+
+Please note, that only nfdump may read older flow files. All other programs relay on the new file format.
+
+Note for NfSen users: If you use NfSen, you must upgrade NfSen to the latest Github version https://github.com/phaag/nfsen. All specific binaries such as nfprofile and nftrack are still available with nfdump-1.7 but may be removed in future.
+EOM
+}
+]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311220846.3AM8kSKB067714>