summaryrefslogtreecommitdiff
path: root/net/dhid
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2000-08-09 21:00:09 +0000
committerhubertf <hubertf@pkgsrc.org>2000-08-09 21:00:09 +0000
commita7dfa74c75d7b175dfdd5d2af70e23b21066389c (patch)
tree394ddb3e7b361b73261df2ee7053106ed9430528 /net/dhid
parentf7dd62d6ee8305f3eb213258612bf94f08ec27ad (diff)
downloadpkgsrc-a7dfa74c75d7b175dfdd5d2af70e23b21066389c.tar.gz
Update to dhis client R4. Changes:
* improved security * server can detect when client goes down, and remove entry
Diffstat (limited to 'net/dhid')
-rw-r--r--net/dhid/Makefile32
-rw-r--r--net/dhid/files/dhid.sh32
-rw-r--r--net/dhid/files/md54
-rw-r--r--net/dhid/files/patch-sum8
-rw-r--r--net/dhid/patches/patch-aa39
-rw-r--r--net/dhid/patches/patch-ab16
-rw-r--r--net/dhid/patches/patch-ac13
-rw-r--r--net/dhid/patches/patch-ad23
-rw-r--r--net/dhid/pkg/MESSAGE16
-rw-r--r--net/dhid/pkg/PLIST14
10 files changed, 96 insertions, 101 deletions
diff --git a/net/dhid/Makefile b/net/dhid/Makefile
index 87fa90805d1..780bec27c35 100644
--- a/net/dhid/Makefile
+++ b/net/dhid/Makefile
@@ -1,32 +1,30 @@
-# $NetBSD: Makefile,v 1.3 1999/08/04 14:04:36 jlam Exp $
+# $NetBSD: Makefile,v 1.4 2000/08/09 21:00:09 hubertf Exp $
#
-DISTNAME= dhid-3.0
+DISTNAME= dhid-4.0.1
CATEGORIES= net
MASTER_SITES= ftp://ftp.dhis.org/pub/dhis/
-MAINTAINER= jlam@netbsd.org
-HOMEPAGE= http://www.dhis.org/sp/
+MAINTAINER= hubertf
+HOMEPAGE= http://www.dhis.org/
-ALL_TARGET= dhid
-
-pre-patch:
- ${MV} -f ${WRKSRC}/dtool ${WRKSRC}/dtool.in
+DEPENDS+= gmp-[0-9]*:../../devel/gmp
do-configure:
- ${SED} -e "s,@PREFIX@,${PREFIX},g" ${WRKSRC}/dtool.in >${WRKSRC}/dtool
- ${SED} -e "s,@PREFIX@,${PREFIX},g" -e "s,@ECHO@,${ECHO},g" \
- ${FILESDIR}/dhid.sh >${WRKDIR}/dhid.sh
+ ${SED} \
+ -e "s,@PREFIX@,${PREFIX},g" \
+ -e "s,@ECHO@,${ECHO},g" \
+ <${FILESDIR}/dhid.sh >${WRKDIR}/dhid.sh
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/dhid ${PREFIX}/libexec
- ${INSTALL_SCRIPT} ${WRKSRC}/dtool ${PREFIX}/sbin
- ${INSTALL_DATA} ${WRKSRC}/dtool.1 ${PREFIX}/man/man1
- ${INSTALL_DATA} ${WRKSRC}/dhid.8 ${PREFIX}/man/man8
- ${INSTALL_SCRIPT} ${WRKDIR}/dhid.sh ${PREFIX}/etc/rc.d
- ${INSTALL_DATA} ${WRKSRC}/dhid.conf ${PREFIX}/share/examples
+ ${INSTALL_PROGRAM} ${WRKSRC}/dhid ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${PREFIX}/sbin/dhid-genkeys
+ ${INSTALL_SCRIPT} ${WRKDIR}/dhid.sh ${PREFIX}/etc/rc.d/dhid
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dhid
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${PREFIX}/share/doc/dhid
+ ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${PREFIX}/share/doc/dhid
+ ${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/dhid
+ ${INSTALL_DATA} ${WRKSRC}/WHATSNEW ${PREFIX}/share/doc/dhid
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/dhid
.include "../../mk/bsd.pkg.mk"
diff --git a/net/dhid/files/dhid.sh b/net/dhid/files/dhid.sh
index f80896b867a..7f03868a1b4 100644
--- a/net/dhid/files/dhid.sh
+++ b/net/dhid/files/dhid.sh
@@ -1,9 +1,29 @@
#!/bin/sh
#
-# $NetBSD: dhid.sh,v 1.1 1999/08/04 14:04:36 jlam Exp $
+# $NetBSD: dhid.sh,v 1.2 2000/08/09 21:00:10 hubertf Exp $
-DHID=@PREFIX@/libexec/dhid
-if [ -f ${DHID} ]; then
- @ECHO@ -n " dhid"
- ${DHID}
-fi
+DHID=@PREFIX@/sbin/dhid
+
+case "$1" in
+start)
+ if [ ! -f "@PREFIX@/etc/dhid.conf" ]; then
+ pkg_info -D dhid
+ echo "@PREFIX@/etc/dhid.conf not found, exiting."
+ exit 1
+ fi
+ if [ -f ${DHID} ]; then
+ @ECHO@ -n " dhid"
+ ${DHID}
+ fi
+ ;;
+stop)
+ if [ -f /var/run/dhid.pid ]; then
+ kill `cat /var/run/dhid.pid`
+ rm -f /var/run/dhid.pid
+ fi
+ ;;
+*)
+ echo "Usage: $0 {start,stop}"
+ exit 1
+ ;;
+esac
diff --git a/net/dhid/files/md5 b/net/dhid/files/md5
index f398acfaa4c..dc557111cd3 100644
--- a/net/dhid/files/md5
+++ b/net/dhid/files/md5
@@ -1,3 +1,3 @@
-$NetBSD: md5,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
+$NetBSD: md5,v 1.2 2000/08/09 21:00:10 hubertf Exp $
-MD5 (dhid-3.0.tar.gz) = bd55b2c076196afd41c147f062990e09
+MD5 (dhid-4.0.1.tar.gz) = d27f0d2c8c3c087d7b5cdd422a1639d8
diff --git a/net/dhid/files/patch-sum b/net/dhid/files/patch-sum
index b406d9a0c1d..e4b860f2545 100644
--- a/net/dhid/files/patch-sum
+++ b/net/dhid/files/patch-sum
@@ -1,6 +1,4 @@
-$NetBSD: patch-sum,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
+$NetBSD: patch-sum,v 1.2 2000/08/09 21:00:10 hubertf Exp $
-MD5 (patch-aa) = a6edcb72e62afabedc1ab02d9b62e7d0
-MD5 (patch-ab) = ee8edf974eb7c113a6b41e036dadbb03
-MD5 (patch-ac) = dcdc9193d9cbe5a67baa5e1188699de3
-MD5 (patch-ad) = 523b2aa17fd69544629efc2221ce7991
+MD5 (patch-aa) = f7be2c12eb5d2dcd0f0399c6ca38793c
+MD5 (patch-ab) = be4385a0dd934f668b1b16240f2245c5
diff --git a/net/dhid/patches/patch-aa b/net/dhid/patches/patch-aa
index 4ec4ca604b7..d0d958313a1 100644
--- a/net/dhid/patches/patch-aa
+++ b/net/dhid/patches/patch-aa
@@ -1,13 +1,30 @@
-$NetBSD: patch-aa,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
+$NetBSD: patch-aa,v 1.2 2000/08/09 21:00:11 hubertf Exp $
---- Makefile.orig Tue Jun 22 07:30:37 1999
-+++ Makefile Mon Jul 19 07:19:04 1999
-@@ -26,7 +26,7 @@
- # DHIS(c) Dynamic Host Information System Release 3.0
-
- CC=cc
--CFLAGS=
-+CFLAGS+=-O2
- LFLAGS=
- LIBS=
+--- Makefile.orig Sat Apr 8 20:02:28 2000
++++ Makefile Mon Aug 7 04:22:23 2000
+@@ -29,8 +29,8 @@
+
+ # Add -lnsl and -lsocket to LIBS in SysV systems
+ #
+-CFLAGS=-I/usr/local/include -DQRC=1
+-LFLAGS=-L/usr/local/lib
++CFLAGS+= -I${LOCALBASE}/include -DQRC=1 -DLOCALBASE=\"${LOCALBASE}\"
++LFLAGS+= -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib
+ LIBS=-lgmp
+
+ # Use these and comment the above if you wish to compile dhid without
+@@ -43,10 +43,13 @@
+
RM=rm -f
+
+-all: dhid
++all: dhid genkeys
+
+ dhid: conf.o network.o main.o
+ $(CC) $(LFLAGS) -o dhid conf.o network.o main.o $(LIBS)
++
++genkeys: genkeys.c
++ $(CC) $(CFLAGS) $(LFLAGS) -o genkeys genkeys.c $(LIBS)
+
+ main.o: dhid.h main.c
+ $(CC) $(CFLAGS) -c main.c
diff --git a/net/dhid/patches/patch-ab b/net/dhid/patches/patch-ab
index b0a90765f78..0cf8d032145 100644
--- a/net/dhid/patches/patch-ab
+++ b/net/dhid/patches/patch-ab
@@ -1,13 +1,15 @@
-$NetBSD: patch-ab,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
+$NetBSD: patch-ab,v 1.2 2000/08/09 21:00:11 hubertf Exp $
---- dhid.h.orig Tue Jun 22 20:01:43 1999
-+++ dhid.h Mon Jul 19 06:24:53 1999
-@@ -64,7 +64,7 @@
- #define POLL_INTERVAL 60
+--- dhid.h.orig Wed Dec 15 19:59:48 1999
++++ dhid.h Mon Aug 7 04:15:57 2000
+@@ -73,8 +73,8 @@
+ #define OFFLINE_REQ 0x00000451
- #define DHID_CONF "/etc/dhid.conf"
+
+-#define DHID_CONF "/etc/dhid.conf"
-#define DHID_PID "/etc/dhid.pid"
++#define DHID_CONF LOCALBASE "/etc/dhid.conf"
+#define DHID_PID "/var/run/dhid.pid"
#define DEF_ISPORT 58800
- #define DEF_MXPORT 58801
+ #define FAIL_ALLOW 3
diff --git a/net/dhid/patches/patch-ac b/net/dhid/patches/patch-ac
deleted file mode 100644
index 644e118e32a..00000000000
--- a/net/dhid/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
-
---- dtool.1.orig Wed Jun 23 20:22:09 1999
-+++ dtool.1 Mon Jul 19 06:34:03 1999
-@@ -13,7 +13,7 @@
- .BR dtool
- command and its usage.
- .BR dtool
--is now a simple bash script that emulates the behaviour
-+is now a simple shell script that emulates the behaviour
- of the former administration utility to DHIS. It allows to send
- online, offline, mail and staus query. It also provides a good way to
- start and stop the daemon manually. Registration, password changes
diff --git a/net/dhid/patches/patch-ad b/net/dhid/patches/patch-ad
deleted file mode 100644
index 470610ee0d1..00000000000
--- a/net/dhid/patches/patch-ad
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ad,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
-
---- dtool.in.orig Fri Jun 25 08:20:58 1999
-+++ dtool.in Mon Jul 19 06:36:42 1999
-@@ -28,7 +28,8 @@
-
- USAGE="usage: dtool [-o] [-d] [-m] [-a host] [-w host] [-k] [-s] [-h]"
-
--PIDFILE=/etc/dhid.pid
-+PIDFILE=/var/run/dhid.pid
-+DHID=@PREFIX@/libexec/dhid
-
-
- usage()
-@@ -77,7 +78,7 @@
- ;;
-
- s)
-- if ( /usr/sbin/dhid ); then
-+ if ( $DHID ); then
- echo "Starting dhid daemon."
- fi
- ;;
diff --git a/net/dhid/pkg/MESSAGE b/net/dhid/pkg/MESSAGE
index 1459f282557..e3ebc99ea38 100644
--- a/net/dhid/pkg/MESSAGE
+++ b/net/dhid/pkg/MESSAGE
@@ -1,15 +1,11 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 1999/07/19 11:38:33 jlam Exp $
+$NetBSD: MESSAGE,v 1.2 2000/08/09 21:00:14 hubertf Exp $
If you don't already have a FQDN with dhis.org domain, you will need to
-register at http://www.dhis.org/sp/register.html.
-
-You will need to install:
-
- ${PREFIX}/share/examples/dhid.conf --> /etc/dhid.conf
-
-and replace `idnumber', `fqdn', and `password' with your DHIS-provided
-host id number, FQDN with dhis.org domain, and update password,
-respectively.
+register at http://www.dhis.org/dhis/register.html.
+You will need to setup /usr/pkg/etc/dhid.conf with settings for
+`idnumber', `fqdn', and `password' with your DHIS-provided host id
+number, FQDN with dhis.org domain, and update password, respectively.
+You receive these values when registerring with dhis.org, see above.
===========================================================================
diff --git a/net/dhid/pkg/PLIST b/net/dhid/pkg/PLIST
index d49af9f3e02..334e06f8a2a 100644
--- a/net/dhid/pkg/PLIST
+++ b/net/dhid/pkg/PLIST
@@ -1,10 +1,10 @@
-@comment $NetBSD: PLIST,v 1.2 1999/08/04 14:04:37 jlam Exp $
-etc/rc.d/dhid.sh
-libexec/dhid
-man/man1/dtool.1
-man/man8/dhid.8
-sbin/dtool
+@comment $NetBSD: PLIST,v 1.3 2000/08/09 21:00:14 hubertf Exp $
+sbin/dhid
+sbin/dhid-genkeys
+etc/rc.d/dhid
share/doc/dhid/COPYRIGHT
share/doc/dhid/README
-share/examples/dhid.conf
+share/doc/dhid/AUTHORS
+share/doc/dhid/WHATSNEW
+share/doc/dhid/INSTALL
@dirrm share/doc/dhid