diff options
author | mharo <mharo@FreeBSD.org> | 2001-04-04 06:07:20 +0800 |
---|---|---|
committer | mharo <mharo@FreeBSD.org> | 2001-04-04 06:07:20 +0800 |
commit | 72ebd45c11c66da2d61045d6130f8c0999b2ba57 (patch) | |
tree | f0bae11ba3dda3363352408bef8b6a63fc08ffef /net-mgmt/nagios2 | |
parent | fdc939f67dccdbf2641b9930310b516af05fe21c (diff) | |
download | freebsd-ports-gnome-72ebd45c11c66da2d61045d6130f8c0999b2ba57.tar.gz freebsd-ports-gnome-72ebd45c11c66da2d61045d6130f8c0999b2ba57.tar.zst freebsd-ports-gnome-72ebd45c11c66da2d61045d6130f8c0999b2ba57.zip |
- update to netsaint 0.0.7b3
- install configuration files with .dist suffix so that users configuration
files are not deleted on package removal
- create ${PREFIX}/var/netsaint/rw directory needed for correct operation
of CGI script
- fix netsaint.log file permission problem
- depend on netsaint-plugins port
PR: 26328
Submitted by: maintainer
Diffstat (limited to 'net-mgmt/nagios2')
-rw-r--r-- | net-mgmt/nagios2/Makefile | 19 | ||||
-rw-r--r-- | net-mgmt/nagios2/distinfo | 2 | ||||
-rw-r--r-- | net-mgmt/nagios2/files/patch-aa | 20 | ||||
-rw-r--r-- | net-mgmt/nagios2/files/patch-ad | 18 | ||||
-rw-r--r-- | net-mgmt/nagios2/files/patch-ai | 24 | ||||
-rw-r--r-- | net-mgmt/nagios2/pkg-plist | 24 | ||||
-rw-r--r-- | net-mgmt/nagios2/scripts/createuser | 2 |
7 files changed, 58 insertions, 51 deletions
diff --git a/net-mgmt/nagios2/Makefile b/net-mgmt/nagios2/Makefile index 7e331c57fe19..dc57265d8145 100644 --- a/net-mgmt/nagios2/Makefile +++ b/net-mgmt/nagios2/Makefile @@ -6,7 +6,7 @@ # PORTNAME= netsaint -PORTVERSION= 0.0.7b2 +PORTVERSION= 0.0.7b3 CATEGORIES= net MASTER_SITES= http://netsaint.sourceforge.net/download/ @@ -14,18 +14,23 @@ MAINTAINER= blaz@amis.net LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \ gnugetopt.1:${PORTSDIR}/devel/libgnugetopt -# no run depends due to circular reference -#RUN_DEPENDS= ${LOCALBASE}/libexec/netsaint/check_netsaint:${PORTSDIR}/net/netsaint-plugins +RUN_DEPENDS= ${LOCALBASE}/libexec/netsaint/check_netsaint:${PORTSDIR}/net/netsaint-plugins GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt" -CONFIGURE_ARGS= --with-command-user=root \ - --with-command-grp=wheel \ +CONFIGURE_ARGS= --with-command-user=nobody \ + --with-command-grp=nogroup \ --with-netsaint-user=netsaint \ - --with-netsaint-grp=netsaint -INSTALL_TARGET= all install config install-config install-daemoninit + --with-netsaint-grp=netsaint \ + --sbindir=${PREFIX}/share/netsaint/sbin \ + --libexecdir=${PREFIX}/libexec/netsaint \ + --datadir=${PREFIX}/share/netsaint \ + --sysconfdir=${PREFIX}/etc/netsaint \ + --localstatedir=${PREFIX}/var/netsaint + +INSTALL_TARGET= all install config install-config install-daemoninit install-commandmode pre-fetch: @${SH} ${SCRIPTDIR}/checkps diff --git a/net-mgmt/nagios2/distinfo b/net-mgmt/nagios2/distinfo index 282020d3dab4..ebfae039965a 100644 --- a/net-mgmt/nagios2/distinfo +++ b/net-mgmt/nagios2/distinfo @@ -1 +1 @@ -MD5 (netsaint-0.0.7b2.tar.gz) = 37a6ebe592888a4c7e25d7dbd5689007 +MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f diff --git a/net-mgmt/nagios2/files/patch-aa b/net-mgmt/nagios2/files/patch-aa index 0b7c36206eff..e106d0e255b3 100644 --- a/net-mgmt/nagios2/files/patch-aa +++ b/net-mgmt/nagios2/files/patch-aa @@ -1,5 +1,5 @@ ---- Makefile.in.orig Thu Mar 1 04:49:19 2001 -+++ Makefile.in Thu Mar 1 21:59:03 2001 +--- Makefile.in.orig Thu Mar 1 05:49:19 2001 ++++ Makefile.in Tue Apr 3 10:02:31 2001 @@ -27,7 +27,7 @@ INSTALL_OPTS=@INSTALL_OPTS@ COMMAND_OPTS=@COMMAND_OPTS@ @@ -9,7 +9,21 @@ CGICFGDIR=$(CGIDIR) PERLDIR=@PERLDIR@ -@@ -108,7 +108,7 @@ +@@ -99,16 +99,16 @@ + + install-config: + $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) netsaint.cfg $(DESTDIR)$(CFGDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) hosts.cfg $(DESTDIR)$(CFGDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) commands.cfg $(DESTDIR)$(CFGDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) nscgi.cfg $(DESTDIR)$(CFGDIR) +- $(INSTALL) -m 660 $(INSTALL_OPTS) resource.cfg $(DESTDIR)$(CFGDIR) ++ $(INSTALL) -m 664 $(INSTALL_OPTS) netsaint.cfg $(DESTDIR)$(CFGDIR)/netsaint.cfg.dist ++ $(INSTALL) -m 664 $(INSTALL_OPTS) hosts.cfg $(DESTDIR)$(CFGDIR)/hosts.cfg.dist ++ $(INSTALL) -m 664 $(INSTALL_OPTS) commands.cfg $(DESTDIR)$(CFGDIR)/commands.cfg.dist ++ $(INSTALL) -m 664 $(INSTALL_OPTS) nscgi.cfg $(DESTDIR)$(CFGDIR)/nscgi.cfg.dist ++ $(INSTALL) -m 660 $(INSTALL_OPTS) resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg.dist + install-init: install-daemoninit install-daemoninit: diff --git a/net-mgmt/nagios2/files/patch-ad b/net-mgmt/nagios2/files/patch-ad index 5342c3e21f0f..6d8038c4bd21 100644 --- a/net-mgmt/nagios2/files/patch-ad +++ b/net-mgmt/nagios2/files/patch-ad @@ -9,24 +9,6 @@ ac_help="$ac_help --with-netsaint-user=<user> sets user name to run netsaint" ac_help="$ac_help -@@ -117,12 +117,12 @@ - x_includes=NONE - x_libraries=NONE - bindir='${exec_prefix}/bin' --sbindir='${exec_prefix}/sbin' --libexecdir='${exec_prefix}/libexec' --datadir='${prefix}/share' --sysconfdir='${prefix}/etc' -+sbindir='${exec_prefix}/share/netsaint/sbin' -+libexecdir='${exec_prefix}/libexec/netsaint' -+datadir='${prefix}/share/netsaint' -+sysconfdir='${prefix}/etc/netsaint' - sharedstatedir='${prefix}/com' --localstatedir='${prefix}/var' -+localstatedir='${prefix}/var/netsaint' - libdir='${exec_prefix}/lib' - includedir='${prefix}/include' - oldincludedir='/usr/include' @@ -562,9 +562,9 @@ # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then diff --git a/net-mgmt/nagios2/files/patch-ai b/net-mgmt/nagios2/files/patch-ai index 6ad4c57daddd..ef3b63b31395 100644 --- a/net-mgmt/nagios2/files/patch-ai +++ b/net-mgmt/nagios2/files/patch-ai @@ -1,5 +1,5 @@ ---- daemon-init.in.orig Sun Feb 18 22:33:21 2001 -+++ daemon-init.in Thu Mar 1 22:00:37 2001 +--- daemon-init.in.orig Sun Feb 18 23:33:21 2001 ++++ daemon-init.in Tue Apr 3 20:58:18 2001 @@ -68,12 +68,9 @@ @@ -10,18 +10,18 @@ -#elif [ -f /etc/init.d/functions ]; then -#. /etc/init.d/functions -#fi -+if [ -f /usr/local/etc/netsaint/functions ]; then -+. /usr/local/etc/netsaint/functions ++if [ -f @sysconfdir@/functions ]; then ++. @sysconfdir@/functions +fi prefix=@prefix@ exec_prefix=@exec_prefix@ -@@ -92,7 +89,7 @@ +@@ -101,7 +98,7 @@ - # Check that netsaint exists. - test -f $NetsaintBin || exit 0 -- -+ - # Check that netsaint.cfg exists. - test -f $NetsaintCfg || exit 0 - + start) + echo "Starting network monitor: netsaint" +- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav" ++ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav" + $NetsaintBin -d $NetsaintCfg + if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi + sleep 1 diff --git a/net-mgmt/nagios2/pkg-plist b/net-mgmt/nagios2/pkg-plist index be7cbae0e9f9..d71e872be420 100644 --- a/net-mgmt/nagios2/pkg-plist +++ b/net-mgmt/nagios2/pkg-plist @@ -1,9 +1,14 @@ +@exec mkdir -p %D/var/netsaint/archives +@exec mkdir -p %D/var/netsaint/rw +@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw +@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives +@exec chown nobody:nogroup %D/var/netsaint/rw bin/netsaint -etc/netsaint/commands.cfg -etc/netsaint/hosts.cfg -etc/netsaint/netsaint.cfg -etc/netsaint/nscgi.cfg -etc/netsaint/resource.cfg +etc/netsaint/commands.cfg.dist +etc/netsaint/hosts.cfg.dist +etc/netsaint/netsaint.cfg.dist +etc/netsaint/nscgi.cfg.dist +etc/netsaint/resource.cfg.dist etc/rc.d/netsaint.sh share/netsaint/docs/about.html share/netsaint/docs/addons.html @@ -167,6 +172,7 @@ share/netsaint/images/logos/mandrake.gd2 share/netsaint/images/logos/mandrake.gif share/netsaint/images/logos/next.gd2 share/netsaint/images/logos/next.gif +share/netsaint/images/logos/netsaint.gd2 share/netsaint/images/logos/ng-switch40.gd2 share/netsaint/images/logos/ng-switch40.gif share/netsaint/images/logos/novell40.gd2 @@ -271,7 +277,7 @@ share/netsaint/stylesheets/status.css share/netsaint/stylesheets/statusmap.css share/netsaint/stylesheets/tac.css share/netsaint/stylesheets/trends.css -@dirrm etc/netsaint +@unexec rmdir %D/etc/netsaint 2>/dev/null || true @dirrm share/netsaint/docs/developer/images @dirrm share/netsaint/docs/developer @dirrm share/netsaint/docs/images @@ -282,6 +288,6 @@ share/netsaint/stylesheets/trends.css @dirrm share/netsaint/sbin @dirrm share/netsaint/stylesheets @dirrm share/netsaint -@dirrm var/netsaint/archives -@dirrm var/netsaint -@dirrm var +@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true +@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true +@unexec rmdir %D/var/netsaint 2>/dev/null || true diff --git a/net-mgmt/nagios2/scripts/createuser b/net-mgmt/nagios2/scripts/createuser index 7733a9cc4323..0ebde3c5496d 100644 --- a/net-mgmt/nagios2/scripts/createuser +++ b/net-mgmt/nagios2/scripts/createuser @@ -31,7 +31,7 @@ if( getgrnam( "netsaint" ) ) { print "netsaint user using uid $nsUID and gid $nsGID\n"; -system( "/usr/bin/chpass -a \"netsaint:*:$nsUID:$nsGID\:\:0:0:Netsaint pseudo-user:$ENV{'PREFIX'}/netsaint:/sbin/nologin\"" ); +system( "/usr/bin/chpass -a \"netsaint:*:$nsUID:$nsGID\:\:0:0:Netsaint pseudo-user:/var/netsaint:/sbin/nologin\"" ); sub append_file { local($file,@list) = @_; |