Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  3 Apr 2001 22:54:58 +0200 (CEST)
From:      blaz@amis.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/26328: [MAINTAINER UPDATE] netsaint port update
Message-ID:  <20010403205458.8746026C02@titanic.medinet.si>

next in thread | raw e-mail | index | archive | help

>Number:         26328
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] netsaint port update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 03 14:00:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Blaz Zupan
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Medinet
>Environment:

	

>Description:

This patch fixes the following things in the netsaint port:
- update to netsaint 0.0.7b3
- move data directory from /usr/local/var/netsaint to /var/netsaint
- install configuration files with .dist suffix so that users configuration
  files are not deleted on package removal
- create /var/netsaint/rw directory needed for correct operation of CGI script
- fix netsaint.log file permission problem
- depend on netsaint-plugins port (this depends on PR 26327 being commited
  first)

>How-To-Repeat:

	

>Fix:

diff -uNr netsaint.old/Makefile netsaint/Makefile
--- netsaint.old/Makefile	Sun Apr  1 04:20:00 2001
+++ netsaint/Makefile	Tue Apr  3 20:41:29 2001
@@ -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 @@
 
 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=/var/netsaint
+		
+INSTALL_TARGET=	all install config install-config install-daemoninit install-commandmode
 
 pre-fetch:
 	@${SH} ${SCRIPTDIR}/checkps
diff -uNr netsaint.old/distinfo netsaint/distinfo
--- netsaint.old/distinfo	Sat Mar 10 04:45:58 2001
+++ netsaint/distinfo	Tue Apr  3 09:39:55 2001
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b2.tar.gz) = 37a6ebe592888a4c7e25d7dbd5689007
+MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
diff -uNr netsaint.old/files/patch-aa netsaint/files/patch-aa
--- netsaint.old/files/patch-aa	Sat Mar 10 04:45:58 2001
+++ netsaint/files/patch-aa	Tue Apr  3 10:02:56 2001
@@ -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 -uNr netsaint.old/files/patch-ad netsaint/files/patch-ad
--- netsaint.old/files/patch-ad	Sat Mar 10 04:45:58 2001
+++ netsaint/files/patch-ad	Tue Apr  3 20:42:29 2001
@@ -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 -uNr netsaint.old/files/patch-ai netsaint/files/patch-ai
--- netsaint.old/files/patch-ai	Sat Mar 10 04:45:58 2001
+++ netsaint/files/patch-ai	Tue Apr  3 20:58:42 2001
@@ -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 -uNr netsaint.old/pkg-plist netsaint/pkg-plist
--- netsaint.old/pkg-plist	Sat Mar 10 04:45:58 2001
+++ netsaint/pkg-plist	Tue Apr  3 21:29:01 2001
@@ -1,9 +1,14 @@
+@exec mkdir -p /var/netsaint/archives
+@exec mkdir -p /var/netsaint/rw
+@exec chmod 775 /var/netsaint /var/netsaint/archives /var/netsaint/rw
+@exec chown netsaint:netsaint /var/netsaint /var/netsaint/archives
+@exec chown nobody:nogroup /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.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/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,7 @@
 @dirrm share/netsaint/sbin
 @dirrm share/netsaint/stylesheets
 @dirrm share/netsaint
-@dirrm var/netsaint/archives
-@dirrm var/netsaint
-@dirrm var
+@cwd /var
+@unexec rmdir %D/netsaint/archives 2>/dev/null || true
+@unexec rmdir %D/netsaint/rw 2>/dev/null || true
+@unexec rmdir %D/netsaint 2>/dev/null || true
diff -uNr netsaint.old/scripts/createuser netsaint/scripts/createuser
--- netsaint.old/scripts/createuser	Sat Feb 24 04:09:30 2001
+++ netsaint/scripts/createuser	Tue Apr  3 21:24:24 2001
@@ -31,7 +31,7 @@
 
 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) = @_;
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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