Ravenports generated: 06 Mar 2021 03:49
[ravenports.git] / bucket_16 / nsd
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               nsd
4 VERSION=                4.3.5
5 KEYWORDS=               dns
6 VARIANTS=               standard
7 SDESC[standard]=        Fast and lean authoritative DNS Name Server
8 HOMEPAGE=               https://www.nlnetlabs.nl/projects/nsd/about/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            http://www.nlnetlabs.nl/downloads/nsd/
13 DISTFILE[1]=            nsd-4.3.5.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         docs
18
19 OPTIONS_AVAILABLE=      ROOT_SERVER CHECKING MMAP PACKED
20 OPTIONS_STANDARD=       ROOT_SERVER CHECKING MMAP PACKED
21
22 BUILDRUN_DEPENDS=       libevent:single:standard
23
24 USERS=                  nsd
25 GROUPS=                 nsd
26 USERGROUP_SPKG=         primary
27
28 USES=                   cpe ssl
29
30 LICENSE=                BSD3CLAUSE:primary
31 LICENSE_FILE=           BSD3CLAUSE:{{WRKSRC}}/LICENSE
32 LICENSE_SCHEME=         solo
33
34 CPE_VENDOR=             nlnetlabs
35 FPC_EQUIVALENT=         dns/nsd
36
37 MUST_CONFIGURE=         gnu
38 CONFIGURE_ARGS=         --with-libevent="{{LOCALBASE}}"
39                         --with-user=nsd
40                         --with-configdir="{{PREFIX}}/etc/nsd"
41                         --localstatedir=/var
42                         --with-dbfile=/var/db/nsd/nsd.db
43                         --with-ssl="{{OPENSSLBASE}}"
44                         --with-pidfile=/var/run/nsd/nsd.pid
45                         --enable-largefile
46                         --enable-nsec3
47                         --enable-minimal-responses
48                         --enable-ratelimit
49                         --enable-radix-tree
50                         --enable-bind8-stats
51                         --enable-zone-stats
52                         --enable-ipv6
53
54 RC_SUBR=                nsd:primary
55
56 [ROOT_SERVER].DESCRIPTION=              Configure as a root server
57 [ROOT_SERVER].CONFIGURE_ENABLE_BOTH=    root-server
58
59 [CHECKING].DESCRIPTION=                 Internal run-time checks
60 [CHECKING].CONFIGURE_ENABLE_BOTH=       checking
61
62 [MMAP].DESCRIPTION=                     Use mmap instead of malloc
63 [MMAP].CONFIGURE_ENABLE_BOTH=           mmap
64
65 [PACKED].DESCRIPTION=                   Use packed structures for reduced memory use
66 [PACKED].CONFIGURE_ENABLE_BOTH=         packed
67
68 post-install:
69         ${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \
70                 ${STAGEDIR}${PREFIX}/etc/nsd/nsd.conf.sample
71         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/nsd \
72                 ${STAGEDIR}${PREFIX}/sbin/nsd-checkconf \
73                 ${STAGEDIR}${PREFIX}/sbin/nsd-checkzone \
74                 ${STAGEDIR}${PREFIX}/sbin/nsd-control
75         # remove garbage
76         ${RMDIR} ${STAGEDIR}/tmp
77         # munin plugin
78         ${MKDIR} ${STAGEDIR}${PREFIX}/share/munin/plugins
79         ${REINPLACE_CMD} \
80                 -e 's|/usr/local|${LOCALBASE}|g' \
81                 -e 's|/usr/local/etc/nsd.conf|${ETCDIR}/nsd.conf|g' \
82                 -e 's|/usr/local/var/munin/plugin-state|/var/munin/plugin-state/root|g' \
83                 -e '90s|/var/munin/plugin-state/root|$${MUNIN_PLUGSTATE}|' \
84                 ${WRKSRC}/contrib/nsd_munin_
85         ${INSTALL_SCRIPT} ${WRKSRC}/contrib/nsd_munin_ \
86                 ${STAGEDIR}${PREFIX}/share/munin/plugins
87         # documentation
88         ${MKDIR} ${STAGEDIR}${STD_DOCDIR}
89         (cd ${WRKSRC}/doc && ${INSTALL_DATA} \
90           CREDITS ChangeLog LICENSE NSD-DATABASE NSD-DIFFFILE \
91           NSD-4-features NSD-FOR-BIND-USERS README README.icc \
92           RELNOTES REQUIREMENTS TESTPLAN TODO UPGRADING \
93           coding-style differences.tex \
94         ${STAGEDIR}${STD_DOCDIR})
95
96 [FILE:1216:descriptions/desc.primary]
97 The NLnet Labs Name Server Daemon (NSD) is an authoritative DNS name
98 server. It has been developed for operations in environments where speed,
99 reliability, stability and security are of high importance.
100
101 NSD has a pure design philosophy that prioritises raw performance. This
102 means that if you serve hundreds of thousands or even millions of queries
103 per second, NSD is the leading implementation in the world. This makes the
104 name server ideally suited for Top Level Domain implementations, DNS Root
105 servers and anyone in need of a fast and optimised authoritative name
106 server. Currently, three DNS root servers and many top-level domain
107 registries use NSD as part of their server implementation. NSD has not
108 implemented recursive caching by design. If you need a validating,
109 recursive, caching resolver then NLnet Labs has Unbound available.
110
111 NSD strives to be a reference implementation for emerging standards of the
112 Internet Engineering Task Force (IETF). The aim is to implement
113 well-established Internet Drafts as a compile option and drafts in the
114 final stage of open community review as an optional feature that is
115 disabled by default. Accepted RFCs are implemented in NSD according to the
116 described standard.
117
118
119 [FILE:95:distinfo]
120 7da2b43e30b3d7f307722c608f719bfb169f0d985c764a34fa0669dc33484472      1184220 nsd-4.3.5.tar.gz
121
122
123 [FILE:391:manifests/plist.primary]
124 @sample etc/nsd/nsd.conf.sample
125 sbin/
126  nsd
127  nsd-checkconf
128  nsd-checkzone
129  nsd-control
130  nsd-control-setup
131 share/man/man5/nsd.conf.5.gz
132 share/man/man8/
133  nsd-checkconf.8.gz
134  nsd-checkzone.8.gz
135  nsd-control.8.gz
136  nsd.8.gz
137 share/munin/plugins/nsd_munin_
138 @dir(nsd,nsd,0755) /var/db/nsd
139 @dir(nsd,nsd,0755) /var/run/nsd
140 @postexec chown -R nsd:nsd /var/db/nsd
141 @postexec chown -R nsd:nsd /var/run/nsd
142
143
144 [FILE:210:manifests/plist.docs]
145 share/doc/nsd/
146  CREDITS
147  ChangeLog
148  LICENSE
149  NSD-4-features
150  NSD-DATABASE
151  NSD-DIFFFILE
152  NSD-FOR-BIND-USERS
153  README
154  README.icc
155  RELNOTES
156  REQUIREMENTS
157  TESTPLAN
158  TODO
159  UPGRADING
160  coding-style
161  differences.tex
162
163
164 [FILE:350:patches/patch-nsd-control.c]
165 --- nsd-control.c.orig  2021-01-26 08:03:11 UTC
166 +++ nsd-control.c
167 @@ -71,6 +71,10 @@ static void ssl_path_err(const char* s,
168  /** timeout to wait for connection over stream, in msec */
169  #define NSD_CONTROL_CONNECT_TIMEOUT 5000
170  
171 +#ifndef AF_LOCAL
172 +#define AF_LOCAL AF_UNIX
173 +#endif
174 +
175  /** Give nsd-control usage, and exit (1). */
176  static void
177  usage()
178
179
180 [FILE:274:patches/patch-remote.c]
181 --- remote.c.orig       2021-01-26 08:03:11 UTC
182 +++ remote.c
183 @@ -92,6 +92,10 @@
184  #  include <sys/un.h>
185  #endif
186  
187 +#ifndef AF_LOCAL
188 +#define AF_LOCAL AF_UNIX
189 +#endif
190 +
191  /** number of seconds timeout on incoming remote control handshake */
192  #define REMOTE_CONTROL_TCP_TIMEOUT 120
193  
194
195
196 [FILE:2555:files/nsd.in]
197 #!/bin/sh
198 #
199 # PROVIDE: nsd
200 # REQUIRE: DAEMON
201 # REQUIRE: LOGIN
202 # KEYWORD: shutdown
203 #
204 # Add the following line to /etc/rc.conf to enable nsd:
205 #
206 # nsd_enable="YES"
207 #
208 # You could set alternative config with
209 #
210 # nsd_config="/path/to/config"
211 #
212 # Multiple profiles are supported with
213 #
214 # nsd_profiles="name1 name2"
215 # nsd_name1_enable="YES"
216 # nsd_name1_config="/path/to/config1"
217 # nsd_name2_enable="YES"
218 # nsd_name2_config="/path/to/config2"
219 #
220
221 . /etc/rc.subr
222
223 name=nsd
224 rcvar=nsd_enable
225
226 # read settings, set default values
227 load_rc_config "${name}"
228 : ${nsd_enable:="NO"}
229 : ${nsd_config:=%%ETCDIR%%/nsd.conf}
230
231 # Set PID file
232 _pidprefix=/var/run/${name}
233 _cfgpidfile=$(%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile ${nsd_config})
234 pidfile=${_cfgpidfile:-${_pidprefix}.pid}
235
236 required_files=${nsd_config}
237 command="%%PREFIX%%/sbin/${name}"
238 command_args="-c ${nsd_config} -P ${pidfile}"
239 extra_commands="reload"
240
241 load_rc_config "${name}"
242
243 if [ -n "$2" ]; then
244         profile="$2"
245         if [ "x${nsd_profiles}" != "x" ]; then
246                 eval nsd_config="\${nsd_${profile}_config:-%%ETCDIR%%/nsd-${profile}.conf}"
247                 if [ "x${nsd_config}" = "x" ]; then
248                         echo "You must define a configuration file (nsd_${profile}_config)"
249                         exit 1
250                 fi
251                 _cfgpidfile=$(%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile ${nsd_config})
252                 _defaultpidfile=$(%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile /dev/null)
253                 # Replace empty or default value with profile-based
254                 if [ "x${_cfgpidfile}" = "x" -o "x${_cfgpidfile}" = "x${_defaultpidfile}" ] ; then 
255                         pidfile=${_pidprefix}-${profile}.pid
256                 else
257                         pidfile=${_cfgpidfile}
258                 fi
259                 required_files="${nsd_config}"
260                 eval nsd_enable="\${nsd_${profile}_enable:-${nsd_enable}}"
261                 command_args="-c ${nsd_config} -P ${pidfile}"
262         else
263                 echo "$0: extra argument ignored"
264         fi
265 else
266         if [ "x${nsd_profiles}" != "x" -a "x$1" != "x" ]; then
267                 for profile in ${nsd_profiles}; do
268                         eval _enable="\${nsd_${profile}_enable}"
269                         case "x${_enable:-${nsd_enable}}" in
270                         x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee])
271                                 continue
272                                 ;;
273                         x[Yy][Ee][Ss])
274                                 ;;
275                         *)
276                                 if test -z "$_enable"; then
277                                         _var=nsd_enable
278                                 else
279                                         _var=nsd_"${profile}"_enable
280                                 fi
281                                 echo "Bad value" \
282                                     "'${_enable:-${nsd_enable}}'" \
283                                     "for ${_var}. " \
284                                     "Profile ${profile} skipped."
285                                 continue
286                                 ;;
287                         esac
288                         echo "===> nsd profile: ${profile}"
289                         %%PREFIX%%/etc/rc.d/nsd $1 ${profile}
290                         retcode="$?"
291                         if [ "0${retcode}" -ne 0 ]; then
292                                 failed="${profile} (${retcode}) ${failed:-}"
293                         else
294                                 success="${profile} ${success:-}"
295                         fi
296                 done
297                 exit 0
298         fi
299 fi
300
301 run_rc_command "$1"
302