ports/63230: [MAINTAINER] net/smokeping: update to 1.26

Lars Thegler lars at thegler.dk
Sun Feb 22 16:40:09 UTC 2004


>Number:         63230
>Category:       ports
>Synopsis:       [MAINTAINER] net/smokeping: update to 1.26
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 22 08:40:08 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Lars Thegler
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD dask.thegler.dk 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Nov 5 11:25:36 CET 2003
>Description:
- Update to 1.26
- Use OPTIONS for optional dependencies
- Change pkg-{,de}install to avoid risk of data loss when upgrading
- Patch files instead of regexps in Makefile

Committer, please note the following added files:

files/patch-bin-smokeping.dist
files/patch-etc-config.dist
files/patch-htdocs-smokeping.cgi.dist
files/patch-lib-probes-Curl.pm
files/patch-lib-probes-EchoPing.pm
files/patch-lib-probes-EchoPingChargen.pm
files/patch-lib-probes-EchoPingDiscard.pm
files/patch-lib-probes-EchoPingHttp.pm
files/patch-lib-probes-EchoPingHttps.pm
files/patch-lib-probes-EchoPingIcp.pm
files/patch-lib-probes-EchoPingSmtp.pm
files/patch-lib-probes-IOSPing.pm
files/patch-lib-probes-RemoteFPing.pm
files/patch-lib-probes-LDAP.pm
files/patch-lib-probes-Radius.pm
files/patch-lib-probes-passwordchecker.pm

>How-To-Repeat:
>Fix:

--- smokeping.diff begins here ---
diff -ruN smokeping.orig/Makefile smokeping/Makefile
--- smokeping.orig/Makefile	Thu Oct 23 15:30:15 2003
+++ smokeping/Makefile	Sun Feb 22 15:01:47 2004
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	smokeping
-PORTVERSION=	1.24
+PORTVERSION=	1.26
 CATEGORIES=	net www
 MASTER_SITES=	http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/
 
