diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2014-02-20 15:44:56 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2014-02-20 15:44:56 +0000 |
commit | f3a13d06cdd8a71d9f84047312357795985fd3d2 (patch) | |
tree | 51551230715164748bdb812b26ec241a40182750 /dns/maradns/files | |
parent | 5461311fedab1f8cfc6c7d5e4f0ae939061653c0 (diff) | |
download | ports-f3a13d06cdd8a71d9f84047312357795985fd3d2.tar.gz ports-f3a13d06cdd8a71d9f84047312357795985fd3d2.zip |
Notes
Diffstat (limited to 'dns/maradns/files')
-rw-r--r-- | dns/maradns/files/Deadwood.in | 25 | ||||
-rw-r--r-- | dns/maradns/files/maradns.in | 4 | ||||
-rw-r--r-- | dns/maradns/files/patch-MaraDns.h | 21 | ||||
-rw-r--r-- | dns/maradns/files/patch-build_Makefile.freebsd | 12 | ||||
-rw-r--r-- | dns/maradns/files/patch-configure | 12 | ||||
-rw-r--r-- | dns/maradns/files/patch-example_full_mararc | 14 | ||||
-rw-r--r-- | dns/maradns/files/patch-tools_Makefile.recursive | 11 | ||||
-rw-r--r-- | dns/maradns/files/patch-tools__Makefile | 11 | ||||
-rw-r--r-- | dns/maradns/files/patch-tools_duende.c | 77 | ||||
-rw-r--r-- | dns/maradns/files/zoneserver.in | 4 |
10 files changed, 70 insertions, 121 deletions
diff --git a/dns/maradns/files/Deadwood.in b/dns/maradns/files/Deadwood.in new file mode 100644 index 000000000000..7344891ca489 --- /dev/null +++ b/dns/maradns/files/Deadwood.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: Deadwood +# REQUIRE: SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown +# + +. /etc/rc.subr + +: ${dwood3_enable="NO"} +: ${dwood3_conf="%%ETCDIR%%/dwood3rc"} + +name="Deadwood" +rcvar=dwood3_enable +command="%%PREFIX%%/bin/duende" +pidfile="/var/run/${name}.pid" +command_args="--pid=${pidfile} %%PREFIX%%/sbin/Deadwood -f ${dwood3_conf}" + +load_rc_config $name + +run_rc_command "$1" diff --git a/dns/maradns/files/maradns.in b/dns/maradns/files/maradns.in index 0d36f307f9b6..eaf7197877c1 100644 --- a/dns/maradns/files/maradns.in +++ b/dns/maradns/files/maradns.in @@ -12,13 +12,13 @@ . /etc/rc.subr : ${maradns_enable="NO"} -: ${maradns_conf="%%PREFIX%%/etc/mararc"} +: ${maradns_conf="%%ETCDIR%%/mararc"} name="maradns" rcvar=maradns_enable command="%%PREFIX%%/bin/duende" -command_args="%%PREFIX%%/sbin/maradns -f ${maradns_conf}" pidfile="/var/run/${name}.pid" +command_args="--pid=${pidfile} %%PREFIX%%/sbin/maradns -f ${maradns_conf}" load_rc_config $name diff --git a/dns/maradns/files/patch-MaraDns.h b/dns/maradns/files/patch-MaraDns.h index 45ff326b37f7..d61f25b945ad 100644 --- a/dns/maradns/files/patch-MaraDns.h +++ b/dns/maradns/files/patch-MaraDns.h @@ -1,6 +1,15 @@ ---- MaraDns.h.orig Sat Jun 2 13:46:12 2007 -+++ MaraDns.h Sat Jun 2 13:47:12 2007 -@@ -75,16 +75,16 @@ +--- ./MaraDns.h.orig 2014-02-12 08:17:18.000000000 +0000 ++++ ./MaraDns.h 2014-02-20 15:23:22.000000000 +0000 +@@ -54,7 +54,7 @@ + /* The default UID (User ID) that MaraDNS has; I put this here so packagers + can change this easily. This should be the 'nobody' user, or, optionally + a special 'MaraDNS' user. This user needs to be able to enter +- the /etc/maradns directory, and read all zone files in /etc/maradns ++ the /usr/local/usr/local/usr/local/etc/maradns directory, and read all zone files in /usr/local/usr/local/usr/local/etc/maradns + + If you change this from 99, please also change the mararc man page, which + states the default value for this is 99. To change the man page: +@@ -77,21 +77,21 @@ line to point to Bash */ @@ -20,3 +29,9 @@ /* The directory that Duende runs in. This directory has to exist for Duende to be able to run. Again, IF YOU CHANGE THIS, CHANGE THE + DUENDE MAN PAGE */ +-#define DUENDE_CHROOT_DIR "/etc/maradns/logger" ++#define DUENDE_CHROOT_DIR "/var/empty/" + + /* The default IP address that Askmara uses; this used to be 127.0.0.3 + but is now 127.0.0.1 because many non-Linux systems only use 127.0.0.1 diff --git a/dns/maradns/files/patch-build_Makefile.freebsd b/dns/maradns/files/patch-build_Makefile.freebsd deleted file mode 100644 index f1a59ce0c92e..000000000000 --- a/dns/maradns/files/patch-build_Makefile.freebsd +++ /dev/null @@ -1,12 +0,0 @@ ---- build/Makefile.freebsd.orig 2006-01-22 06:22:01.000000000 +0100 -+++ build/Makefile.freebsd 2012-10-23 16:10:31.188976256 +0200 -@@ -27,8 +27,7 @@ - Q="DEFINES=-DSELECT_PROBLEM" - - # FreeBSD needs some special flags to compile MaraDNS --CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" --M=CC=$(CC) -+M="CC=$(CC) -O2 -Wall -pipe -D_THREAD_SAFE -pthread" - V="VERSION=$(VERSION)" - - # Debug diff --git a/dns/maradns/files/patch-configure b/dns/maradns/files/patch-configure new file mode 100644 index 000000000000..15a3fdbf9480 --- /dev/null +++ b/dns/maradns/files/patch-configure @@ -0,0 +1,12 @@ +--- ./configure.orig 2014-01-14 21:46:25.000000000 +0000 ++++ ./configure 2014-02-20 15:33:18.000000000 +0000 +@@ -93,6 +93,9 @@ + echo It looks like you are using Cygwin\; this should compile fine + echo by typing in \'make\'. + EXITCODE=0 ++elif echo $UNAME | grep -i freebsd > /dev/null ; then ++ cat $BUILDDIR/Makefile.freebsd >> Makefile ++ EXITCODE=0 + # This is a a template for adding support to a new OS for MaraDNS. + # Some points: If you port MaraDNS, make sure the underlying OS has + # /dev/urandom support or have the default mararc have a diff --git a/dns/maradns/files/patch-example_full_mararc b/dns/maradns/files/patch-example_full_mararc deleted file mode 100644 index 9b09fb0ad786..000000000000 --- a/dns/maradns/files/patch-example_full_mararc +++ /dev/null @@ -1,14 +0,0 @@ ---- doc/en/examples/example_full_mararc.orig Thu Dec 22 16:10:23 2005 -+++ doc/en/examples/example_full_mararc Thu Dec 22 16:10:40 2005 -@@ -16,9 +16,9 @@ - # The directory with all of the zone files - chroot_dir = "/etc/maradns" - # The numeric UID MaraDNS will run as --maradns_uid = 99 -+maradns_uid = 53 - # The (optional) numeric GID MaraDNS will run as --# maradns_gid = 99 -+maradns_gid = 53 - # The maximum number of threads (or processes, with the zone server) - # MaraDNS is allowed to run - maxprocs = 96 diff --git a/dns/maradns/files/patch-tools_Makefile.recursive b/dns/maradns/files/patch-tools_Makefile.recursive deleted file mode 100644 index 52653b5a7140..000000000000 --- a/dns/maradns/files/patch-tools_Makefile.recursive +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/Makefile.recursive.orig 2006-01-02 17:59:33.000000000 +0100 -+++ tools/Makefile.recursive 2010-01-08 09:51:36.000000000 +0100 -@@ -27,7 +27,7 @@ - $(CC) $(FLAGS) -o benchmark benchmark.c $(OBJECTS) $(POBJECTS) - - duende: duende.c -- $(CC) $(FLAGS) -o duende duende.c -+ $(CC) $(FLAGS) -o duende duende.c -lutil - - strip.control: strip.control.c - $(CC) $(FLAGS) -o strip.control strip.control.c diff --git a/dns/maradns/files/patch-tools__Makefile b/dns/maradns/files/patch-tools__Makefile new file mode 100644 index 000000000000..e9221ffd6210 --- /dev/null +++ b/dns/maradns/files/patch-tools__Makefile @@ -0,0 +1,11 @@ +--- ./tools/Makefile.orig 2010-09-09 20:21:09.000000000 +0000 ++++ ./tools/Makefile 2014-02-20 15:23:49.000000000 +0000 +@@ -18,7 +18,7 @@ + rm -f core $(EXECS) *.exe + + askmara: askmara.c askmara_labels_en.h $(OBJECTS) $(Q) $(OUTOBJ) +- $(CC) $(FLAGS) -DAUTHONLY -o askmara askmara.c $(OBJECTS) $(Q) $(OUTOBJ) ++ $(CC) $(FLAGS) -DAUTHONLY -DIPV6 -o askmara askmara.c $(OBJECTS) $(Q) $(OUTOBJ) + + askmara-tcp: askmara-tcp.c askmara_labels_en.h $(OBJECTS) $(ROBJECTS) $(POBJECTS) + $(CC) $(FLAGS) -o askmara-tcp askmara-tcp.c $(OBJECTS) $(ROBJECTS) $(POBJECTS) diff --git a/dns/maradns/files/patch-tools_duende.c b/dns/maradns/files/patch-tools_duende.c deleted file mode 100644 index eed161e2ce14..000000000000 --- a/dns/maradns/files/patch-tools_duende.c +++ /dev/null @@ -1,77 +0,0 @@ ---- tools/duende.c.orig 2008-08-03 20:10:49.000000000 +0200 -+++ tools/duende.c 2010-09-30 01:46:03.000000000 +0200 -@@ -35,10 +35,13 @@ - #include <signal.h> - #include <stdio.h> - #include <stdlib.h> -+#include <string.h> - #include <syslog.h> -+#include <sys/param.h> - #include <sys/time.h> - #include <sys/types.h> - #include <sys/wait.h> -+#include <libutil.h> - #include <unistd.h> - #include "../MaraDns.h" - -@@ -61,13 +64,24 @@ - - void log_helper(char *name,int stdout_fd) { - char out_buf[1024]; -+ -+ /* Prefix MaraDNS syslog messages with ident of "maradns:" -+ instead of "/usr/local/sbin/maradns:" */ -+ char *needle, *ident; -+ needle = strrchr(name,'/'); -+ /* needle found and not at the end of string */ -+ if (needle && *(needle + 1) != '\0') { -+ ident = needle + 1; -+ } else { -+ ident = name; -+ } - - /* We can't use our signal handlers because fgets is blocking */ - signal(SIGTERM,SIG_DFL); - signal(SIGHUP,SIG_DFL); - - /* Open up the sys log */ -- openlog(name,0,LOG_DAEMON); -+ openlog(ident,0,LOG_DAEMON); - - /* Drop all privileges */ - if(chdir(DUENDE_CHROOT_DIR) != 0) { -@@ -146,6 +160,10 @@ - int exit_status; - pid_t pid, log_pid; - int stream1[2]; /* Used for piping */ -+ struct pidfh *pfh; -+ char *name; -+ char *pidfile; -+ - if(argv[0] == NULL || argv[1] == NULL) { - printf("Usage: duende [program] [arguments]\n"); - exit(1); -@@ -210,6 +228,23 @@ - syslog(LOG_ALERT,"log_helper finished, terminating\n"); - exit(1); - } -+ name = strrchr(argv[1], '/'); -+ if (name && *name != '\0') { -+ pidfile = malloc(strlen("/var/run/") + strlen(name) + strlen(".pid") + 1); -+ if (pidfile) { -+ strcpy(pidfile, "/var/run/"); -+ strcat(pidfile, name); -+ strcat(pidfile, ".pid"); -+ remove(pidfile); -+ pfh = pidfile_open(pidfile, 0600, &pid); -+ if (pfh) { -+ pidfile_write(pfh); -+ pidfile_close(pfh); -+ } -+ free(pidfile); -+ } -+ } -+ - for(;;) { - /* If we got a HUP signal, send it to the child */ - if(got_hup_signal == 1) { diff --git a/dns/maradns/files/zoneserver.in b/dns/maradns/files/zoneserver.in index 40614d213081..95a26bf98da2 100644 --- a/dns/maradns/files/zoneserver.in +++ b/dns/maradns/files/zoneserver.in @@ -12,13 +12,13 @@ . /etc/rc.subr : ${zoneserver_enable="NO"} -: ${maradns_conf="%%PREFIX%%/etc/mararc"} +: ${maradns_conf="%%ETCDIR%%/mararc"} name="zoneserver" rcvar=zoneserver_enable command="%%PREFIX%%/bin/duende" -command_args="%%PREFIX%%/sbin/zoneserver -f ${maradns_conf}" pidfile="/var/run/${name}.pid" +command_args="--pid=${pidfile} %%PREFIX%%/sbin/zoneserver -f ${maradns_conf}" load_rc_config $name |