logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 6c200af7986812602e94fd8ef7429277f1c32915
parent 45cb29c7061f720724965d39a3dc6711505b7f8a
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 13 Oct 2017 23:28:32 -0700

Add nsd 4.1.17

Diffstat:

MREADME.md1+
Mpkg/gen.lua1+
Apkg/nsd/.gitignore2++
Apkg/nsd/README.md20++++++++++++++++++++
Apkg/nsd/config.h368+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/nsd/gen.lua71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/nsd/patch/0001-Fix-writev-compile-warning-on-FreeBSD.patch54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/nsd/patch/0002-Fix-1567-Change-crit-to-err-log-level-for-gettimeofd.patch39+++++++++++++++++++++++++++++++++++++++
Apkg/nsd/patch/0003-Fix-1567-Add-defines-for-compile-without-syslog.patch54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/nsd/patch/0004-Remove-quotes-from-dbfile-in-man-pages.patch57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/nsd/rev1+
Apkg/nsd/sha2561+
Apkg/nsd/url1+
Msets.lua1+
14 files changed, 671 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -14,6 +14,7 @@ a solution for many common tasks: * Document viewer (mupdf) * Media player (mpv) * HTTP server (nginx) +* DNS server (nsd) * BitTorrent client (transmission) The entire system can be compiled in minutes, and uses up up only a couple diff --git a/pkg/gen.lua b/pkg/gen.lua @@ -59,6 +59,7 @@ subgen 'nasm' subgen 'ncurses' subgen 'netsurf' subgen 'nginx' +subgen 'nsd' subgen 'openbsd' subgen 'openntpd' subgen 'openssh' diff --git a/pkg/nsd/.gitignore b/pkg/nsd/.gitignore @@ -0,0 +1,2 @@ +/nsd-4.1.17.tar.gz +/src diff --git a/pkg/nsd/README.md b/pkg/nsd/README.md @@ -0,0 +1,20 @@ +# nsd +nsd is an authoritative name server. + +## config.h +Generated with + + ./configure \ + --prefix= \ + --sbindir=/bin \ + --with-zonesdir=/etc/nsd/zone \ + --with-pidfile=/run/nsd.pid \ + --without-ssl \ + --without-libevent \ + CPPFLAGS=-I/src/oasis/pkg/openbsd/include \ + LIBS=/src/oasis/out/pkg/openbsd/libbsd.a + +`HAVE_SYSLOG_H` was changed to false since we handle logging from stdout with +perp and tinylog. `HAVE_B64_NTOP` and `HAVE_B64_PTON` were changed to false so +that `config.h` will declare their prototypes since they are used without +including `resolv.h`. diff --git a/pkg/nsd/config.h b/pkg/nsd/config.h @@ -0,0 +1,368 @@ +#define BIND8_STATS /**/ +/* #undef CHROOTDIR */ +#define CONFIGDIR "/etc/nsd" +#define CONFIGFILE "/etc/nsd/nsd.conf" +/* #undef DARWIN_BROKEN_SETREUID */ +#define DBFILE "/var/db/nsd/nsd.db" +#define EDNS_MAX_MESSAGE_LEN 4096 +#define FACILITY LOG_DAEMON +#define HAVE_ALARM 1 +/* #undef HAVE_ARC4RANDOM */ +/* #undef HAVE_ARC4RANDOM_UNIFORM */ +#define HAVE_ARPA_INET_H 1 +#define HAVE_ATTR_FORMAT 1 +#define HAVE_ATTR_UNUSED 1 +/* #undef HAVE_B64_NTOP */ +/* #undef HAVE_B64_PTON */ +#define HAVE_BASENAME 1 +#define HAVE_CHOWN 1 +#define HAVE_CHROOT 1 +#define HAVE_CLOCK_GETTIME 1 +#define HAVE_CTIME_R_PROTO 1 +#define HAVE_DUP2 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_ENDPWENT 1 +/* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */ +/* #undef HAVE_EVENT_BASE_FREE */ +/* #undef HAVE_EVENT_BASE_GET_METHOD */ +/* #undef HAVE_EVENT_BASE_NEW */ +/* #undef HAVE_EVENT_BASE_ONCE */ +/* #undef HAVE_EVENT_H */ +/* #undef HAVE_EVP_CLEANUP */ +/* #undef HAVE_EV_DEFAULT_LOOP */ +/* #undef HAVE_EV_LOOP */ +#define HAVE_FCNTL_H 1 +#define HAVE_FORK 1 +#define HAVE_FREEADDRINFO 1 +#define HAVE_FSEEKO 1 +#define HAVE_GAI_STRERROR 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_GETNAMEINFO 1 +#define HAVE_GETPWNAM 1 +#define HAVE_GLOB 1 +#define HAVE_GLOB_H 1 +#define HAVE_GRP_H 1 +/* #undef HAVE_HMAC_CTX_NEW */ +/* #undef HAVE_HMAC_CTX_RESET */ +#define HAVE_INET_ATON 1 +#define HAVE_INET_NTOP 1 +#define HAVE_INET_PTON 1 +#define HAVE_INITGROUPS 1 +#define HAVE_INTTYPES_H 1 +/* #undef HAVE_LIBCRYPTO */ +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALTIME_R 1 +#define HAVE_MALLOC 1 +#define HAVE_MEMCPY 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MEMSET 1 +#define HAVE_MMAP 1 +/* #undef HAVE_MUNMAP */ +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +/* #undef HAVE_OPENSSL_ERR_H */ +/* #undef HAVE_OPENSSL_INIT_CRYPTO */ +/* #undef HAVE_OPENSSL_INIT_SSL */ +/* #undef HAVE_OPENSSL_RAND_H */ +/* #undef HAVE_OPENSSL_SSL_H */ +#define HAVE_PPOLL 1 +#define HAVE_PSELECT 1 +#define HAVE_PSELECT_PROTO 1 +#define HAVE_PWRITE 1 +#define HAVE_REALLOCARRAY 1 +/* #undef HAVE_RECVMMSG */ +/* #undef HAVE_SENDMMSG */ +#define HAVE_SETREGID 1 +#define HAVE_SETRESGID 1 +#define HAVE_SETRESUID 1 +#define HAVE_SETREUID 1 +/* #undef HAVE_SETUSERCONTEXT */ +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SIGPROCMASK 1 +#define HAVE_SNPRINTF 1 +#define HAVE_SOCKET 1 +/* #undef HAVE_SSL */ +#define HAVE_STDARG_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRCASECMP 1 +#define HAVE_STRCHR 1 +#define HAVE_STRDUP 1 +#define HAVE_STRERROR 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRLCPY 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_STRPTIME 1 +#define HAVE_STRTOL 1 +/* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */ +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#define HAVE_STRUCT_TIMESPEC 1 +/* #undef HAVE_SYSLOG_H */ +/* #undef HAVE_SYS_BITYPES_H */ +/* #undef HAVE_SYS_MMAN_H */ +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_WAIT_H 1 +/* #undef HAVE_TCPD_H */ +#define HAVE_TIME_H 1 +#define HAVE_TZSET 1 +#define HAVE_UNISTD_H 1 +/* #undef HAVE_VA_LIST_DOUBLE_DEF */ +#define HAVE_VFORK 1 +/* #undef HAVE_VFORK_H */ +#define HAVE_WORKING_FORK 1 +#define HAVE_WORKING_VFORK 1 +#define HAVE_WRITEV 1 +#define IDENTITY "unidentified server" +#define INET6 /**/ +/* #undef LEX_DEFINES_YY_CURRENT_BUFFER */ +#define MAXSYSLOGMSGLEN 512 +/* #undef MEMCMP_IS_BROKEN */ +#define MINIMAL_RESPONSES /**/ +/* #undef MKDIR_HAS_ONE_ARG */ +#define NDEBUG /**/ +/* #undef NONBLOCKING_IS_BROKEN */ +#define NSD_CONTROL_PORT 8952 +#define NSD_CONTROL_VERSION 1 +#define NSD_START_PATH "/bin/nsd" +/* #undef NSEC3 */ +#define PACKAGE_BUGREPORT "nsd-bugs@nlnetlabs.nl" +#define PACKAGE_NAME "NSD" +#define PACKAGE_STRING "NSD 4.1.17" +#define PACKAGE_TARNAME "nsd" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "4.1.17" +#define PIDFILE "/run/nsd.pid" +/* #undef RATELIMIT */ +/* #undef RATELIMIT_DEFAULT_OFF */ +#define RETSIGTYPE void +/* #undef ROOT_SERVER */ +#define SIZEOF_OFF_T 8 +#define SIZEOF_VOIDP 8 +#define STDC_HEADERS 1 +/* #undef STRPTIME_NEEDS_DEFINES */ +#define STRPTIME_WORKS 1 +#define TCP_BACKLOG 256 +#define TCP_MAX_MESSAGE_LEN 65535 +#define TCP_PORT "53" +#define TCP_TIMEOUT 120 +#define UDP_MAX_MESSAGE_LEN 512 +#define UDP_PORT "53" +#define USER "nsd" +#define USE_MINI_EVENT 1 +/* #undef USE_MMAP_ALLOC */ +#define USE_RADIX_TREE /**/ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* #undef USE_ZONE_STATS */ +#define VERSION PACKAGE_STRING +#define XFRDFILE "/var/db/nsd/xfrd.state" +#define XFRDIR "/tmp" +/* #undef YYTEXT_POINTER */ +#define ZONELISTFILE "/var/db/nsd/zone.list" +#define ZONESDIR "/etc/nsd/zone" +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif +/* #undef _FILE_OFFSET_BITS */ +/* #undef _LARGEFILE_SOURCE */ +/* #undef _LARGE_FILES */ +/* #undef _MINIX */ +/* #undef _NETBSD_SOURCE */ +/* #undef _POSIX_1_SOURCE */ +/* #undef _POSIX_SOURCE */ +/* #undef const */ +/* #undef gid_t */ +/* #undef in_addr_t */ +#ifndef __cplusplus +/* #undef inline */ +#endif +/* #undef int16_t */ +/* #undef int32_t */ +/* #undef int64_t */ +/* #undef int8_t */ +/* #undef malloc */ +/* #undef off_t */ +/* #undef pid_t */ +/* #undef sig_atomic_t */ +/* #undef size_t */ +/* #undef socklen_t */ +/* #undef ss_family */ +/* #undef ssize_t */ +/* #undef suseconds_t */ +/* #undef uid_t */ +/* #undef uint16_t */ +/* #undef uint32_t */ +/* #undef uint64_t */ +/* #undef uint8_t */ +/* #undef uintptr_t */ +/* #undef vfork */ +#if (defined(HAVE_PSELECT) && !defined (HAVE_PSELECT_PROTO)) \ + || !defined (HAVE_CTIME_R_PROTO) \ + || defined (STRPTIME_NEEDS_DEFINES) +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 +# endif +# ifndef _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200112 +# endif +# ifndef _BSD_SOURCE +# define _BSD_SOURCE 1 +# endif +# ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE 1 +# endif +# ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +# endif +# ifndef _STDC_C99 +# define _STDC_C99 1 +# endif +# ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +# endif +#endif +#ifdef HAVE_VA_LIST_DOUBLE_DEF +# ifndef _VA_LIST_DEFINED +# define _VA_LIST_DEFINED +# endif +#endif +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +#ifdef HAVE_TIME_H +#include <time.h> +#endif +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_NETINET_TCP_H +#include <netinet/tcp.h> +#endif +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif +#ifdef HAVE_SYS_BITYPES_H +#include <sys/bitypes.h> +#endif +#ifdef HAVE_ATTR_FORMAT +#define ATTR_FORMAT(archetype, string_index, first_to_check) \ + __attribute__ ((format (archetype, string_index, first_to_check))) +#else /* !HAVE_ATTR_FORMAT */ +#define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ +#endif /* !HAVE_ATTR_FORMAT */ +#if defined(__cplusplus) +#define ATTR_UNUSED(x) +#elif defined(HAVE_ATTR_UNUSED) +#define ATTR_UNUSED(x) x __attribute__((unused)) +#else /* !HAVE_ATTR_UNUSED */ +#define ATTR_UNUSED(x) x +#endif /* !HAVE_ATTR_UNUSED */ +#ifndef IPV6_MIN_MTU +#define IPV6_MIN_MTU 1280 +#endif /* IPV6_MIN_MTU */ +#ifndef AF_INET6 +#define AF_INET6 28 +#endif /* AF_INET6 */ +#define MAXINCLUDES 10 +#ifndef HAVE_B64_NTOP +int b64_ntop(uint8_t const *src, size_t srclength, + char *target, size_t targsize); +#endif /* !HAVE_B64_NTOP */ +#ifndef HAVE_B64_PTON +int b64_pton(char const *src, uint8_t *target, size_t targsize); +#endif /* !HAVE_B64_PTON */ +#ifndef HAVE_FSEEKO +#define fseeko fseek +#define ftello ftell +#endif /* HAVE_FSEEKO */ +#ifndef HAVE_SNPRINTF +#include <stdarg.h> +int snprintf (char *str, size_t count, const char *fmt, ...); +int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); +#endif /* HAVE_SNPRINTF */ +#ifndef HAVE_INET_PTON +int inet_pton(int af, const char* src, void* dst); +#endif /* HAVE_INET_PTON */ +#ifndef HAVE_INET_NTOP +const char *inet_ntop(int af, const void *src, char *dst, size_t size); +#endif +#ifndef HAVE_INET_ATON +int inet_aton(const char *cp, struct in_addr *addr); +#endif +#ifndef HAVE_MEMMOVE +void *memmove(void *dest, const void *src, size_t n); +#endif +#ifndef HAVE_STRLCAT +size_t strlcat(char *dst, const char *src, size_t siz); +#endif +#ifndef HAVE_STRLCPY +size_t strlcpy(char *dst, const char *src, size_t siz); +#endif +#ifndef HAVE_REALLOCARRAY +void* reallocarray(void *ptr, size_t nmemb, size_t size); +#endif +#ifndef HAVE_GETADDRINFO +#include "compat/fake-rfc2553.h" +#endif +#ifndef HAVE_STRPTIME +#define HAVE_STRPTIME 1 +char *strptime(const char *s, const char *format, struct tm *tm); +#endif +#ifndef STRPTIME_WORKS +#define STRPTIME_WORKS 1 +char *nsd_strptime(const char *s, const char *format, struct tm *tm); +#define strptime(a,b,c) nsd_strptime((a),(b),(c)) +#endif +#ifdef MEMCMP_IS_BROKEN +#include "compat/memcmp.h" +#define memcmp memcmp_nsd +int memcmp(const void *x, const void *y, size_t n); +#endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 256 +#endif +#ifndef CONFIG_DEFINES +#define CONFIG_DEFINES +#ifndef HAVE_STRUCT_TIMESPEC +#ifndef __timespec_defined +#define __timespec_defined 1 + struct timespec { + long tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ + }; +#endif /* !__timespec_defined */ +#endif /* !HAVE_STRUCT_TIMESPEC */ +#endif /* !CONFIG_DEFINES */ diff --git a/pkg/nsd/gen.lua b/pkg/nsd/gen.lua @@ -0,0 +1,71 @@ +cflags{ + '-Wall', + '-I $dir', + '-I pkg/openbsd/include', +} + +lib('libcommon.a', [[ + answer.c axfr.c buffer.c configlexer.c configparser.c dname.c dns.c + edns.c iterated_hash.c lookup3.c namedb.c nsec3.c options.c packet.c + query.c rbtree.c radtree.c rdata.c region-allocator.c rrl.c tsig.c + tsig-openssl.c udb.c udbradtree.c udbzone.c util.c + $builddir/pkg/openbsd/libbsd.a +]]) + +lib('libnsd.a', [[ + dbaccess.c dbcreate.c difffile.c ipc.c mini_event.c netio.c server.c + zlexer.c zonec.c zparser.c + xfrd-disk.c xfrd-notify.c xfrd-tcp.c xfrd.c remote.c + libcommon.a.d +]]) + +exe('nsd', {'nsd.c', 'libnsd.a.d'}) +exe('nsd-checkconf', {'nsd-checkconf.c', 'libcommon.a.d'}) +exe('nsd-checkzone', {'nsd-checkzone.c', 'libnsd.a.d'}) + +local cfg = { + logfile='/var/log/nsd.log', -- just used for man page example + chrootdir='', + ratelimit_default='on', +} +table.insert(pkg.inputs.gen, '$dir/config.h') +for line in io.lines(pkg.dir..'/config.h') do + local var, val = line:match('^#define (%g+) "(%g+)"$') + if var then + cfg[var:lower()] = val + elseif line:find('^#define RATELIMIT') then + cfg.ratelimit = 'on' + elseif line:find('^#define RATELIMIT_DEFAULT_OFF') then + cfg.ratelimit_default = 'off' + end +end +local subst = { + '-e s,@configdir@,'..cfg.configdir..',g', + '-e s,@zonesdir@,'..cfg.zonesdir..',g', + '-e s,@chrootdir@,'..cfg.chrootdir..',g', + '-e s,@pidfile@,'..cfg.pidfile..',g', + '-e s,@logfile@,'..cfg.logfile..',g', + '-e s,@dbfile@,'..cfg.dbfile..',g', + '-e s,@xfrdir@,'..cfg.xfrdir..',g', + '-e s,@xfrdfile@,'..cfg.xfrdfile..',g', + '-e s,@zonelistfile@,'..cfg.zonelistfile..',g', + '-e s,@nsdconfigfile@,'..cfg.configfile..',g', + '-e s,@ratelimit_default@,'..cfg.ratelimit_default..',g', + '-e s,@user@,'..cfg.user..',g', +} +if not cfg.ratelimit then + table.insert(subst, '-e /rrlstart/,/rrlend/d') +end +set('subst', subst) +local function substman(file) + build('sed', '$outdir/'..file, '$srcdir/'..file..'.in', {expr='$subst'}) + man{'$outdir/'..file} +end + +for _, cmd in ipairs{'nsd', 'nsd-checkconf', 'nsd-checkzone'} do + file('bin/'..cmd, '755', '$outdir/'..cmd) + substman(cmd..'.8') +end +substman('nsd.conf.5') + +fetch 'curl' diff --git a/pkg/nsd/patch/0001-Fix-writev-compile-warning-on-FreeBSD.patch b/pkg/nsd/patch/0001-Fix-writev-compile-warning-on-FreeBSD.patch @@ -0,0 +1,54 @@ +From 5e22412c42c546a1e3c5e44adb93ac5e4088419a Mon Sep 17 00:00:00 2001 +From: wouter <wouter@a26ef69c-88ff-0310-839f-98b793d9c207> +Date: Tue, 29 Aug 2017 12:42:20 +0000 +Subject: [PATCH] - Fix writev compile warning on FreeBSD. + +git-svn-id: https://www.nlnetlabs.nl/svn/nsd/trunk@4773 a26ef69c-88ff-0310-839f-98b793d9c207 +--- + doc/ChangeLog | 3 +++ + doc/RELNOTES | 6 ++++++ + xfrd-tcp.c | 1 + + 3 files changed, 10 insertions(+) + +diff --git a/doc/ChangeLog b/doc/ChangeLog +index ff6d1347..6e52fff4 100644 +--- a/doc/ChangeLog ++++ b/doc/ChangeLog +@@ -1,3 +1,6 @@ ++29 August 2016: Wouter ++ - Fix writev compile warning on FreeBSD. ++ + 29 June 2016: Wouter + - make depend. + +diff --git a/doc/RELNOTES b/doc/RELNOTES +index 752c468c..c72ed6f8 100644 +--- a/doc/RELNOTES ++++ b/doc/RELNOTES +@@ -1,5 +1,11 @@ + NSD RELEASE NOTES + ++4.1.18 (upcoming) ++================ ++BUG FIXES: ++ - Fix writev compile warning on FreeBSD. ++ ++ + 4.1.17 + ================ + FEATURES: +diff --git a/xfrd-tcp.c b/xfrd-tcp.c +index 27156894..167cf1c7 100644 +--- a/xfrd-tcp.c ++++ b/xfrd-tcp.c +@@ -13,6 +13,7 @@ + #include <fcntl.h> + #include <unistd.h> + #include <stdlib.h> ++#include <sys/uio.h> + #include "nsd.h" + #include "xfrd-tcp.h" + #include "buffer.h" +-- +2.14.2 + diff --git a/pkg/nsd/patch/0002-Fix-1567-Change-crit-to-err-log-level-for-gettimeofd.patch b/pkg/nsd/patch/0002-Fix-1567-Change-crit-to-err-log-level-for-gettimeofd.patch @@ -0,0 +1,39 @@ +From 685eeb1ab71422ce4151dbd803674b33115a1fb3 Mon Sep 17 00:00:00 2001 +From: wouter <wouter@a26ef69c-88ff-0310-839f-98b793d9c207> +Date: Wed, 11 Oct 2017 06:44:50 +0000 +Subject: [PATCH] - Fix #1567: Change crit to err log level for gettimeofday + failure. + +git-svn-id: https://www.nlnetlabs.nl/svn/nsd/trunk@4786 a26ef69c-88ff-0310-839f-98b793d9c207 +--- + doc/ChangeLog | 3 +++ + netio.c | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/doc/ChangeLog b/doc/ChangeLog +index 6e52fff4..f58c71ac 100644 +--- a/doc/ChangeLog ++++ b/doc/ChangeLog +@@ -1,3 +1,6 @@ ++11 October 2016: Wouter ++ - Fix #1567: Change crit to err log level for gettimeofday failure. ++ + 29 August 2016: Wouter + - Fix writev compile warning on FreeBSD. + +diff --git a/netio.c b/netio.c +index 6c4b395b..58fd2e18 100644 +--- a/netio.c ++++ b/netio.c +@@ -94,7 +94,7 @@ netio_current_time(netio_type *netio) + if (!netio->have_current_time) { + struct timeval current_timeval; + if (gettimeofday(&current_timeval, NULL) == -1) { +- log_msg(LOG_CRIT, "gettimeofday: %s, aborting.", strerror(errno)); ++ log_msg(LOG_ERR, "gettimeofday: %s, aborting.", strerror(errno)); + abort(); + } + timeval_to_timespec(&netio->cached_current_time, &current_timeval); +-- +2.14.2 + diff --git a/pkg/nsd/patch/0003-Fix-1567-Add-defines-for-compile-without-syslog.patch b/pkg/nsd/patch/0003-Fix-1567-Add-defines-for-compile-without-syslog.patch @@ -0,0 +1,54 @@ +From 3bd8d49884860c41341565d19541b165265b0d75 Mon Sep 17 00:00:00 2001 +From: wouter <wouter@a26ef69c-88ff-0310-839f-98b793d9c207> +Date: Wed, 11 Oct 2017 06:47:42 +0000 +Subject: [PATCH] - Fix #1567: Add defines for compile without syslog. + +git-svn-id: https://www.nlnetlabs.nl/svn/nsd/trunk@4787 a26ef69c-88ff-0310-839f-98b793d9c207 +--- + doc/ChangeLog | 1 + + doc/RELNOTES | 2 ++ + util.h | 4 ++++ + 3 files changed, 7 insertions(+) + +diff --git a/doc/ChangeLog b/doc/ChangeLog +index f58c71ac..5d6585a9 100644 +--- a/doc/ChangeLog ++++ b/doc/ChangeLog +@@ -1,5 +1,6 @@ + 11 October 2016: Wouter + - Fix #1567: Change crit to err log level for gettimeofday failure. ++ Add defines for compile without syslog. + + 29 August 2016: Wouter + - Fix writev compile warning on FreeBSD. +diff --git a/doc/RELNOTES b/doc/RELNOTES +index c72ed6f8..4f052745 100644 +--- a/doc/RELNOTES ++++ b/doc/RELNOTES +@@ -4,6 +4,8 @@ NSD RELEASE NOTES + ================ + BUG FIXES: + - Fix writev compile warning on FreeBSD. ++ - Fix #1567: Change crit to err log level for gettimeofday failure. ++ Add defines for compile without syslog. + + + 4.1.17 +diff --git a/util.h b/util.h +index b59b7b69..5f00911d 100644 +--- a/util.h ++++ b/util.h +@@ -25,6 +25,10 @@ struct region; + # define LOG_WARNING 4 + # define LOG_NOTICE 5 + # define LOG_INFO 6 ++ ++/* Unused, but passed to log_open. */ ++# define LOG_PID 0x01 ++# define LOG_DAEMON (3<<3) + #endif + + #define ALIGN_UP(n, alignment) \ +-- +2.14.2 + diff --git a/pkg/nsd/patch/0004-Remove-quotes-from-dbfile-in-man-pages.patch b/pkg/nsd/patch/0004-Remove-quotes-from-dbfile-in-man-pages.patch @@ -0,0 +1,57 @@ +From 82f72d52236a5642f95b52fb1ed10b16b756eb82 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 14 Oct 2017 01:00:22 -0700 +Subject: [PATCH] Remove quotes from @dbfile@ in man pages + +--- + nsd.8.in | 4 ++-- + nsd.conf.5.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/nsd.8.in b/nsd.8.in +index 5e488958..babaa06a 100644 +--- a/nsd.8.in ++++ b/nsd.8.in +@@ -115,7 +115,7 @@ Do not fork, stay in the foreground. + Use the specified + .I database + instead of the default of +-.IR '@dbfile@' . ++.IR @dbfile@ . + If a + .B zonesdir: + is specified in the config file this path can be relative to that +@@ -224,7 +224,7 @@ SIGUSR1 + Dump BIND8\-style statistics into the log. Ignored otherwise. + .SH "FILES" + .TP +-"@dbfile@" ++@dbfile@ + default + .B NSD + database +diff --git a/nsd.conf.5.in b/nsd.conf.5.in +index b9ac956b..4f7c9867 100644 +--- a/nsd.conf.5.in ++++ b/nsd.conf.5.in +@@ -197,7 +197,7 @@ If yes, NSD listens to IPv6 connections. Default yes. + .TP + .B database:\fR <filename> + By default +-.I '@dbfile@' ++.I @dbfile@ + is used. The specified file is used to store the compiled + zone information. Same as commandline option + .BR \-f. +@@ -858,7 +858,7 @@ also function as a resolver or cache. The configuration options that + BIND9 has for the resolver or caching thus have no equivalents for NSD. + .SH "FILES" + .TP +-"@dbfile@" ++@dbfile@ + default + .B NSD + database +-- +2.14.2 + diff --git a/pkg/nsd/rev b/pkg/nsd/rev @@ -0,0 +1 @@ +1 diff --git a/pkg/nsd/sha256 b/pkg/nsd/sha256 @@ -0,0 +1 @@ +107fa506d18ed6fd0a922d1b96774afd9270ec38ec6b17cd7c46fb9433a03a6c nsd-4.1.17.tar.gz diff --git a/pkg/nsd/url b/pkg/nsd/url @@ -0,0 +1 @@ +url = "https://www.nlnetlabs.nl/downloads/nsd/nsd-4.1.17.tar.gz" diff --git a/sets.lua b/sets.lua @@ -58,6 +58,7 @@ return { 'ii', 'msmtp', 'nginx', + 'nsd', 'sshfs', 'transmission', },