Commit Diff
Diff:
c513e46689782c057ef0b48ed215dba01b643821
af7c8454ecd1a59d9ad7931102d085aa0ef4f3bd
Commit:
af7c8454ecd1a59d9ad7931102d085aa0ef4f3bd
Tree:
7d180b6bd5b96a1cd97a352bf985b2aa4cdb5be5
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Wed Jun 12 14:58:48 2019 UTC
Message:
Make NetBSD compile. For this one has to install libressl from the pkgsrc.
blob - b7913fb30869af6f9b74df4e1f251fb9bc4f71fc
blob + a600550c901495c80bf7db46452047a37102f614
--- README
+++ README
@@ -1,4 +1,4 @@
-$Id: README,v 1.31 2018/10/19 08:16:29 pjp Exp $
+$Id: README,v 1.32 2019/06/12 14:58:48 pjp Exp $
1. README
2. WHY DELPHINUSDNS?
@@ -118,10 +118,14 @@ $ make install
3.4 NetBSD
----------
-The tests for this were done on NetBSD 7.1.2
+The tests for this were done on NetBSD 8.1
## create paths needed
$ mkdir -p /usr/local/sbin /usr/local/man/man/man5 /usr/local/man/man/man8 /usr/local/man/man/html5/ /usr/local/man/man/html8
+## install libressl from pkgsrc
+$ cd /usr/pkgsrc/security/libressl && make install
+## add libressl to ld.so search path
+$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/pkg/libressl/lib
## configure the platform
$ ./configure
## add a privsep user with a chroot directory (as root)
@@ -147,7 +151,7 @@ Operating System | makes and compiles | responds to q
------------------+--------------------+---------------------+
FreeBSD 11.2 | yes | yes |
------------------+--------------------+---------------------+
-NetBSD 7.1 | yes | yes |
+NetBSD 8.1 | yes | yes |
------------------+--------------------+---------------------+
OpenBSD 6.4 | yes | yes |
------------------+--------------------+---------------------+
blob - 21e43251558e7efd2daf60aefc6679557a2421bd
blob + c085645ce0b51fd70e5f7909c8b08c660c44d232
--- configure
+++ configure
@@ -36,6 +36,10 @@ openbsd() {
netbsd() {
echo configuring for NetBSD
+ if [ ! -d /usr/pkg/libressl ]; then
+ echo must install libressl in pkgsrc. 1>&2
+ exit 1
+ fi
cp Makefile.netbsd Makefile
cp delphinusdnsd/Makefile.netbsd delphinusdnsd/Makefile
cp dddctl/Makefile.netbsd dddctl/Makefile
blob - a25846a5adc9d2059d09c0631d671cf98017f0a6
blob + 5168742f8f84c9e1e772a36181de8b5871780205
--- dddctl/Makefile.netbsd
+++ dddctl/Makefile.netbsd
@@ -5,8 +5,8 @@ PROG=dddctl
SRCS=dddctl.c parse.y base64.c dnssec.c util.c ent.c db.c raxfr.c
CFLAGS= -g
-CFLAGS+= -I${.CURDIR}/..
-LDFLAGS= -g -L/usr/pkg/lib -R/usr/pkg/lib
+CFLAGS+= -I${.CURDIR}/.. -I/usr/pkg/libressl/include
+LDFLAGS= -g -L/usr/pkg/lib -L/usr/pkg/libressl/lib -R/usr/pkg/lib
LDADD= -lcrypto -lssl
OBJDIR=.
blob - 56deaf698d836744615b463e20f9e7de3696acb0
blob + cccf4e1bf8f76f239d050583df7aa3a8577fdbba
--- delphinusdnsd/Makefile.netbsd
+++ delphinusdnsd/Makefile.netbsd
@@ -5,8 +5,8 @@ PROG=delphinusdnsd
SRCS=delphinusdnsd.c parse.y reply.c additional.c region.c log.c axfr.c filter.c ratelimit.c whitelist.c base64.c dnssec.c util.c ent.c db.c imsg-buffer.c imsg.c tsig.c
CFLAGS= -g
-CFLAGS+= -I${.CURDIR}/..
-LDFLAGS= -g -L/usr/pkg/lib -R/usr/pkg/lib
+CFLAGS+= -I${.CURDIR}/.. -I/usr/pkg/libressl/include
+LDFLAGS= -g -L/usr/pkg/lib -L/usr/pkg/libressl/lib -R/usr/pkg/lib
LDADD= -lcrypto -lssl
blob - 316371939e02c75a733b1153a6d8b9931859223b
blob + 6e8d9f515fe6c9c7a29d342a0913fd8ed7c5a94e
--- parse.y
+++ parse.y
@@ -21,7 +21,7 @@
*/
/*
- * $Id: parse.y,v 1.68 2019/06/06 14:56:08 pjp Exp $
+ * $Id: parse.y,v 1.69 2019/06/12 14:58:48 pjp Exp $
*/
%{
@@ -471,7 +471,7 @@ rzonestatement:
rz->masterport = $2 & 0xffff;
-#ifndef __linux__
+#ifdef __OpenBSD__
if (debug)
printf("at rzone %x, set masterport to %d\n", (unsigned int)rz, rz->masterport);
#endif
@@ -494,7 +494,7 @@ rzonestatement:
rz->master = p;
-#ifndef __linux__
+#ifdef __OpenBSD__
if (debug)
printf("at rzone %x, added master server at %s\n", (unsigned int)rz,
p);
@@ -521,20 +521,20 @@ rzonestatement:
if (strcmp($1, "zonename") == 0) {
rz->zonename = p;
-#ifndef __linux__
+#ifdef __OpenBSD__
if (debug)
printf("at rzone %x, added zonename of %s\n", (unsigned int)rz, p);
#endif
} else if (strcmp($1, "filename") == 0) {
rz->filename = p;
-#ifndef __linux__
+#ifdef __OpenBSD__
if (debug)
printf("at rzone %x, added filename of %s\n", (unsigned int)rz, p);
#endif
} else if (strcmp($1, "tsigkey") == 0) {
rz->tsigkey = p;
-#ifndef __linux__
+#ifdef __OpenBSD__
if (debug)
printf("at rzone %x, added tsigkey of %s\n", (unsigned int)rz, p);
#endif
@@ -3507,7 +3507,7 @@ add_rzone(void)
lrz->filename = NULL;
SLIST_INSERT_HEAD(&rzones, lrz, rzone_entry);
-#ifndef __linux__
+#ifdef __OpenBSD__
if (debug)
printf("added rzone at 0x%x\n", (unsigned int)lrz);
#endif
blob - 4bc3116f6d7777bb039f0a41ddaed6d0d0ec1931
blob + 0b3cba9160954f3819e65aef5d0571d966a31f4b
--- util.c
+++ util.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: util.c,v 1.33 2019/06/07 04:25:50 pjp Exp $
+ * $Id: util.c,v 1.34 2019/06/12 14:58:48 pjp Exp $
*/
#include <sys/types.h>
@@ -1087,7 +1087,7 @@ build_question(char *buf, int len, int additional, cha
tsigrr = (struct dns_tsigrr *)&buf[i];
/* XXX */
-#if defined __linux__ || defined __FreeBSD__
+#ifndef __OpenBSD__
timefudge = be64toh(tsigrr->timefudge);
#else
timefudge = betoh64(tsigrr->timefudge);
repomaster@centroid.eu