aboutsummaryrefslogtreecommitdiffstats
path: root/dns/dnrd
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2001-03-11 03:33:51 +0800
committerwill <will@FreeBSD.org>2001-03-11 03:33:51 +0800
commit80206bcb9084541dc164caa7db3c061cd2093b2d (patch)
tree80f097ea2c0a9d627d833365c95cd168b29fb24f /dns/dnrd
parent30b7014249ef005cb49863f749b1ae7b27169185 (diff)
downloadfreebsd-ports-gnome-80206bcb9084541dc164caa7db3c061cd2093b2d.tar.gz
freebsd-ports-gnome-80206bcb9084541dc164caa7db3c061cd2093b2d.tar.zst
freebsd-ports-gnome-80206bcb9084541dc164caa7db3c061cd2093b2d.zip
Add dnrd 2.9, a proxy DNS daemon.
PR: 24107 Submitted by: George Reid <greid@ukug.uk.freebsd.org>
Diffstat (limited to 'dns/dnrd')
-rw-r--r--dns/dnrd/Makefile28
-rw-r--r--dns/dnrd/distinfo1
-rw-r--r--dns/dnrd/files/patch-Makefile46
-rw-r--r--dns/dnrd/files/patch-args.c10
-rw-r--r--dns/dnrd/files/patch-common.h10
-rw-r--r--dns/dnrd/files/patch-dns.c10
-rw-r--r--dns/dnrd/files/patch-main.c83
-rw-r--r--dns/dnrd/files/patch-master.c11
-rw-r--r--dns/dnrd/files/patch-query.h10
-rw-r--r--dns/dnrd/files/patch-tcp.c11
-rw-r--r--dns/dnrd/pkg-comment1
-rw-r--r--dns/dnrd/pkg-descr19
-rw-r--r--dns/dnrd/pkg-plist1
13 files changed, 241 insertions, 0 deletions
diff --git a/dns/dnrd/Makefile b/dns/dnrd/Makefile
new file mode 100644
index 000000000000..3938364c8d36
--- /dev/null
+++ b/dns/dnrd/Makefile
@@ -0,0 +1,28 @@
+# New ports collection makefile for: dnrd
+# Date created: 06 January 2001
+# Whom: George Reid <greid@ukug.uk.freebsd.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dnrd
+PORTVERSION= 2.9
+CATEGORIES= net
+MASTER_SITES= http://members.home.com/garsh/dnrd/archive/
+
+MAINTAINER= greid@ukug.uk.freebsd.org
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
+
+USE_GMAKE= yes
+
+MAN8= dnrd.8
+
+post-patch:
+.for F in main.c master.c
+ @(cd ${WRKSRC} && ${SED} -e 's,%%PREFIX%%,${PREFIX},g' $F > foo && \
+ ${MV} foo $F)
+.endfor
+ ${PERL} -pi -e "s@cc@${CC}@g; s@-lc_r@-pthread@g" ${WRKSRC}/Makefile
+
+.include <bsd.port.mk>
diff --git a/dns/dnrd/distinfo b/dns/dnrd/distinfo
new file mode 100644
index 000000000000..db67cbb65d46
--- /dev/null
+++ b/dns/dnrd/distinfo
@@ -0,0 +1 @@
+MD5 (dnrd-2.9.tar.gz) = ba593a4e1ebff641338663430fe3edef
diff --git a/dns/dnrd/files/patch-Makefile b/dns/dnrd/files/patch-Makefile
new file mode 100644
index 000000000000..5fc2b32ec17b
--- /dev/null
+++ b/dns/dnrd/files/patch-Makefile
@@ -0,0 +1,46 @@
+--- Makefile Tue Nov 2 19:47:10 1999
++++ Makefile.new Sat Mar 10 14:28:13 2001
+@@ -1,13 +1,13 @@
+-CC = gcc
+-COPT = -O2
++CC = cc
++COPT =
+ CDEF = -D_REENTRANT
+-CWARN = -Wall -Werror
+-CDBG = -ggdb
+-CFLAGS = ${CWARN} ${COPT} ${CDEF} ${CDBG}
++CWARN = -Wall
++CDBG =
++CFLAGS += ${CWARN} ${COPT} ${CDEF} ${CDBG}
+ LDFLAGS =
+-LIBS = -lpthread
+-INSTDIR = /usr/local/sbin
+-MANDIR = /usr/local/man/man8
++LIBS = -lc_r
++INSTDIR = ${PREFIX}/sbin
++MANDIR = ${PREFIX}/man/man8
+ SHELL = /bin/sh
+
+ all: dnrd
+@@ -17,17 +17,16 @@
+ rm -f dnrd core tags ID *.o *.d *~ *.bak
+
+ install: dnrd
+- strip dnrd
+- install -m 0751 -o root -g root -s dnrd ${INSTDIR}
+- install -m 0644 -o root -g root -s ../doc/dnrd.8 ${MANDIR}
++ install -m 0755 -s -o root -g wheel -s -c dnrd ${INSTDIR}
++ install -m 0544 -o root -g wheel -c ../doc/dnrd.8 ${MANDIR}
+
+ sources = args.c cache.c common.c dns.c lib.c main.c master.c \
+ query.c relay.c sig.c tcp.c udp.c
+
+-include $(sources:.c=.d)
++#include $(sources:.c=.d)
+
+ dnrd: $(sources:.c=.o)
+- $(CC) $(LDFLAGS) $(LIBS) $^ -o $@
++ $(CC) $(LDFLAGS) $(LIBS) *.o -o $@
+
+ %.d: %.c
+ @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \
diff --git a/dns/dnrd/files/patch-args.c b/dns/dnrd/files/patch-args.c
new file mode 100644
index 000000000000..83b672347fa6
--- /dev/null
+++ b/dns/dnrd/files/patch-args.c
@@ -0,0 +1,10 @@
+--- args.c.orig Sat Jan 6 14:54:15 2001
++++ args.c Sat Jan 6 14:54:57 2001
+@@ -25,6 +25,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #if defined(__GNU_LIBRARY__)
+ # include <getopt.h>
+ #endif
diff --git a/dns/dnrd/files/patch-common.h b/dns/dnrd/files/patch-common.h
new file mode 100644
index 000000000000..9e29c415be18
--- /dev/null
+++ b/dns/dnrd/files/patch-common.h
@@ -0,0 +1,10 @@
+--- common.h.orig Sat Jan 6 14:52:53 2001
++++ common.h Sat Jan 6 14:53:00 2001
+@@ -23,6 +23,7 @@
+ #ifndef _DNRD_COMMON_H_
+ #define _DNRD_COMMON_H_
+
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <syslog.h>
+ #include <semaphore.h>
diff --git a/dns/dnrd/files/patch-dns.c b/dns/dnrd/files/patch-dns.c
new file mode 100644
index 000000000000..5ea94c468580
--- /dev/null
+++ b/dns/dnrd/files/patch-dns.c
@@ -0,0 +1,10 @@
+--- dns.c Thu Jan 4 10:37:21 2001
++++ dns.c.new Sat Mar 10 14:29:38 2001
+@@ -27,6 +27,7 @@
+ #include <ctype.h>
+
+ #include <netdb.h>
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
diff --git a/dns/dnrd/files/patch-main.c b/dns/dnrd/files/patch-main.c
new file mode 100644
index 000000000000..09f5612abf43
--- /dev/null
+++ b/dns/dnrd/files/patch-main.c
@@ -0,0 +1,83 @@
+--- main.c.orig Thu Jan 4 14:40:42 2001
++++ main.c Sat Jan 6 15:06:31 2001
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
++#include <sys/types.h>
+ #include "relay.h"
+ #include "cache.h"
+ #include "common.h"
+@@ -26,7 +27,6 @@
+ #include "master.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+@@ -170,20 +170,20 @@
+ * Change our root and current working directories to /etc/dnrd.
+ * Also, so some sanity checking on that directory first.
+ */
+- dirp = opendir("/etc/dnrd");
++ dirp = opendir("%%PREFIX%%/etc/dnrd");
+ if (!dirp) {
+- log_msg(LOG_ERR, "The directory /etc/dnrd must be created before "
++ log_msg(LOG_ERR, "The directory %%PREFIX%%/etc/dnrd must be created before "
+ "dnrd will run");
+ }
+
+- rslt = stat("/etc/dnrd", &st);
++ rslt = stat("%%PREFIX%%/etc/dnrd", &st);
+ if (st.st_uid != 0) {
+- log_msg(LOG_ERR, "The /etc/dnrd directory must be owned by root");
++ log_msg(LOG_ERR, "The %%PREFIX%%/dnrd directory must be owned by root");
+ cleanexit(-1);
+ }
+ if ((st.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
+ log_msg(LOG_ERR,
+- "The /etc/dnrd directory should only be user writable");
++ "The %%PREFIX%%/etc/dnrd directory should only be user writable");
+ cleanexit(-1);
+ }
+
+@@ -198,31 +198,31 @@
+
+ if (rslt) continue;
+ if (S_ISDIR(st.st_mode)) {
+- log_msg(LOG_ERR, "The /etc/dnrd directory must not contain "
++ log_msg(LOG_ERR, "The %%PREFIX%%/etc/dnrd directory must not contain "
+ "subdirectories");
+ cleanexit(-1);
+ }
+ if ((st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH|S_IWGRP|S_IWOTH)) != 0) {
+- log_msg(LOG_ERR, "A file in /etc/dnrd has either execute "
++ log_msg(LOG_ERR, "A file in %%PREFIX%%/etc/dnrd has either execute "
+ "permissions or non-user write permission. Please do a "
+ "\"chmod a-x,go-w\" on all files in this directory");
+ cleanexit(-1);
+ }
+ if (st.st_uid != 0) {
+- log_msg(LOG_ERR, "All files in /etc/dnrd must be owned by root");
++ log_msg(LOG_ERR, "All files in %%PREFIX%%/etc/dnrd must be owned by root");
+ cleanexit(-1);
+ }
+ }
+ closedir(dirp);
+
+- if (chdir("/etc/dnrd")) {
++ if (chdir("%%PREFIX%%/etc/dnrd")) {
+ log_msg(LOG_ERR, "couldn't chdir to %s, %s",
+- "/etc/dnrd", strerror(errno));
++ "%%PREFIX%%/etc/dnrd", strerror(errno));
+ cleanexit(-1);
+ }
+- if (chroot("/etc/dnrd")) {
++ if (chroot("%%PREFIX%%/etc/dnrd")) {
+ log_msg(LOG_ERR, "couldn't chroot to %s, %s",
+- "/etc/dnrd", strerror(errno));
++ "%%PREFIX%%/etc/dnrd", strerror(errno));
+ cleanexit(-1);
+ }
+
diff --git a/dns/dnrd/files/patch-master.c b/dns/dnrd/files/patch-master.c
new file mode 100644
index 000000000000..16377f1155fa
--- /dev/null
+++ b/dns/dnrd/files/patch-master.c
@@ -0,0 +1,11 @@
+--- master.c.orig Sat Jan 6 15:07:32 2001
++++ master.c Sat Jan 6 15:06:54 2001
+@@ -37,7 +37,7 @@
+ #include "master.h"
+ #include "lib.h"
+
+-#define MASTER_CONFIG "/etc/dnrd/master"
++#define MASTER_CONFIG "%%PREFIX%%/etc/dnrd/master"
+ #define PACKET_ASSEMBLYSIZE 600
+
+
diff --git a/dns/dnrd/files/patch-query.h b/dns/dnrd/files/patch-query.h
new file mode 100644
index 000000000000..31e22ce092bd
--- /dev/null
+++ b/dns/dnrd/files/patch-query.h
@@ -0,0 +1,10 @@
+--- query.h.orig Sat Jan 6 14:56:49 2001
++++ query.h Sat Jan 6 14:56:59 2001
+@@ -25,6 +25,7 @@
+ #ifndef _DNSR_QUERY_H_
+ #define _DNSR_QUERY_H_
+
++#include <sys/types.h>
+ #include <time.h>
+ #include <netinet/in.h>
+
diff --git a/dns/dnrd/files/patch-tcp.c b/dns/dnrd/files/patch-tcp.c
new file mode 100644
index 000000000000..60aaa68ffbcd
--- /dev/null
+++ b/dns/dnrd/files/patch-tcp.c
@@ -0,0 +1,11 @@
+--- tcp.c.orig Sat Jan 6 14:53:45 2001
++++ tcp.c Sat Jan 6 14:53:51 2001
+@@ -23,7 +23,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/fcntl.h>
diff --git a/dns/dnrd/pkg-comment b/dns/dnrd/pkg-comment
new file mode 100644
index 000000000000..3c09965e0672
--- /dev/null
+++ b/dns/dnrd/pkg-comment
@@ -0,0 +1 @@
+A proxy DNS daemon
diff --git a/dns/dnrd/pkg-descr b/dns/dnrd/pkg-descr
new file mode 100644
index 000000000000..3c8e8f93c8b1
--- /dev/null
+++ b/dns/dnrd/pkg-descr
@@ -0,0 +1,19 @@
+DNRD is a proxy name server. To clients on your home network,
+it looks just like a name server. In reality, it forwards every
+DNS query to the "real" DNS server, and forwards responses back
+to the client.
+
+So, why would you want to use it? DNRD was designed for home
+networks where you might want to dial into more than one ISP
+(ie, your home ISP and a dialup connection to your office). The
+problem with multiple dialups is that you need to change
+/etc/resolv.conf for each one. With DNRD, this is no longer
+necessary.
+
+Your dialup machine will run DNRD (with appropriate options for
+forwarding messages to the desired DNS servers). All other
+machines on the home network, including the dialup machine
+itself, will use the dialup machine as its DNS server.
+
+- George Reid
+greid@ukug.uk.freebsd.org
diff --git a/dns/dnrd/pkg-plist b/dns/dnrd/pkg-plist
new file mode 100644
index 000000000000..8b9a119df28d
--- /dev/null
+++ b/dns/dnrd/pkg-plist
@@ -0,0 +1 @@
+sbin/dnrd