@@ -19,9 +19,42 @@
 		${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \
 		${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
 		${SITE_PERL}/Pod/Usage.pm:${PORTSDIR}/textproc/p5-PodParser \
-		${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \
-		${LOCALBASE}/sbin/fping:${PORTSDIR}/net/fping
+		${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net
 
+OPTIONS=	FPING "Support for fping probes" on
+OPTIONS+=	ECHOPING "Support for EchoPing probes" off
+OPTIONS+=	CURL "Support for Curl probes" off
+OPTIONS+=	LDAP "Support for LDAP probes" off
+OPTIONS+=	RADIUS "Support for Radius probes" off
+
+.include <bsd.port.pre.mk>
+
+.ifdef(WITH_FPING)
+RUN_DEPENDS+=	${LOCALBASE}/sbin/fping:${PORTSDIR}/net/fping
+.endif
+
+.ifdef(WITH_ECHOPING)
+RUN_DEPENDS+=	${LOCALBASE}/bin/echoping:${PORTSDIR}/net/echoping
+.endif
+
+.ifdef(WITH_CURL)
+RUN_DEPENDS+=	${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl
+.endif
+
+.ifdef(WITH_LDAP)
+RUN_DEPENDS+=	${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap
+.endif
+
+.ifdef(WITH_RADIUS)
+RUN_DEPENDS+=	${SITE_PERL}/Authen/Radius.pm:${PORTSDIR}/security/p5-Authen-Radius
+.endif
+
+.if defined(WITH_LDAP) || defined(WITH_RADIUS)
+RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
+.endif
+
+NO_BUILD=	yes
+USE_REINPLACE=	yes
 USE_PERL5=	yes
 
 MAN1=		CiscoRTTMonDNS.pm.1 CiscoRTTMonEchoICMP.pm.1 CiscoRTTMonTcpConnect.pm.1 \
@@ -32,6 +65,20 @@
 		smokeping.cgi.1 smokeping_config.1 smokeping_install.1 telnetIOSPing.pm.1
 
 PKGMESSAGE=	${WRKDIR}/pkg-message
+PKGINSTALL=	${WRKDIR}/pkg-install
+PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
+
+USER=		smokeping
+GROUP=		smokeping
+WWW_USER=	www
+WWW_UID=	80
+WWW_GROUP=	www
+WWW_GID=	80
+
+FILES_SUB=	USER=${USER} GROUP=${GROUP} \
+		WWW_USER=${WWW_USER} WWW_UID=${WWW_UID} \
+		WWW_GROUP=${WWW_GROUP} WWW_GID=${WWW_GID} \
+		PERL=${PERL} PREFIX=${PREFIX}
 
 DOC1=		CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO
 DOC2=		CiscoRTTMonDNS.pm CiscoRTTMonEchoICMP.pm CiscoRTTMonTcpConnect.pm \
@@ -42,39 +89,35 @@
 		smokeping smokeping_config smokeping_install telnetIOSPing.pm
 ETC1=		basepage.html config smokemail config-echoping
 
-pre-patch:
-	@${MV} ${WRKSRC}/bin/smokeping.dist ${WRKSRC}/bin/smokeping
-	@${MV} ${WRKSRC}/htdocs/smokeping.cgi.dist ${WRKSRC}/htdocs/smokeping.cgi
-	@${PERL} -pi -e ' \
-		s|/usr/sepp/bin/perl|${PERL}|; \
-		s|/usr/sepp/bin/speedy|${PREFIX}/bin/speedy|; \
-		s|use lib qw\(/usr/pack/rrdtool-1.0.40-to/lib/perl\);\n||; \
-		s|/home/oetiker/data/projects/AADJ-smokeping/dist/etc|${PREFIX}/etc/smokeping|; \
-		s|/home/oetiker/data/projects/AADJ-smokeping/dist|${PREFIX}/smokeping|; \
-		s|/home/oetiker/.smokeping/config|${PREFIX}/etc/smokeping/config|; \
-		s|/usr/lib/sendmail|/usr/sbin/sendmail|; \
-		s|/usr/sepp/bin/fping|${PREFIX}/sbin/fping|; \
-		s|dir  = /usr/local/smokeping/var|dir  = ${PREFIX}/var/smokeping|; \
-		s|imgcache = /home/oetiker/public_html/.simg|imgcache = ${PREFIX}/smokeping/htdocs/img|; \
-		s|imgurl   = ../.simg|imgurl   = /smokeimg|; \
-		' \
-		${WRKSRC}/bin/smokeping ${WRKSRC}/htdocs/smokeping.cgi ${WRKSRC}/etc/config.dist
-	@${PERL} -pi -e ' \
-		s|/usr/bin|${PREFIX}/bin|g; \
-		' \
-		${WRKSRC}/lib/probes/*
-	@${PERL} -p -e ' \
-		s|%%PREFIX%%|${PREFIX}|g; \
-		' \
-		${PKGDIR}/pkg-message > ${PKGMESSAGE}
-
-do-build:
+# Things that shouldn't have been in the tarball in the first place
+post-extract:
 	@${RM} ${WRKSRC}/lib/BER.pm
 	@${RM} ${WRKSRC}/lib/SNMP_*.pm
 	@${RM} ${WRKSRC}/lib/probes/patch
+	@${RM} ${WRKSRC}/lib/Smokeping.pm.orig
+	@${RM} ${WRKSRC}/lib/Smokeping.pm.rej
+
+post-patch:
+	@${FIND} ${WRKSRC} -name \*.orig -delete
+
+pre-configure:
+	@${REINPLACE_CMD} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+		${WRKSRC}/bin/smokeping.dist \
+		${WRKSRC}/htdocs/smokeping.cgi.dist \
+		${WRKSRC}/etc/config.dist \
+		${WRKSRC}/lib/probes/*.pm
+	@${FIND} ${WRKSRC} -name \*.bak -delete
+	@${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+		${PKGDIR}/pkg-message > ${PKGMESSAGE}
+	@${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+		${PKGDIR}/pkg-install > ${PKGINSTALL}
+	@${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+		${PKGDIR}/pkg-deinstall > ${PKGDEINSTALL}
+	@${MV} ${WRKSRC}/bin/smokeping.dist ${WRKSRC}/bin/smokeping
+	@${MV} ${WRKSRC}/htdocs/smokeping.cgi.dist ${WRKSRC}/htdocs/smokeping.cgi
 
 pre-install:
-	PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
+	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 do-install:
 	@${INSTALL_SCRIPT} ${WRKSRC}/bin/smokeping ${PREFIX}/bin
@@ -101,15 +144,21 @@
 	@${MKDIR} ${PREFIX}/smokeping
 	@${CP} -Rp ${WRKSRC}/[hl]* ${PREFIX}/smokeping/
 	@${MKDIR} ${PREFIX}/var/smokeping
-	@${CHOWN} smokeping:smokeping ${PREFIX}/var/smokeping
+	@${CHOWN} ${USER}:${GROUP} ${PREFIX}/var/smokeping
 	@${MKDIR} ${PREFIX}/smokeping/htdocs/img
-	@${CHOWN} www:www ${PREFIX}/smokeping/htdocs/img
+	@${CHOWN} ${WWW_USER}:${WWW_GROUP} ${PREFIX}/smokeping/htdocs/img
 	@if [ ! -f ${PREFIX}/etc/rc.d/smokeping.sh ]; then \
 		${ECHO} "Installing ${PREFIX}/etc/rc.d/smokeping.sh startup file."; \
 		${INSTALL_SCRIPT} ${FILESDIR}/smokeping.sh ${PREFIX}/etc/rc.d/smokeping.sh; \
 	fi
 
 post-install:
+	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if !defined(BATCH)
 	@${CAT} ${PKGMESSAGE}
+.endif
+
+post-deinstall:
+	@PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN smokeping.orig/distinfo smokeping/distinfo
--- smokeping.orig/distinfo	Thu Oct 23 15:30:15 2003
+++ smokeping/distinfo	Thu Feb 19 23:19:19 2004
@@ -1 +1,2 @@
-MD5 (smokeping-1.24.tar.gz) = b206983f358afb53fbc8d6b161298f82
+MD5 (smokeping-1.26.tar.gz) = 3d61ccbcc36e08a18306f8b439309b88
+SIZE (smokeping-1.26.tar.gz) = 213969
diff -ruN smokeping.orig/files/patch-bin-smokeping.dist smokeping/files/patch-bin-smokeping.dist
--- smokeping.orig/files/patch-bin-smokeping.dist	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-bin-smokeping.dist	Thu Feb 19 23:32:31 2004
@@ -0,0 +1,45 @@
+--- bin/smokeping.dist.orig	Sun Jan 18 15:48:21 2004
++++ bin/smokeping.dist	Sun Jan 18 15:52:40 2004
+@@ -1,14 +1,11 @@
+-#!/usr/sepp/bin/perl -w
++#!%%PERL%% -w
+ # -*-perl-*-
+ 
+-use lib qw(/home/oetiker/data/projects/AABN-rrdtool/perl-shared/blib/lib);
+-use lib qw(/home/oetiker/data/projects/AABN-rrdtool/perl-shared/blib/arch);
+-use lib qw(/usr/pack/rrdtool-1.0.40-ds/lib/perl/5.8.0);
+-use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
++use lib qw(%%PREFIX%%/smokeping/lib);
+ 
+ use Smokeping 1.26;
+ 
+-Smokeping::main("etc/config.dist");
++Smokeping::main("%%PREFIX%%/etc/smokeping/config");
+ 
+ =head1 NAME
+ 
+@@ -86,22 +83,8 @@
+ 
+ =head1 SETUP
+ 
+-When installing SmokePing, this file has to be adjusted to fit your
+-local system. Three paths have to be entered.
+-
+-One pointing to your B<rrdtool> installation
+-
+- use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
+-
+-One pointing to the place where you have installed the SmokePing libraries
+-
+- use lib qw(/home/oetiker/public_html/smokeping/lib);
+-
+-The third path is the argument to the Smokeping::main command. It points to
+-the SmokePing configuration file.
+-
+- use Smokeping;
+- Smokeping::main("/home/oetiker/.smokeping/config");
++When installing SmokePing, this file has been adjusted to fit your
++local system. There should be no need for further path adjustments.
+ 
+ =head1 COPYRIGHT
+ 
diff -ruN smokeping.orig/files/patch-etc-config.dist smokeping/files/patch-etc-config.dist
--- smokeping.orig/files/patch-etc-config.dist	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-etc-config.dist	Sun Jan 18 15:57:53 2004
@@ -0,0 +1,40 @@
+--- etc/config.dist.orig	Sun Jan 18 15:55:11 2004
++++ etc/config.dist	Sun Jan 18 15:57:10 2004
+@@ -7,13 +7,13 @@
+ owner    = Joe Random
+ contact  = joe at some.place.xyz
+ mailhost = smtp.mailhost.abc
+-sendmail = /usr/lib/sendmail
+-imgcache = /home/oetiker/public_html/.simg
+-imgurl   = ../.simg
+-datadir  = /home/oetiker/data/projects/AADJ-smokeping/dist/var
+-piddir  = /home/oetiker/data/projects/AADJ-smokeping/dist/var
++sendmail = /usr/sbin/sendmail
++imgcache = %%PREFIX%%/smokeping/htdocs/img
++imgurl   = /smokeimg
++datadir  = %%PREFIX%%/var/smokeping
++piddir  = %%PREFIX%%/var/smokeping
+ cgiurl   = http://people.ee.ethz.ch/~oetiker/smokeping/smokeping.cgi
+-smokemail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/smokemail.dist
++smokemail = %%PREFIX%%/etc/smokeping/smokemail
+ # specify this to get syslog logging
+ # syslogfacility = local0
+ 
+@@ -63,7 +63,7 @@
+ 
+ *** Presentation ***
+ 
+-template = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/basepage.html.dist
++template = %%PREFIX%%/etc/smokeping/basepage.html
+ 
+ + overview 
+ 
+@@ -86,7 +86,7 @@
+ 
+ + FPing
+ 
+-binary = /usr/sepp/bin/fping
++binary = %%PREFIX%%/sbin/fping
+ 
+ *** Targets ***
+ 
diff -ruN smokeping.orig/files/patch-htdocs-smokeping.cgi.dist smokeping/files/patch-htdocs-smokeping.cgi.dist
--- smokeping.orig/files/patch-htdocs-smokeping.cgi.dist	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-htdocs-smokeping.cgi.dist	Thu Feb 19 23:33:20 2004
@@ -0,0 +1,18 @@
+--- htdocs/smokeping.cgi.dist.orig	Sun Oct  5 16:20:06 2003
++++ htdocs/smokeping.cgi.dist	Sun Jan 11 18:03:19 2004
+@@ -1,12 +1,11 @@
+-#!/usr/sepp/bin/speedy -w
++#!%%PREFIX%%/bin/speedy -w
+ # -*-perl-*-
+ 
+-use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
+-use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
++use lib qw(%%PREFIX%%/smokeping/lib);
+ 
+ use Smokeping 1.26;
+ 
+-Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");
++Smokeping::cgi("%%PREFIX%%/etc/smokeping/config");
+ 
+ 
+ BEGIN {
diff -ruN smokeping.orig/files/patch-lib-probes-Curl.pm smokeping/files/patch-lib-probes-Curl.pm
--- smokeping.orig/files/patch-lib-probes-Curl.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-Curl.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,19 @@
+--- lib/probes/Curl.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/Curl.pm	Sun Jan 11 18:06:12 2004
+@@ -1,6 +1,6 @@
+ package probes::Curl;
+ 
+-my $DEFAULTBIN = "/usr/bin/curl";
++my $DEFAULTBIN = "%%PREFIX%%/bin/curl";
+ 
+ =head1 NAME
+ 
+@@ -15,7 +15,7 @@
+  *** Probes ***
+  + Curl
+ 
+- binary = /usr/bin/curl # default value
++ binary = %%PREFIX%%/bin/curl # default value
+ 
+  *** Targets ***
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPing.pm smokeping/files/patch-lib-probes-EchoPing.pm
--- smokeping.orig/files/patch-lib-probes-EchoPing.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPing.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,28 @@
+--- lib/probes/EchoPing.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPing.pm	Sun Jan 11 18:06:12 2004
+@@ -1,6 +1,6 @@
+ package probes::EchoPing;
+ 
+-my $DEFAULTBIN = "/usr/bin/echoping";
++my $DEFAULTBIN = "%%PREFIX%%/bin/echoping";
+ 
+ =head1 NAME
+ 
+@@ -16,7 +16,7 @@
+  *** Probes ***
+  + EchoPing
+ 
+- binary = /usr/bin/echoping # default value
++ binary = %%PREFIX%%/bin/echoping # default value
+ 
+  *** Targets ***
+ 
+@@ -105,7 +105,7 @@
+ 
+ The location of the echoping binary should probably be a global variable
+ instead of a probe-specific one. As things are, every EchoPing -derived probe 
+-has to declare it if the default (/usr/bin/echoping) isn't correct.
++has to declare it if the default (%%PREFIX%%/bin/echoping) isn't correct.
+ 
+ =head1 AUTHOR
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPingChargen.pm smokeping/files/patch-lib-probes-EchoPingChargen.pm
--- smokeping.orig/files/patch-lib-probes-EchoPingChargen.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPingChargen.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/EchoPingChargen.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPingChargen.pm	Sun Jan 11 18:06:12 2004
+@@ -13,7 +13,7 @@
+  *** Probes ***
+  + EchoPingChargen
+ 
+- binary = /usr/bin/echoping
++ binary = %%PREFIX%%/bin/echoping
+ 
+  *** Targets ***
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPingDiscard.pm smokeping/files/patch-lib-probes-EchoPingDiscard.pm
--- smokeping.orig/files/patch-lib-probes-EchoPingDiscard.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPingDiscard.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/EchoPingDiscard.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPingDiscard.pm	Sun Jan 11 18:06:12 2004
+@@ -13,7 +13,7 @@
+  *** Probes ***
+  + EchoPingDiscard
+ 
+- binary = /usr/bin/echoping
++ binary = %%PREFIX%%/bin/echoping
+ 
+  *** Targets ***
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPingHttp.pm smokeping/files/patch-lib-probes-EchoPingHttp.pm
--- smokeping.orig/files/patch-lib-probes-EchoPingHttp.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPingHttp.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/EchoPingHttp.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPingHttp.pm	Sun Jan 11 18:06:12 2004
+@@ -13,7 +13,7 @@
+  *** Probes ***
+  + EchoPingHttp
+ 
+- binary = /usr/bin/echoping # mandatory
++ binary = %%PREFIX%%/bin/echoping # mandatory
+  
+ 
+  *** Targets ***
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPingHttps.pm smokeping/files/patch-lib-probes-EchoPingHttps.pm
--- smokeping.orig/files/patch-lib-probes-EchoPingHttps.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPingHttps.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/EchoPingHttps.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPingHttps.pm	Sun Jan 11 18:06:12 2004
+@@ -14,7 +14,7 @@
+  *** Probes ***
+  + EchoPingHttps
+ 
+- binary = /usr/bin/echoping # mandatory
++ binary = %%PREFIX%%/bin/echoping # mandatory
+ 
+  *** Targets ***
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPingIcp.pm smokeping/files/patch-lib-probes-EchoPingIcp.pm
--- smokeping.orig/files/patch-lib-probes-EchoPingIcp.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPingIcp.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/EchoPingIcp.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPingIcp.pm	Sun Jan 11 18:06:12 2004
+@@ -14,7 +14,7 @@
+  *** Probes ***
+  + EchoPingIcp
+ 
+- binary = /usr/bin/echoping # mandatory
++ binary = %%PREFIX%%/bin/echoping # mandatory
+  
+  *** Targets ***
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-EchoPingSmtp.pm smokeping/files/patch-lib-probes-EchoPingSmtp.pm
--- smokeping.orig/files/patch-lib-probes-EchoPingSmtp.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-EchoPingSmtp.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/EchoPingSmtp.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/EchoPingSmtp.pm	Sun Jan 11 18:06:12 2004
+@@ -13,7 +13,7 @@
+  *** Probes ***
+  + EchoPingSmtp
+ 
+- binary = /usr/bin/echoping # mandatory
++ binary = %%PREFIX%%/bin/echoping # mandatory
+ 
+  *** Targets ***
+  probe = EchoPingSmtp
diff -ruN smokeping.orig/files/patch-lib-probes-IOSPing.pm smokeping/files/patch-lib-probes-IOSPing.pm
--- smokeping.orig/files/patch-lib-probes-IOSPing.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-IOSPing.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,22 @@
+--- lib/probes/IOSPing.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/IOSPing.pm	Sun Jan 11 18:06:12 2004
+@@ -8,7 +8,7 @@
+ 
+  *** Probes ***
+  + IOSPing
+- binary = /usr/bin/remsh
++ binary = %%PREFIX%%/bin/remsh
+  packetsize = 1024
+  forks = 1
+ 
+@@ -27,8 +27,8 @@
+ The binary and ioshost options are mandatory.
+ 
+ The binary option specifies the path of the binary to be used to
+-connect to the IOS device.  Commonly used binaries are /usr/bin/rsh
+-and /usr/bin/remsh, although any script or binary should work if can
++connect to the IOS device.  Commonly used binaries are %%PREFIX%%/bin/rsh
++and %%PREFIX%%/bin/remsh, although any script or binary should work if can
+ be called as 
+ 
+     /path/to/binary [ -l user ] router ping
diff -ruN smokeping.orig/files/patch-lib-probes-LDAP.pm smokeping/files/patch-lib-probes-LDAP.pm
--- smokeping.orig/files/patch-lib-probes-LDAP.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-LDAP.pm	Fri Feb 20 00:30:36 2004
@@ -0,0 +1,11 @@
+--- lib/probes/LDAP.pm.orig	Fri Feb 20 00:28:14 2004
++++ lib/probes/LDAP.pm	Fri Feb 20 00:28:44 2004
+@@ -13,7 +13,7 @@
+  *** Probes ***
+  + LDAP
+ 
+- passwordfile = /usr/share/smokeping/etc/password # optional
++ passwordfile = %%PREFIX%%/etc/smokeping/password # optional
+  sleeptime = 0.5 # optional, 1 second by default
+ 
+  *** Targets ***
diff -ruN smokeping.orig/files/patch-lib-probes-Radius.pm smokeping/files/patch-lib-probes-Radius.pm
--- smokeping.orig/files/patch-lib-probes-Radius.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-Radius.pm	Fri Feb 20 00:31:02 2004
@@ -0,0 +1,11 @@
+--- lib/probes/Radius.pm.orig	Fri Feb 20 00:29:00 2004
++++ lib/probes/Radius.pm	Fri Feb 20 00:29:21 2004
+@@ -13,7 +13,7 @@
+  *** Probes ***
+  + Radius
+ 
+- passwordfile = /usr/share/smokeping/etc/password
++ passwordfile = %%PREFIX%%/etc/smokeping/password
+  secretfile = /etc/raddb/secret
+  sleeptime = 0.5 # optional, 1 second by default
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-RemoteFPing.pm smokeping/files/patch-lib-probes-RemoteFPing.pm
--- smokeping.orig/files/patch-lib-probes-RemoteFPing.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-RemoteFPing.pm	Sun Jan 11 18:23:12 2004
@@ -0,0 +1,11 @@
+--- lib/probes/RemoteFPing.pm.orig	Sun Jan 11 18:06:12 2004
++++ lib/probes/RemoteFPing.pm	Sun Jan 11 18:06:12 2004
+@@ -8,7 +8,7 @@
+ 
+  *** Probes ***
+  + RemoteFPing
+- binary = /usr/bin/ssh
++ binary = %%PREFIX%%/bin/ssh
+  packetsize = 1024
+  forks = 1
+ 
diff -ruN smokeping.orig/files/patch-lib-probes-passwordchecker.pm smokeping/files/patch-lib-probes-passwordchecker.pm
--- smokeping.orig/files/patch-lib-probes-passwordchecker.pm	Thu Jan  1 01:00:00 1970
+++ smokeping/files/patch-lib-probes-passwordchecker.pm	Fri Feb 20 00:31:33 2004
@@ -0,0 +1,11 @@
+--- lib/probes/passwordchecker.pm.orig	Fri Feb 20 00:29:34 2004
++++ lib/probes/passwordchecker.pm	Fri Feb 20 00:29:55 2004
+@@ -16,7 +16,7 @@
+  *** Probes ***
+  + MyPasswordChecker
+  # location of the file containing usernames and passwords
+- passwordfile = /usr/share/smokeping/etc/passwords
++ passwordfile = %%PREFIX%%/etc/smokeping/passwords
+ 
+ The specified password file:
+ 
diff -ruN smokeping.orig/pkg-deinstall smokeping/pkg-deinstall
--- smokeping.orig/pkg-deinstall	Mon Jun  3 04:33:32 2002
+++ smokeping/pkg-deinstall	Sun Feb  1 22:37:27 2004
@@ -3,84 +3,53 @@
 # $FreeBSD: ports/net/smokeping/pkg-deinstall,v 1.3 2002/06/03 02:33:32 ijliao Exp $
 #
 
-ask() {
-    local question default answer
-
-    question=$1
-    default=$2
-    if [ -z "${PACKAGE_BUILDING}" ]; then
-	read -p "${question} [${default}]? " answer
-    fi
-    if [ x${answer} = x ]; then
-	answer=${default}
-    fi
-    echo ${answer}
-}
-
-yesno() {
-    local dflt question answer
-
-    question=$1
-    dflt=$2
-    while :; do
-	answer=$(ask "${question}" "${dflt}")
-	case "${answer}" in
-	[Yy]*)		return 0;;
-	[Nn]*)		return 1;;
-	esac
-	echo "Please answer yes or no."
-    done
-}
-
-delete_account() {
-    local u g home
-
-    u=$1
-    g=$2
-    if yesno "Do you want me to remove group \"${g}\"" y; then
-        pw groupdel -n ${g}
-        echo "Done."
-    fi
-    if yesno "Do you want me to remove user \"${u}\"" y; then
-        eval home=~${u}
-        pw userdel -n ${u}
-        echo "Done."
-        if [ -d "${home}" ]; then
-            echo "Please remember to check if there's any unsent mail left"
-            echo "in the home directory \"${home}\""
-        fi
-
-    fi
-}
-
+echo 'Stopping Smokeping daemon.'
 if [ -f ${PKG_PREFIX}/var/smokeping/smokeping.pid ]; then
-    if [ -x ${PKG_PREFIX}/etc/rc.d/smokeping.sh ]; then
-        ${PKG_PREFIX}/etc/rc.d/smokeping.sh stop > /dev/null
-    fi
-    rm ${PKG_PREFIX}/var/smokeping/smokeping.pid
-fi
-
-if [ "$2" != "POST-DEINSTALL" ]; then
-    exit 0
+	if [ -x ${PKG_PREFIX}/etc/rc.d/smokeping.sh ]; then
+		${PKG_PREFIX}/etc/rc.d/smokeping.sh stop > /dev/null
+	fi
+	rm ${PKG_PREFIX}/var/smokeping/smokeping.pid
 fi
 
-if [ ! -n "$BATCH" ]; then
+case $2 in
+POST-DEINSTALL)
 
-    if [ -d ${PKG_PREFIX}/etc/smokeping ]; then
-	echo "You have some custom SmokePing configuration in \"${PKG_PREFIX}/etc/smokeping/\"."
-	if yesno "Would you like me to remove it" y; then
-	    rm -R ${PKG_PREFIX}/etc/smokeping
-	    echo "Done."
-	fi
-    fi
+	if [ ! -n "$BATCH" ]; then
 
-    if [ -d ${PKG_PREFIX}/var/smokeping ]; then
-	echo "You have some collected data in \"${PKG_PREFIX}/var/smokeping/\"."
-	if yesno "Would you like me to remove it" y; then
-	    rm -R ${PKG_PREFIX}/var/smokeping
-	    echo "Done."
+		if [ -d ${PKG_PREFIX}/etc/smokeping -o -d ${PKG_PREFIX}/var/smokeping ]; then
+			echo '================================================================='
+			echo
+			echo 'You seem to have some custom config and data.'
+			echo 'The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
+			echo
+			echo 'You may delete them with:'
+			echo
+			echo '  pw groupdel %%GROUP%%'
+			echo '  pw userdel %%USER%%'
+			echo
+			echo 'The config and data can be deleted with:'
+			echo
+			echo "  rm -R ${PKG_PREFIX}/etc/smokeping"
+			echo "  rm -R ${PKG_PREFIX}/var/smokeping"
+			echo
+			echo '================================================================='
+		else
+			if pw groupdel -n %%GROUP%%; then
+				echo 'Removed group "%%GROUP%%".'
+			else
+				echo 'Removing group "%%GROUP%%" failed...'
+				exit 1
+			fi
+
+			if pw userdel -n %%USER%%; then
+				echo 'Removed user "%%USER%%".'
+			else
+				echo 'Removing user "%%USER%%" failed...'
+				exit 1
+			fi
+		fi
 	fi
-    fi
 
-    delete_account smokeping smokeping
-fi
+	exit 0
+	;;
+esac
diff -ruN smokeping.orig/pkg-install smokeping/pkg-install
--- smokeping.orig/pkg-install	Mon Jun  3 04:33:32 2002
+++ smokeping/pkg-install	Sun Jan 25 16:53:33 2004
@@ -3,119 +3,50 @@
 # $FreeBSD: ports/net/smokeping/pkg-install,v 1.2 2002/06/03 02:33:32 ijliao Exp $
 #
 
-ask() {
-    local question default answer
-
-    question=$1
-    default=$2
-    if [ -z "${PACKAGE_BUILDING}" ]; then
-	read -p "${question} [${default}]? " answer
-    fi
-    if [ x${answer} = x ]; then
-	answer=${default}
-    fi
-    echo ${answer}
-}
-
-yesno() {
-    local dflt question answer
-
-    question=$1
-    dflt=$2
-    while :; do
-	answer=$(ask "${question}" "${dflt}")
-	case "${answer}" in
-	[Yy]*)		return 0;;
-	[Nn]*)		return 1;;
-	esac
-	echo "Please answer yes or no."
-    done
-}
-
-make_account() {
-    local u g gcos homeopt home
-
-    u=$1
-    g=$2
-    gcos=$3
-    homeopt=${4:+"-d $4"}
-
-    if pw group show "${g}" >/dev/null 2>&1; then
-	echo "You already have a group \"${g}\", so I will use it."
-    else
-	echo "You need a group \"${g}\"."
-	if which -s pw && yesno "Would you like me to create it" y; then
-	    pw groupadd ${g} || exit
-	    echo "Done."
-	else
-	    echo "Please create it, and try again."
-	    if ! grep -q "^${u}:" /etc/passwd; then
-		echo "While you're at it, please create a user \"${u}\" too,"
-		echo "with a default group of \"${g}\"."
-	    fi
-	    exit 1
-	fi
-    fi
-    
-    if pw user show "${u}" >/dev/null 2>&1; then
-	echo "You already have a user \"${u}\", so I will use it."
-    else
-	echo "You need a user \"${u}\"."
-	if which -s pw && yesno "Would you like me to create it" y; then
-	    pw useradd ${u} -g ${g} -h - ${homeopt} \
-		-s /nonexistent -c "${gcos}" || exit
-	    echo "Done."
-	else
-	    echo "Please create it, and try again."
-	    exit 1
+case $2 in
+PRE-INSTALL)
+	if ! pw groupshow %%WWW_GROUP%% 2>/dev/null 1>&2; then
+		if pw groupadd %%WWW_GROUP%% -g %%WWW_GID%%; then
+			echo 'Added group "%%WWW_GROUP%%".'
+		else
+			echo 'Adding group "%%WWW_GROUP%%" failed...'
+			exit 1
+		fi
 	fi
-    fi
 
-    if [ x"$homeopt" = x ]; then
-	eval home=~${u}
-	if [ ! -d "${home}" ]; then
-	    if yesno \
-		"Would you like me to create ${u}'s home directory (${home})" y
-	    then
-		(umask 77 && \
-		    mkdir -p ${home}) || exit
-		chown -R ${u}:${g} ${home} || exit
-	    else
-		echo "Please create it, and try again."
-		exit 1
-	    fi
+	if ! pw usershow %%WWW_USER%% 2>/dev/null 1>&2; then
+		if pw useradd %%WWW_USER%% -u %%WWW_UID%% -g %%WWW_GROUP%% -h - \
+			-s /sbin/nologin -d /nonexistent \
+			-c "World Wide Web Owner"; \
+		then
+			echo 'Added user "%%WWW_USER%%".'
+		else
+			echo 'Adding user "%%WWW_USER%%" failed...'
+			exit 1
+		fi
 	fi
-    fi
-}
-
-if [ "$2" != "PRE-INSTALL" ]; then
-    exit 0
-fi
 
-USER=www
-GROUP=${USER}
-UID=80
-GID=${UID}
-
-if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
-	if pw groupadd ${GROUP} -g ${GID}; then
-		echo "Added group \"${GROUP}\"."
-	else
-		echo "Adding group \"${GROUP}\" failed..."
-		exit 1
+	if ! pw groupshow %%GROUP%% 2>/dev/null 1>&2; then
+		if pw groupadd %%GROUP%%; then
+			echo 'Added group "%%GROUP%%".'
+		else
+			echo 'Adding group "%%GROUP%%" failed...'
+			exit 1
+		fi
 	fi
-fi
 
-if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
-	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-		-s "/sbin/nologin" -d "/nonexistent" \
-		-c "World Wide Web Owner"; \
-	then
-		echo "Added user \"${USER}\"."
-	else
-		echo "Adding user \"${USER}\" failed..."
-		exit 1
+	if ! pw usershow %%USER%% 2>/dev/null 1>&2; then
+                if pw useradd %%USER%% -g %%GROUP%% -h - \
+			-s /nonexistent -c "SmokePing Daemon"; \
+		then
+			echo 'Added user "%%USER%%".'
+		else
+			echo 'Adding user "%%USER%%" failed...'
+			exit 1
+		fi
 	fi
-fi
 
-make_account smokeping smokeping "SmokePing Daemon" "/nonexistent"
+	exit 0
+	;;
+esac
+
diff -ruN smokeping.orig/pkg-message smokeping/pkg-message
--- smokeping.orig/pkg-message	Mon Apr  1 15:47:18 2002
+++ smokeping/pkg-message	Sun Feb  1 19:02:51 2004
@@ -9,7 +9,7 @@
   %%PREFIX%%/etc/smokeping/basepage.html
   %%PREFIX%%/etc/smokeping/config-echoping
 
-You need edit these to suit your requirements. Please refer to
+You *MUST* edit these to suit your requirements. Please refer to
 %%PREFIX%%/share/doc/smokeping/smokeping_install.txt and 
 %%PREFIX%%/share/doc/smokeping/smokeping_config.txt for further
 details on installation and configuration.
diff -ruN smokeping.orig/pkg-plist smokeping/pkg-plist
--- smokeping.orig/pkg-plist	Thu Oct 23 15:30:15 2003
+++ smokeping/pkg-plist	Sun Feb 22 15:03:35 2004
@@ -72,7 +72,6 @@
 %%PORTDOCS%%%%DOCSDIR%%/telnetIOSPing.pm.txt
 smokeping/htdocs/smokeping.cgi
 smokeping/lib/ISG/ParseConfig.pm
-smokeping/lib/ISG/VppGateway.pm
 smokeping/lib/Smokeping.pm
 smokeping/lib/ciscoRttMonMIB.pm
 smokeping/lib/probes/CiscoRTTMonDNS.pm
@@ -90,14 +89,17 @@
 smokeping/lib/probes/FPing.pm
 smokeping/lib/probes/FPing6.pm
 smokeping/lib/probes/IOSPing.pm
+smokeping/lib/probes/LDAP.pm
+smokeping/lib/probes/Radius.pm
 smokeping/lib/probes/RemoteFPing.pm
 smokeping/lib/probes/base.pm
 smokeping/lib/probes/basefork.pm
 smokeping/lib/probes/basevars.pm
+smokeping/lib/probes/passwordchecker.pm
 smokeping/lib/probes/telnetIOSPing.pm
- at unexec rmdir %D/etc/smokeping || true
+ at unexec rmdir %D/etc/smokeping 2>/dev/null || true
 @exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img
- at unexec rm -rf %D/smokeping/htdocs/img
+ at unexec rm -rf %D/smokeping/htdocs/img 2>/dev/null || true
 @exec mkdir -p %D/var/smokeping
 @exec chown smokeping:smokeping %D/var/smokeping
 @unexec rmdir %D/var/smokeping 2>/dev/null || true
--- smokeping.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list