Skip to content

Commit

Permalink
net-mgmt/nfsen: Update to 1.3.11
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Fernando Apesteguía authored and Fernando Apesteguía committed Nov 22, 2023
1 parent a568547 commit 0223f14
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 34 deletions.
31 changes: 17 additions & 14 deletions net-mgmt/nfsen/Makefile
@@ -1,23 +1,25 @@
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

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
Expand All @@ -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"
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions 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
12 changes: 6 additions & 6 deletions 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 @@

#
Expand Down Expand Up @@ -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
Expand All @@ -55,7 +55,7 @@

#
# Where go all the frontend plugins
@@ -69,7 +69,7 @@
@@ -76,7 +76,7 @@

#
# nfdump tools path
Expand All @@ -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!
Expand Down
11 changes: 0 additions & 11 deletions net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm

This file was deleted.

17 changes: 17 additions & 0 deletions 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
}
]

0 comments on commit 0223f14

Please sign in to comment.