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