diff options
author | will <will@FreeBSD.org> | 2001-03-13 06:52:33 +0800 |
---|---|---|
committer | will <will@FreeBSD.org> | 2001-03-13 06:52:33 +0800 |
commit | da6b4f99c8bef68a1a64f04ad487c8853ccdd2fe (patch) | |
tree | 4b087e8de929258735f86ab5e37ff5f12fda9b4f /dns/dhisd | |
parent | 4f9eed6dd350e25c3c9f58f7ab5bab7d8d909302 (diff) | |
download | freebsd-ports-gnome-da6b4f99c8bef68a1a64f04ad487c8853ccdd2fe.tar.gz freebsd-ports-gnome-da6b4f99c8bef68a1a64f04ad487c8853ccdd2fe.tar.zst freebsd-ports-gnome-da6b4f99c8bef68a1a64f04ad487c8853ccdd2fe.zip |
Add dhisd 4.0, DHIS server for updating dynamic DNS entries in DNS
tables.
PR: 25368
Submitted by: Bas Kruit <baskruit@bsltwr.dhis.org>
Diffstat (limited to 'dns/dhisd')
-rw-r--r-- | dns/dhisd/Makefile | 74 | ||||
-rw-r--r-- | dns/dhisd/distinfo | 1 | ||||
-rw-r--r-- | dns/dhisd/files/dhis.db | 13 | ||||
-rw-r--r-- | dns/dhisd/files/dhisd.sh | 15 | ||||
-rw-r--r-- | dns/dhisd/files/patch-INSTALL | 91 | ||||
-rw-r--r-- | dns/dhisd/files/patch-Makefile | 15 | ||||
-rw-r--r-- | dns/dhisd/files/patch-README | 30 | ||||
-rw-r--r-- | dns/dhisd/files/patch-dhisd.h | 15 | ||||
-rw-r--r-- | dns/dhisd/pkg-comment | 1 | ||||
-rw-r--r-- | dns/dhisd/pkg-descr | 22 | ||||
-rw-r--r-- | dns/dhisd/pkg-plist | 1 |
11 files changed, 278 insertions, 0 deletions
diff --git a/dns/dhisd/Makefile b/dns/dhisd/Makefile new file mode 100644 index 000000000000..20b89c706fb8 --- /dev/null +++ b/dns/dhisd/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: dhisd +# Date created: Sun Feb 25 21:13:59 CET 2001 +# Whom: Bas Kruit <baskruit@bsltwr.dhis.org> +# +# $FreeBSD$ +# + +PORTNAME= dhisd +PORTVERSION= 4.0 +CATEGORIES= net +MASTER_SITES= http://bsltwr.dhis.org/ftp/pub/dhis/ \ + ftp://ftp.dhis.org/pub/dhis/ + +MAINTAINER= baskruit@bsltwr.dhis.org + +DHISBASE= ${PREFIX}/dhis +DIRS= dhis dhis/bin dhis/pid dhis/db dhis/log dhis/script +RDIRS= dhis/bin dhis/pid dhis/db dhis/log dhis/script dhis + +post-patch: + @${ECHO} "===> Patching Makefile" + ${PERL} -i -p -e "s^__PREFIX__^${DHISBASE}^g" ${WRKSRC}/Makefile + @${ECHO} "===> Patching documentation..." + ${PERL} -i -p -e "s^__PREFIX__^${DHISBASE}^g" ${WRKSRC}/INSTALL + ${PERL} -i -p -e "s^__PREFIX__^${DHISBASE}^g" ${WRKSRC}/README + @${ECHO} "===> Patching dhisd.h" + ${PERL} -i -p -e "s^__PREFIX__^${DHISBASE}^g" ${WRKSRC}/dhisd.h + @${ECHO} "===> Patching dhisd.sh" + @${CP} ${FILESDIR}/dhisd.sh ${WRKSRC} + ${PERL} -i -p -e "s^__PREFIX__^${PREFIX}^g" ${WRKSRC}/dhisd.sh + +do-install: + +post-install: +.for dir in ${DIRS} + @${MKDIR} ${PREFIX}/${dir} + @${CHMOD} 700 ${PREFIX}/${dir} +.endfor + ${INSTALL_PROGRAM} ${WRKSRC}/dhisd ${DHISBASE}/bin + @${INSTALL_DATA} ${FILESDIR}/dhis.db ${DHISBASE}/db/dhis.db.sample + @${ECHO} "dhis/bin/dhisd" >> ${TMPPLIST} + @${ECHO} "dhis/db/dhis.db.sample" >> ${TMPPLIST} + @${CHMOD} 600 ${PREFIX}/dhis/db/* +.if !exists(${PREFIX}/etc/rc.d/dhisd.sh) + ${ECHO} "===> Installing ${PREFIX}/etc/rc.d/dhid.sh startup file." + ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dhisd.sh ${PREFIX}/etc/rc.d/dhisd.sh + @${ECHO} "etc/rc.d/dhisd.sh" >> ${TMPPLIST} +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DHISBASE}/doc + @${INSTALL_DATA} ${WRKSRC}/README ${DHISBASE}/doc + @${INSTALL_DATA} ${WRKSRC}/INSTALL ${DHISBASE}/doc + @${CHMOD} 755 ${DHISBASE}/doc + @${ECHO} "dhis/doc/README" >> ${TMPPLIST} + @${ECHO} "dhis/doc/INSTALL" >> ${TMPPLIST} + @${ECHO} "@dirrm dhis/doc" >> ${TMPPLIST} +.endif +.for dir in ${RDIRS} + @${ECHO} "@dirrm ${dir}" >> ${TMPPLIST} +.endfor + @${ECHO} "--------------------------------------------------------------------------" + @${ECHO} "Before dhisd can run, you will need configure BIND." + @${ECHO} "" + @${ECHO} "For more information, see the following site:" + @${ECHO} "http://www.dhis.org/dhis/r4/server.html" +.if !defined(NOPORTDOCS) + @${ECHO} "or ${DHISBASE}/doc/" +.endif + @${ECHO} "" + @${ECHO} "For information on this port, check the following site:" + @${ECHO} "http://bsltwr.dhis.org/dhis/" + @${ECHO} "--------------------------------------------------------------------------" + +.include <bsd.port.mk> diff --git a/dns/dhisd/distinfo b/dns/dhisd/distinfo new file mode 100644 index 000000000000..1981887c4981 --- /dev/null +++ b/dns/dhisd/distinfo @@ -0,0 +1 @@ +MD5 (dhisd-4.0.tar.gz) = 9757deffda1b4a261f4313a4bd1b5ed1 diff --git a/dns/dhisd/files/dhis.db b/dns/dhisd/files/dhis.db new file mode 100644 index 000000000000..c0e821458337 --- /dev/null +++ b/dns/dhisd/files/dhis.db @@ -0,0 +1,13 @@ +1001 { + hostname dyn1.example.com + hostpass password + } + +1002 { + hostname dyn2.example.com + authn 32934593845689467748967498674789585769453 + authn 56456894768497649867849769487659847684977 + authn 22389472897348957348957389457894375849573 + authn 23459435734957398753489573495743985743985 + } + diff --git a/dns/dhisd/files/dhisd.sh b/dns/dhisd/files/dhisd.sh new file mode 100644 index 000000000000..7847c5c6e9e0 --- /dev/null +++ b/dns/dhisd/files/dhisd.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +case "$1" in +start) + [ -x "__PREFIX__/dhis/bin/dhisd" ] && __PREFIX__/dhis/bin/dhisd > /dev/null && echo -n ' dhisd' + ;; +stop) + killall dhisd && echo -n ' dhisd' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/dns/dhisd/files/patch-INSTALL b/dns/dhisd/files/patch-INSTALL new file mode 100644 index 000000000000..495cbe513b52 --- /dev/null +++ b/dns/dhisd/files/patch-INSTALL @@ -0,0 +1,91 @@ +--- INSTALL.orig Sun May 7 19:35:19 2000 ++++ INSTALL Mon Feb 26 01:00:37 2001 +@@ -87,17 +87,17 @@ + + Create the directories: + +- /etc/dhis +- /etc/dhis/bin +- /etc/dhis/pid +- /etc/dhis/db +- /etc/dhis/log +- /etc/dhis/script ++ __PREFIX__ ++ __PREFIX__/bin ++ __PREFIX__/pid ++ __PREFIX__/db ++ __PREFIX__/log ++ __PREFIX__/script + +- You may wish to create /etc/dhis/src and put dhisd-4.0 under ++ You may wish to create __PREFIX__/src and put dhisd-4.0 under + this directory. + +- Copy dhisd to /etc/dhis/bin . This is the server binary. ++ Copy dhisd to __PREFIX__/bin . This is the server binary. + + Create the database file which will hold information for + current dynamic hosts. For this installation let us assume +@@ -105,7 +105,7 @@ + example.com, and that we wish to create 3 dynamic hosts + named dyn1.example.com, dyn2.example.com and dyn3.example.com + +- Change directory to /etc/dhis/db ++ Change directory to __PREFIX__/db + + Create a text file named dhis.db with a text editor. + The file should have three lines, one for each dynamic host. +@@ -179,20 +179,20 @@ + Change the permissions as you wish. In particular dhis.db + should not be readable by anyone. Suggested example: + +- chmod 700 /etc/dhis /etc/dhis/* +- chmod 600 /etc/dhis/db/dhis.db ++ chmod 700 __PREFIX__ __PREFIX__/* ++ chmod 600 __PREFIX__/db/dhis.db + + Add dhisd to your system's startup script + (rc.local for BSD systems, SXXdhis under /etc/rc2.d + for System V). A simple line such as + +- /etc/dhis/bin/dhisd ++ __PREFIX__/bin/dhisd + + will do. However, if your service will provide mail + relaying as well you must specify the relay's IP address, + in which case the line should look like: + +- /etc/dhis/bin/dhisd -m y.y.y.y ++ __PREFIX__/bin/dhisd -m y.y.y.y + + where y.y.y.y is the IP address of the mail relay (may be + the same host). Check the relay-4.0.tar.gz distribution +@@ -209,7 +209,7 @@ + present, the relay machine is identified by relay.example.com. + Again, these may point to the same machine. + +- Edit /etc/named.conf and add a section such as: ++ Edit /etc/named/named.conf and add a section such as: + + zone "example.com" in { + +@@ -277,8 +277,8 @@ + + DNS is now running and accepting dynamic updates. + +- You may also run /etc/dhis/bin/dhisd or +- /etc/dhis/bin/dhisd -m y.y.y.y manually by now if ++ You may also run __PREFIX__/bin/dhisd or ++ __PREFIX__/bin/dhisd -m y.y.y.y manually by now if + you wish to run DHIS at once. + + 4. Adding Records +@@ -301,7 +301,7 @@ + + run + +- kill -HUP `cat /etc/dhis/pid/dhisd.pid` ++ kill -HUP `cat __PREFIX__/pid/dhisd.pid` + + to reload the DHIS database. + diff --git a/dns/dhisd/files/patch-Makefile b/dns/dhisd/files/patch-Makefile new file mode 100644 index 000000000000..a1c5f7ac0bd2 --- /dev/null +++ b/dns/dhisd/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig Sat Feb 24 02:59:57 2001 ++++ Makefile Sat Feb 24 03:01:42 2001 +@@ -28,9 +28,11 @@ + CC=gcc + CFLAGS=-I/usr/local/include + LFLAGS=-L/usr/local/lib +-LIBS=-lbind -lgmp ++LIBS=-lgmp + OBJS=log.o network.o misc.o db.o online.o nsupdate.o main.o + RM=rm -f ++ ++all: dhisd + + dhisd: $(OBJS) + $(CC) $(LFLAGS) -o dhisd $(OBJS) $(LIBS) diff --git a/dns/dhisd/files/patch-README b/dns/dhisd/files/patch-README new file mode 100644 index 000000000000..2a7fed26476c --- /dev/null +++ b/dns/dhisd/files/patch-README @@ -0,0 +1,30 @@ +--- README.orig Sun Apr 30 18:51:47 2000 ++++ README Mon Feb 26 00:55:38 2001 +@@ -29,7 +29,8 @@ + would result in non-existent host. Thus, the presence of + an IP address, even while offline, is essencial. + +- The DHIS server dhisd runs a database file (/etc/dhis/db/dhis.db) ++ The DHIS server dhisd runs a database file ++ (__PREFIX__/db/dhis.db) + and loads the current list of dynamic hosts into memory. + Furthermore it expects datagram packets to be received on + port 58800 from the connecting clients running dhid. +@@ -91,7 +92,7 @@ + dhisd accepts HUP and TERM signals. A kill -HUP will + make it reload the hosts database and kill -TERM + will terminate it. Its pid number is recorded on the +- text file /etc/dhis/pid/dhisd.pid. ++ text file __PREFIX__/pid/dhisd.pid. + + The current DHIS server is expected to perform well + on a 100Mhz machine with up to 5000 dynamic hosts. +@@ -99,7 +100,7 @@ + users. + + dhisd logs online and offline transitions at +- /etc/dhis/log/dhisd.log ++ __PREFIX__/log/dhisd.log + + + Firewall considerations: diff --git a/dns/dhisd/files/patch-dhisd.h b/dns/dhisd/files/patch-dhisd.h new file mode 100644 index 000000000000..6280c561a479 --- /dev/null +++ b/dns/dhisd/files/patch-dhisd.h @@ -0,0 +1,15 @@ +--- dhisd.h.orig Mon Mar 13 18:08:04 2000 ++++ dhisd.h Mon Feb 26 01:03:00 2001 +@@ -62,9 +62,9 @@ + + #define MX_PORT 58801 + #define DHISD_PORT 58800 +-#define DHISD_PID "/etc/dhis/pid/dhisd.pid" +-#define DHISD_DB "/etc/dhis/db/dhis.db" +-#define DHISD_LOG "/etc/dhis/log/dhisd.log" ++#define DHISD_PID "__PREFIX__/pid/dhisd.pid" ++#define DHISD_DB "__PREFIX__/db/dhis.db" ++#define DHISD_LOG "__PREFIX__/log/dhisd.log" + + #define MAX_HOSTNAME 64 + #define MAX_PASS 16 diff --git a/dns/dhisd/pkg-comment b/dns/dhisd/pkg-comment new file mode 100644 index 000000000000..803dc7a57152 --- /dev/null +++ b/dns/dhisd/pkg-comment @@ -0,0 +1 @@ +DHIS server for updating dynamic DNS entries in DNS tables diff --git a/dns/dhisd/pkg-descr b/dns/dhisd/pkg-descr new file mode 100644 index 000000000000..521b0191cef0 --- /dev/null +++ b/dns/dhisd/pkg-descr @@ -0,0 +1,22 @@ +DHIS Daemon release 4.0 +============================== + +dhisd is the DHIS daemon. The deamon is used to update DNS tables on a +running unix based DNS server, running BIND 8.1.2 or higher. It's clients +should run the dhis-client 3 or 4 software to send updates. + +You need a full DNS domain to run this server. You should at least have a +domain hosted for you with a primary and backup dns server and 1 +backup mail-exchanger +. +If you don't know what this previous few lines where about, +you probably shouldn't try and run this software. + +For more information on the services of DHIS, you should look at the +official DHIS site: + http://www.dhis.org/dhis/services/ + +For more info on the FreeBSD port, see + http://bsltwr.dhis.org/dhis + +WWW: http://bsltwr.dhis.org/dhis/ diff --git a/dns/dhisd/pkg-plist b/dns/dhisd/pkg-plist new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/dns/dhisd/pkg-plist @@ -0,0 +1 @@ + |