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