threaded dns daemon, optimized for caching
Submitted by Sebastian Stark <seb@todesplanet.de>
This commit is contained in:
parent
82bb46e55f
commit
82a4c631a2
39
net/pdnsd/Makefile
Normal file
39
net/pdnsd/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $
|
||||
|
||||
COMMENT= "threaded dns daemon, optimized for caching"
|
||||
|
||||
DISTNAME= pdnsd-1.1.5
|
||||
CATEGORIES= net
|
||||
NEED_VERSION= 1.414
|
||||
HOMEPAGE= http://home.t-online.de/home/Moestl/
|
||||
|
||||
MAINTAINER= Sebastian Stark <seb@todesplanet.de>
|
||||
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}
|
||||
|
||||
SEPARATE_BUILD= concurrent
|
||||
|
||||
CONFIGURE_STYLE= gnu
|
||||
CONFIGURE_ARGS+= --with-target=BSD \
|
||||
--with-random-device=arc4random \
|
||||
--enable-strict-rfc2181 \
|
||||
--with-cachedir="/var/pdnsd" \
|
||||
--with-default-id=pdnsd
|
||||
|
||||
DOCFILES= faq.txt intro.txt manual.txt
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pdnsd
|
||||
${INSTALL_DATA} ${WRKBUILD}/doc/pdnsd.conf ${PREFIX}/share/examples/pdnsd
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pdnsd
|
||||
.for file in ${DOCFILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/txt/${file} ${PREFIX}/share/doc/pdnsd
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
3
net/pdnsd/files/md5
Normal file
3
net/pdnsd/files/md5
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (pdnsd-1.1.5.tar.gz) = 847376a31a8546f5a800d18011beca32
|
||||
RMD160 (pdnsd-1.1.5.tar.gz) = 55a28a46427e63cf0142615795d9a976ad1e5a46
|
||||
SHA1 (pdnsd-1.1.5.tar.gz) = 759a49ed69db0ebb93ae957c1506828279ab2554
|
14
net/pdnsd/patches/patch-icmp_c
Normal file
14
net/pdnsd/patches/patch-icmp_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-icmp_c,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $
|
||||
|
||||
--- src/icmp.c.orig Wed May 9 19:51:52 2001
|
||||
+++ src/icmp.c Thu Jun 14 11:09:30 2001
|
||||
@@ -48,7 +48,9 @@ Boston, MA 02111-1307, USA. */
|
||||
# include <netinet/ip6.h>
|
||||
# include <netinet/icmp6.h>
|
||||
#endif
|
||||
+#ifndef __OPENBSD__
|
||||
#include <netinet/ip.h>
|
||||
+#endif
|
||||
#include <netdb.h>
|
||||
#include "icmp.h"
|
||||
#include "error.h"
|
31
net/pdnsd/patches/patch-netdev_c
Normal file
31
net/pdnsd/patches/patch-netdev_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-netdev_c,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $
|
||||
|
||||
- add define from FreeBSD net/if.h as we don't have it here
|
||||
|
||||
--- src/netdev.c.orig Wed May 9 19:51:52 2001
|
||||
+++ src/netdev.c Thu Jun 14 11:09:05 2001
|
||||
@@ -22,7 +22,9 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "ipvers.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#ifndef __OPENBSD__
|
||||
#include <net/if.h>
|
||||
+#endif
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@@ -37,6 +39,14 @@ Boston, MA 02111-1307, USA. */
|
||||
static char rcsid[]="$Id: patch-netdev_c,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $";
|
||||
#endif
|
||||
|
||||
+/* borrowed from FreeBSD net/if.h */
|
||||
+#ifdef __OpenBSD__
|
||||
+#define _SIZEOF_ADDR_IFREQ(ifr) \
|
||||
+((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
|
||||
+ (sizeof(struct ifreq) - sizeof(struct sockaddr) + \
|
||||
+ (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* These portion is Linux/FreeBSD specific. Please write interface-detection routines for other
|
||||
* flavours of Unix if you can and want.
|
51
net/pdnsd/pkg/DEINSTALL
Normal file
51
net/pdnsd/pkg/DEINSTALL
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $
|
||||
#
|
||||
# De-installation setup of pdnsd
|
||||
|
||||
# exit on errors, use a sane path and install prefix
|
||||
#
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
|
||||
# Function: tell the user what they need to do to delete the port completely
|
||||
#
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To completely deinstall the $1 package you need to perform"
|
||||
echo "| these steps as root:"
|
||||
echo "|"
|
||||
echo "| rm -f ${CONFIG_DIR}/pdnsd.conf"
|
||||
echo "| rm -rf /var/pdnsd"
|
||||
echo "| rm -f /var/run/pdnsd.pid"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| at some future time."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# Verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
do_notice "$1"
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
21
net/pdnsd/pkg/DESCR
Normal file
21
net/pdnsd/pkg/DESCR
Normal file
@ -0,0 +1,21 @@
|
||||
pdnsd is a proxy dns server with permanent caching (the cache
|
||||
contents are written to hard disk on exit) that is designed to cope
|
||||
with unreacheable or down dns servers (for example in dial-in
|
||||
networking).
|
||||
|
||||
pdnsd is configurable via a file and supports run-time configuration
|
||||
using the program pdnsd-ctl that comes with pdnsd.
|
||||
|
||||
Wonder why you should use it instead of BIND?
|
||||
|
||||
* permanent disk cache (useful for frequent power-offs/reboots)
|
||||
* usually smaller memory footprint (depends on cache size)
|
||||
* offline-detection prevents hangs (e.g. the typical hang on startup
|
||||
of some Netscape Navigator versions if not dialed in)
|
||||
* better control about timeouts (also to prevent hangs)
|
||||
* better control over the cache
|
||||
* better run-time control
|
||||
* strict RFC 2181 matching
|
||||
* negative cacheing
|
||||
|
||||
WWW: ${HOMEPAGE}
|
136
net/pdnsd/pkg/INSTALL
Normal file
136
net/pdnsd/pkg/INSTALL
Normal file
@ -0,0 +1,136 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $
|
||||
#
|
||||
# Pre/post-installation setup of pdnsd
|
||||
|
||||
# exit on errors, use a sane path and install prefix
|
||||
#
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=${SYSCONFDIR}
|
||||
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/pdnsd
|
||||
CACHE_DIR=/var/pdnsd
|
||||
ID=pdnsd
|
||||
|
||||
# Function: user "pdnsd" is not available
|
||||
#
|
||||
do_notice_user()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| Please add user ${ID} and group ${ID}"
|
||||
echo "| "$1" won't work without it."
|
||||
echo "| Example:"
|
||||
echo "| groupadd ${ID}"
|
||||
echo "| useradd -c PDNSD -d /nonexistent -g ${ID} -s /sbin/nologin ${ID}"
|
||||
echo "+---------------"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Function: install configuration files
|
||||
#
|
||||
do_install_conf()
|
||||
{
|
||||
install -d -o root -g wheel ${CONFIG_DIR}
|
||||
install -o root -g wheel ${SAMPLE_CONFIG_DIR}/pdnsd.conf \
|
||||
${CONFIG_DIR}/pdnsd.conf
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The $1 configuration files have been installed in ${CONFIG_DIR}."
|
||||
echo "| Please view these files and change the configuration to meet"
|
||||
echo "| your needs."
|
||||
echo "|"
|
||||
echo "| You may want to put the following in /etc/rc.local:"
|
||||
echo "|"
|
||||
echo "| if [ -x /usr/local/sbin/pdnsd ]; then"
|
||||
echo "| echo -n ' pdnsd'; /usr/local/sbin/pdnsd -4 -s -d -p /var/run/pdnsd.pid"
|
||||
echo "| fi"
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: install cache dir
|
||||
#
|
||||
do_install_cachedir()
|
||||
{
|
||||
install -d -o ${ID} -g ${ID} ${CACHE_DIR}
|
||||
dd if=/dev/zero of=${CACHE_DIR}/pdnsd.cache bs=1 count=4 2>/dev/null
|
||||
chown ${ID}:${ID} ${CACHE_DIR}/pdnsd.cache
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The $1 caching directory has been installed in ${CACHE_DIR}."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: tell the user what they need to do to use the port just installed
|
||||
#
|
||||
do_notice_conf()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration files in ${CONFIG_DIR} have NOT"
|
||||
echo "| been changed. You may want to compare them to the current samples"
|
||||
echo "| in ${SAMPLE_CONFIG_DIR}, and update your configuration files"
|
||||
echo "| as needed."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: tell the user what they need to do to use the port just installed
|
||||
#
|
||||
do_notice_cachedir()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The caching directory ${CACHE_DIR} has not been touched."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# Function: inform user where documentation has been installed
|
||||
#
|
||||
do_notice_docs()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| Documentation files for $1 have been copied to"
|
||||
echo "| ${PREFIX}/share/doc/pdnsd"
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
userinfo -e ${ID} || do_notice_user "$1"
|
||||
groupinfo -e ${ID} || do_notice_user "$1"
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ ! -d ${CONFIG_DIR} ]; then
|
||||
do_install_conf "$1"
|
||||
elif [ ! -f ${CONFIG_DIR}/pdnsd.conf ]; then
|
||||
do_install_conf "$1"
|
||||
else
|
||||
do_notice_conf "$1"
|
||||
fi
|
||||
if [ ! -d ${CACHE_DIR} ]; then
|
||||
do_install_cachedir "$1"
|
||||
else
|
||||
do_notice_cachedir "$1"
|
||||
fi
|
||||
do_notice_docs "$1"
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
10
net/pdnsd/pkg/PLIST
Normal file
10
net/pdnsd/pkg/PLIST
Normal file
@ -0,0 +1,10 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $
|
||||
man/man8/pdnsd-ctl.8
|
||||
sbin/pdnsd
|
||||
sbin/pdnsd-ctl
|
||||
share/doc/pdnsd/faq.txt
|
||||
share/doc/pdnsd/intro.txt
|
||||
share/doc/pdnsd/manual.txt
|
||||
share/examples/pdnsd/pdnsd.conf
|
||||
@dirrm share/examples/pdnsd
|
||||
@dirrm share/doc/pdnsd
|
Loading…
Reference in New Issue
Block a user